Skip to content

Update step-security/harden-runner digest to 41d3351 (#1163) #576

Update step-security/harden-runner digest to 41d3351 (#1163)

Update step-security/harden-runner digest to 41d3351 (#1163) #576

Workflow file for this run

name: Scorecards supply-chain security
on:
# Only the default branch is supported.
branch_protection_rule:
schedule:
- cron: '43 12 * * 5'
push:
branches: [ main ]
workflow_dispatch:
# Declare default permissions as read only.
permissions: read-all
jobs:
analysis:
name: Scorecards analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to code-scanning dashboard.
security-events: write
actions: read
contents: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@41d3351872a2104cca2e1c0c05eae533d14f3967
with:
disable-sudo: true
egress-policy: audit
disable-telemetry: false
allowed-endpoints: >
api.github.com:443
api.osv.dev:443
bestpractices.coreinfrastructure.org:443
codeload.github.com:443
github.com:443
pipelines.actions.githubusercontent.com:443
oauth2.sigstore.dev:443
oss-fuzz-build-logs.storage.googleapis.com:443
www.bestpractices.dev:443
- name: "Checkout code"
uses: actions/checkout@1e31de5234b9f8995739874a8ce0492dc87873e2 # v4.0.0
with:
persist-credentials: false
- name: "Run analysis"
uses: ossf/scorecard-action@80e868c13c90f172d68d1f4501dee99e2479f7af # v2.1.3
with:
results_file: results.sarif
results_format: sarif
# Read-only PAT token. To create it,
# follow the steps in https://github.com/ossf/scorecard-action#pat-token-creation.
repo_token: ${{ secrets.SCORECARD_READ_TOKEN }}
# Publish the results to enable scorecard badges. For more details, see
# https://github.com/ossf/scorecard-action#publishing-results.
# For private repositories, `publish_results` will automatically be set to `false`,
# regardless of the value entered here.
publish_results: true
# Upload the results as artifacts (optional).
- name: "Upload artifact"
uses: actions/upload-artifact@c7d193f32edcb7bfad88892161225aeda64e9392 # v4.0.0
with:
name: SARIF file
path: results.sarif
retention-days: 5
# Upload the results to GitHub's code scanning dashboard.
- name: "Upload to code-scanning"
uses: github/codeql-action/upload-sarif@012739e5082ff0c22ca6d6ab32e07c36df03c4a4 # v3.22.12
with:
sarif_file: results.sarif