Skip to content

feat: add trivy image scan support - #10

Merged
sraisl merged 2 commits into
mainfrom
feat/trivy-image-scan
Jul 19, 2026
Merged

sraisl merged 2 commits into
mainfrom
feat/trivy-image-scan

Conversation

@sraisl

@sraisl sraisl commented Jul 19, 2026

Copy link
Copy Markdown
Owner

New optional input trivy-image — when set, trivy also runs 'trivy image ' in addition to the existing filesystem scan. The image must be available in the local Docker daemon (build it before running PolyScan).

Changes:

  • action.yml: new input trivy-image (optional, default empty)
  • src/engines/trivy.ts: runTrivy(target, image?) — fs scan always runs; image scan runs when image is provided. Findings from both scans are merged into a single EngineResult.
  • src/main.ts: read trivy-image input, pass to runEngine/runTrivy
  • README.md: document new input
  • test/trivy-parser.test.ts: image scan output test (multi-layer result)

sraisl and others added 2 commits July 19, 2026 21:08
New optional input `trivy-image` — when set, trivy also runs
'trivy image <name>' in addition to the existing filesystem scan.
The image must be available in the local Docker daemon (build it
before running PolyScan).

Changes:
- action.yml: new input trivy-image (optional, default empty)
- src/engines/trivy.ts: runTrivy(target, image?) — fs scan always runs;
  image scan runs when image is provided. Findings from both scans are
  merged into a single EngineResult.
- src/main.ts: read trivy-image input, pass to runEngine/runTrivy
- README.md: document new input
- test/trivy-parser.test.ts: image scan output test (multi-layer result)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- schema.ts: add optional source? field to Finding for sub-source tagging
- trivy.ts: parseTrivyData(data, imageRef?) tags image findings with
  source: 'image:<name>' so they can be distinguished from fs findings
- summary.ts: new '🐳 Container Image Scan' section below the secrets
  block, showing CVE/rule, full finding message and layer per image finding
- test/trivy-parser.test.ts: 2 new tests for source tagging

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sraisl
sraisl merged commit 8fb171b into main Jul 19, 2026
3 checks passed
@sraisl
sraisl deleted the feat/trivy-image-scan branch September 7, 2026 18:18
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