Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / .github / workflows / scorecard.yml
blob4469222c79f1e21164d2730ef8dfd9556e9f0589
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
8 on:
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
14   schedule:
15     - cron: '38 20 * * 4'
16   push:
17     branches: [ "main" ]
19 # Declare default permissions as read only.
20 permissions:
21   contents: read
23 jobs:
24   analysis:
25     name: Scorecard analysis
26     runs-on: ubuntu-latest
27     permissions:
28       # Needed to upload the results to code-scanning dashboard.
29       security-events: write
30       # Needed to publish results and get a badge (see publish_results below).
31       id-token: write      
33     steps:
34       - name: "Checkout code"
35         uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
36         with:
37           persist-credentials: false
39       - name: "Run analysis"
40         uses: ossf/scorecard-action@e38b1902ae4f44df626f11ba0734b14fb91f8f86 # v2.1.2
41         with:
42           results_file: results.sarif
43           results_format: sarif
45           #   - Publish results to OpenSSF REST API for easy access by consumers
46           #   - Allows the repository to include the Scorecard badge.
47           #   - See https://github.com/ossf/scorecard-action#publishing-results.      
48           publish_results: true
50       # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
51       # format to the repository Actions tab.
52       - name: "Upload artifact"
53         uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
54         with:
55           name: SARIF file
56           path: results.sarif
57           retention-days: 5
59       # Upload the results to GitHub's code scanning dashboard.
60       - name: "Upload to code-scanning"
61         uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
62         with:
63           sarif_file: results.sarif