docs(miner): regenerate env-reference.md for GITTENSORY_MINER_KILL_SWITCH - #5507
Closed
JSONbored wants to merge 1 commit into
Closed
docs(miner): regenerate env-reference.md for GITTENSORY_MINER_KILL_SWITCH#5507JSONbored wants to merge 1 commit into
JSONbored wants to merge 1 commit into
Conversation
…gv and child env setup-github-datasource.sh had the identical secret-leak pattern PR #5489 fixed in its sibling setup-sentry-datasource.sh: sourcing .env with `set -a` exported GITHUB_TOKEN/GRAFANA_ADMIN_PASSWORD into every child process's environment, `curl -u "$AUTH"` put GRAFANA_ADMIN_PASSWORD on the process argv (visible to any local user via ps), and `-d "$(payload)"` put the GitHub token in argv too. Apply the same fix: drop `set -a` on the .env source, authenticate via a temporary permissioned netrc file instead of `-u`, pipe the JSON payload to curl over stdin via `--data-binary @-` instead of `-d`, and wrap curl in a `grafana_curl()` helper that additionally unsets GRAFANA_ADMIN_PASSWORD and GITHUB_TOKEN from its own environment as defense in depth. Idempotent update-vs-create and the health check are unchanged. Adds test/unit/selfhost-grafana-github-datasource.test.ts (no prior dedicated test file existed for this script) with a regression test mirroring the one added for the Sentry script in #5489, plus mode and behavior-preservation checks.
Contributor
|
Superagent didn't find any vulnerabilities or security issues in this PR. |
Owner
Author
|
Closing: this was created against the wrong branch by mistake (a tooling slip picked up fix/github-datasource-secret-leak — the branch behind #5503 — instead of docs/miner-env-reference-kill-switch-drift). It's a duplicate of #5503 with a mismatched title, not a real second PR. The actual env-reference.md fix is being re-opened correctly. |
JSONbored
added a commit
that referenced
this pull request
Jul 13, 2026
…me.storage.sync (#5511) #5343 removed the discoveryIndexUrl UI field and stopped reading/writing it, but chrome.storage.sync.set only merges keys -- it never deletes ones an earlier extension version already synced. Without an active purge, a value synced before #5343 stays in a user's account indefinitely, which is a real privacy/data-retention gap #5343 didn't close. Add removeLegacyDiscoveryIndexUrl(), called from refreshSettings() (which runs on every options-page load and again at the end of every save), so any stale value is cleared regardless of which path a user hits first. Extends the existing dead-field regression test with coverage for the purge on both load and save. Also regenerates packages/gittensory-miner/docs/env-reference.md, which was already stale on main (GITTENSORY_MINER_KILL_SWITCH from #5198/#5500 was never regenerated in) -- unrelated to this fix but required for miner:env-reference:check to pass in this PR's own CI; also fixed standalone in #5507.
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.
Summary
`npm run miner:env-reference:check` has been failing on `main` since #5198/#5500 added the `env.GITTENSORY_MINER_KILL_SWITCH` read in `lib/config-precedence.js` (`config-precedence.js:14`) without regenerating this generated doc. Found while running the full local gate for an unrelated fix and confirmed the drift is real and still present at current `main`.
Ran `npm run miner:env-reference` and committed the regenerated `packages/gittensory-miner/docs/env-reference.md` (single line added, matching the file's own "Generated by ... Do not edit manually" contract).
Validation
Mechanical, zero-risk generated-artifact fix — no behavior change.