Skip to content

feat(orb): hardwire fleet telemetry on (no opt-out); anonymize with the App secret - #1257

Merged
JSONbored merged 3 commits into
mainfrom
feat/orb-hardwire
Jun 24, 2026
Merged

feat(orb): hardwire fleet telemetry on (no opt-out); anonymize with the App secret#1257
JSONbored merged 3 commits into
mainfrom
feat/orb-hardwire

Conversation

@JSONbored

Copy link
Copy Markdown
Owner

Makes Orb fleet-calibration export always-on per the directive — no ORB_ENABLED opt-out. Self-hosting gittensory now contributes anonymized calibration telemetry by default, the way the fleet collector (#1255) is meant to work.

What changed

  • Removed ORB_ENABLED and the orbEnabled() gate. The hourly export cron always runs; exportOrbBatch self-gates on a configured GitHub App webhook secret — no App configured → no review data to export → no-op, so first-run is clean.
  • Anonymization keyed off GITHUB_WEBHOOK_SECRET (the App's own secret, present once the App is set up) instead of a separate ORB_WEBHOOK_SECRET. One less thing to configure; still a per-instance key the collector never holds.
  • ORB_AIR_GAP kept strictly as an air-gapped/offline escape (instances with no internet), not advertised as a telemetry opt-out.

Transparency

.env.example now leads with a TELEMETRY NOTICE: running the self-host image contributes anonymized, on-by-default calibration data, and spells out exactly what is sent (verdict, outcome, reversal flag, bucketed reason, cycle time) and what is never sent (repo/owner/PR names, commit SHAs, code, diffs, comments, logins). repo/PR identifiers are HMAC'd with the instance's own secret → the collector can never de-anonymize them.

This is a deliberate product decision (use the tool ⇒ contribute anonymized fleet signal); the disclosure is prominent so self-hosters aren't surprised by the outbound calls.

Validation

  • npm run test:ci green; npm audit 0 vulnerabilities
  • 100% branch coverage on orb-collector.ts (incl. the new "no App secret → no-op" gate)

Advances #1255.

@dosubot dosubot Bot added the size:M label Jun 24, 2026

@superagent-security superagent-security Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superagent found 2 security concern(s).

Comment thread src/selfhost/orb-collector.ts
Comment thread src/server.ts
@superagent-security superagent-security Bot added the pr:flagged PR flagged for review by security analysis. label Jun 24, 2026
@JSONbored JSONbored self-assigned this Jun 24, 2026
@codecov

codecov Bot commented Jun 24, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.04%. Comparing base (43a2449) to head (1f88aec).
⚠️ Report is 1 commits behind head on main.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1257   +/-   ##
=======================================
  Coverage   95.04%   95.04%           
=======================================
  Files         177      177           
  Lines       19927    19933    +6     
  Branches     7178     7176    -2     
=======================================
+ Hits        18939    18945    +6     
  Misses        395      395           
  Partials      593      593           
Files with missing lines Coverage Δ
src/selfhost/orb-collector.ts 100.00% <100.00%> (ø)
🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@superagent-security superagent-security Bot removed the pr:flagged PR flagged for review by security analysis. label Jun 24, 2026
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 24, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
gittensory-ui c9e8b41 Commit Preview URL

Branch Preview URL
Jun 24 2026, 09:58 PM

@JSONbored JSONbored added the orb Gittensory Orb related - maintainer self-hosting analytics. label Jun 24, 2026

@superagent-security superagent-security Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Superagent found 1 security concern(s).

Comment thread src/selfhost/orb-collector.ts Outdated
@superagent-security superagent-security Bot added the pr:flagged PR flagged for review by security analysis. label Jun 24, 2026
…App secret

Remove the ORB_ENABLED opt-in — Orb fleet-calibration export is now ALWAYS ON (the contract of
self-hosting gittensory). It self-gates on a configured GitHub App webhook secret (no App → no review
data to export anyway) and uses that secret (GITHUB_WEBHOOK_SECRET) as the per-instance anonymization
key, so there is no separate ORB_WEBHOOK_SECRET to set. ORB_AIR_GAP stays for air-gapped/offline
deployments only.

.env.example now carries a prominent TELEMETRY NOTICE: running the self-host image contributes
anonymized, on-by-default calibration data. repo/PR identifiers are HMAC'd with the instance's own
secret (the collector can never de-anonymize them) and no code / PII / repo names / commit SHAs are sent.
Address two review findings on the always-on telemetry:

P1 — stop reusing GITHUB_WEBHOOK_SECRET as the anonymization key. A low-entropy webhook secret made the
24-char HMACs brute-forceable, and coupling the two boundaries meant rotating the webhook secret would
silently break repo-hash dedup continuity on the collector. Derive a DEDICATED, domain-separated key
from GITHUB_APP_PRIVATE_KEY (high-entropy RSA material) via HMAC(appKey, "gittensory-orb-anon-v1"), and
gate export on the App private key. No new operator config; the webhook secret stays single-purpose.

P2 — the always-on hourly export cron no longer swallows errors silently; it logs a structured
selfhost_orb_export_error (message) so operators can detect reliability issues.
…ivate key

Stop using GITHUB_APP_PRIVATE_KEY as HMAC key material for telemetry anonymization
(key separation — the App's RSA private key is for JWT signing only). Generate a 256-bit
random secret once, persist it in system_flags (getOrCreateAnonSecret), and reuse it on
every export: stable so the collector can still dedup, per-instance, single-purpose. The
App private key now only GATES export (configured ⇒ there is review data to send).
@superagent-security

Copy link
Copy Markdown
Contributor

Superagent didn't find any vulnerabilities or security issues in this PR.

@superagent-security superagent-security Bot removed the pr:flagged PR flagged for review by security analysis. label Jun 24, 2026
@dosubot dosubot Bot added size:L and removed size:M labels Jun 24, 2026
@JSONbored
JSONbored merged commit b03bcbc into main Jun 24, 2026
19 checks passed
@JSONbored
JSONbored deleted the feat/orb-hardwire branch June 24, 2026 22:16
JSONbored added a commit that referenced this pull request Jun 24, 2026
…1280)

The Orb exporter anonymizes with a dedicated, randomly-generated per-instance secret stored in system_flags (since #1257), not a key derived from the App private key. Corrects the .env.example TELEMETRY NOTICE prose to match the shipped code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

orb Gittensory Orb related - maintainer self-hosting analytics.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Orb: fleet calibration collector + analytics (retire per-instance App; feed from review_audit)

1 participant