Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .github/workflows/security.yml
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,24 @@ jobs:
# Residual risk, accepted: a credential that literally ends in one of these extensions.
'''^[A-Za-z0-9_.-]+\.(py|conf|cnf|ini|cfg|ya?ml|json|toml|sh|tpl)$''',
]
[[allowlists]]
description = "kagent-tools redaction-test fixture"
# kagent-dev/tools internal/mcp/mcp_test.go declares a fake JWT-shaped constant to prove a
# tool error never puts a credential on a span (upstream #107, ours). It is in upstream
# history (8fd3465) and in krateo-agentiko/kagent-tools (7162d6d), so a fingerprint cannot
# cover it. Scoped to that file AND that exact line shape (const secret, segments 17/11/3
# after "eyJ"). The constant is being replaced upstream with a value that is not token-shaped.
# Tested with gitleaks 8.30.1: both findings clear; a JWT-shaped value under another
# const name in that file, or `const secret` in any other file, is still caught
# (Diego 2026-11-16).
condition = "AND"
regexTarget = "line"
paths = [
'''(^|/)internal/mcp/mcp_test\.go$''',
]
regexes = [
'''^\s*const secret = "eyJ[A-Za-z0-9_-]{17}\.[A-Za-z0-9_-]{11}\.[A-Za-z0-9_-]{3}"\s*$''',
]
TOML
# --redact keeps the secret out of the log and must stay. But on its own the job prints
# "leaks found: N" and nothing else -- not the rule, the file, or the fingerprint -- so a
Expand Down