Skip to content

Commit 1678ac3

Browse files
committed
Fix security logging
Addresses GitHub Actions security review: Risk: Logging secret_name reveals credential context to attackers Fix: - Changed log message from revealing secret type to generic warning - Before: "SECURITY: Secret '{secret_name}' found in sanitized message" - After: "SECURITY: Credential sanitization validation failed" - Maintains security alerting without revealing attack surface Signed-off-by: sallyom <[email protected]>
1 parent 2cdb3b4 commit 1678ac3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

components/runners/claude-code-runner/security_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,9 @@ def sanitize_exception_message(
6161
# This catches edge cases like partial matches, encoded forms, etc.
6262
for secret_name, secret_value in secrets_to_redact.items():
6363
if secret_value and secret_value.strip() and secret_value in error_msg:
64+
# SECURITY: Do not log secret_name - reveals context to attackers
6465
logging.error(
65-
f"SECURITY: Secret '{secret_name}' found in sanitized message - "
66+
"SECURITY: Credential sanitization validation failed - "
6667
"using generic error message"
6768
)
6869
return "Operation failed - check configuration and credentials"

0 commit comments

Comments
 (0)