Debian Codegraph @

.github/workflows/scorecard.yml

raw
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.
4
5 name: Scorecard supply-chain security
6
7 on:
8 # For Branch-Protection check. Only the default branch is supported. See
9 # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
10 branch_protection_rule:
11 # To guarantee Maintained check is occasionally updated. See
12 # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
13 schedule:
14 - cron: '16 21 * * 1'
15 push:
16 branches: [ "master" ]
17
18 # Declare default permissions as read only.
19 permissions: read-all
20
21 jobs:
22 analysis:
23 name: Scorecard analysis
24 runs-on: ubuntu-latest
25 permissions:
26 # Needed to upload the results to code-scanning dashboard.
27 security-events: write
28 # Needed to publish results and get a badge (see publish_results below).
29 id-token: write
30 # Uncomment the permissions below if installing in a private repository.
31 # contents: read
32 # actions: read
33
34 steps:
35 - name: "Checkout code"
36 uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd # v4.1.2
37 with:
38 persist-credentials: false
39
40 - name: "Run analysis"
41 uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
42 with:
43 results_file: results.sarif
44 results_format: sarif
45 # (Optional) "write" PAT token. Uncomment the `repo_token` line below if:
46 # - you want to enable the Branch-Protection check on a *public* repository, or
47 # - you are installing Scorecard on a *private* repository
48 # To create the PAT, follow the steps in https://github.com/ossf/scorecard-action#authentication-with-pat.
49 # repo_token: ${{ secrets.SCORECARD_TOKEN }}
50
51 # Public repositories:
52 # - Publish results to OpenSSF REST API for easy access by consumers
53 # - Allows the repository to include the Scorecard badge.
54 # - See https://github.com/ossf/scorecard-action#publishing-results.
55 # For private repositories:
56 # - `publish_results` will always be set to `false`, regardless
57 # of the value entered here.
58 publish_results: true
59
60 # Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
61 # format to the repository Actions tab.
62 - name: "Upload artifact"
63 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
64 with:
65 name: SARIF file
66 path: results.sarif
67 retention-days: 5
68
69 # Upload the results to GitHub's code scanning dashboard.
70 - name: "Upload to code-scanning"
71 uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # v3.29.5
72 with:
73 sarif_file: results.sarif