feat(selfhost): add claude code token to native Docker secrets#5144
Merged
Conversation
Extends the file-mounted secrets convention (secrets/README.md) to cover CLAUDE_CODE_OAUTH_TOKEN, the one core self-host secret still requiring an inline .env value. The existing generic <NAME>_FILE loader (src/selfhost/load-file-secrets.ts) already reads any *_FILE var, so this needs no application code change -- just the compose secrets wiring, the init-script placeholder, and doc updates.
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 #5144 +/- ##
=======================================
Coverage 94.33% 94.33%
=======================================
Files 472 472
Lines 39878 39878
Branches 14544 14544
=======================================
Hits 37617 37617
Misses 1583 1583
Partials 678 678
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Merged
19 tasks
This was referenced Jul 12, 2026
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
CLAUDE_CODE_OAUTH_TOKENto the native Docker Compose secrets convention (docker-compose.yml,scripts/selfhost-init-secrets.sh,secrets/README.md,.env.example) — it was the last core self-host secret still requiring an inline.envvalue.<NAME>_FILEloader (src/selfhost/load-file-secrets.ts) already resolves any_FILE-suffixed var, confirmed by reading it before making this change.Scope
type(scope): short summaryConventional Commit format.CONTRIBUTING.mdand does not reintroduce GitHub Pages, VitePress,site/, orCNAME.Validation
git diff --checknpm run actionlintnpm run typechecknpm run test:coverage— skipped, see note belownpm run test:workers— skipped, see note belownpm run build:mcp— skipped, see note belownpm run test:mcp-pack— skipped, see note belownpm run ui:openapi:check— skipped, see note belownpm run ui:lint— skipped, see note belownpm run ui:typecheck— skipped, see note belownpm run ui:build— skipped, see note belownpm audit --audit-level=moderateIf any required check was skipped, explain why:
docker-compose.yml,scripts/selfhost-init-secrets.sh,secrets/README.md, and.env.example— nosrc/**,apps/gittensory-ui/**, or API/schema files, and adds zero application code (the generic secret-file loader already covers this var). Codecov's patch gate only measuressrc/**, so there's no coverage obligation here. Ran the checks that actually apply to what changed instead:docker compose -f docker-compose.yml config --quiet(valid),npm run selfhost:env-reference:check(clean — confirms no new literalenv.SOMETHINGread was introduced),npm run docs:drift-check(clean), andbash -n scripts/selfhost-init-secrets.sh(valid). Skipped the UI/MCP/miner/workers suites since none of their inputs changed.Safety
secrets/README.md,.env.example).UI Evidence
Not applicable — no visible UI/frontend change.
Notes
gittensoryservice (seesecrets/README.md's table) —CLAUDE_CODE_OAUTH_TOKENwas the only one left requiring an inline.envvalue.secrets/claude_code_oauth_token.txton deployments that opt into this and remove the now-redundantCLAUDE_CODE_OAUTH_TOKEN=line from.env.