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 is failing on sarif mode #386

Open
khantnaingset-kns opened this issue Sep 10, 2024 · 5 comments
Open

Trivy is failing on sarif mode #386

khantnaingset-kns opened this issue Sep 10, 2024 · 5 comments

Comments

@khantnaingset-kns
Copy link

I'm experiencing an issue with Trivy when running it in SARIF mode. Unfortunately, I'm not seeing any error logs, making it difficult to troubleshoot. To investigate further, I switched to Table mode, which allowed me to view more logs. The step completed successfully in Table mode, no errors logs. However, when I switched back to SARIF mode, the step failed again. I'm puzzled as to why this is happening and would appreciate an explanation.

Outputs for sarif mode:

Screenshot 2567-09-11 at 03 17 32

Code for sarif mode:

Screenshot 2567-09-11 at 03 18 41

Outputs for Table mode:

image

Code for Table mode:

image

@stianfro
Copy link

I am having the same issue with a configuration like this:

jobs:
  trivy-analysis:
    runs-on: ubuntu-latest
      - name: Run Trivy
        uses: aquasecurity/[email protected]
        with:
          scan-type: "config"
          exit-code: "1"
          format: "sarif"
          output: "trivy-results.sarif"

Works when running in other formats.

@khantnaingset-kns
Copy link
Author

I am having the same issue with a configuration like this:

jobs:
  trivy-analysis:
    runs-on: ubuntu-latest
      - name: Run Trivy
        uses: aquasecurity/[email protected]
        with:
          scan-type: "config"
          exit-code: "1"
          format: "sarif"
          output: "trivy-results.sarif"

Works when running in other formats.

Yeah, fine in other formats, error only happened in sarif mode. It's weird.

@nikpivkin
Copy link
Contributor

Hi @khantnaingset-kns !

Are you encountering a issue with the latest version of action (0.26)?

@radical-izak
Copy link

radical-izak commented Oct 22, 2024

The issue still happens in version .28

@khantnaingset-kns
Copy link
Author

Hi @khantnaingset-kns !

Are you encountering a issue with the latest version of action (0.26)?

Still the same on version 28.

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

No branches or pull requests

4 participants