docs: restore security documentation as SECURITY.md#228
Open
derekmisler wants to merge 2 commits into
Open
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
reviewed
Jun 2, 2026
Contributor
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.
Contributor
Author
|
Good catch — fixed. Changed "two" to "three" to match the actual implementation (and the |
docker-agent
reviewed
Jun 2, 2026
Contributor
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
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.
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.