docs: restore security documentation as SECURITY.md#228
Conversation
The security/ bash scripts were replaced by TypeScript under src/security/. This brings back the security documentation, updated to reflect the current TypeScript implementation, and fixes two broken links in README.md.
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟡 NEEDS ATTENTION
One documentation accuracy issue found in the newly added SECURITY.md. The README.md link fixes are correct. The security architecture description, authorization tier table, module table, CLI interface docs, pattern tables, and test coverage claims all accurately reflect the current src/security/ implementation.
|
Good catch — fixed. Changed "two" to "three" to match the actual implementation (and the |
docker-agent
left a comment
There was a problem hiding this comment.
Assessment: 🟢 APPROVE
This PR accurately restores security documentation as SECURITY.md. The added content was verified against the actual src/security/ TypeScript implementation:
- Authorization tiers — correctly describes the 4-tier waterfall in
src/main/auth.ts(skip-auth → trusted-bot → org-membership → author_association) - Output scanning heuristics — correctly states three false-positive heuristics for
sanitizeOutput(metacharacter check, single-quote wrapping check, structural CRC32 validator). The source code's JSDoc comment says two but the implementation has three — the documentation is more accurate than the stale JSDoc - Prompt sanitization — correctly describes the three-tier strategy (CRITICAL/SUSPICIOUS/MEDIUM-RISK) plus the diff-comment preprocessing step, matching
src/security/sanitize-input.ts's own terminology - CLI subcommand signatures —
check-auth,sanitize-input,sanitize-outputverified againstsrc/security/index.ts - SECRET_PATTERNS table — all 7 patterns (Anthropic, 5× GitHub, OpenAI) verified against
src/security/patterns.ts - SECRET_PREFIXES alternation string — including
sk-proj-verified as present in the actual code - GitHub Actions output names —
secrets-detected,prompt-suspicious,input-risk-level,security-blockedverified againstsrc/main/index.tsandaction.yml - Module file references —
src/security/validators.ts,src/main/auth.ts,src/main/index.tsall confirmed to exist - Test case counts — 21 cases from
test-security.sh+ 6 fromtest-exploits.shconfirmed insecurity.test.tsheader
…puts - Point Security Policy links to SECURITY.md (the doc restored in #228) - Remove org-membership-token/auth-org (deprecated) and skip-auth (internal PR-review-workflow use only) from the inputs table
|
⏱️ PR Review Timed Out — The review agent hit the 1800 s time limit before completing. This usually happens on large or complex diffs. You can re-trigger with |
Restores the security documentation removed when bash scripts were replaced by TypeScript. The content has been audited and updated to reflect the current
src/security/implementation. Also fixes two broken links in README.md that pointed to the now-deletedsecurity/README.md.