Replies: 3 comments 8 replies
-
To me this looks like trivy was not able to fetch the required file from the filesystem within the CI. Are you certain that there isn't anything wrong with the CI setup, especially around permissions/disk? |
Beta Was this translation helpful? Give feedback.
4 replies
-
i getting sames. ran this on GHA name: pre-commit
on:
pull_request:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
....
- name: Install Trivy
run: |
wget https://github.com/aquasecurity/trivy/releases/download/v0.52.2/trivy_0.52.2_Linux-64bit.deb
sudo dpkg -i trivy_0.52.2_Linux-64bit.deb and it doesn't error for me on 2024-07-31T01:23:33Z FATAL Fatal error filesystem scan error: scan error: unable to initialize a scanner: unable to initialize a filesystem scanner: analyzer group error: post-analyzer init error: azure-arm scanner init error: mapfs file copy error: open /home/runner/.cache/trivy/policy/content/policies/kubernetes/policies/cisbenchmarks/controllermamager: no such file or directory whereas latest does |
Beta Was this translation helpful? Give feedback.
1 reply
-
Consider pointing your Example with a - id: terraform_trivy
files: terraform/.*\.tf$
args:
- --args=--config=__GIT_WORKING_DIR__/terraform/trivy.yaml
- --args=--ignorefile=__GIT_WORKING_DIR__/terraform/.trivyignore
- --args=--skip-dirs="**/.terraform"
- --args=--cache-dir=__GIT_WORKING_DIR__/terraform/.trivy-cache |
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Description
I am not sure that is trivy bug, but after update to v0.53.0 we have in some helm chart scans this issue:
trivy runs inside bazel build with the command:
trivy config --exit-code 1 --severity HIGH,CRITICAL $file --quiet
2024-07-10T06:34:15Z FATAL Fatal error filesystem scan error: scan error: unable to initialize a scanner: unable to initialize a filesystem scanner: analyzer group error: post-analyzer init error: cloudformation scanner init error: mapfs file copy error: open /tmp/trivy/policy/content/policies/kubernetes/policies/cisbenchmarks/cni: no such file or directory
May be you can get some clarification what is the issue?
Desired Behavior
trivy scan runs without errors
Actual Behavior
2024-07-10T06:34:15Z FATAL Fatal error filesystem scan error: scan error: unable to initialize a scanner: unable to initialize a filesystem scanner: analyzer group error: post-analyzer init error: cloudformation scanner init error: mapfs file copy error: open /tmp/trivy/policy/content/policies/kubernetes/policies/cisbenchmarks/cni: no such file or directory
Reproduction Steps
I cant give exact repro steps because the issue only reproduces in CI
Target
None
Scanner
None
Output Format
None
Mode
None
Debug Output
Operating System
Ubuntu 20.04 amd64
Version
Checklist
trivy clean --all
Beta Was this translation helpful? Give feedback.
All reactions