Skip to content

OpenSSF Scorecards Scan #153

OpenSSF Scorecards Scan

OpenSSF Scorecards Scan #153

name: OpenSSF Scorecards Scan
on:
branch_protection_rule:
push:
branches: [ "master" ]
paths-ignore:
- '**/*.md'
- '**/*.gitignore'
- '**/*.gitattributes'
workflow_dispatch:
schedule:
- cron: '21 21 * * 6'
permissions: read-all
jobs:
analyze:
name: Analyze
runs-on: ubuntu-latest
permissions:
security-events: write # needed to upload the results
contents: read
actions: read
steps:
- name: Harden Runner
uses: step-security/harden-runner@ebacdc22ef6c2cfb85ee5ded8f2e640f4c776dd5
with:
egress-policy: block
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
- name: Checkout
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
with:
persist-credentials: false
- name: Scorecards Analysis
uses: ossf/scorecard-action@99c53751e09b9529366343771cc321ec74e9bd3d
with:
results_file: results.sarif
results_format: sarif
repo_token: ${{ secrets.SCORECARDS_TOKEN }}
publish_results: false # true will not work with Harden Runner!
- name: Upload Report
uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb
with:
name: SARIF file
path: results.sarif
retention-days: 5
- name: Upload to Code-Scanning
uses: github/codeql-action/upload-sarif@cc7986c02bac29104a72998e67239bb5ee2ee110
with:
sarif_file: results.sarif