Uh oh!
There was an error while loading. Please reload this page.
security: add DO_CLIENT_SECRET env var override - #2538
Merged
Conversation
Allows users/organizations to supply their own DigitalOcean OAuth client secret via DO_CLIENT_SECRET env var rather than relying on the bundled default. The bundled secret remains as fallback. Fixes#2537 Agent: security-auditor Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Agent: security-auditor Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
louisgv
approved these changes
Mar 12, 2026
louisgv
left a comment
Collaborator
There was a problem hiding this comment.
Security Review
Verdict: APPROVED
Commit: 9dcf40d
Findings
None. The changes are secure and follow best practices.
Analysis
The PR adds support for overriding DO_CLIENT_SECRET via environment variable while maintaining the bundled default. This enables organizations to use custom DigitalOcean OAuth applications.
Security considerations:
- ✅ Environment variable access is safe (no injection risk)
- ✅ Fallback maintains backward compatibility
- ✅ Original OAuth secret pattern is already acceptable for public clients
- ✅ Secret is only used in secure HTTPS POST requests (token exchange, refresh)
- ✅ No logging or exposure of secret values
- ✅ Documentation accurately describes the feature and use case
Code quality:
- ✅ Proper bracket notation for env var access
- ✅ Version bump follows semantic versioning (patch)
- ✅ Clear inline documentation added
Tests
- bash -n: N/A (no shell scripts modified)
- bun test: PASS (verified with do-payment-warning.test.ts)
- curl|bash: N/A (TypeScript only)
- macOS compat: N/A (TypeScript only)
Recommendation
Safe to merge. No security concerns.
-- security/pr-reviewer
Uh oh!
There was an error while loading. Please reload this page.
AhmedTMM pushed a commit
to AhmedTMM/spawn
that referenced
this pull request
Mar 12, 2026
* security: add DO_CLIENT_SECRET env var override Allows users/organizations to supply their own DigitalOcean OAuth client secret via DO_CLIENT_SECRET env var rather than relying on the bundled default. The bundled secret remains as fallback. FixesOpenRouterLabs#2537 Agent: security-auditor Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * chore: bump CLI version to 0.16.19 Agent: security-auditor Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> --------- Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
AhmedTMM pushed a commit
to AhmedTMM/spawn
that referenced
this pull request
Mar 13, 2026
* security: add DO_CLIENT_SECRET env var override Allows users/organizations to supply their own DigitalOcean OAuth client secret via DO_CLIENT_SECRET env var rather than relying on the bundled default. The bundled secret remains as fallback. FixesOpenRouterLabs#2537 Agent: security-auditor Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * chore: bump CLI version to 0.16.19 Agent: security-auditor Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> --------- Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
5 tasks
AhmedTMM pushed a commit
to AhmedTMM/spawn
that referenced
this pull request
Mar 13, 2026
* security: add DO_CLIENT_SECRET env var override Allows users/organizations to supply their own DigitalOcean OAuth client secret via DO_CLIENT_SECRET env var rather than relying on the bundled default. The bundled secret remains as fallback. FixesOpenRouterLabs#2537 Agent: security-auditor Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> * chore: bump CLI version to 0.16.19 Agent: security-auditor Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> --------- Co-authored-by: B <6723574+louisgv@users.noreply.github.com> Co-authored-by: Claude Sonnet 4.5 <noreply@anthropic.com>
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 freeto 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.
Why: Allows users/organizations to supply their own DigitalOcean OAuth client secret via
DO_CLIENT_SECRETenv var, eliminating the need to modify source code for secret rotation or custom deployments.Changes
packages/cli/src/digitalocean/digitalocean.ts: ChangeDO_CLIENT_SECRETto read fromprocess.env["DO_CLIENT_SECRET"]with fallback to bundled valueTest plan
bun testpasses (1381 tests, 0 failures)DO_CLIENT_SECRETenv var overrides the bundled secretFixes#2537
-- refactor/security-auditor