Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trivy failing on config scan of terraform files on 0.0.19 #57

Closed
peter-kipping-seequent opened this issue Jul 28, 2021 · 1 comment · Fixed by #58
Closed

Trivy failing on config scan of terraform files on 0.0.19 #57

peter-kipping-seequent opened this issue Jul 28, 2021 · 1 comment · Fixed by #58

Comments

@peter-kipping-seequent
Copy link
Contributor

peter-kipping-seequent commented Jul 28, 2021

Hi there, with the recent release of the actions version 0.0.19 we are seeing our actions failing for
scan error: image scan failed: failed analysis: analyze error: failed to analyze layer: sha256:87ceb75dec9b514f26b1b9227e29d4f72790c37a5c1c3281efe349dda702e544 : config scan error: scan terraform error: terraform scan error: stat /github/workspace/evo-hub-infra/main/variables.tf: no such file or directory
This was working correctly before the version bump.

I believe this issue is relates to aquasecurity/trivy#1120 which is fixed in this PR aquasecurity/trivy#1133.
This was fixed in trivy version 0.19.2
According to https://github.com/aquasecurity/trivy-action/blob/master/Dockerfile we are based off of the 0.19.1 version.
Hopefully bumping the base docker image that is being used should cause this error to be fixed.

For reference we trigger the check in our github actions via:

- name: Run Trivy vulnerability scanner
  uses: aquasecurity/trivy-action@master
  with:
    image-ref: ${{ env.IMAGE_REF }}
    format: "table"
    exit-code: "1"
    ignore-unfixed: true
    skip-dirs: /bin/terraform,/usr/local/lib/python3.9/site-packages

changing the 'uses: aquasecurity/trivy-action@master' back to 'uses: aquasecurity/trivy-action@0.0.18' causes the issue to no longer be present.

Also able to reproduce this locally, where running with trivy version 0.19.1 causes the same error to be logged, 0.19.2 does not cause this issue to occur.

@peter-kipping-seequent
Copy link
Contributor Author

Hey guys, any update on this issue?
I've had a PR sitting around for nearly a week that should fix this but with no action?

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 a pull request may close this issue.

1 participant