fix: security hardening across auth, API, keychain, and error output#7
Merged
wcole1-godaddy merged 1 commit intomainfrom Feb 24, 2026
Merged
fix: security hardening across auth, API, keychain, and error output#7wcole1-godaddy merged 1 commit intomainfrom
wcole1-godaddy merged 1 commit intomainfrom
Conversation
SEC-01: Bind OAuth callback server to 127.0.0.1 instead of 0.0.0.0 SEC-02: Sanitize response headers in --debug output (redact cookies, tokens) SEC-03: Sanitize response headers in --include JSON envelope SEC-04: HTML-escape error messages in OAuth callback page (XSS) SEC-05: Harden PowerShell escaping (strip NUL, reject newlines in all methods) SEC-06: Stop forwarding raw server error payloads into userMessage fields SEC-07: Redact sensitive fields (token, secret, password) in debug request body SEC-10: Add 120s timeout to OAuth server to prevent indefinite hang
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.
Security Hardening
Addresses 8 findings from a security audit of the CLI. 2 high, 4 medium, 2 low severity.
High
127.0.0.1instead of0.0.0.0, preventing LAN-based auth code interception--debugoutput now sanitizes response headers, redactingSet-Cookie,Authorization, and other sensitive headersMedium
--includeflag now sanitizes response headers before writing them into the JSON envelope on stdoutuserMessagefields in JSON envelopes. Affectsapplications.ts(9 GraphQL catch sites) andwebhook-events.tsLow
--debugoutput now redacts sensitive fields (token,secret,password,credential) in request bodiesNot code changes
-Ffile read) are by-design behaviors, documented onlyFiles changed
src/core/auth.ts— SEC-01, SEC-04, SEC-10src/core/api.ts— SEC-02, SEC-03, SEC-06, SEC-07src/cli/commands/api.ts— SEC-03src/effect/layers/keychain-native.ts— SEC-05src/services/applications.ts— SEC-06src/services/webhook-events.ts— SEC-06Testing
tsc --noEmitpassespnpm run buildpasses