Skip to content

Setting 'cache: false' doesn't actually prevent cache creation #457

@cglewis

Description

@cglewis

Setting cache: false doesn't prevent creating (or it isn't cleaning it up) cache. Running two back to back trivy actions with different parameters ends up failing on the second one because the cache from the first one breaks it.

160.49 KiB / 160.49 KiB [------------------------------------------------------] 100.00% ? p/s 100ms2025-04-09T21:44:25Z	
ERROR	[rego] Error occurred while parsing. Trying to fallback to embedded check	file_path="home/runner/work/org/repo/.cache/trivy/policy/content/policies/cloud/policies/aws/ec2/specify_ami_owners.rego"
err="home/runner/work/org/repo/.cache/trivy/policy/content/policies/cloud/policies/aws/ec2/specify_ami_owners.rego:30: 
rego_type_error: undefined ref: input.aws.ec2.requestedamis[__local622__]\n\tinput.aws.ec2.requestedamis[__local622__]\n\t              ^\n\t              have: \"requestedamis\"\n\t              want (one of): [\"instances\" \"launchconfigurations\" \"launchtemplates\" \"networkacls\" \"securitygroups\" \"subnets\" \"volumes\" \"vpcs\"]"

How can I clean up trivy in between action calls?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions