Skip to content

Commit 84ea24f

Browse files
authored
Update action.yml
1 parent c956c35 commit 84ea24f

1 file changed

Lines changed: 10 additions & 2 deletions

File tree

action.yml

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,27 +54,35 @@ runs:
5454
env:
5555
INPUT_SPOTBUGS_VERSION: ${{ inputs.spotbugs_version }}
5656
run: |
57+
cd /home/runner/work/
58+
mkdir -p 'spotbugs+'
59+
cd 'spotbugs+'
5760
wget -q https://github.com/spotbugs/spotbugs/releases/download/"${INPUT_SPOTBUGS_VERSION}"/spotbugs-"${INPUT_SPOTBUGS_VERSION}".tgz
5861
tar -xzf spotbugs-"${INPUT_SPOTBUGS_VERSION}".tgz
62+
chmod +x spotbugs-"${INPUT_SPOTBUGS_VERSION}"/bin/spotbugs
5963
echo "Got spotbugs-${INPUT_SPOTBUGS_VERSION}.tgz"
6064
shell: bash
6165
- name: Get FindSecBugs
6266
if: steps.cache-findsecbugs.outputs.cache-hit != 'true'
6367
env:
6468
INPUT_FINDSECBUGS_VERSION: ${{ inputs.findsecbugs_version }}
6569
run: |
70+
cd /home/runner/work/
71+
mkdir -p 'findsecbugs+'
72+
cd 'findsecbugs+'
6673
wget -q https://search.maven.org/remotecontent?filepath=com/h3xstream/findsecbugs/findsecbugs-plugin/"${INPUT_FINDSECBUGS_VERSION}"/findsecbugs-plugin-"${INPUT_FINDSECBUGS_VERSION}".jar
6774
echo "Got findsecbugs-plugin-${INPUT_FINDSECBUGS_VERSION}.jar"
6875
shell: bash
6976
- name: Run SpotBugs
7077
env:
71-
INPUT_SPOTBUGS_VERSION: ${{ inputs.spotbugs_version }}
7278
INPUT_FINDSECBUGS_VERSION: ${{ inputs.findsecbugs_version }}
7379
INPUT_SPOTBUGS_TARGET: ${{ inputs.spotbugs_target }}
80+
SPOTBUGS_HOME: /home/runner/work/spotbugs+/spotbugs-${{ inputs.spotbugs_version }}
81+
FINDSECBUGS_HOME: /home/runner/work/findsecbugs+/
7482
run: |
7583
find "${INPUT_SPOTBUGS_TARGET}" -type f -name "*.class"
7684
find "${INPUT_SPOTBUGS_TARGET}" -type f -name "*.jar"
77-
bash spotbugs-"${INPUT_SPOTBUGS_VERSION}"/bin/spotbugs -textui -quiet -effort:max -low -bugCategories SECURITY -pluginList findsecbugs-plugin-"${INPUT_FINDSECBUGS_VERSION}".jar -sarif=spotbugs.sarif "${INPUT_SPOTBUGS_TARGET}"
85+
"${SPOTBUGS_HOME}"/bin/spotbugs -textui -quiet -effort:max -low -bugCategories SECURITY -pluginList "${FINDSECBUGS_HOME}"/findsecbugs-plugin-"${INPUT_FINDSECBUGS_VERSION}".jar -sarif=spotbugs.sarif "${INPUT_SPOTBUGS_TARGET}"
7886
shell: bash
7987
- name: Upload SARIF file
8088
if: inputs.upload_sarif == 'true'

0 commit comments

Comments
 (0)