Skip to content

Security: blankframe-tech/ThrottleIQ

SECURITY.md

Security Policy

Supported versions

Only the latest beta release receives security fixes.

Reporting a vulnerability

Report privately: use Security → Report a vulnerability on this repository (GitHub private vulnerability reporting), or email the.abraar.rar@gmail.com. Do not open a public issue, pull request or discussion for a vulnerability.

Include what you found, steps to reproduce, the affected version, and what an attacker could do with it. We aim to acknowledge reports within 7 days.

Swag bounty

ThrottleIQ is built by a small team, so the reward is small but real:

  • Every valid, new vulnerability: a ThrottleIQ drop-shoulder t-shirt and cha-nashta-adda with the ThrottleIQ team. Free delivery inside Bangladesh; outside Bangladesh you pay the shipping.
  • Higher-severity findings (for example reading another rider's location, rides or private data, taking over an account, or sending crash alerts as someone else) may get more. This is at the team's discretion.
  • With your permission, your name or handle goes in the credits below.

Not eligible

  • Known issues. Anything already listed in this file (including "Known, hardening pending" and the owner runbooks below), in DOCS/Handoff for agents and Todos/ (issues_open.md, security_sweep_*.md, needs_attention.md), or in an open GitHub issue. If two people report the same new issue, the first report wins.
  • Firebase web API keys, the Cloudinary cloud name, and other client config that is public by design.
  • Missing headers or best practices with no working attack, self-XSS, clickjacking on pages with no sensitive action, and reports from automated scanners without a reproduced impact.
  • Denial of service, spam, social engineering, and physical attacks.
  • Builds older than the latest beta release.

Rules (safe harbor)

  • Test only with accounts you created yourself, or against the Firebase emulators under a demo project (firebase emulators:start --project demo-throttleiq from the repo root; the repo's default project is production, so always pass --project demo-throttleiq). Never access, change or delete another rider's data. If you reach it by accident, stop, don't keep a copy, and tell us.
  • No denial of service, load testing, brute force, or mass uploads to Cloudinary or Firebase.
  • Don't trigger crash alerts or messages to real people's emergency contacts.
  • Give us a reasonable time to fix the issue before you talk about it publicly.

If you follow these rules in good faith, we consider your testing authorised and will not take legal action against you or ask anyone else to.

Known, hardening pending (not eligible)

These areas have known gaps that we are already working on. Reports about them are not eligible; the details stay private until they are fixed.

  • Known: media upload hardening pending.
  • Known: write rate limiting pending.
  • Known: live-link password guess limiting pending.
  • Known: server-side account erasure pending.
  • Known: test and review account cleanup pending.

Credits

No reports yet.


Owner runbooks

These are console and deploy steps only the project owner can take. Agents never run them. Project: throttleiqfb. Never run a bare firebase deploy: it would also push undeployed functions (crash alerts, chat moderation). If the standalone firebase binary crashes in predeploy, use npx firebase-tools@15 in its place.

Deploying the 2026-10-14 and 2026-10-15 fixes (B1, B2, B3, B9, N3, retention)

Do these in order.

  1. Ship the client first, then wait for the testers to move. Release a build numbered 27 or higher (the part after + in pubspec.yaml) with scripts/deploy.sh. It has the B2 profile changes (email in users/{uid}/private/account, find-by-email through emailLookup), the forced-update gate, and the email-verification step. Message every tester to install it.

    Builds up to beta 4.5 (build 26) have no update gate, so nothing can block them. Once the rules deploy (step 3) lands they break like this (CrtiQue_Oct15 N2):

    • They lose find-by-email and the All People list.
    • A new sign-up on an old build gets no public profile and no @username. The old build writes the email onto the profile, the rules refuse that, and the app hides the error.
    • Display-name changes on an old build fail silently once the migration in step 3 has stripped the email.

    The rules do not let the old write through on purpose: any rule that accepts it puts the email back on a profile every signed-in rider can read (tested in scripts/test/rules/critique_oct14_rules.test.js, "N2"). So go on only when no active tester is on build 26 or older. Check Analytics (Dashboard, app version, last 7 days) or ask each tester.

  2. Set config/app.minBuild (an int) in the console to the build from step 1, before the rules deploy. Every build that has the gate is then at least that build. Clients cannot write config/*. Every Android artifact carries the same number (split APKs too, see scripts/deploy.sh), so one value covers them all. Done 2026-10-19: minBuild = 29 (beta-v4.7.1). Step 3 done 2026-10-27: rules and indexes redeployed, migration moved 53/53 emails, Hosting with the new §5.

  3. Rules and indexes, then the email migration in the same hour. Until the migration runs, the old public profiles still hold their emails and the new rules only slow a scraper down (N9). Rules work on Spark:

    firebase deploy --only firestore:rules,firestore:indexes --project throttleiqfb

    If the CLI offers to delete indexes that are not in the file, answer no. Wait until the four new field overrides show "Enabled" in the console (Firestore, Indexes, Single field). Then run the one-off migration. Keep the service-account key outside the repo (today it sits in secrets/; move it first):

    cd scripts
    node oneoff/migrate_emails_private.js --service-account=/path/key.json
    node oneoff/migrate_emails_private.js --service-account=/path/key.json --yes-i-really-mean-it

    The first command is a dry run. A second real run should report 0. The migration writes an emailLookup entry only for addresses that Firebase Auth marks verified (N3). Google accounts are verified. Riders with email and password get a verification link from the new build, once, and become findable by email after they click it and next open the app. Then update public/privacy.html §5 (the email is no longer readable by other riders; someone who already knows a verified address can find the account) and deploy Hosting from a pushed main: bash scripts/deploy_hosting.sh.

  4. Realtime Database rules, only if an RTDB instance exists (the rules now deny everything): firebase deploy --only database --project throttleiqfb

  5. Account deletion (B1). Needs the Blaze plan. Upgrade, add a budget alert (for example $5; alerts do not cap spend), then:

    firebase functions:secrets:set CLOUDINARY_API_KEY --project throttleiqfb
    firebase functions:secrets:set CLOUDINARY_API_SECRET --project throttleiqfb
    firebase deploy --only functions:onUserAccountDeleted --project throttleiqfb

    The key and secret are on the Cloudinary console dashboard. An empty secret skips the media sweep and records it in accountDeletions/{uid}. To check it works, delete a test account and confirm that accountDeletions/{uid} shows ok: true with an empty failedSteps.

  6. GPS retention, when you are ready to commit to it. Blaze, and update public/privacy.html first (raw trails older than 12 months are deleted, ride summaries kept): firebase deploy --only functions:purgeOldGpsTracks --project throttleiqfb

  7. Cloudinary upload preset. Known, hardening pending (see above). The console steps and the signed-upload plan are in the owner's private notes, not in this public file.

  8. Report evidence (2026-10-21). The reports snapshot rule (chat and forum-post copies) rides on the step 3 rules deploy; until then the app files those reports without the copy (it retries without it). Deploy Hosting for the privacy.html §1/§8/§9 text with step 3. Retention (90 days after review) and anonymising a deleted rider's closed reports run in the existing daily purgeOldGpsTracks (step 6's deploy, Blaze). Deploying it also starts GPS retention; until then, do both by hand (DOCS/General/Files for Stores/moderation_policy.md §5).

  9. Rules from 2026-10-27 (follow graph, places, reviews, legacy blocks). Deployed 2026-10-27 with step 3. No client change is needed (every build since August already writes the shapes these accept), so deploy them with, or right after, step 3's migration: firebase deploy --only firestore:rules --project throttleiqfb. Proven in the emulator only (scripts/test/rules/access_matrix_rules.test.js). After it, check one rider profile's follower count and one place add with a photo on a real build.

  10. Rules and indexes from the 2026-10-27 critique fixes (7822003a, c3f9072c). Deployed 2026-10-27. Safe before the next app release: every build-29 write path passes (scripts/test/rules/critic_oct27_rules.test.js). Deploy: firebase deploy --only firestore:rules,firestore:indexes --project throttleiqfb (answer no to deleting indexes). Then on a real build: vote and un-vote a ride, comment, follow a forum, post a reply, share a ride with a photo. Later, once config/app.minBuild passes the release that deletes the ride before its comments, drop the shortcut: legacy comment-delete clause.

  11. Vote uid (2026-10-28, 7a3b2add). Before the next app release, or that release's votes are denied: deploy (done 2026-10-29, 4a16cc37) firebase deploy --only firestore:rules,firestore:indexes --project throttleiqfb, wait for the votes.uid override to show "Enabled", then from scripts/: node oneoff/backfill_vote_uid.js --service-account=../secret/<throttleiqfb key>.json (dry run), then the same with --yes-i-really-mean-it (done 2026-10-29, 110/110). Run the backfill again once config/app.minBuild passes that release.

  12. Road-speed pool without exact times (2026-11-08). The app now writes pool samples with a UTC day number instead of createdAt, in shuffled order, and reads them by day. Order matters: (a) release the build with it (scripts/deploy.sh); its pool writes are refused until (c), which only costs pool contributions. (b) Raise config/app.minBuild past it, because older builds still send createdAt. (c) npx firebase-tools@15 deploy --only firestore:rules --project throttleiqfb. (d) From scripts/, rewrite the old samples so they keep counting: node oneoff/rewrite_road_speed_samples.js --service-account=../secret/<throttleiqfb key>.json (dry run), then the same with --yes-i-really-mean-it. The privacy page change (public/privacy.html §2) has no dependency: deploy Hosting from pushed main with npx firebase-tools@15 deploy --only hosting --project throttleiqfb.

App Check enforcement

Decision 2026-10-21: enforce App Check on Cloud Firestore only. The runbook, in order, is DOCS/For Devs and Contributors/guides/app_check.md: finish step 3 above first, switch the iOS project to the paid team with App Attest set to production, register the apps (App Attest and DeviceCheck with the Team ID, Play Integrity with the Play app-signing SHA-256), ship the build through Google Play only, register debug tokens, watch the metrics for a few days, then enforce Firestore.

Status: enforced on Cloud Firestore since 2026-11-01. Android uses Play Integrity, the web live viewer (public/live-viewer.html) uses reCAPTCHA Enterprise, and iOS waits on App Attest (only registered debug tokens work today). Sideloaded or self-built Android builds and unregistered iPhones lose Firestore access; sideloaded builds from 2026-10-21 on show an "install from Google Play" screen. Researchers: test against the emulators (--project demo-throttleiq), where App Check is not enforced.

There aren't any published security advisories