Contents
The scope changed. Nobody told you.
Bug bounty programs publish a scope: the systems a hunter is allowed to test and the rewards attached to them. That scope changes quietly. A target is removed, a reward tier drops, a wildcard appears, or a target moves between groups.
There is no universal changelog. A hunter can plan a weekend around a target that was removed three days earlier, or discover a new high-value wildcard a week after everyone else. ScopeDiff turns the published scope into an append-only version history and computes the delta.
+ *.staging.acme.example new in-scope asset, Tier 1, $5,000+ api.staging.acme.example new in-scope asset, Tier 2, $3,000~ *.acme.example Tier 1 / $10,000 → Tier 3 / $2,000− legacy.acme.example removed from scope materiality: 91/100 · 4 targets affected · high confidence
“What changed?” is not the same question as “what matters to me?”. The second question is why the product exists. A new Tier 1 wildcard matters more than an instruction edit, and a change to a host you actually test matters more than a change somewhere else in the program.
What was built.
A working free-plan product, not a mockup: collection, canonicalisation, versioned diffs, materiality scoring, account onboarding, personal watches, alerts, a hybrid AI explanation layer and a public security review.
| Area | Capability | State |
|---|---|---|
| Sources | Bugcrowd, HackerOne and Intigriti adapters, plus a sandbox fixture. | Implemented |
| Diff | Added, removed, reintroduced, modified and moved targets; rename rescue; group and bounty changes. | Implemented |
| Materiality | Weighted score, impact and magnitude, personal-target matching. | Implemented |
| Identity & state | Firebase Auth, Firestore profiles, preferences, watches and immutable snapshots. | Implemented |
| Free cron | GitHub Actions every 30 minutes; queued baselines and due watches. | Implemented |
| Hybrid AI | Firebase AI Logic with on-device preference and Gemini cloud fallback. | Verified |
| Security review | OWASP Top 10 assessment with access-control, dependency, header and AI-overlay checks. | Published |
| Not claimed | Scanning, exploitation, arbitrary website scraping, email delivery, hosted worker on the free plan. | Out of scope |
The AI explains a diff; it does not decide that one exists. The Python engine remains the source of truth, which makes the system auditable and keeps a model failure from becoming a data-integrity failure.
A small, auditable system.
The product is split into collection, canonicalisation, diff/scoring, and presentation. The free-plan build keeps the same core and replaces the paid worker host with GitHub Actions.
Bugcrowd, HackerOne and Intigriti metadata behind a common adapter interface.
Canonicalise targets, build immutable snapshots, detect add/remove/modify/move/reintroduce.
Auth for identity, Firestore for profiles, watches, snapshots, changes and source runs.
Firebase AI Logic prefers an on-device model, with Gemini cloud fallback and visible provenance.
What is stored
Programs, immutable versions, snapshots with content hashes, target-level change items, materiality scores, source runs and per-user watches. Each change links back to the published revision and source URL.
What is not stored
No target traffic, no scan output, no exploitation data, no credentials for program systems. The demo sandbox uses RFC 2606 domains and RFC 5737 test ranges.
How a watch runs.
A watch is a supported program URL plus a cadence. The lifecycle is deliberately deterministic: the cron handles timing, the diff engine handles truth.
- Add a supported URLA Bugcrowd, HackerOne or Intigriti program page. Unknown domains are rejected instead of guessed at.
- Queue the baselineThe free build writes a pending watch to Firestore. The GitHub Actions cron runs every 30 minutes.
- Capture the first versionThe worker fetches the published scope, canonicalises targets and stores the first snapshot with a content hash.
- Diff and scoreOn later revisions, the engine detects additions, removals, changes, moves and reintroductions, then scores materiality and confidence.
- Explain and notifyThe feed, personal-impact matching and hybrid AI analyst show what changed. Slack is sent when the user’s threshold is met.
The AI is not responsible for deciding that scope changed. The diff engine is. The model explains an already-computed fact, which keeps the system auditable and makes a model failure non-catastrophic.
Hybrid AI, with the source in the open.
The AI Diff Analyst turns an exact scope diff into a concise summary, a why-it-matters explanation, review priorities and caveats. It uses Firebase AI Logic hybrid inference.
On supported Chrome Desktop hardware, the request runs against the on-device model. When the local model is unavailable, Firebase AI Logic automatically falls back to Gemini 3.5 Flash Lite in the cloud. The UI reports which source produced the answer and how long it took. The model is initialized from the user’s click (initializeDeviceModel()), which satisfies Chrome’s user-activation requirement before the first prompt.
The prompt contains only public diff metadata. Email, Firebase UID, Slack webhook and the user’s private testing targets are excluded. The output is constrained JSON, parsed into fixed fields and rendered as text. The model has no tools and cannot write to Firestore.
const model = getGenerativeModel(ai, {
mode: InferenceMode.PREFER_ON_DEVICE,
inCloudParams: {
model: "gemini-3.5-flash-lite",
generationConfig: {
responseMimeType: "application/json",
responseSchema: schema
}
},
onDeviceParams: {
createOptions: {
expectedInputs: [{ type: "text" }],
expectedOutputs: [{ type: "text" }]
},
promptOptions: { responseConstraint: onDeviceSchema }
}
});
await model.initializeDeviceModel();
const result = await model.generateContent(prompt);
console.log(result.response.inferenceSource);
// "on_device" or "in_cloud"
The AI action first calls await model.initializeDeviceModel() inside the click handler, then sends the prompt.
On-device inference is the preferred path because the prompt stays local. The cloud fallback is explicit, not silent: the user sees the inference source and can decide whether to trust the result. The deterministic diff remains the source of truth.
Guardrails, including the uncomfortable ones.
A scope watcher is only useful if its alerts are trustworthy. These are the controls that keep the feed honest — and the ones still being hardened.
| Control | Status | What it does |
|---|---|---|
| Published metadata only | PASS | No target traffic, scanning or exploitation is performed. |
| Zero-target refusal | PASS | An empty response is never stored as a real scope change. |
| Collapse / removal gates | PASS | Large collapses and ≥50% removals wait for a second identical fetch. |
| Partial revisions | PASS | Incomplete revisions are low-confidence and do not alert immediately. |
| Supported URL allowlist | PASS | Only Bugcrowd, HackerOne and Intigriti URLs are accepted and revalidated by the cron. |
| Auth + Firestore rules | PASS | Users read/write only their own profile and pending watches; global program data is read-only. |
| AI data minimisation | PASS | No email, UID, webhook or private testing targets enter the prompt. |
| App Check (AI Logic) | PASS | Registered debug token; enforced for Firebase AI Logic. Production should use reCAPTCHA Enterprise. |
| API-key restriction | PARTIAL | Headers and rules are in place; the web API key still needs stricter API/referrer restrictions. |
| Cron failure monitoring | FAIL | Runs are logged and persisted, but failures do not yet page an operator. |
Safety and authorisation.
ScopeDiff is a change-communication tool, not an attack tool. It reads public program metadata to answer one question: what changed in the published rules?
Authorised testing only. Only test systems you own or have explicit written authorisation to test. ScopeDiff does not grant permission, expand a program’s scope or replace a program’s rules.
No scanning or exploitation. The product does not resolve, probe, fuzz, exploit or otherwise touch a target. It does not provide payloads or attack automation. The AI analyst is explicitly prompted to use review language and is not given tools.
Reserved values in examples. Every demo target uses RFC 2606 domains such as example.com and RFC 5737 ranges such as 192.0.2.10. Seeded programs are fictional.
The publication explains the method, architecture and scoring model. It does not publish a ready-to-run evasion or exploitation sequence, and it does not include real program tokens or private endpoint data.
What this build does not do.
Honest limitations
- The free plan checks every 30 minutes, not every minute.
- Queued baselines wait for the next GitHub Actions run; there is no instant fetch.
- Email digest is stored as a preference only. Slack is the implemented channel.
- App Check is enforced for AI Logic with a registered debug token; Auth/Firestore and strict API-key restrictions remain hardening items.
- On-device inference is Chrome-on-Desktop only; other browsers use cloud fallback.
- Prompt injection is a bounded partial risk because scope metadata is untrusted public content.
- The FastAPI worker is not hosted on the free plan; Cloud Run would require billing.
Out of scope
- Vulnerability discovery, scanning, exploitation or proof-of-concept generation.
- Guaranteeing that a published change was intentional or authorised.
- Replacing a program’s rules, disclosure policy or legal terms.
- Monitoring private, authenticated or non-public program pages.
- Arbitrary website scraping. Only supported platform URLs are accepted.
Evidence, not adjectives.
The claims on this page map to things that were run against the repository or the deployed app.
| Check | Result |
|---|---|
| Backend test suite | 51 passed |
| Production web build | Passes |
npm audit --omit=dev | 0 vulnerabilities |
| Cross-user Firestore profile read | 403 denied |
| Client writes an active watch directly | 403 denied |
| Valid pending watch write | 200 allowed |
| Unauthenticated program read | 403 denied |
| Security headers | CSP · HSTS · XFO · nosniff |
| Hybrid AI cloud fallback | in_cloud verified |
| Hybrid AI on-device path | ON_DEVICE verified · 40,264 ms live |
| App Check debug token exchange | HTTP 200 · AI Logic enforced |
| OWASP Top 10 | 5 pass · 4 partial · 1 fail |
Read the full OWASP assessment · Read the source · MIT license
Built and written by.
Odigie David Idemudia — design, engineering and write-up. GitHub profile.
ScopeDiff is a hackathon project built with Python, FastAPI, React, Firebase Auth, Firestore, Firebase Hosting, Firebase AI Logic and GitHub Actions. The source, OWASP assessment and submission story are public in the repository.