Skip to content

docs: restore security documentation as SECURITY.md#228

Open
derekmisler wants to merge 2 commits into
docker:mainfrom
derekmisler:add-security-md
Open

docs: restore security documentation as SECURITY.md#228
derekmisler wants to merge 2 commits into
docker:mainfrom
derekmisler:add-security-md

Conversation

@derekmisler
Copy link
Copy Markdown
Contributor

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-deleted security/README.md.

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.
@derekmisler derekmisler requested a review from a team June 2, 2026 13:41
Copy link
Copy Markdown
Contributor

@docker-agent docker-agent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread SECURITY.md Outdated
@derekmisler
Copy link
Copy Markdown
Contributor Author

Good catch — fixed. Changed "two" to "three" to match the actual implementation (and the Heuristic 3 (structural validator) label in the source).

@derekmisler derekmisler enabled auto-merge (squash) June 2, 2026 13:50
@derekmisler derekmisler requested a review from aheritier June 2, 2026 13:50
Copy link
Copy Markdown
Contributor

@docker-agent docker-agent left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 signaturescheck-auth, sanitize-input, sanitize-output verified against src/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 namessecrets-detected, prompt-suspicious, input-risk-level, security-blocked verified against src/main/index.ts and action.yml
  • Module file referencessrc/security/validators.ts, src/main/auth.ts, src/main/index.ts all confirmed to exist
  • Test case counts — 21 cases from test-security.sh + 6 from test-exploits.sh confirmed in security.test.ts header

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.

2 participants