# Copyright (C) Daniel Stenberg, , et al. # # SPDX-License-Identifier: curl name: 'OpenSSF Scorecard' 'on': # For Branch-Protection check. Only the default branch is supported. See # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection branch_protection_rule: # To guarantee Maintained check is occasionally updated. See # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained schedule: - cron: '15 14 * * 0' push: branches: ['master'] concurrency: group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.sha }} cancel-in-progress: true permissions: {} cache-mode: none jobs: analysis: name: 'Scorecard analysis' runs-on: ubuntu-latest # `publish_results: true` only works when run from the default branch. conditional can be removed if disabled. if: ${{ github.event.repository.default_branch == github.ref_name || github.event_name == 'pull_request' }} permissions: security-events: write # to upload the results to code-scanning dashboard. id-token: write # Needed to publish results and get a badge (see publish_results below). steps: - name: 'Checkout code' uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 with: persist-credentials: false - name: 'Run analysis' uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0 with: results_file: results.sarif results_format: sarif publish_results: true - name: 'Upload artifact' uses: actions/upload-artifact@cf430e030ddbb5b0abf93d22962f4752f3646cd9 # v7.0.2 with: name: SARIF file path: results.sarif retention-days: 5 - name: 'Upload to code-scanning' uses: github/codeql-action/upload-sarif@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1 with: sarif_file: results.sarif