Skip to content

Commit 65a498d

Browse files
authored
Only analyze vulnerabilities if a gold standard is present
1 parent aca12b7 commit 65a498d

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

.github/workflows/reverse_engineering.yml

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,16 @@ jobs:
9494
echo "benchmark=$(yq eval '.benchmark // "false"' $CONFIG_FILE)" >> $GITHUB_ENV
9595
fi
9696
97+
- name: Check for gold standard
98+
if: ${{ needs.collect_info.outputs.latest_version != env.current_version || inputs.overrideBenchmark == 'true' || inputs.analyzeVulnerabilities == 'true' }}
99+
run: |
100+
# only analyze vulnerabilities if a gold standard is present
101+
if [ -d "benchmark/${{ matrix.directory }}/model_gs" ]; then
102+
echo "analyze_vulnerabilities=${{ github.event.inputs.analyzeVulnerabilities }}" >> $GITHUB_ENV
103+
else
104+
echo "analyze_vulnerabilities="false"" >> $GITHUB_ENV
105+
fi
106+
97107
- name: Checkout repositories
98108
if: ${{ needs.collect_info.outputs.latest_version != env.current_version || inputs.overrideBenchmark == 'true' || inputs.analyzeVulnerabilities == 'true' }}
99109
run: |
@@ -111,7 +121,7 @@ jobs:
111121
with:
112122
source_path: repo/${{ matrix.directory }}
113123
rules: ${{ env.rules }}
114-
analyze_vulnerabilities: ${{ github.event.inputs.analyzeVulnerabilities }}
124+
analyze_vulnerabilities: ${{ env.analyze_vulnerabilities }}
115125
snyk_token: ${{ secrets.SNYK_TOKEN }}
116126
nist_nvd_token: ${{ secrets.NVD_TOKEN }}
117127
benchmark: ${{ env.benchmark }}

0 commit comments

Comments
 (0)