fix: deplace le venv semgrep hors de /tmp (fs noexec du runner) BUG-091
CI / lint (push) Successful in 2m27s
CI / security (push) Failing after 2m15s
CI / test (push) Successful in 4m21s
CI / build (push) Successful in 1m40s
CI / e2e (push) Successful in 15m33s

This commit is contained in:
2026-09-29 10:37:01 -04:00
parent 435a0687d7
commit 267a33d43b
10 changed files with 38 additions and 23 deletions
+10 -10
View File
@@ -149,8 +149,8 @@ jobs:
pip install -U pip setuptools
pip install bandit pip-audit
pip install -r backend/requirements.txt
python -m venv /tmp/semgrep-venv
/tmp/semgrep-venv/bin/pip install --quiet semgrep==1.157.0
python -m venv "$HOME/semgrep-venv"
"$HOME/semgrep-venv/bin/pip" install --quiet semgrep==1.157.0
- name: Bandit (SAST, bloquant — #87)
# B105 est exclu (aligné avec [tool.bandit] de pyproject.toml :
@@ -159,10 +159,10 @@ jobs:
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.
# Le core est un exécutable natif : selon le runner il sort en 127,
# soit avec un message ISA (CPU trop ancien), soit sans message
# (fs noexec, fichier absent, permissions). On trace CPU, options de
# montage, taille/permissions du core et exécution brute.
# NOTE runner Gitea Act (BUG-083) : aucun `#` dans le `run:`.
run: |
echo "== CPU =="
@@ -172,10 +172,10 @@ jobs:
if grep -qm1 " $f " /proc/cpuinfo; then echo -n "$f "; fi
done
echo
echo "== disque =="
df -h /tmp | tail -1 || true
echo "== montages (noexec ?) =="
findmnt -no TARGET,OPTIONS / /tmp "$HOME" 2>/dev/null || cat /proc/mounts
echo "== core =="
CORE=$(/tmp/semgrep-venv/bin/python -c "import semgrep,os;print(os.path.join(os.path.dirname(semgrep.__file__),'bin','semgrep-core'))")
CORE=$("$HOME/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
@@ -186,7 +186,7 @@ jobs:
# Règles 100 % locales (semgrep-rules/, 8 règles) : aucun
# téléchargement de registre (runner au réseau fragile).
# Venv isolé (BUG-091) : cf. l'étape « Install dependencies ».
run: /tmp/semgrep-venv/bin/semgrep --config semgrep-rules/ backend/
run: $HOME/semgrep-venv/bin/semgrep --config semgrep-rules/ backend/
- name: Pip-audit (bloquant — #87)
# Bloquant depuis T6 (#87) : dépendances qualifiées (mistune 3.3.3,