Skip to content

Commit 2b0da57

Browse files
author
Issam Kadar
committed
chore/security : fix velnerabilities
1 parent f84bf29 commit 2b0da57

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/actions/fix-trivy-sarif/action.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ runs:
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"

.github/workflows/security-scan.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff 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)) != ''

0 commit comments

Comments
 (0)