Files
SeedPass/.gitignore
T
thePR0M3TH3ANandClaude Opus 5 c2a6a11472 fix: revert an inverted security check I committed by accident, and make it impossible
Commit cf18ab8 included a one-line change to agent.ts that was never intended:

    -if (generateFingerprint(mnemonic) !== fingerprint) {
    +if (generateFingerprint(mnemonic) === fingerprint) {

That inverts the daemon's `put` check, so it would refuse every CORRECT
fingerprint and accept every wrong one — the exact L-7 hole this branch closed
two days ago, reopened backwards.

Cause: scripts/mutation_test.py deliberately writes broken security code into
the working tree one mutant at a time, and I ran it in the background and then
committed with `git add -A` from another shell while a mutant was live. The
script restored the file correctly when it finished; the mistake was entirely
mine, in committing during the window.

Reverted. The check is back, typecheck is clean, and all 630 tests pass.

The real fix is structural, because "remember not to commit during a mutation
run" is not a control. The script now:

  - takes a lock file at start and refuses to run if one exists, so a
    previous run that died with a mutant applied is loud rather than silent;
  - releases it on success, on failure, and on Ctrl-C;
  - VERIFIES after each target that the file it restored actually matches the
    original, and aborts loudly if not — a mutant left behind is a broken
    security check sitting in the tree waiting to be committed;
  - prints a warning at start that the tree contains deliberately broken code.

The lock file is gitignored, so its presence never itself becomes a commit.

Worth stating plainly: this was found by reading `git diff` after a test
failure looked wrong, not by any check. A CI run on that commit would have
caught it — agentSecurity.test.ts fails on that mutation — which is an
argument for the CI wiring done earlier today, not against it.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_01Vtx94nXDmNgXEeThUZP4QN
2026-08-19 13:46:11 -04:00

65 lines
1.0 KiB
Plaintext

torch/node_modules
torch/node_modules/
node_modules/
# Ignore virtual environment directory
venv/
.venv/
# Ignore context tool directory
context_tool/
# Ignore info directory
info/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# Encrypted index file should be backed up, hence not ignored
!.deterministic_password_generator/password_indices.csv
# Ignore system files
.DS_Store
Thumbs.db
# Ignore logs and temporary files
*.log
*.tmp
# Python env
.env
*.env
# Coverage files
.coverage
coverage.xml
# Other
.hypothesis
totp_export.json.enc
# src
src/seedpass.egg-info/PKG-INFO
src/seedpass.egg-info/SOURCES.txt
src/seedpass.egg-info/dependency_links.txt
src/seedpass.egg-info/entry_points.txt
src/seedpass.egg-info/top_level.txt
# Allow vendored dependencies to be committed
!src/vendor/
torch/node_modules
torch/torch/
# Agent runtime state (local only)
.scheduler-memory/
memory-update.md
memory-update.json
.claude/
# Agent-local memory state (never committed)
.agents/private/
.agents/state/
.mutation-test-running