mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-09 18:28:15 +01:00
53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
name: OpenSSF Scorecard
|
|
# Supply-chain posture report (#1997): pinned actions, token permissions,
|
|
# branch protection, dangerous workflow patterns. Results land in the
|
|
# Security tab as code-scanning alerts and are published to
|
|
# api.scorecard.dev for the badge.
|
|
#
|
|
# Publishing imposes rules this file must keep: no workflow-level env,
|
|
# defaults or write permissions; `id-token: write` only on the job that runs
|
|
# ossf/scorecard-action; that job uses only approved actions on a GitHub
|
|
# hosted Ubuntu runner, with no env, defaults, containers or `run:` steps.
|
|
# Scorecard does not support forks, so the job runs only in this repository.
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
schedule:
|
|
- cron: '41 5 * * 2'
|
|
branch_protection_rule:
|
|
workflow_dispatch:
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
analysis:
|
|
if: github.repository == 'garrytan/gstack'
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 15
|
|
permissions:
|
|
contents: read
|
|
actions: read
|
|
security-events: write
|
|
id-token: write
|
|
steps:
|
|
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- uses: ossf/scorecard-action@2d1146689b8cda280b9bc96326124645441f03bc # v2.4.4
|
|
with:
|
|
results_file: results.sarif
|
|
results_format: sarif
|
|
publish_results: true
|
|
|
|
- uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
|
|
with:
|
|
name: scorecard-sarif
|
|
path: results.sarif
|
|
retention-days: 5
|
|
|
|
- uses: github/codeql-action/upload-sarif@2892aa5e19bbd11bc0cff5427e3b750a04d9e3c2 # v4.38.2
|
|
with:
|
|
sarif_file: results.sarif
|