Skip to content

Conversation

@derekmisler
Copy link
Contributor

@derekmisler derekmisler commented Jan 22, 2026

Resolves https://github.com/docker/agentcatalog/issues/36

Summary

  • Fix false positive secret detection when reviewing PRs that contain security patterns (e.g., changes to secret-patterns.sh)
  • Improve output extraction to filter out verbose agent "thinking" content

Changes

False Positive Fix (security/sanitize-output.sh)

When reviewing PRs containing security scanning code, the regex patterns themselves would trigger false positives. For example, the literal string 'ghs_[a-zA-Z0-9]{36}' in a diff would match the grep pattern.

Now the scanner:

  • Extracts each match and verifies it doesn't contain regex metacharacters ([]{}()*+?^$\)
  • Skips matches that appear within single quotes (quoted patterns in code)

Verbose Output Fix (action.yml)

Added filters to remove agent internal content from extracted output:

  • msg= log messages
  • --- Agent: / --- Tool: markers
  • <thinking> / </thinking> XML tags
  • [thinking] / [/thinking] bracket tags
  • Thinking: prefixed content

Tests (tests/test-security.sh)

Added two new test cases:

  • Test 14: Regex pattern in output → correctly NOT flagged
  • Test 15: Real GitHub server token → correctly detected

@derekmisler derekmisler self-assigned this Jan 22, 2026
@derekmisler derekmisler marked this pull request as ready for review January 22, 2026 21:55
@derekmisler derekmisler requested a review from a team as a code owner January 22, 2026 21:55
@derekmisler derekmisler merged commit eaa2dfa into docker:main Jan 23, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants