chore(deps): update actions/upload-artifact action to v6 #1509
Workflow file for this run
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: scans | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| merge_group: | |
| branches: [main] | |
| workflow_call: | |
| workflow_dispatch: | |
| permissions: {} | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref_name != github.event.repository.default_branch }} | |
| jobs: | |
| checkov: | |
| permissions: | |
| contents: read | |
| security-events: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - uses: bridgecrewio/checkov-action@02a4c5d6a02367e5ea493c34c26b094302fd3f61 # master | |
| with: | |
| soft_fail: ${{ github.event_name != 'pull_request' }} | |
| - if: ${{ success() || failure() }} | |
| uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4 | |
| with: | |
| sarif_file: results.sarif | |
| clair: | |
| permissions: | |
| contents: read | |
| security-events: write | |
| runs-on: ubuntu-latest | |
| env: | |
| GHCR_IMAGE_NAME: ghcr.io/${{ github.repository }} | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - id: build | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6 | |
| with: | |
| cache-from: ${{ env.GHCR_IMAGE_NAME }}:cache | |
| load: true | |
| - run: | | |
| docker save "${IMAGE_ID}" | podman load | |
| podman save -o "${GITHUB_SHA}" "${IMAGE_ID}" | |
| env: | |
| IMAGE_ID: ${{ steps.build.outputs.imageid }} | |
| - uses: quay/clair-action@9894dc130d2f159ddfa29e93867a0000f5269afd # V0 | |
| with: | |
| image-path: ${{ github.sha }} | |
| output: clair_results.sarif | |
| return-code: ${{ github.event_name == 'pull_request' && 1 || 0 }} | |
| db-file: matcher.db | |
| - if: ${{ success() || failure() }} | |
| uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4 | |
| with: | |
| sarif_file: clair_results.sarif | |
| devskim: | |
| permissions: | |
| contents: read | |
| security-events: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - uses: microsoft/DevSkim-Action@4b5047945a44163b94642a1cecc0d93a3f428cc6 # v1 | |
| - uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4 | |
| with: | |
| sarif_file: devskim-results.sarif | |
| dustilock: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - uses: checkmarx/dustilock@9a0cc4fe3da93f7efb38679896c074dc94d60ac6 # v1 | |
| gitleaks: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| security-events: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| with: | |
| fetch-depth: (${{ github.event.pull_request.commits || 2 }} + 1) | |
| - uses: gitleaks/gitleaks-action@ff98106e4c7b2bc287b24eaf42907196329070c7 # v2 | |
| env: | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - if: ${{ success() || failure() }} | |
| uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4 | |
| with: | |
| sarif_file: results.sarif | |
| grype: | |
| permissions: | |
| contents: read | |
| security-events: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - id: grype | |
| uses: anchore/scan-action@3c9a191a0fbab285ca6b8530b5de5a642cba332f # v7 | |
| with: | |
| path: . | |
| fail-build: ${{ github.event_name == 'pull_request' }} | |
| severity-cutoff: high | |
| only-fixed: true | |
| - if: ${{ success() || failure() }} | |
| uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4 | |
| with: | |
| sarif_file: ${{ steps.grype.outputs.sarif }} | |
| grype-container: | |
| permissions: | |
| contents: read | |
| security-events: write | |
| runs-on: ubuntu-latest | |
| env: | |
| GHCR_IMAGE_NAME: ghcr.io/${{ github.repository }} | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - id: build | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6 | |
| with: | |
| cache-from: ${{ env.GHCR_IMAGE_NAME }}:cache | |
| load: true | |
| - id: grype | |
| uses: anchore/scan-action@3c9a191a0fbab285ca6b8530b5de5a642cba332f # v7 | |
| with: | |
| image: ${{ env.IMAGE_ID }} | |
| fail-build: ${{ github.event_name == 'pull_request' }} | |
| severity-cutoff: high | |
| only-fixed: true | |
| env: | |
| IMAGE_ID: ${{ steps.build.outputs.imageid }} | |
| - if: ${{ success() || failure() }} | |
| uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4 | |
| with: | |
| sarif_file: ${{ steps.grype.outputs.sarif }} | |
| kics: | |
| permissions: | |
| checks: write | |
| contents: read | |
| pull-requests: write | |
| security-events: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - uses: checkmarx/kics-github-action@e01759d524f8abd5bd650d3d5bd4b96d46ebbc1d # v2 | |
| with: | |
| enable_annotations: true | |
| enable_comments: true | |
| enable_jobs_summary: true | |
| comments_with_queries: true | |
| path: . | |
| fail_on: high | |
| output_formats: sarif | |
| bom: true | |
| - if: ${{ success() || failure() }} | |
| uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4 | |
| with: | |
| sarif_file: results.sarif | |
| megalinter: | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| security-events: write | |
| statuses: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| with: | |
| repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }} | |
| ref: ${{ github.event.pull_request.head.sha || github.sha }} | |
| fetch-depth: (${{ github.event.pull_request.commits || 2 }} + 1) | |
| - id: megalinter | |
| # You can override MegaLinter flavor used to have faster performances | |
| # More info at https://megalinter.io/latest/flavors/ | |
| uses: oxsecurity/megalinter/flavors/python@55a59b24a441e0e1943080d4a512d827710d4a9d # v9 | |
| env: | |
| DISABLE_ERRORS: ${{ github.event_name != 'push' }} | |
| GITHUB_TOKEN: ${{ github.token }} | |
| - if: ${{ success() || failure() }} | |
| uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6 | |
| with: | |
| name: megalinter-reports | |
| path: megalinter-reports | |
| - if: ${{ success() || failure() }} | |
| uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4 | |
| with: | |
| sarif_file: megalinter-reports/megalinter-report.sarif | |
| ref: ${{ github.head_ref && format('refs/heads/{0}', github.head_ref) || github.ref }} | |
| sha: ${{ github.event.pull_request.head.sha || github.sha }} | |
| - if: ${{ failure() && steps.megalinter.outputs.has_updated_sources == 1 && github.event_name == 'pull_request' }} | |
| name: commit changes | |
| run: | | |
| git config user.email "${GITHUB_ACTOR_ID}+${GITHUB_ACTOR}@users.noreply.github.com" | |
| git config user.name "${GITHUB_ACTOR}" | |
| git commit --all --message "${COMMIT_MESSAGE}" | |
| git push origin "HEAD:refs/heads/${GITHUB_HEAD_REF}" | |
| env: | |
| COMMIT_MESSAGE: "fix: apply megalinter fixes" | |
| # https://api.github.com/users/megalinter-bot | |
| GITHUB_ACTOR: megalinter-bot | |
| GITHUB_ACTOR_ID: 129584137 | |
| msdo: | |
| permissions: | |
| contents: read | |
| id-token: write | |
| security-events: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - uses: microsoft/security-devops-action@08976cb623803b1b36d7112d4ff9f59eae704de0 # v1 | |
| id: msdo | |
| - uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4 | |
| with: | |
| sarif_file: ${{ steps.msdo.outputs.sarifFile }} | |
| osv-scan-pr: | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| if: ${{ github.event_name == 'pull_request' || github.event_name == 'merge_group' }} | |
| uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable-pr.yml@b77c075a1235514558f0eb88dbd31e22c45e0cd2 # v2 | |
| osv-scan-push: | |
| permissions: | |
| actions: read | |
| contents: read | |
| security-events: write | |
| if: ${{ github.event_name == 'push' || github.event_name == 'schedule' }} | |
| uses: google/osv-scanner-action/.github/workflows/osv-scanner-reusable.yml@b77c075a1235514558f0eb88dbd31e22c45e0cd2 # v2 | |
| with: | |
| fail-on-vuln: false | |
| syft: | |
| permissions: | |
| actions: read | |
| contents: write | |
| security-events: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - uses: anchore/sbom-action@43a17d6e7add2b5535efe4dcae9952337c479a93 # v0 | |
| with: | |
| output-file: "${{ github.event.repository.name }}-sbom.spdx.json" | |
| dependency-snapshot: true | |
| - id: grype | |
| uses: anchore/scan-action@3c9a191a0fbab285ca6b8530b5de5a642cba332f # v7 | |
| with: | |
| sbom: "${{ github.event.repository.name }}-sbom.spdx.json" | |
| fail-build: ${{ github.event_name == 'pull_request' }} | |
| severity-cutoff: high | |
| only-fixed: true | |
| - if: ${{ success() || failure() }} | |
| uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4 | |
| with: | |
| sarif_file: ${{ steps.grype.outputs.sarif }} | |
| trivy-fs: | |
| permissions: | |
| contents: write | |
| security-events: write | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.30 | |
| with: | |
| scan-type: fs | |
| format: github | |
| output: dependency-results.sbom.json | |
| github-pat: ${{ github.token }} | |
| - uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.30 | |
| with: | |
| scan-type: fs | |
| format: sarif | |
| output: trivy-results.sarif | |
| exit-code: ${{ github.event_name == 'pull_request' && 1 || 0 }} | |
| ignore-unfixed: true | |
| severity: HIGH,CRITICAL | |
| scanners: vuln,secret,misconfig | |
| skip-setup-trivy: true | |
| - uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4 | |
| with: | |
| sarif_file: trivy-results.sarif | |
| trivy-image: | |
| permissions: | |
| contents: write | |
| security-events: write | |
| runs-on: ubuntu-latest | |
| env: | |
| GHCR_IMAGE_NAME: ghcr.io/${{ github.repository }} | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| # required for sarif upload | |
| - id: build | |
| uses: docker/build-push-action@263435318d21b8e681c14492fe198d362a7d2c83 # v6 | |
| with: | |
| cache-from: ${{ env.GHCR_IMAGE_NAME }}:cache | |
| load: true | |
| - uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.30 | |
| with: | |
| image-ref: ${{ steps.build.outputs.imageid }} | |
| format: github | |
| output: dependency-results.sbom.json | |
| github-pat: ${{ github.token }} | |
| - uses: aquasecurity/trivy-action@b6643a29fecd7f34b3597bc6acb0a98b03d33ff8 # 0.30 | |
| with: | |
| image-ref: ${{ steps.build.outputs.imageid }} | |
| format: sarif | |
| output: trivy-results.sarif | |
| exit-code: ${{ github.event_name == 'pull_request' && 1 || 0 }} | |
| ignore-unfixed: true | |
| severity: HIGH,CRITICAL | |
| skip-setup-trivy: true | |
| - uses: github/codeql-action/upload-sarif@5d4e8d1aca955e8d8589aabd499c5cae939e33c7 # v4 | |
| with: | |
| sarif_file: trivy-results.sarif | |
| trufflehog: | |
| permissions: | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| with: | |
| fetch-depth: (${{ github.event.pull_request.commits || 2 }} + 1) | |
| - uses: trufflesecurity/trufflehog@821e8b9e5cdf8dc484dd23e06f78941fcf6b9191 # v3 | |
| with: | |
| extra_args: --results=verified,unknown | |
| vorpal: | |
| permissions: | |
| checks: write | |
| contents: read | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6 | |
| - id: changed-files | |
| uses: step-security/changed-files@95b56dadb92a30ca9036f16423fd3c088a71ee94 # v46 | |
| with: | |
| files: "**/*.{cs,java,js,py}" | |
| separator: "," | |
| - if: ${{ steps.changed-files.outputs.all_changed_files != '' }} | |
| uses: checkmarx/vorpal-reviewdog-github-action@8cc292f337a2f1dea581b4f4bd73852e7becb50d # v1 | |
| with: | |
| source_path: ${{ steps.changed-files.outputs.all_changed_files }} | |
| reporter: github-pr-check | |
| filter_mode: file | |
| fail_on_error: ${{ github.event_name == 'pull_request' }} |