@@ -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
@@ -68,10 +71,11 @@ runs:
6871 cd /home/runner/work/
6972 mkdir -p 'spotbugs+'
7073 cd 'spotbugs+'
71- wget -q https://github.com/spotbugs/spotbugs/releases/download/" ${INPUT_SPOTBUGS_VERSION}" /spotbugs-" ${INPUT_SPOTBUGS_VERSION}" .tgz
74+ wget -q -O spotbugs-"${INPUT_SPOTBUGS_VERSION}".tgz " https://github.com/spotbugs/spotbugs/releases/download/${INPUT_SPOTBUGS_VERSION}/spotbugs-${INPUT_SPOTBUGS_VERSION}.tgz"
7275 tar -xzf spotbugs-"${INPUT_SPOTBUGS_VERSION}".tgz
7376 chmod +x spotbugs-"${INPUT_SPOTBUGS_VERSION}"/bin/spotbugs
74- echo "Got spotbugs-${INPUT_SPOTBUGS_VERSION}.tgz"
77+ ls "spotbugs-${INPUT_SPOTBUGS_VERSION}.tgz"
78+ echo "Got spotbugs"
7579 shell : bash
7680 - name : Get FindSecBugs
7781 if : inputs.no_cache == 'true' || steps.cache-findsecbugs.outputs.cache-hit != 'true'
@@ -81,18 +85,20 @@ runs:
8185 cd /home/runner/work/
8286 mkdir -p 'findsecbugs+'
8387 cd 'findsecbugs+'
84- wget -q https://search.maven.org/remotecontent?filepath=com/h3xstream/findsecbugs/findsecbugs-plugin/"${INPUT_FINDSECBUGS_VERSION}"/findsecbugs-plugin-"${INPUT_FINDSECBUGS_VERSION}".jar
85- echo "Got findsecbugs-plugin-${INPUT_FINDSECBUGS_VERSION}.jar"
88+ wget -q -O "findsecbugs-plugin-${INPUT_FINDSECBUGS_VERSION}.jar" "https://search.maven.org/remotecontent?filepath=com/h3xstream/findsecbugs/findsecbugs-plugin/${INPUT_FINDSECBUGS_VERSION}/findsecbugs-plugin-${INPUT_FINDSECBUGS_VERSION}.jar"
89+ ls "findsecbugs-plugin-${INPUT_FINDSECBUGS_VERSION}.jar"
90+ echo "Got findsecbugs"
8691 shell : bash
8792 - name : Run SpotBugs
8893 env :
8994 INPUT_FINDSECBUGS_VERSION : ${{ inputs.findsecbugs_version }}
9095 INPUT_SPOTBUGS_TARGET : ${{ inputs.spotbugs_target }}
96+ INPUT_SPOTBUGS_GLOB : ${{ inputs.spotbugs_filename_glob }}
9197 SPOTBUGS_HOME : /home/runner/work/spotbugs+/spotbugs-${{ inputs.spotbugs_version }}
9298 FINDSECBUGS_HOME : /home/runner/work/findsecbugs+/
9399 run : |
94- SPOTBUGS_FILES=$(find "${INPUT_SPOTBUGS_TARGET}" -type f -exec echo -n {} \+)
95- "${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}
100+ SPOTBUGS_FILES=$(find "${INPUT_SPOTBUGS_TARGET}" -type f -name "${INPUT_SPOTBUGS_GLOB}" - exec echo -n {} \+)
101+ "${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}
96102 shell : bash
97103 - name : Upload SARIF file
98104 if : inputs.upload_sarif == 'true'
0 commit comments