Skip to content

Harden evidence tooling and JS gauntlet commands after security audit - #18

Merged
AmazingAng merged 6 commits into
mainfrom
fix/codex-security-audit
Nov 23, 2026
Merged

AmazingAng merged 6 commits into
mainfrom
fix/codex-security-audit

Conversation

@AmazingAng

@AmazingAng AmazingAng commented Nov 5, 2026 •

Copy link
Copy Markdown
Owner

Fixes the security audit findings in the old-coder instructions and demo, including the three gaps found in the first PR review.

Changes

  • JS checks invoke explicit project-local binaries after approved pinned dependencies are installed. Missing tools fail; neither npx nor global/cache lookup can supply an unapproved executable.
  • Mutation testing runs in a disposable copy. File, directory and dangling symlinks are rejected before importing the subject, and the target path is checked again before each write. The imported package must be the copy, and the original source must remain unchanged.
  • Scan hits print only file and line, withholding matching content. -H preserves the filename for GNU grep's single-file case.
  • Source-state rejects symlinks at scope roots, in ancestor directories and at leaf inputs, including dangling links, before emitting any binding.
  • SPEC revisions 8–9 describe the contracts. Evidence is bound to source commit acb90b5, tree c2c0431156288a42.

Validation

  • Full gauntlet passes locally on macOS/Python 3.14 and on Linux/Python 3.12: CI run 45242634920.
  • 57 tests pass with 49/49 statements and 20/20 branches covered; 22/22 mutants killed.
  • Five mutation-isolation controls run outside the subject's mutation suite; all 16 source-state checks pass. The combined new/existing control run was 8 failed / 13 passed before the follow-up fix and 21 passed afterwards.
  • Linux verifies both directory and single-file scan redaction. Types, lint/format, dependency audit, real execution and source binding pass.
  • The documented JS compiler command was checked with a same-named global executable: missing project tool exits 127 without invoking it; installed local tool runs with arguments preserved.

The first local gauntlet stopped because the restricted environment could not prepare pip-audit; rerunning with network access passed. No gate was skipped. Final diff review found no remaining blocking findings. No fresh-context independent verification was performed; evidence records that downgrade. The disposable copy is not an OS sandbox against hostile tests or concurrent filesystem replacement.

AmazingAng and others added 6 commits November 5, 2026 12:05
Three demo tooling defects found by an external audit: in-place mutation
not surviving SIGTERM, the must-not scan echoing matched credentials, and
source-state hashing symlink text instead of refusing it.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- mutants.py runs every mutant in a throwaway copy and aborts unless that
  copy is what gets imported; a killed run can no longer leave a mutant in
  src/ (SIGTERM skipped the old finally-restore).
- must_not_match prints file:line only, so a credential hit is not copied
  into CI logs; -H keeps single-file targets from leaking the line.
- source_state refuses symlinks in scope instead of hashing link text,
  which let the target change under an unchanged binding.
- gauntlet.md: JS commands use `npx --no-install`; bare npx auto-installs
  unpinned packages in CI, and `npx tsc` fetches an unrelated package.
- SKILL.md / gauntlet.md: manual mutation runs in a disposable copy.

New controls for the scan and source-state fail on the pre-fix code.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Source state is now `4c184cb` / `48000fb38edb5064`, from a fresh gauntlet
run; the 52-test randomized suite was rerun 10/10 at this state. Records
REVISION 8 as approved, unverified by an independent round, and found by
an external audit rather than by the gauntlet.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@AmazingAng
AmazingAng merged commit 3b4e20a into main Nov 23, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant