fix(#8): remove SSM credential logging at Info level - #9
fix(#8): remove SSM credential logging at Info level#9fullsend-ai-coder[bot] wants to merge 1 commit into
Conversation
Remove logger.Infof calls for TokenValue and StreamUrl in runSSMsession (cmd/ocm-backplane/cloud/ssm.go). These sensitive AWS SSM session credentials were logged at Info level on every invocation of "ocm-backplane cloud ssm-session", exposing the websocket auth token to terminal scrollback and log collectors. The token alone is sufficient to hijack an active SSM session to a customer EC2 instance (CWE-532, CWE-312). SessionId is retained at Debug level since it is not a secret but useful for troubleshooting. The session JSON is already passed privately to session-manager-plugin via argv, so these log lines served no functional purpose. Added three tests verifying that TokenValue, StreamUrl, and SessionId do not appear in log output at Info level. Note: golangci-lint could not run in the sandbox (network restriction on install). go vet passed. One pre-existing test failure in common_test.go (network-dependent test blocked by sandbox) is unrelated to this change. Closes #8
|
/fs-review |
|
🤖 Finished Review · ✅ Success · Started 8:38 AM UTC · Completed 8:42 AM UTC |
|
Looks good to me FindingsLow
Labels: PR fixes a security bug (CWE-532/CWE-312) in credential logging Previous runReview — approvePR: fix(#8): remove SSM credential logging at Info level SummaryClean, well-scoped security fix that removes credential logging at Info level in Changes verified
No findingsNo blocking or notable issues identified. The fix is correct, minimal, and well-tested. |
|
/fs-review |
|
🤖 Finished Review · ❌ Failure · Started 4:56 AM UTC · Completed 5:10 AM UTC |
Remove logger.Infof calls for TokenValue and StreamUrl in runSSMsession (cmd/ocm-backplane/cloud/ssm.go). These sensitive AWS SSM session credentials were logged at Info level on every invocation of "ocm-backplane cloud ssm-session", exposing the websocket auth token to terminal scrollback and log collectors. The token alone is sufficient to hijack an active SSM session to a customer EC2 instance (CWE-532, CWE-312).
SessionId is retained at Debug level since it is not a secret but useful for troubleshooting. The session JSON is already passed privately to session-manager-plugin via argv, so these log lines served no functional purpose.
Added three tests verifying that TokenValue, StreamUrl, and SessionId do not appear in log output at Info level.
Note: golangci-lint could not run in the sandbox (network restriction on install). go vet passed. One pre-existing test failure in common_test.go (network-dependent test blocked by sandbox) is unrelated to this change.
Closes #8
Post-script verification
agent/8-remove-ssm-token-logging)ae64d7cf510a866657b8dcb2881b8c7dc3fe2a16..HEAD)