Skip to content

Commit 1e63fd0

Browse files
author
Kenneth Rosario
authored
feat: configure security score card action (#509)
1 parent 6bfa02e commit 1e63fd0

File tree

1 file changed

+47
-0
lines changed

1 file changed

+47
-0
lines changed

.github/workflows/scorecard.yml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
name: Scorecard 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: '0 */12 * * *'
10+
push:
11+
branches: [ "master" ]
12+
13+
# Declare default permissions as read only.
14+
permissions: read-all
15+
16+
jobs:
17+
analysis:
18+
name: Scorecard 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@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 # v3.1.0
29+
with:
30+
persist-credentials: false
31+
32+
- name: "Run analysis"
33+
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d # v2.0.6
34+
with:
35+
results_file: results.sarif
36+
results_format: sarif
37+
# Public repositories:
38+
# - Publish results to OpenSSF REST API for easy access by consumers
39+
# - Allows the repository to include the Scorecard badge.
40+
# - See https://github.com/ossf/scorecard-action#publishing-results.
41+
publish_results: true
42+
43+
# Upload the results to GitHub's code scanning dashboard.
44+
- name: "Upload to code-scanning"
45+
uses: github/codeql-action/upload-sarif@807578363a7869ca324a79039e6db9c843e0e100 # v2.1.27
46+
with:
47+
sarif_file: results.sarif

0 commit comments

Comments
 (0)