Debian Codegraph @

.github/workflows/scorecards.yml

raw
1 name: Scorecards supply-chain security
2 on:
3 # For Branch-Protection check. Only the default branch is supported. See
4 # https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
5 branch_protection_rule:
6 # To guarantee Maintained check is occasionally updated. See
7 # https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
8 schedule:
9 - cron: "19 23 * * 5"
10 push:
11 branches: ["main"]
12
13 # Declare default permissions as read only.
14 permissions: {}
15
16 jobs:
17 analysis:
18 name: Scorecards analysis
19 runs-on: ubuntu-latest
20 permissions:
21 # Needed to upload the results to code-scanning dashboard.
22 security-events: write
23 # Needed to publish results and get a badge (see publish_results below).
24 id-token: write
25
26 steps:
27 - name: "Checkout code"
28 uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v3.1.0
29 with:
30 persist-credentials: false
31
32 - name: "Run analysis"
33 uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
34 with:
35 results_file: results.sarif
36 results_format: sarif
37 # Publish results to OpenSSF REST API for easy access by consumers.
38 # Allows the repository to include the Scorecard badge.
39 # See https://github.com/ossf/scorecard-action#publishing-results.
40 publish_results: true
41
42 # Upload the results as artifacts (optional). Commenting out will disable
43 # uploads of run results in SARIF format to the repository Actions tab.
44 - name: "Upload artifact"
45 uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
46 with:
47 name: SARIF file
48 path: results.sarif
49 retention-days: 5
50
51 # Upload the results to GitHub's code scanning dashboard.
52 - name: "Upload to code-scanning"
53 uses: github/codeql-action/upload-sarif@fdbfb4d2750291e159f0156def62b853c2798ca2 # v2.1.27
54 with:
55 sarif_file: results.sarif