Skip to content

alternateReportStorage creates some "empty" files #2853

@Kariton

Description

@Kariton

What steps did you take and what happened:
running trivy-operator on talos node with alternateReportStorage the created files for
rbac_assessment_reports,config_audit_reports and infra_assessment_reports are basically empty.

this was discovered while implementing file reports for trivy-operator-dashboard in raoulx24/trivy-operator-dashboard#7

/mnt/data/trivy-operator $ cat rbac_assessment_reports/ReplicaSet-cilium-operator-77d76d7bbb.json 
{"scanner":{"name":"","vendor":"","version":""},"summary":{"criticalCount":0,"highCount":0,"mediumCount":0,"lowCount":0},"checks":null}/mnt/data/trivy-operator $ 
/mnt/data/trivy-operator $ cat infra_assessment_reports/ReplicaSet-cilium-operator-77d76d7bbb.json 
{"scanner":{"name":"Trivy","vendor":"Aqua Security","version":"0.29.0"},"summary":{"criticalCount":0,"highCount":0,"mediumCount":0,"lowCount":0},"checks":[]}/mnt/data/trivy-operator $

/mnt/data/trivy-operator $ cat config_audit_reports/ClusterRole-envoy-gateway-gateway-helm-certgen:envoy-system.json
{"updateTimestamp":null,"scanner":{"name":"","vendor":"","version":""},"summary":{"criticalCount":0,"highCount":0,"mediumCou
nt":0,"lowCount":0},"checks":null

What did you expect to happen:
files with some content.

Anything else you would like to add:

Environment:

  • Trivy-Operator version (use trivy-operator version): {"Version":"0.29.0","Commit":"c8b31d9428fe730da7f306e43abc45c3de904c94","Date":"2025-09-23T06:46:35Z","Executable":""}
  • Kubernetes version (use kubectl version): v1.34.3
  • OS (macOS 10.15, Windows 10, Ubuntu 19.10 etc): Talos v1.12.1 (also happens on kind cluster; see trivy-operator-dashboard issue mentioned above)

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions