OpenSSF #395
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
name: OpenSSF | |
on: | |
workflow_dispatch: | |
branch_protection_rule: | |
push: | |
branches: [main, 'release/v*', next, next-major, beta, alpha] | |
schedule: | |
- cron: '24 3 * * *' # At 03:24 every day | |
permissions: read-all | |
jobs: | |
scorecard-secure-supply-chain-analysis: | |
name: Scorecard - Secure supply-chain analysis | |
runs-on: ubuntu-22.04 | |
timeout-minutes: 5 | |
permissions: | |
security-events: write # Required to upload found security gaps | |
id-token: write # Required to publish results and get a badge | |
steps: | |
- name: Harden runner | |
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0 | |
with: | |
disable-sudo: true | |
egress-policy: block | |
allowed-endpoints: > | |
github.com:443 | |
api.github.com:443 | |
api.osv.dev:443 | |
www.bestpractices.dev:443 | |
api.deps.dev:443 | |
api.scorecard.dev:443 | |
repo.maven.apache.org:443 | |
oss-fuzz-build-logs.storage.googleapis.com:443 | |
rekor.sigstore.dev:443 | |
fulcio.sigstore.dev:443 | |
tuf-repo-cdn.sigstore.dev:443 | |
- name: Checkout repository | |
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 | |
with: | |
ref: main | |
persist-credentials: false | |
- name: Perform Scorecard Analysis | |
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0 | |
with: | |
results_file: results.sarif | |
results_format: sarif | |
repo_token: ${{ secrets.SCORECARD_TOKEN }} | |
publish_results: true | |
- name: Upload artifact | |
uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6 | |
with: | |
name: SARIF file | |
path: results.sarif | |
retention-days: 5 | |
- name: Upload to GitHub's code scanning dashboard | |
uses: github/codeql-action/upload-sarif@e8893c57a1f3a2b659b6b55564fdfdbbd2982911 # v3.24.0 | |
with: | |
sarif_file: results.sarif |