Skip to content

Commit 5ce6f90

Browse files
Add scoreboard CI for supply-chain security (#3819)
1 parent 86926aa commit 5ce6f90

1 file changed

Lines changed: 65 additions & 0 deletions

File tree

.github/workflows/supply_chain.yml

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
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+
# Check current WASM Micro Runtime results here: https://securityscorecards.dev/viewer/?uri=github.com/bytecodealliance/wasm-micro-runtime
6+
7+
name: Scorecard supply-chain security
8+
on:
9+
# For Branch-Protection check. Only the default branch is supported. See
10+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#branch-protection
11+
branch_protection_rule:
12+
# To guarantee Maintained check is occasionally updated. See
13+
# https://github.com/ossf/scorecard/blob/main/docs/checks.md#maintained
14+
# midnight UTC
15+
schedule:
16+
- cron: "0 0 * * *"
17+
# allow to be triggered manually
18+
workflow_dispatch:
19+
20+
# Declare default permissions as read only.
21+
permissions:
22+
contents: read
23+
24+
jobs:
25+
analysis:
26+
name: Scorecard analysis
27+
runs-on: ubuntu-latest
28+
if: github.repository == 'bytecodealliance/wasm-micro-runtime'
29+
permissions:
30+
# Needed to upload the results to code-scanning dashboard.
31+
security-events: write
32+
# Needed to publish results and get a badge (see publish_results below).
33+
id-token: write
34+
35+
steps:
36+
- name: "Checkout code"
37+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
38+
with:
39+
persist-credentials: false
40+
41+
- name: "Run analysis"
42+
uses: ossf/scorecard-action@0864cf19026789058feabb7e87baa5f140aac736 # v2.3.1
43+
with:
44+
results_file: results.sarif
45+
results_format: sarif
46+
47+
# - Publish results to OpenSSF REST API for easy access by consumers
48+
# - Allows the repository to include the Scorecard badge.
49+
# - See https://github.com/ossf/scorecard-action#publishing-results.
50+
publish_results: true
51+
52+
# Upload the results as artifacts (optional). Commenting out will disable uploads of run results in SARIF
53+
# format to the repository Actions tab.
54+
- name: "Upload artifact"
55+
uses: actions/upload-artifact@3cea5372237819ed00197afe530f5a7ea3e805c8 # v3.1.0
56+
with:
57+
name: SARIF file
58+
path: results.sarif
59+
retention-days: 5
60+
61+
# Upload the results to GitHub's code scanning dashboard.
62+
- name: "Upload to code-scanning"
63+
uses: github/codeql-action/upload-sarif@17573ee1cc1b9d061760f3a006fc4aac4f944fd5 # v2.2.4
64+
with:
65+
sarif_file: results.sarif

0 commit comments

Comments
 (0)