Discovery: open threats as an OpenThreat descriptor, with a per-installation announce switch - #181
Merged
Merged
Conversation
…llation announce switch threatcrush.com/discovery lists what the GitHub App found in PUBLIC repositories, and /.well-known/openthreat.json serves the same list as an OpenThreat 0.1 descriptor (logicsrc.com/openthreat) for nichedb.dev and any other directory to read. What is published: findings from the latest complete scan of each public, still-attached repository on an active, announcing installation, with rule, cwe, category, severity, confidence, subject (owner/repo, URL, ref, commit), status open or fixed, first and last seen. What is never published: private repositories, installation ids, account and sender logins, organizations, servers, properties, detections, and any finding's excerpt. A sensitive finding (secrets) also withholds file, line, message and consequence. assertNoPrivateData throws if a forbidden key ever reaches the serialized descriptor. The announce switch: github_installations.announce (migration, default true). The installer turns it off under Account > Scan announcements; the API gates on the signed-in user's GitHub login matching the installation's account_login or sender_login. Until the migration is applied the code treats a missing column as announce on and the toggle answers 503 with a plain message. Tests: open-threats (12) and the installations route (9), 21 passing. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014cmNRtR2vL1p89dbVQ7FZJ
ThreatCrush Security Scan12 finding(s) HIGH/CRITICAL: 1 | MEDIUM: 6 | LOW: 5
Snippets are redacted; ThreatCrush never prints matched credential material. |
ralyodio
marked this pull request as ready for review
September 13, 2026 03:28
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.
Adds
threatcrush.com/discovery, the list of threats ThreatCrush identified in the open, and serves it as an OpenThreat 0.1 descriptor at/.well-known/openthreat.json(spec: https://logicsrc.com/openthreat, logicsrc PR #167; first directory: nichedb.dev threats collection, niche-db PR #66).Published: findings from the latest complete scan of each public, still-attached repository on an active, announcing installation: rule, CWE, category, severity, confidence, subject (owner/repo, GitHub URL, ref, commit), status
openorfixed, first and last seen, count. The id is a hash of repo, rule and file, stable across line shifts.Never published: private repositories, installation ids, account and sender logins, organizations, servers, properties, detections, and every finding's
excerpt. Sensitive findings (secrets) also withhold file, line, message and consequence.assertNoPrivateDatathrows if any forbidden key reaches the serialized descriptor.The announce switch (on by default):
github_installations.announce, toggled under Account > Scan announcements by the person whose GitHub login matches the installation'saccount_loginorsender_login.GET/PATCH /api/github/installations.Migration step after merge: apply
supabase/migrations/20260913030000_installation_announce.sqlto projectodhaoehucfyrqhanthyqvia the Supabase MCP (memory: migrations are not auto-applied). Nothing breaks before that: a missing column reads as announce on, and the toggle answers 503 with a message.Checks:
vitest runon the two new test files: 21 passed.tsc --noEmit: five pre-existing errors (contact guard and x402-gateway modules missing from the hardlinked node_modules), none in the new files. Prod currently holds 0 scans, so/discoveryshows its empty state until the GitHub App scans a public repository.🤖 Generated with Claude Code
https://claude.ai/code/session_014cmNRtR2vL1p89dbVQ7FZJ