fix(sast): set semgrep metrics off by flag and env, skip the version check

This commit is contained in:
James Johnson 2026-10-18 21:40:16 +01:00
parent 542d844321
commit 5949c40942
No known key found for this signature in database
GPG key ID: 4DD5E522F8940E76

View file

@ -20,12 +20,13 @@ jobs:
- name: semgrep - name: semgrep
env: env:
CONFIGS: ${{ inputs.config }} CONFIGS: ${{ inputs.config }}
# The env var, not --metrics=off: semgrep 1.90 still prints its # Both the env var and --metrics=off. Inside a job semgrep 1.90
# "reports pseudonymous rule metrics" notice for registry configs # still prints its registry "pseudonymous rule metrics" notice;
# when given only the flag, and does not with the env var. # that could not be reproduced outside a job, so it is unexplained.
SEMGREP_SEND_METRICS: "off" SEMGREP_SEND_METRICS: "off"
SEMGREP_ENABLE_VERSION_CHECK: "0"
run: | run: |
semgrep --version semgrep --version
set -- scan --error --disable-version-check set -- scan --error --metrics=off --disable-version-check
for c in $CONFIGS; do set -- "$@" --config "$c"; done for c in $CONFIGS; do set -- "$@" --config "$c"; done
semgrep "$@" semgrep "$@"