SAFE on a python script blocks when the body mentions subprocess or base64
Maintainer antworten meist innerhalb von 1 Tag
Dieses Issue hat noch niemand übernommen.
Bewertung
- Schwierigkeit
- 4/5
- Geschätzter Aufwand
- 3-5 Tage
- Anfängerfreundlichkeit
- 42/100
- Issue-Typ
- Bug
- Klarheit
- Größtenteils klar
- Aktivitätsstatus
- Aktiv
- Tech-Stack
- python, typescript
- Bereich
- ai-infra-agents, security
Rechercherichtung
Start by tracing hasInterpreterCodeRisk, the decision order branches 5 and 6, and the SAFE post-filter; the issue identifies these as the relevant paths but gives no file names. Compare both proposed policy changes and run the adversarial and gitflow corpora, as the issue requires a measured evaluation. Done means the selected behavior lets a reviewer allow this file-body flag while critical-pattern, lookalike, and moderate-risk-token flags remain hard blocks.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Beschreibung
A SAFE verdict on python3 <script>.py still blocks whenever the script body contains subprocess, base64, or a \x.. escape anywhere. In the last two days that refused 4 commands Jev had already cleared, in 4 different repos. None of them has a path to the reviewer.
| Command | What tripped hasInterpreterCodeRisk |
|---|---|
python -I scripts/preflight.py <hex> |
\x00, \x14 (byte literals in a hash test) |
python3 scripts/site-structure.py validate |
base64 x2 |
python3 scripts/testflight.py |
import subprocess, subprocess. x5 |
python3 -I ops/memory/test_sync.py |
import subprocess, subprocess. x1 |
python3 x.py ─► script body read ─► INTERPRETER_CODE_RISK matches ─► flag "python3 runs x.py"
│
Jev: SAFE ─► decision order branch 6 (overlaid SAFE, never reviewed) ─► "flagged" block
Root cause: #67 put the inline -c markers on script bodies read from disk. For a one-line -c, subprocess or b64decode is a strong signal that the real work is hidden somewhere else. In a 300-line test script or release tool it's ordinary code, and the classifier has already read every line of it. The marker can't tell a subprocess.run(["git", "status"]) the judge saw from a decoded payload it didn't.
Two ways to fix it, each with a cost:
- Narrow the markers for file bodies to actual second execution:
exec(,eval(,compile(in code mode,__import__,marshal, and ab64decodewhose result reaches one of those. Keeps the hard block. Costs a regex that has to track data flow, which is what got #67's markers this broad in the first place. - Send this one flag class (interpreter risk in a file body) to branch 5 instead of branch 6, so the stage 2 reviewer sees the body and the user's words. The gate's SAFE post-filter then has to accept a reviewer allow for this flag only. Critical-pattern, lookalike and moderate-risk-token flags stay hard.
I lean toward 2. It's a policy change to the overlay, so it needs a measured run over the adversarial and gitflow corpora before it ships.
- Vorherrschende Sprache
- TypeScript
- Sterne
- 1
- Forks
- 1
- Ø Merge
- 49 Min.
- Gemergte PRs (30 T.)
- 82
Entwicklungsumgebung
Dieses Projekt bietet weder Dev-Container noch Dockerfile noch Beitragsleitfaden – die Einrichtung liegt bei Ihnen. Beginnen Sie mit der README; die allgemeinen Schritte stehen in unserem Leitfaden für den ersten Beitrag.
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus STRML/omp-classifier
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
STRML/omp-classifier#259 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 52/100
STRML/omp-classifier#256 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 42/100
STRML/omp-classifier#253 ·
Maintainer antworten meist innerhalb von 1 Tag
Alle Issues in STRML/omp-classifier
Ähnliche Issues
-
area:cli area:security bug priority:medium
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 82/100
rtk-ai/rtk#5127 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
"code source" and "numerique.gouv" links: "new window" mention duplicated in the accessible nameOffenaccessibility
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
numerique-gouv/lasuite-landingpage#315 ·
Maintainer antworten meist innerhalb von 1 Tag
-
needs:triage
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 92/100
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 72/100
HyeokjaeChoi/vaultme#585 ·
Maintainer antworten meist innerhalb von 1 Tag
-
enhancement priority/P2
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
beettlle/pi-smart-router#200 ·