You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
auditcmd: audit-logs substring match, filenames shape, and pre-scan truncation all let secrets bypass DLP #109
Three related gaps in packages/guard/auditcmd/auditcmd.go all weaken the DLP scan applied to audit-log content:
:58 — the check that decides whether a log entry is an "audit-logs" entry uses a substring match against the entry's identifier/path, so any entry whose name merely contains that substring (without being an actual audit-logs entry) is misclassified, and conversely crafted names can dodge the intended match.
:176 — when the entry being scanned has a filenames field (a list), the code only scans that field and skips scanning sibling fields in the same entry, so secrets placed in another field of a filenames-shaped entry are never checked.
:292 — the DLP scan is run on a summary string that has already been truncated for display, rather than on the full original content, so secrets located past the truncation point are never seen by the scanner.
Impact
Each of these independently lets secret material pass through the audit command's DLP scanning path unredacted or unflagged: via a misclassified entry, via an unscanned sibling field, or via content past the truncation cutoff.
Repro
Craft an entry whose identifier merely contains the audit-logs substring but is not actually one, and observe the special-case handling at :58 misfires (or a genuine audit-logs-shaped entry's substring is crafted to dodge it).
Produce a filenames-shaped entry with a secret in a different top-level field and observe only filenames gets scanned.
Produce a long entry where a secret appears after the point the display-summary truncates it, and observe the DLP scan (which runs on the truncated summary) never sees it.
Suggested fix
Replace the substring check at :58 with an exact match (or a structural/type check) against the entry's actual classification rather than a loose substring test. At :176, scan all relevant fields of the entry, not just filenames, when that shape is detected. At :292, run the DLP scan against the full original content before truncation, and only truncate the already-scanned/redacted result for display.
Three separate DLP bypass vectors in the audit log path is a lot of surface area. I'll fix each one: use exact path matching instead of substring, validate the filename shape against a strict pattern, and move truncation to after the scan completes.
Activity
sharmis-tp commentedon Nov 18, 2026
Three separate DLP bypass vectors in the audit log path is a lot of surface area. I'll fix each one: use exact path matching instead of substring, validate the filename shape against a strict pattern, and move truncation to after the scan completes.