feat: Bug Bounty Mode
Problem Statement
Security researchers running Shannon against bug bounty programs face three concrete problems. First, there is no way to feed a program's scope into the tool — in-scope domains, out-of-scope exclusions, and active campaign focus classes all have to be manually translated into Shannon YAML config, which is error-prone and slow. Second, Shannon generates a single executive report aimed at internal security teams; bug bounty platforms expect one structured report per finding with a specific set of fields (title, severity, CVSS, steps to reproduce, PoC, impact). Third, the default pipeline is tuned for thoroughness, not for being a polite guest on a production system — aggressive scanning can get a researcher banned from a program before they find anything useful.
Solution
A ./shannon bounty subcommand that accepts a bug bounty program page (as a URL or pasted text file), parses it with an LLM into a structured program config, enforces scope automatically, and produces per-finding reports formatted for direct HackerOne submission alongside the existing executive summary.
The pipeline is also extended with three new lightweight vulnerability agents (CORS misconfiguration, information disclosure, open redirects) and the existing auth agent is extended to cover auth-surface hardening and rate-limiting bypass checks. Recon is enhanced to produce an agent_hints map that routes specific endpoints to the most relevant specialist agents.
User Stories
- As a bug bounty researcher, I want to pass a HackerOne program URL to Shannon so that scope, out-of-scope exclusions, and campaign focus classes are parsed automatically without manual YAML authoring.
- As a researcher, I want to pass a copy-pasted program page as a text file so that I can use Shannon even when the platform requires login to view the program page.
- As a researcher, I want parsed program configs to be saved to
~/.shannon/programs/<name>.jsonso that I can reference a program by name on subsequent scans without re-parsing. - As a researcher, I want a
--refresh-programflag so that I can pull updated scope when a program changes its rules or adds a new campaign. - As a researcher, I want Shannon to automatically inject in-scope domains as URL focus rules so that agents stay within the program's allowed surface.
- As a researcher, I want out-of-scope patterns from the program page to be injected as avoid rules so that agents do not touch excluded assets.
- As a researcher, I want a post-scan scope validator to check every URL visited against the program's in-scope domains so that I know before submitting whether any out-of-scope activity occurred.
- As a researcher, I want findings that touched out-of-scope assets to be excluded from HackerOne submission files automatically, while still appearing in the executive summary for my own review.
- As a researcher, I want one HackerOne-formatted markdown file per finding, ready to paste into a submission, so that I do not have to reformat results manually.
- As a researcher, I want each HackerOne report to include a title, severity, suggested CVSS vector, the mapped asset from the program's asset list, a summary, exact steps to reproduce, the precise payload or HTTP request used, the expected vs actual response, impact statement, and a suggested fix.
- As a researcher, I want the CVSS score to be clearly marked as a suggestion requiring manual review before submission so that I do not accidentally submit an inaccurate severity.
- As a researcher, I want the steps-to-reproduce section to be a complete reproduction recipe — exact HTTP request, payload, auth state — so that I can manually verify the finding before submitting.
- As a researcher, I want the executive summary to still be generated alongside HackerOne files so that I have an overview for my own analysis before deciding what to submit.
- As a researcher, I want HackerOne reports to be written to
workspaces/<workspace>/hackerone/so that submission files are easy to find and separate from the executive report. - As a researcher, I want Shannon to instruct agents to behave as a careful human researcher — spacing out requests, avoiding brute-force patterns, not hammering endpoints — so that I am not flagged for automated scanning and banned from a program.
- As a researcher, I want Shannon to detect CORS misconfigurations as a new dedicated agent so that a common P3 finding class is covered reliably.
- As a researcher, I want Shannon to detect information disclosure (exposed API keys, stack traces, debug endpoints,
.envpaths) as a new dedicated agent. - As a researcher, I want Shannon to detect open redirects as a new dedicated agent, since these are often chainable to OAuth and session bugs.
- As a researcher, I want the existing auth agent extended to test auth-surface hardening and rate-limiting bypass so that auth-focused campaigns like Shopify's Authentication & ATO program are better covered.
- As a researcher, I want the recon agent to produce an
agent_hintsmap — a structured output that routes specific endpoints to the most relevant specialist agents — so that each agent starts with targeted context rather than re-discovering the attack surface from scratch. - As a researcher, I want bounty mode to work in black box mode (no repo path required, or with an empty git-initialised directory) so that I can scan targets where I do not have access to source code.
- As a researcher, I want the program's active campaign focus (e.g. Authentication & ATO with bounty multipliers) to be surfaced in the workspace output so that I know which finding classes are currently paying a premium.
- As a researcher, I want the
./shannon bountycommand to support the same--workspace,--output,--debug, and--pipeline-testingflags as./shannon startso that my existing workflow is not disrupted.
Implementation Decisions
New subcommand: ./shannon bounty
bountyis registered as a top-level command in the CLI dispatcher alongsidestart,stop,logs, etc.bounty startis the primary subcommand. Future subcommands (programs list,submit) are reserved but not built.- Internally,
bounty startcalls the samespawnWorker/ensureInframachinery asstart. It is a thin wrapper, not a parallel implementation. bounty startaccepts--url,--repo,--program,--refresh-program,--workspace,--output,--debug,--pipeline-testing. The--configflag is omitted — scope and config are derived from the program config, not a user-authored YAML.--reporemains required at the CLI layer for now (the git-init workaround is the short-term fix for black box scans; making it optional is a separate issue).
Program config system (apps/cli/src/programs/)
types.tsdefinesProgramConfig:name,platform('hackerone' | 'bugcrowd'),in_scope_domains(string[], supports wildcards like*.shopify.com),out_of_scope_patterns(string[]),focus_classes(maps to Shannon agent names),active_campaign(optional: asset name, multipliers by severity),rules(free-text array of participation rules).fetcher.tsaccepts a URL or file path. For URLs, performs a plain HTTP GET (no auth). For file paths, reads the file as UTF-8 text. Returns raw string.parser.tstakes raw text and calls Claude (haiku tier — cheap, fast) with a structured output schema matchingProgramConfig. Validates the response with Zod before returning.store.tsreads and writes~/.shannon/programs/<name>.json. On write, derives thenameslug fromProgramConfig.name(lowercased, hyphenated).--refresh-programdeletes the existing file before the fetch+parse cycle.
Scope enforcement
bounty startconvertsProgramConfig.in_scope_domainstorules.focusURL patterns andProgramConfig.out_of_scope_patternstorules.avoidpatterns, then passes these asconfigDataoverrides intoPipelineInput.- Bounty mode is signalled to the worker via a new
bountyConfigfield onPipelineInput(serialisedProgramConfig). This field drives agent prompt injection and report generation. - The
_bounty-mode.txtshared partial is injected into all agent prompts whenbountyConfigis present. It instructs the agent to behave as a careful human researcher: space out requests, avoid brute-force patterns, vary timing, do not hammer authentication endpoints.
Recon agent_hints
- The recon-collector MCP server gains a
set_agent_hintstool. The schema isRecord<AgentName, string[]>— a map from agent name to a list of prioritised endpoint URLs or patterns. ReconDatagains anagent_hintsoptional field.recon-renderer.tsgains a new section renderer for agent hints (a simple table: agent to endpoints).- Each vuln agent prompt gains an
{{AGENT_HINTS}}substitution variable. The prompt-manager resolves it from the recon deliverable at agent startup. If no hints exist for an agent, the variable resolves to empty string (no-op). - The
agent_hintsfeature is implemented unconditionally — it benefits all Shannon scans, not only bounty mode. Only the{{AGENT_HINTS}}substitution in agent prompts is conditional on hints being present.
New vulnerability agents
- Three new agents added to
AGENTSinsession-manager.ts:cors-vuln,info-disclosure-vuln,open-redirects-vuln. - All three have
reconas their only prerequisite and run in the existing parallel vuln phase alongside the five current agents (8 total parallel agents in vuln phase). ALL_AGENTSandAgentNameintypes/agents.tsupdated accordingly.- The existing
auth-vulnagent prompt is extended (not replaced) to include auth-surface hardening checks and rate-limiting bypass testing. No new agent is created for these. - No exploit agents are created for the three new vuln types in this iteration — findings go directly to HackerOne reports via the reporting phase.
Scope validator (apps/worker/src/services/scope-validator.ts)
- Reads the workspace audit log after the vuln phase completes.
- Extracts every URL the agents visited (from tool call logs).
- Matches each URL against
bountyConfig.in_scope_domainsusing wildcard hostname matching (e.g.*.shopify.commatchesaccounts.shopify.com). - Returns
ScopeViolation[]:{ url, agent, timestamp }. - Called from
activities.tsbefore the report activity. Result is passed into both the executive report and the HackerOne reporter. - Normalises URLs to hostname-only before matching (strips path, query, fragment).
HackerOne report generator (apps/worker/src/services/hackerone-reporter.ts)
- Takes the assembled findings (from deliverable files),
bountyConfig, andScopeViolation[]. - For each finding, determines whether it touched an out-of-scope URL. If yes, the finding is excluded from HackerOne output but retained in the executive summary.
- For each in-scope finding, renders a HackerOne-formatted markdown file using a
report-hackerone.txtprompt template (LLM call per finding). - Each file is written to
workspaces/<workspace>/hackerone/finding-NNN-<slug>.md. - Files include a
[SUGGESTED CVSS — review before submitting]marker on the CVSS line.
Storage layout
workspaces/<workspace>/
report-executive.md
hackerone/
finding-001-cors-wildcard.md
finding-002-open-redirect.md
~/.shannon/programs/
shopify.json
PipelineInput changes
- New optional field:
bountyConfig?: BountyConfig(serialised form ofProgramConfig— platform, in_scope_domains, out_of_scope_patterns, focus_classes, active_campaign). - Workflow passes
bountyConfigthrough to all activity inputs that need it (agent execution, scope validator, HackerOne reporter).
Testing Decisions
- Good tests test observable external behaviour, not implementation details. They call the module's public interface with realistic inputs and assert on outputs. They do not mock internal collaborators unless those collaborators cross a system boundary (network, filesystem, LLM).
scope-validator.tsgets a unit test suite. Test cases: exact domain match, wildcard subdomain match (*.shopify.commatchesaccounts.shopify.com), wildcard does not match unrelated domain, multiple violations returned, empty violations when all URLs in scope, path component ignored in host matching. No filesystem or network needed — inputs are arrays of strings.- No other modules get automated tests in this iteration.
- Test runner: Vitest. Add
vitestas a dev dependency and atestscript in the rootpackage.json.
Out of Scope
- IDOR/BOLA agent — deferred until basic bounty mode is validated end-to-end.
- Direct HackerOne API submission (
./shannon bounty submit) — deferred. - Duplicate detection (checking whether a finding is already reported on the platform) — deferred.
- Bugcrowd platform support — architecture supports it (
platformfield inProgramConfig) but only HackerOne parsing and report format are implemented. - Hard rate-limit enforcement at the network/Playwright layer — prompt-level instructions only.
- Making
--repooptional for black box scans — tracked separately; current workaround isgit initon an empty directory. - Business logic vulnerability detection.
./shannon bounty programs listand related program management commands.
Further Notes
- The Shopify bug bounty program page was used as the primary design reference. The active Authentication & ATO campaign (multipliers: Medium 1.25x, High 1.5x, Critical 2x) demonstrates why
active_campaignneeds to surface in output — researchers need to know which finding classes are currently paying a premium. - Shopify's program rules ("only test stores you created") are extracted into
ProgramConfig.rulesand injected into the bounty-mode prompt partial so agents are aware of participation constraints, not just technical scope. - The scope validator's wildcard matching must handle both
*.shopify.comstyle patterns and exact domain entries. - The
agent_hintsfeature benefits all Shannon scans, not just bounty mode. The recon-collector MCP change and renderer update should be implemented unconditionally.
/claim
Hi! I'm a TypeScript developer. I'd love to build out this Bug Bounty Mode logic today. Let me know if I can take this on!
@niktoimiyazap idk if you're asking me but if you are go for it lol, the guy above you already built out https://github.com/KeygraphHQ/shannon/issues/364 and https://github.com/KeygraphHQ/shannon/issues/365 I believe, you can look at that in https://github.com/KeygraphHQ/shannon/pull/372
This isn't my repo so I don't have permission to assign you.
Thanks for putting so much thought into this and for breaking the proposal down in such detail.
After reviewing it, we think the broader bug bounty / black-box workflow is outside Shannon's focus for now. We're currently focused on code-informed pentesting integrated into the software development lifecycle, rather than optimizing Shannon for public bug bounty programs and HackerOne-style workflows.
There are definitely some useful ideas here that could apply more broadly to Shannon, and we may revisit those independently. For now, though, we're going to close these out so we can stay focused on our current direction.
Really appreciate the feedback and the work that went into this. We can absolutely revisit bug bounty support if it becomes a priority for Shannon in the future.