Skip to content

Commit 133c68d

Browse files
authored
Update action.yml
1 parent eecdd4c commit 133c68d

1 file changed

Lines changed: 6 additions & 2 deletions

File tree

action.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,12 @@ inputs:
1616
required: false
1717
default: '1.12.0'
1818
spotbugs_target:
19-
description: 'The target to run SpotBugs against'
19+
description: 'The target directory to run SpotBugs against'
2020
required: false
2121
default: 'target/'
22+
spotbugs_filename_glob:
23+
description: 'The filenames to locate for SpotBugs, e.g. *.class, *.jar'
24+
default: '*.jar'
2225
upload_sarif:
2326
description: 'Whether to upload the SARIF file to GitHub Code Scanning'
2427
required: false
@@ -88,10 +91,11 @@ runs:
8891
env:
8992
INPUT_FINDSECBUGS_VERSION: ${{ inputs.findsecbugs_version }}
9093
INPUT_SPOTBUGS_TARGET: ${{ inputs.spotbugs_target }}
94+
INPUT_SPOTBUGS_GLOB: ${{ inputs.spotbugs_filename_glob }}
9195
SPOTBUGS_HOME: /home/runner/work/spotbugs+/spotbugs-${{ inputs.spotbugs_version }}
9296
FINDSECBUGS_HOME: /home/runner/work/findsecbugs+/
9397
run: |
94-
SPOTBUGS_FILES=$(find "${INPUT_SPOTBUGS_TARGET}" -type f -exec echo -n {} \+)
98+
SPOTBUGS_FILES=$(find "${INPUT_SPOTBUGS_TARGET}" -type f -name "${INPUT_SPOTBUGS_GLOB}" -exec echo -n {} \+)
9599
"${SPOTBUGS_HOME}/bin/spotbugs" -textui -quiet -effort:max -low -bugCategories SECURITY -pluginList "${FINDSECBUGS_HOME}/findsecbugs-plugin-${INPUT_FINDSECBUGS_VERSION}.jar" -sarif=spotbugs.sarif ${SPOTBUGS_FILES}
96100
shell: bash
97101
- name: Upload SARIF file

0 commit comments

Comments
 (0)