fix(miner): isolate cli agent credential paths#4981
Conversation
Deploying with
|
| Status | Name | Latest Commit | Preview URL | Updated (UTC) |
|---|---|---|---|---|
| ✅ Deployment successful! View logs |
gittensory-ui | 5544e9d | Commit Preview URL Branch Preview URL |
Jul 11 2026, 06:43 AM |
|
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 #4981 +/- ##
=======================================
Coverage 94.11% 94.11%
=======================================
Files 433 433
Lines 38494 38495 +1
Branches 14037 14037
=======================================
+ Hits 36229 36230 +1
Misses 1604 1604
Partials 661 661
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
|
Warning 🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨🟨 ⏸️ Gittensory review result - manual review recommendedReview updated: 2026-07-12 08:23:09 UTC
⏸️ Suggested Action - Manual Review
Review summary Nits — 5 non-blocking
Concerns raised — review before merging
Review context
Contributor next steps
Signal definitions
[BETA] Chat with GittensoryAsk Gittensory a question about this PR directly in a comment — grounded only in the same cached, public-safe facts shown above, never a new claim.
Full command reference: https://gittensory.aethereal.dev/docs/gittensory-commands 🟩 Safe / merged · 🟦 Advisory · 🟨 Held for review · 🟥 Blocked / closed 💰 Earn for open-source contributions like this. Gittensor lets GitHub contributors earn for the work they already do — register to start earning →. Checked by Gittensory, a quiet PR intelligence layer for OSS maintainers.
|
Motivation
HOMEand XDG credential/config envs and spawning a prompt-injectable subprocess in the attempt worktree, which exposed local CLI credential stores to prompt injection.Description
CODING_AGENT_ENV_ALLOWLISTand switched the driver to use it instead of the broaderSUBPROCESS_CLI_ENV_ALLOWLISTsoHOME/XDG_*paths are not inherited by default (packages/gittensory-engine/src/miner/cli-subprocess-driver.ts).SUBPROCESS_CLI_ENV_ALLOWLISTin the driver and callbuildAllowlistedEnv(...)with the new allowlist so callers can still explicitly overlay an isolatedHOMEwhen needed.test/unit/cli-subprocess-driver.test.tsto assert parentHOME/XDG_CONFIG_HOME/XDG_DATA_HOME/XDG_STATE_HOMEare not passed through while verifying explicit overlays (e.g. an injectedHOMEor session handle) continue to work.Testing
npm test -- --run test/unit/cli-subprocess-driver.test.tsand the test file passed.npm run build:minerand the build succeeded.npx vitest run test/unit/cli-subprocess-driver.test.ts --coverage.enabled true --coverage.reporter=text); the targeted tests passed but the repo-wide global coverage thresholds failed (this is expected when running a single test file against the repository-level coverage gates).Codex Task