-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (55 loc) · 2.09 KB
/
Copy pathscorecard.yml
File metadata and controls
65 lines (55 loc) · 2.09 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
name: OpenSSF Scorecard
on:
push:
branches: [main]
schedule:
# Run weekly so the score stays current on scorecard.dev
- cron: '30 3 * * 1' # Mondays 03:30 UTC
workflow_dispatch:
permissions: read-all
jobs:
scorecard:
name: OpenSSF Scorecard
runs-on: ubuntu-latest
permissions:
id-token: write # publish results to OpenSSF REST API (public badge)
contents: read
steps:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
persist-credentials: false
- name: Run OpenSSF Scorecard
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
with:
results_file: scorecard-results.sarif
results_format: sarif
# Publish to https://scorecard.dev/viewer/?uri=github.com/aleksUIX/vastlint
# so the live badge pulls a real score
publish_results: true
- name: Upload raw Scorecard SARIF artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: scorecard-results-sarif
path: scorecard-results.sarif
upload-scorecard-sarif:
name: Upload filtered Scorecard SARIF
runs-on: ubuntu-latest
needs: scorecard
permissions:
security-events: write
steps:
- name: Download raw Scorecard SARIF artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: scorecard-results-sarif
path: .
- name: Filter non-remediable Maintained finding from Security tab SARIF
shell: bash
run: |
jq '(.runs[]?.results) |= map(select(.ruleId != "Maintained")) |
(.runs[]?.tool.driver.rules) |= map(select(.id != "Maintained"))' \
scorecard-results.sarif > scorecard-results.filtered.sarif
- name: Upload filtered SARIF to GitHub Security tab
uses: github/codeql-action/upload-sarif@99df26d4f13ea111d4ec1a7dddef6063f76b97e9 # v4.37.0
with:
sarif_file: scorecard-results.filtered.sarif