Repository navigation
feat(security): import email-delivered scans; add submit-to-oss-scan - #1786
Merged
Merged
Conversation
The Anthropic OSS Scanner discloses a whole scan in one multi-MB plain-text email. Add an `anthropic-oss-scanner` scan-format adapter: `security-management issue-import-from-scan parse-email` turns the .eml (or a saved Gmail-connector result) into a scan folder and checks completeness against the preamble, banners, INDEX and signature; attachments are saved byte-exact with their OpenPGP framing checked, never decrypted, and every file is owner-only. Add the read-only `oauth-draft-fetch-message` so a message that large lands in a file rather than the context; a private source never goes to a gist. Add the `security-submit-to-oss-scan` skill: the enrolment PR against anthropics/oss-scanner, with a threat_model.md derived from the project's security model, and wire it into security-model-prepare and security-model-update (a Scanner threat-model summaries table tracks each copy by model commit). Generated-by: Claude Opus 5
CodeQL: `_LOC` and `_FENCE` were left behind when entry and header parsing moved to `_ENTRY_LOCATION` and `_HEADER_BLOCK`. Generated-by: Claude Opus 5
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.
Summary
ANT-YYYY-…block per finding, a "NOT SECURITY" list, a GPG-encrypted archive).security-issue-import-from-scanonly knew ASVS report folders and GitHub issues. This adds ananthropic-oss-scannerscan-format adapter:security-management issue-import-from-scan parse-emailturns the.eml(or a saved Gmail-connector result) into a scan folder (index.json+ oneevidence/<id>.mdper finding) and refuses to call a scan complete unless the preamble totals, every severity banner, the INDEX, the parsed blocks and the closing signature all agree. Attachments are saved byte-exact (sha256, OpenPGP framing checked, never decrypted); every file is written owner-only.oauth-draft-fetch-messagesaves a Gmail message's raw RFC-5322 source to a file. The Gmail connector inlines bodies into context and its text rendering drops control characters (a NUL-byte password reads as""), so connector-derived input is markedlossy. Reports built from a private mail never go to a gist.security-submit-to-oss-scan, a new skill. Prepares the enrolment (or update) PR againstanthropics/oss-scanner—project.yaml, an offline-capableDockerfilederived from the project's own CI, and athreat_model.mdderived from the project's security model — and walks the maintainer throughtools/validate.py/tools/checkbefore anything is opened. The summary is wired into the model lifecycle:security-model-preparehands off to it,security-model-updateStep 12 refreshes stale copies (tracked by model commit in a new Scanner threat-model summaries table), andissue-import-from-scanroutes repeat by-design clusters back tosecurity-model-update.Type of change
security-submit-to-oss-scan;issue-import-from-scan,security-model-update,security-model-prepareamended; eval suite addedtools/scan-format/README.md— email-delivered scans)tools/security-management,tools/gmail/oauth-draft)security-model.md— scanner summaries table)Test plan
prek runon every changed file passesuv run pytestfortools/security-managementandtools/gmail/oauth-draft(new:test_issue_import_from_scan_oss_scanner.py,test_fetch_message.py).eml): 115 findings + 16 not-security bugs,checks.complete: true, identical parse from the.emland the connector JSON except where the connector dropped control characters; the 1.5 MB encrypted archive saved intacttools/skill-evals/evals/security-submit-to-oss-scan/(threat-model derivation: supported claim vs model gap)roborevreview, every finding fixed with a regression testRFC-AI-0004 compliance
tools/checkis never run by the agent; nothing executes the scanner's reproducersgh pr create --webfor the enrolment PRNotes for reviewers
Gen-AI disclosure: drafted with Claude Code (Opus 5); reviewed by the submitter.
🤖 Generated with Claude Code