forked from TraceMachina/nativelink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add OpenSSF scorecard action (TraceMachina#486)
Ensure that we follow security best practices.
- Loading branch information
1 parent
1aadd42
commit 4d9d897
Showing
1 changed file
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
--- | ||
name: Scorecard supply-chain security | ||
on: | ||
schedule: | ||
# Non-peak hour 23:15 on Tuesdays. | ||
- cron: '15 23 * * 1' | ||
push: | ||
branches: [ "main" ] | ||
|
||
permissions: read-all | ||
|
||
jobs: | ||
analysis: | ||
name: Scorecard analysis | ||
runs-on: ubuntu-22.04 | ||
permissions: | ||
security-events: write | ||
id-token: write | ||
|
||
steps: | ||
- name: Checkout | ||
uses: >- # v4.1.1 | ||
actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 | ||
with: | ||
persist-credentials: false | ||
|
||
- name: Run analysis | ||
uses: >- # v2.3.1 | ||
ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 | ||
with: | ||
results_file: results.sarif | ||
results_format: sarif | ||
publish_results: true | ||
|
||
- name: Upload artifact | ||
uses: >- # v4.0.0 | ||
actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 | ||
with: | ||
name: SARIF file | ||
path: results.sarif | ||
retention-days: 5 | ||
|
||
- name: Upload to code-scanning | ||
uses: >- # v3.22.11 | ||
github/codeql-action/upload-sarif@b374143c1149a9115d881581d29b8390bbcbb59c | ||
with: | ||
sarif_file: results.sarif |