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

Add output-file as an input param #216

Open
sidmitra opened this issue Mar 4, 2023 · 1 comment · May be fixed by #346
Open

Add output-file as an input param #216

sidmitra opened this issue Mar 4, 2023 · 1 comment · May be fixed by #346
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@sidmitra
Copy link

sidmitra commented Mar 4, 2023

This is a "nice-to-have" feature request.

Currently the output file name is hardcoded to ./results.json or results.sarif. See here

I would like some control over the file name, currently i need to add an extra step like so

    - name: Run grype vulnerability scanner
      uses: anchore/scan-action@v3 
      id: grype-scan
      with:
        path: .
        fail-build: false
        output-format: sarif
    - name: Output report to custom file
      run: cat ${{ steps.grype-scan.outputs.sarif }} > grype-results.sarif
    - name: Upload vulnerability report
      uses: actions/upload-artifact@master
      if: always()
      with:
        name: grype-results
        path: |
          grype-results.sarif
        if-no-files-found: warn

This avoids automatic name clashes with results.json produced by other steps in the same job.

Note: This parameter is supported by "trivy". See here

PS: I'd be happy to send a PR if you guys agree.

@tgerla tgerla added enhancement New feature or request good first issue Good for newcomers labels Mar 9, 2023
@tgerla
Copy link

tgerla commented Mar 9, 2023

Hi @sidmitra, we would be happy to review a PR for this! Let us know if we can help, and thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
Status: Ready
Development

Successfully merging a pull request may close this issue.

2 participants