Bump securego/gosec from 849570622f56a251c015c0e2417aebafc0216e17 to 1769a22fd149bfd9e5e546e06a7f9d596eab2f65 #66
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: gosec | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| schedule: | |
| - cron: "0 0 * * 0" | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| scan: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Run Gosec Security Scanner | |
| uses: securego/gosec@1769a22fd149bfd9e5e546e06a7f9d596eab2f65 # master, gosec 2.26.1 | |
| with: | |
| args: "-no-fail -fmt sarif -out results.sarif ./..." | |
| - name: Upload SARIF artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: gosec-sarif | |
| path: results.sarif | |
| if-no-files-found: error | |
| retention-days: 7 | |
| upload-sarif: | |
| needs: scan | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| security-events: write | |
| steps: | |
| - name: Download SARIF artifact | |
| uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1 | |
| with: | |
| name: gosec-sarif | |
| path: . | |
| - name: Upload SARIF file | |
| uses: github/codeql-action/upload-sarif@7c1e4cf0b20d7c1872b26569c00ba908797a59bf # v4 | |
| with: | |
| sarif_file: results.sarif |