Skip to content

Conversation

@knqyf263
Copy link

@knqyf263 knqyf263 commented Oct 8, 2025

Summary

This PR refactors the codebase to use Trivy's public Go API instead of packages that will be moved to internal.

Changes include:

  • Replace mapfs.New() with fstest.MapFS in createDataFS()
  • Replace CycloneDXWriter with k8s.Write in cluster controller
  • Update compliance imports to use public API

Dependencies

This PR depends on aquasecurity/trivy#9606 which moves some packages to internal.

Currently using Trivy fork commit 869a6b0895def51a9ea4b0b6d92ebc1724a7df47 via go.mod replace directive.
Once PR #9606 is merged, the replace directive should be updated to use the main branch or tagged version.

- Replace mapfs.New() with fstest.MapFS in createDataFS()
- Replace CycloneDXWriter with k8s.Write in cluster controller
- Update compliance imports to use public types package
- Update go.mod to use Trivy fork with public API changes

TODO: Update go.mod to use main branch after
aquasecurity/trivy#9606 merges
@knqyf263 knqyf263 self-assigned this Oct 8, 2025
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