Skip to content

Feat/scanner update comment#23

Merged
lachen-nv merged 3 commits into
mainfrom
feat/scanner-update-comment
Jan 28, 2026
Merged

Feat/scanner update comment#23
lachen-nv merged 3 commits into
mainfrom
feat/scanner-update-comment

Conversation

@lachen-nv

Copy link
Copy Markdown
Collaborator

Summary

Improve security scanner actions (TruffleHog, Trivy, CodeQL) to update existing PR comments instead of creating new ones on each run, reducing comment noise.

Changes

  • Comment Update: Scan actions now find and update their existing comments in PRs rather than creating duplicate comments
  • Status-Based Updates: Comments are only updated when scan status changes (e.g., clean ↔ issues_found), preventing unnecessary updates
  • Enhanced Metadata: Added timestamp and commit SHA to each comment for better traceability
  • Unique Comment Markers: Each scanner uses HTML comment markers () to identify their own comments

Modified Actions

  • .github/actions/trufflehog-scan/action.yml - TruffleHog secret scanner
  • .github/actions/trivy-scan/action.yml - Trivy vulnerability scanner
  • .github/actions/codeql-scan/action.yml - CodeQL security analysis

Benefits

  • Reduced PR clutter: No more duplicate comments on every push
  • Dynamic updates: Only notifies when status actually changes
  • Better tracking: Timestamps and commit SHAs show scan history

@lachen-nv lachen-nv merged commit f435aa6 into main Jan 28, 2026
2 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Jan 28, 2026
@lachen-nv lachen-nv deleted the feat/scanner-update-comment branch February 5, 2026 04:23
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants