Repository navigation
fix(config): timeout OAuth subprocesses - #1694
kawacukennedy wants to merge 1 commit into
Conversation
Benchmark report — no significant changeMetrics worse: 0 · better: 0 (threshold: ±3%). benchstat outputauto-generated by benchmarks.yml |
|
This has had no activity for 45 days. It will be closed in 21 days unless updated. Comment or remove the |
|
Hi @andrinoff — this PR is still open and all CI checks are green; just keeping it off the stale queue. Happy to rebase/adjust if anything needs updating. Thanks! |
|
This has had no activity for 45 days. It will be closed in 21 days unless updated. Comment or remove the |
|
Hey, if you can make this PR on the new version, that'd be great! |
8da7b78 to
79d8b98
Compare
|
Rebased onto the new v1.0.0 The fix is unchanged in intent, just re-applied on top of the restructured tree:
Also removes the two
|
Both exec.Command calls in config/oauth.go suppressed the noctx linter and could hang indefinitely if the Python helper script stalls (e.g. waiting for network, user input, or a broken process). - GetOAuth2Token: add 30-second timeout via exec.CommandContext; capture stderr into a buffer so error messages are included in the returned error instead of leaking to the application's stderr. - RunOAuth2Flow: add 5-minute timeout (user needs time for browser-based consent); capture stderr for richer error reporting on failure. This also fixes the previous behavior where the Python subprocess's stderr was piped directly to os.Stderr, which could leak sensitive information (tokens, error traces) to logs or terminal output.
79d8b98 to
06cc618
Compare
|
CI note: the only failing check here is I've opened #1749 to bump the toolchain (also reachable via |
What?
Add context timeouts to both OAuth subprocess calls (30s for token retrieval, 5 min for browser flow). Capture stderr into a buffer instead of leaking it to
os.Stderr.Why?
Both
exec.Commandcalls suppressed thenoctxlinter and could hang indefinitely if the Python helper script stalled. Stderr was piped directly toos.Stderr, which could leak sensitive information (tokens, error traces) to logs.