-
Notifications
You must be signed in to change notification settings - Fork 30
51 lines (49 loc) · 1.54 KB
/
Copy pathscorecard.yml
File metadata and controls
51 lines (49 loc) · 1.54 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Scorecard
on:
workflow_dispatch: {}
workflow_run:
workflows:
- Release
types:
- completed
branch_protection_rule:
types: [created, edited, deleted]
schedule:
- cron: '30 1 * * 6'
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
if: >-
github.event_name != 'workflow_run' ||
(github.event.workflow_run.conclusion == 'success' &&
github.event.workflow_run.head_branch == 'dev')
runs-on: ubuntu-latest
permissions:
security-events: write
id-token: write
contents: read
actions: read
steps:
- name: Checkout code
uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
# Manual runs always score tip of dev (not the branch selected in the UI).
ref: ${{ github.event_name == 'workflow_dispatch' && 'dev' || github.sha }}
- name: Run analysis
uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
with:
results_file: results.sarif
results_format: sarif
publish_results: true
- name: Upload artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: SARIF file
path: results.sarif
retention-days: 5
- name: Upload to code-scanning
uses: github/codeql-action/upload-sarif@1c5b675653bb5c22dbe9b12b556ec555138e09fd # v4.38.1
with:
sarif_file: results.sarif