Skip to content

Commit b075a7d

Browse files
committed
Update reference organization and improve documentation structure
1 parent 7c4f574 commit b075a7d

File tree

2 files changed

+115
-0
lines changed

2 files changed

+115
-0
lines changed
Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: OpenSSF Scorecard Analysis
2+
3+
on:
4+
# For Branch-Protection check. Only the default branch is supported.
5+
branch_protection_rule:
6+
# To guarantee Maintained check is occasionally updated.
7+
push:
8+
branches: [ main ]
9+
# For manual triggering
10+
workflow_dispatch:
11+
# Run weekly to track progress
12+
schedule:
13+
- cron: '0 0 * * 1' # Run every Monday at midnight
14+
15+
permissions: read-all
16+
17+
jobs:
18+
scorecard-analysis:
19+
name: OpenSSF Scorecard Analysis
20+
runs-on: ubuntu-latest
21+
permissions:
22+
# Needed to upload the results to code-scanning dashboard.
23+
security-events: write
24+
# Needed to publish results and get a badge (see publish_results below).
25+
id-token: write
26+
27+
steps:
28+
- name: "Checkout code"
29+
uses: actions/checkout@v4
30+
with:
31+
persist-credentials: false
32+
33+
- name: "Run Scorecard analysis"
34+
uses: ossf/[email protected]
35+
with:
36+
results_file: results.sarif
37+
results_format: sarif
38+
# A read-only PAT token, which is needed for the Branch-Protection check.
39+
repo_token: ${{ secrets.SCORECARD_TOKEN }}
40+
# Publish results to enable scorecard badges. For more details, see
41+
# https://github.com/ossf/scorecard-action#publishing-results
42+
publish_results: true
43+
44+
# Upload the results as artifacts.
45+
- name: "Upload artifact"
46+
uses: actions/upload-artifact@v4
47+
with:
48+
name: SARIF file
49+
path: results.sarif
50+
retention-days: 5
51+
52+
# Upload the results to GitHub's code scanning dashboard.
53+
- name: "Upload to code-scanning"
54+
uses: github/codeql-action/upload-sarif@v3
55+
with:
56+
sarif_file: results.sarif
57+
category: ossf-scorecard

.github/workflows/zizmor.yml

Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
name: Zizmor GitHub Actions Security Analysis
2+
3+
on:
4+
# Run on push to main branch
5+
push:
6+
branches: [ main ]
7+
# Run on pull requests
8+
pull_request:
9+
branches: [ main ]
10+
# Run on schedule (weekly)
11+
schedule:
12+
- cron: '0 0 * * 0' # Run at midnight every Sunday
13+
# Allow manual triggering
14+
workflow_dispatch:
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
zizmor-analysis:
21+
name: Zizmor Analysis
22+
runs-on: ubuntu-latest
23+
permissions:
24+
contents: read
25+
security-events: write
26+
27+
steps:
28+
- name: Checkout repository
29+
uses: actions/checkout@v4
30+
with:
31+
persist-credentials: false
32+
33+
- name: Set up Rust
34+
uses: actions-rs/toolchain@v1
35+
with:
36+
profile: minimal
37+
toolchain: stable
38+
override: true
39+
40+
- name: Install Zizmor
41+
run: |
42+
cargo install zizmor
43+
44+
- name: Run Zizmor analysis
45+
run: |
46+
zizmor --sarif results.sarif .github/workflows/
47+
48+
- name: Upload analysis results
49+
uses: actions/upload-artifact@v4
50+
with:
51+
name: zizmor-results
52+
path: results.sarif
53+
retention-days: 7
54+
55+
- name: Upload to code-scanning
56+
uses: github/codeql-action/upload-sarif@v3
57+
with:
58+
sarif_file: results.sarif

0 commit comments

Comments
 (0)