File tree Expand file tree Collapse file tree 2 files changed +12
-5
lines changed
Expand file tree Collapse file tree 2 files changed +12
-5
lines changed Original file line number Diff line number Diff line change 1414 steps :
1515 - name : Fix SARIF file paths
1616 shell : bash
17+ env :
18+ SARIF_FILE : ${{ inputs.sarif-file }}
19+ SCAN_PATH : ${{ inputs.scan-path }}
1720 run : |
18- SARIF_FILE="${{ inputs.sarif-file }}"
19- SCAN_PATH="${{ inputs.scan-path }}"
2021
2122 if [ ! -f "$SARIF_FILE" ]; then
2223 echo "::error::SARIF file not found: $SARIF_FILE"
Original file line number Diff line number Diff line change @@ -177,11 +177,17 @@ jobs:
177177 if : inputs.static-analysis
178178 env :
179179 SEMGREP_EXCLUDES : " --exclude=dist --exclude=build --exclude=coverage --exclude=__pycache__ --exclude=.venv --exclude=.cache --exclude=.pytest_cache --exclude=.tox --exclude=.mypy_cache --exclude=uv.lock --exclude=*.pyc --exclude=*.min.js --exclude=*.bundle.js --exclude=.gradle --exclude=gradle/wrapper --exclude=*.class --exclude=*.jar"
180+ SEMGREP_ADDITIONAL_EXCLUDES : ${{ inputs.semgrep-excludes }}
180181 run : |
181182 pip install semgrep
182- semgrep --config auto --sarif --output semgrep.sarif \
183- $SEMGREP_EXCLUDES \
184- ${{ inputs.semgrep-excludes }}
183+ if [ -n "$SEMGREP_ADDITIONAL_EXCLUDES" ]; then
184+ semgrep --config auto --sarif --output semgrep.sarif \
185+ $SEMGREP_EXCLUDES \
186+ "$SEMGREP_ADDITIONAL_EXCLUDES"
187+ else
188+ semgrep --config auto --sarif --output semgrep.sarif \
189+ $SEMGREP_EXCLUDES
190+ fi
185191
186192 - name : Fix Semgrep SARIF file paths
187193 if : inputs.static-analysis && hashFiles(format('{0}/semgrep.sarif', inputs.working-directory)) != ''
You can’t perform that action at this time.
0 commit comments