codex-log-guard — independently scanned and version-tracked by SaferSkills.
SaferSkills independently audited codex-log-guard (Agent Skill) and scored it 96/100 (green). The audit ran 55 deterministic rules across Security, Supply Chain, Maintenance, Transparency, and Community; it found 0 high-severity and 1 lower-severity findings. The full rule-by-rule trace and per-finding evidence are below. Free, methodology-open.
Findings & checks · 1 flagged
The text {match} tells the agent to skip the normal "ask the user first" gate. Used adversarially it removes the human-in-the-loop check before destructive or sensitive actions, turning a normally-gated agent into a fire-and-forget executor.
Every scanned point with the score it earned and what moved between them.
First recorded scan — no prior version to compare against.
The primary manifest — the file an agent reads to learn what this artifact does.
Automatically diagnose Codex persistent diagnostic logging from local evidence, then give a concise conclusion and the safest next action. Do not make the user choose from a command menu.
When the user asks to "check", "看看", "诊断", or asks whether the local machine is affected:
~/.codex/logs_2.sqlite~/.codex/sqlite/logs_2.sqliteblock_log_inserts already exists on each candidate with a logs table.logs is still being written using COUNT(*), MIN(id), MAX(id) samples.Treat MAX(id) or MIN(id) movement with stable COUNT(*) as active churn, not necessarily disk growth.
TRACE/DEBUG counts and top noisy targets.When the user asks to "处理", "修一下", "止血", or explicitly approves mitigation:
block_log_inserts first.COUNT(*), MAX(id) stops growing..backup, then delete log rows, vacuum, and truncate WAL.When the user asks to restore diagnostics:
block_log_inserts.COUNT(*), MAX(id) to confirm logging resumes or stays quiet.Run direct shell/SQLite commands. Use only the needed subset for the user's request; do not paste a menu back to the user.
Inspect files:
for db in ~/.codex/logs_2.sqlite ~/.codex/sqlite/logs_2.sqlite; do
ls -lh "$db"* 2>/dev/null
du -h "$db"* 2>/dev/null
doneCheck schema and trigger:
db=~/.codex/logs_2.sqlite
sqlite3 "$db" ".tables"
sqlite3 "$db" "PRAGMA table_info(logs);"
sqlite3 "$db" "SELECT name, tbl_name, sql FROM sqlite_master WHERE type='trigger' AND name='block_log_inserts';"Sample writes and growth:
db=~/.codex/logs_2.sqlite
for i in 1 2 3; do
date '+%F %T'
sqlite3 "$db" "SELECT COUNT(*) AS rows, MIN(id) AS min_id, MAX(id) AS max_id FROM logs;"
stat -f '%N %z bytes mtime=%Sm' "$db" "$db-wal" "$db-shm" 2>/dev/null
sleep 10
doneInspect levels and noisy targets:
db=~/.codex/logs_2.sqlite
sqlite3 "$db" "SELECT level, COUNT(*) AS n, ROUND(SUM(estimated_bytes)/1024.0/1024.0, 1) AS estimated_mib FROM logs GROUP BY level ORDER BY n DESC;"
sqlite3 "$db" "SELECT target, level, COUNT(*) AS n, ROUND(SUM(estimated_bytes)/1024.0/1024.0, 1) AS estimated_mib FROM logs GROUP BY target, level ORDER BY n DESC LIMIT 15;"Check open processes:
lsof ~/.codex/logs_2.sqlite ~/.codex/logs_2.sqlite-wal ~/.codex/logs_2.sqlite-shm \
~/.codex/sqlite/logs_2.sqlite ~/.codex/sqlite/logs_2.sqlite-wal ~/.codex/sqlite/logs_2.sqlite-shm 2>/dev/nullInstall protection:
db=~/.codex/logs_2.sqlite
sqlite3 "$db" "PRAGMA busy_timeout=10000; CREATE TRIGGER IF NOT EXISTS block_log_inserts BEFORE INSERT ON logs BEGIN SELECT RAISE(IGNORE); END;"Clean up after protection:
db="$HOME/.codex/logs_2.sqlite"
backup="$db.bak.$(date +%Y%m%d-%H%M%S)"
sqlite3 "$db" ".backup '$backup'"
sqlite3 "$db" "PRAGMA busy_timeout=10000; PRAGMA wal_checkpoint(TRUNCATE); DELETE FROM logs; VACUUM; PRAGMA wal_checkpoint(TRUNCATE);"
echo "$backup"Restore persistent logging:
db=~/.codex/logs_2.sqlite
sqlite3 "$db" "DROP TRIGGER IF EXISTS block_log_inserts;"logs_2.sqlite files: healthy/not applicable unless the user expects Codex to have run.lsof; do not assume the top-level path is the only live database.COUNT/MIN(id)/MAX(id) stable: protected.MIN(id) or MAX(id) moves: affected and actively writing.TRACE/DEBUG, but no sample movement: affected historically; recommend protection, cleanup optional.logs is absent or schema differs, stop and report that the known workaround is not safely applicable.COUNT(*), MAX(id) sampling.cleanup as reversible only through its timestamped backup. Mention the backup path in the final answer.~/.codex/logs_2.sqlite* and ~/.codex/sqlite/logs_2.sqlite*); it does not manage conversation archives, repo files, credentials, or remote telemetry.Keep the user-facing answer short:
~30 seconds. Free. No account. Every finding cites a rule and a line of evidence.