1 # This workflow uses actions that are not certified by GitHub. They are provided
2 # by a third-party and are governed by separate terms of service, privacy
3 # policy, and support documentation.
5 # Check current LLVM-Project results here: https://securityscorecards.dev/viewer/?uri=github.com/llvm/llvm-project
7 name: Scorecard supply-chain security
9 # For Branch-Protection check. Only the default branch is supported. See
10 # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
11 branch_protection_rule:
12 # To guarantee Maintained check is occasionally updated. See
13 # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
17 # Declare default permissions as read only.
23 name: Scorecard analysis
24 runs-on: ubuntu-latest
25 if: github.repository == 'llvm/llvm-project'
27 # Needed to upload the results to code-scanning dashboard.
28 security-events: write
29 # Needed to publish results and get a badge (see publish_results below).
33 - name: "Checkout code"
34 uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
36 persist-credentials: false
38 - name: "Run analysis"
39 uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
41 results_file: results.sarif
44 # - Publish results to OpenSSF REST API for easy access by consumers
45 # - Allows the repository to include the Scorecard badge.
46 # - See https://github.com/ossf/scorecard-action#publishing-results.
49 # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
50 # format to the repository Actions tab.
51 - name: "Upload artifact"
52 uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
58 # Upload the results to GitHub's code scanning dashboard.
59 - name: "Upload to code-scanning"
60 uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
62 sarif_file: results.sarif