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

Build failed with upgrade to v6.0.0 of anchore/scan-action #421

Closed
vlo-rte opened this issue Jan 3, 2025 · 1 comment
Closed

Build failed with upgrade to v6.0.0 of anchore/scan-action #421

vlo-rte opened this issue Jan 3, 2025 · 1 comment
Labels
question Further information is requested

Comments

@vlo-rte
Copy link

vlo-rte commented Jan 3, 2025

Since the upgrade of anchore/scan-action to v6.0.0, my task "github/codeql-action/upload-sarif" is failing.
The code for upload-sarif is :

- name: Upload Anchore Scan Report for xxx
      uses: github/codeql-action/upload-sarif@48ab28a6f5dbc2a99bf1e0131198dd8f1df78169 # v3.28.0
      with:
        sarif_file: results.sarif
        category: consultation

The error I get is :

Error: Path does not exist: results.sarif

Do you have an idea where the problem is please ?

@kzantow
Copy link
Contributor

kzantow commented Jan 3, 2025

Hi @vlo-rte -- the action no longer generates files in your working directory by default, instead you should use the action outputs: ${{ steps.<id>.outputs.sarif }} where the <id> needs to match the id you configured to reference the scan-action, e.g.:

      - uses: anchore/scan-action@v6
        id: scan
        ...
      - uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: ${{ steps.scan.outputs.sarif }}

If you would prefer to continue generating a results.sarif in the working directory, you can configure the option using: output-file: results.sarif. In both cases, you should use the step outputs for SARIF uploads.

@kzantow kzantow closed this as not planned Won't fix, can't repro, duplicate, stale Jan 3, 2025
@kzantow kzantow added the question Further information is requested label Jan 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
Status: Done
Development

No branches or pull requests

2 participants