Repository navigation
Fix export validity, re-audit counts and guard bypasses - #1
Merged
Merged
Conversation
Found by auditing the repo as a new user would.
Exports:
- OSCAL target-id is a valid token; every finding failed NIST's 1.1.2 schema.
- SARIF rules carry fullDescription and help. Findings with no file and
closed findings are left out and named by the exporter.
- OCSF maps remediated to Resolved (4), not Suppressed (3).
- Exports and KPIs use each company's latest report, so a re-audit no longer
doubles findings. Exporters exit 1 for a company with no report.
Guards:
- Hooks run from ${CLAUDE_PROJECT_DIR} and find the workspace from the event's
cwd. A cd into a subdirectory used to crash the hook with exit 1, which does
not block, so writes went through.
- The write-guard fails closed, with onFailure: block for a hook that can't start.
- Hooks, schemas and settings are out of the writable layout.
- New Aadhaar, PAN and +91 mobile checks in company and assessment data.
- Secret patterns catch OpenSSH keys, github_pat_ and sk-ant- keys and
JSON-style passwords, and no longer block "password: hardcoded" in prose.
- validate rejects skill descriptions that are not valid YAML; all 20 are quoted.
Usability:
- examples/acme-demo: a synthetic app with planted issues and an answer list.
- run-headless --target, a 2-hour timeout, transcripts saved on failure.
- kpis --company, onboarding fields the schema used to reject, report provenance
fields, relative-only finding paths, and /penalty totals per finding and
per provision.
- Real company data is gitignored; private: true; CITATION.cff.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
${CLAUDE_PROJECT_DIR} is the folder a session started in. A session that moved
into the repo could not find the guard, so onFailure: block stopped every write.
The hook commands now fall back to the relative path. Approved by the maintainer,
since these are guard files agents don't normally edit.
Added a test that runs the real hook commands, skipped on Windows because bash
may resolve to WSL. Documented the two cases that still fail closed in SECURITY.md.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes from auditing Vigil as a new user would: fresh clones, the official export schemas, and hostile input to the hooks. The full list is under Unreleased in
CHANGELOG.md.What was wrong
.claude/**was writable.What changes for users
.claude/scripts,.claude/schemasor.claude/settings.json. Those are hand-edit only, including for your own Claude sessions on this repo.report.json, OSCAL and OCSF.filepaths must be relative. Absolute paths and../now fail validation.kpis --companyexit 1 for a company with no report, instead of reporting 0 findings.Known limits
Both are documented in
SECURITY.md, and both block writes rather than let them through.${CLAUDE_PROJECT_DIR}, then relative to the working directory.Testing
npm run validate -- --strictpasses.claude/settings.json, an append-only log rewrite, an Aadhaar number in a report, and a key-shaped string. Allowed live: edits toREADME.md,SECURITY.mdandCHANGELOG.md. The post-write hook reported a finding with no clause and an absolute pathonFailure: blockstopped a write live when the guard could not start/auditrun onexamples/acme-demo, scored againstexamples/acme-demo.expected.jsonNot in this PR
aranya/stays inlayout.jsonand.gitignore, because the local Aranya checkout sits inside this folder./penaltynow reports totals per finding and per provision.🤖 Generated with Claude Code