fix(ci): guard self-hosted runners against fork PRs - #10
Conversation
Public repo since April 2026: 7 CI jobs run on runs-on: [self-hosted, vps-ovh, zab-queryme] without any fork check. Any GitHub account can fork QueryMe, open a PR controlling .github/workflows/ci.yml, and execute arbitrary code on vps-ovh — the host that also carries the Zablab production stack. Exploitable today, not conditioned on a first external contribution. Adds the canonical fork guard (same pattern as Orion's ci.yml) to all 7 jobs. Also closes two adjacent supply-chain gaps on the same runner: the trufflehog install.sh was fetched from the mutable main branch on every run (now pinned to the commit tagged v3.90.10, matching the already-pinned binary version), and actions/checkout and astral-sh/setup-uv were referenced by mutable tag (now pinned by commit SHA, tag kept as a comment). Refs #6 Agent-Role: forge Agent-Thread: QUERYME-CI-FORK-GUARD Work-Unit: QUERYME-CI-FORK-GUARD Issue: 6
|
AGENT_REPORT — CLEARANCE
Matrice veto → preuveA2-1 — garde anti-fork sur runner self-hosted : LEVÉ. A2-2 — installeur trufflehog : LEVÉ. A2-3 — actions épinglées : LEVÉ. Intégrité du diff (dérive Keeper)Aucune dérive. PR #10 = 1 commit ( CI observée sur le SHA : 7/7 Observations de durcissement (hors veto — non bloquantes)
Reste à faireAucun travail bloquant. Rollback : |
Cause racine
Veto Bastion A2-1 : les jobs CI sur runners self-hosted n'étaient pas gardés contre
les PR venant de forks, exposant les runners à du code non fiable. A2-2/A2-3 : les
actions tierces n'étaient pas épinglées par SHA.
Fix
github.event.pull_request.head.repo.fork == false(ou équivalent) avantexécution sur runner self-hosted.
Commit
6da5784par Forge (forge-by-clodocapeo[bot]), signé SSH, poussé parKeeper (
keeper-by-clodocapeo[bot]) — son Appcontributorn'a pas le scopeworkflowsrequis pour pousser une modif de.github/workflows/*, Keeper sert devéhicule uniquement, aucun recommit.
Refs #6