Skip to content

fix: persist comprehensive Trivy secrets and misconfigs - #86

Closed
Abhinesh Jha (Abhineshhh) wants to merge 1 commit into
microsoft:mainfrom
Abhineshhh:fix/security-findings-persist
Closed

fix: persist comprehensive Trivy secrets and misconfigs#86
Abhinesh Jha (Abhineshhh) wants to merge 1 commit into
microsoft:mainfrom
Abhineshhh:fix/security-findings-persist

Conversation

@Abhineshhh

Copy link
Copy Markdown
Contributor

Description

Comprehensive scans counted secrets/misconfigurations but never built SecurityFindings, so the security_findings table stayed empty and detail reports could not surface them — despite schema, InsertImage support, and docs claiming otherwise.

Related Issue

Fixes #73

Changes

  • Map Trivy secrets → finding_type=secret and misconfigs → misconfiguration
  • Copy findings onto ImageRecord during analysis
  • Load security findings and capabilities in QueryAllImageDetails
  • Emit securityFindings and capabilities in the detailed JSON report
  • Update docs/detailed-report.md
  • Tests for parse → insert → query → detail report path

Checklist

  • task lint passes locally
  • task test passes locally
  • Documentation updated (if applicable)

Comprehensive scans counted secrets/misconfigurations but never built
SecurityFindings, so the security_findings table stayed empty and detail
reports could not surface them.

Map Trivy secrets and misconfigs into domain findings, store them on the
image record, load them (and capabilities) in QueryAllImageDetails, and
emit them in the detailed JSON report.

Fixes microsoft#73
@Abhineshhh

Copy link
Copy Markdown
Contributor Author

Closing in favor of a consolidated stack to avoid multi-PR conflicts on the same files.

Superseded by consolidated Trivy stack (security findings are included there).

Please review the replacement PR linked above (Trivy stack or registry stack).

@Abhineshhh

Copy link
Copy Markdown
Contributor Author

Replacement: #87 (Trivy stack).

@Abhineshhh
Abhinesh Jha (Abhineshhh) deleted the fix/security-findings-persist branch July 16, 2026 20:14
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.

[Bug]: Comprehensive Trivy findings are counted but never persisted to security_findings

1 participant