Skip to content

fix: only flag bot/webhook APIs as exfiltration when the secret is hardcoded - #7

Merged
bajrangCoder merged 2 commits into
mainfrom
fix/bot-api-false-positives
Nov 10, 2026
Merged

bajrangCoder merged 2 commits into
mainfrom
fix/bot-api-false-positives

Conversation

@bajrangCoder

@bajrangCoder bajrangCoder commented Nov 10, 2026 •

Copy link
Copy Markdown
Member

Fixed

  • Telegram, Discord, Slack and Apps Script URLs are High only when the URL itself carries the secret: a Telegram bot token, a Discord webhook id and token, a Slack services/T…/B…/… path, or an Apps Script id.
  • The bare API base, with the token added at runtime, is now Low and tagged bot-api.
  • Reading a plugin's own localStorage / sessionStorage keys no longer counts as reading user data for the exfiltration correlation.

Added

  • network.hardcoded_bot_token (High): a Telegram bot token in any string, including one split from the URL. It counts as an exfiltration endpoint in the correlation.
  • storage.web_storage_dump (Medium): reading every web storage entry (Object.keys/values/entries, JSON.stringify(localStorage), spread, for…in, .key(i)). It counts as reading user data.

Other

  • RULES_VERSION is bumped to 2026.11.3.
  • The README rule docs cover the new rules.

Tests

  • cargo test: 84 pass, including new cases for:
    • a runtime-token bot client → Pass
    • a hardcoded token with an editor read → Block
    • a storage dump sent to a capture host → Block
    • own storage keys with a capture host → Review
  • cargo clippy --all-targets is clean.

…rdcoded

- Telegram, Discord, Slack and Apps Script URLs are High only when the URL
  carries its secret; the bare API base with a runtime token is Low
  (`bot-api`).
- New `network.hardcoded_bot_token` (High) catches Telegram bot tokens in
  any string, including ones split from the URL, and counts as an
  exfiltration endpoint.
- Reading a plugin's own localStorage keys no longer counts as reading
  user data; dumping all of web storage is the new
  `storage.web_storage_dump` (Medium) and still feeds the exfiltration
  correlation.
- Bump rules version to 2026.11.3.
@bajrangCoder
bajrangCoder force-pushed the fix/bot-api-false-positives branch from f04f7db to 30dc990 Compare November 10, 2026 13:41
@bajrangCoder
bajrangCoder merged commit 74e7cb0 into main Nov 10, 2026
5 checks passed
@bajrangCoder
bajrangCoder deleted the fix/bot-api-false-positives branch November 10, 2026 13:48
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.

1 participant