Skip to content

ci(security): add Trivy security scanning - #1

Merged
appleboy merged 1 commit into
mainfrom
fix/trivy-security-scan
Oct 6, 2026
Merged

appleboy merged 1 commit into
mainfrom
fix/trivy-security-scan

Conversation

@appleboy

@appleboy appleboy commented Oct 6, 2026

Copy link
Copy Markdown
Member

Summary

Add the missing Trivy filesystem scan using the same workflow as the other golang-queue repositories. Scan vulnerabilities, secrets, and misconfigurations on pull requests to main, pushes to main, daily schedules, and manual dispatch. HIGH/CRITICAL findings fail the job; no exclusions or ignore rules are added.

AI authorship

  • AI was used: OpenAI Codex.
  • AI-authored files: .github/workflows/security.yml.
  • Human line-by-line reviewed: None — not yet reviewed by a human.

Change classification and scope

Leaf: isolated CI configuration, no application behavior or public interfaces changed. One reviewer recommended. Goal: close the missing security-scan coverage. Related issues: N/A; none supplied.

Verification

Checkout fix/trivy-security-scan at a1339113b0033c5bf82109afc486e1e993a04c92 and run from this repository root. Prerequisites: Trivy 0.69.3 with a current vulnerability database; Go 1.26.7 to run actionlint 1.7.12.

Command Expected result Status / observed result
trivy fs --scanners vuln,secret,misconfig --severity CRITICAL,HIGH --exit-code 1 . No HIGH/CRITICAL findings; exit 0 Passed, exit 0 on 2026-10-06
go run github.com/rhysd/actionlint/cmd/actionlint@v1.7.12 .github/workflows/security.yml No workflow syntax errors Passed, exit 0
git diff --check main...HEAD No whitespace errors Passed, staged diff check before commit

Behavioral scenario: this branch previously had no security workflow. Open the PR against main, then inspect the Trivy Security Scan check; expect the scan job to complete successfully. Remote execution is pending at PR creation and will be checked separately. Daily/manual runs become available after merge. No runtime tests are applicable to this workflow-only change. Cleanup: none; tools only populate local caches.

Security, risk, and rollback

Read-only contents permission; reviewed diff contains no secrets. The scan uses the existing organization HIGH/CRITICAL policy. Risk: future findings may block CI. Roll back by reverting this commit. Review the workflow triggers, scanner list, severity and nonzero exit policy.

- Scan pull requests, main updates, and daily schedules for security findings
- Fail on high and critical vulnerabilities, secrets, and misconfigurations
@appleboy
appleboy merged commit b37a4bf into main Oct 6, 2026
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.

1 participant