fix: diagnostic semgrep-core dans le job security - CPU, disque et exec brute traces BUG-091
CI / lint (push) Successful in 2m31s
CI / security (push) Failing after 2m16s
CI / test (push) Failing after 4m21s
CI / build (push) Skipped
CI / e2e (push) Skipped

This commit is contained in:
2026-09-29 09:21:25 -04:00
parent d6d081c0e9
commit dbf935bec0
10 changed files with 45 additions and 15 deletions
+28 -2
View File
@@ -141,9 +141,11 @@ jobs:
# fixe tomli~=2.0.1 (pip-audit 2.10+ exige >=2.2.1) et
# pyjwt~=2.12.0 (PYSEC-2026-178) — le plancher pyjwt>=2.13.0 de
# requirements.txt resterait insatisfaisable s'il était co-installé.
# 3) setuptools / pip sont mis à jour : l'image de base peut embarquer
# une version couverte par un advisory fraîchement publié
# (PYSEC-2026-3447 / PYSEC-2026-3721).
# NOTE runner Gitea Act (BUG-083) : aucun `#` dans le `run:`.
run: |
# setuptools récent : l'image de base peut embarquer une version
# couverte par un advisory fraîchement publié (PYSEC-2026-3447).
pip install -U pip setuptools
pip install bandit pip-audit
pip install -r backend/requirements.txt
@@ -156,6 +158,30 @@ jobs:
# vrais positifs restants portent un `# nosec` justifié inline.
run: bandit -r backend/ --skip B101,B105,B110,B310
- name: Diagnostic semgrep-core (BUG-091)
# Le core est un exécutable natif : sur un CPU trop ancien il sort en
# 127 sans message exploitable. On trace CPU, taille/permissions du
# core et exécution brute pour distinguer un refus ISA/libc d'un
# simple fichier absent ou non exécutable.
# NOTE runner Gitea Act (BUG-083) : aucun `#` dans le `run:`.
run: |
echo "== CPU =="
grep -m1 "model name" /proc/cpuinfo || echo "cpuinfo illisible"
echo -n "flags attendues : "
for f in sse4_2 popcnt avx avx2; do
if grep -qm1 " $f " /proc/cpuinfo; then echo -n "$f "; fi
done
echo
echo "== disque =="
df -h /tmp | tail -1 || true
echo "== core =="
CORE=$(/tmp/semgrep-venv/bin/python -c "import semgrep,os;print(os.path.join(os.path.dirname(semgrep.__file__),'bin','semgrep-core'))")
echo "chemin : $CORE"
ls -l "$CORE" || echo "core absent"
file "$CORE" || true
echo "== exec brute =="
"$CORE" --version && echo "core executable" || echo "core a sort en $?"
- name: Semgrep (SAST local, bloquant — #87)
# Règles 100 % locales (semgrep-rules/, 8 règles) : aucun
# téléchargement de registre (runner au réseau fragile).