fix(orb): require anonymization secret for export - #1267
Closed
JSONbored wants to merge 1 commit into
Closed
Conversation
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1267 +/- ##
=======================================
Coverage 95.03% 95.03%
=======================================
Files 177 177
Lines 19886 19889 +3
Branches 7166 7167 +1
=======================================
+ Hits 18898 18901 +3
Misses 395 395
Partials 593 593
🚀 New features to boost your workflow:
|
Owner
Author
|
Superseded by #1257. #1257 keys Orb anonymization off a dedicated, domain-separated key derived from the GitHub App private key and makes |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
ORB_ANONYMIZEis enabled butORB_WEBHOOK_SECRETis missing or trivially short, which allowed empty-key HMACs to be shipped to the collector.Description
exportOrbBatchifORB_WEBHOOK_SECRETis not set or is shorter than 32 characters, and increment a metricgittensory_orb_export_errors_totalwithreason=missing_anonymization_secret(change insrc/selfhost/orb-collector.ts).test/unit/selfhost-orb-collector.test.tsto use a long test secret for normal flows and add regression tests that assert export fails closed and does not call the collector when the secret is missing or weak..env.exampleto document thatORB_WEBHOOK_SECRETis required (32+ characters) whenORB_ANONYMIZE=true.Testing
npm test -- --run test/unit/selfhost-orb-collector.test.ts, and all tests in that file passed.git diff --checkproduced no spacing/conflict issues locally.npm run test:ci, which began but was blocked by local type resolution for optional native dependencies (pg/ioredis) duringtscand thus did not complete in this environment.npm audit --audit-level=moderatewas attempted but could not complete due to the registry audit endpoint returning403in this environment.Codex Task