Files
cozystack/.github/workflows/scorecard.yml
Timur Tukaev 688f73f8f0 ci: pin Scorecard workflow actions by SHA
The initial Scorecard workflow used floating major-version tags
(@v2, @v4, @v3). ossf/scorecard-action does not publish a floating
v2 tag — only specific patch releases — so the first scheduled run
failed with `Unable to resolve action ossf/scorecard-action@v2`.

Pin every action by its full commit SHA with a trailing comment
showing the human-readable version. This also satisfies the
`Pinned-Dependencies` Scorecard check itself.

- actions/checkout@de0fac2 (v6.0.2)
- ossf/scorecard-action@4eaacf0 (v2.4.3)
- actions/upload-artifact@043fb46 (v7.0.1)
- github/codeql-action/upload-sarif@03e4368 (v3)

Signed-off-by: Timur Tukaev <timur.tukaev@aenix.io>
2026-05-23 09:25:31 +05:00

56 lines
1.7 KiB
YAML

name: OpenSSF Scorecard
on:
branch_protection_rule:
schedule:
# Run weekly on Mondays at 06:00 UTC.
- cron: '0 6 * * 1'
push:
branches: [main]
workflow_dispatch:
# Declare default permissions as read-only.
permissions: read-all
jobs:
analysis:
name: Scorecard analysis
runs-on: ubuntu-latest
permissions:
# Needed to upload the results to the GitHub code-scanning dashboard.
security-events: write
# Needed to publish results to the public scorecard.dev API
# (OIDC token allows publish without storing long-lived credentials).
id-token: write
# Needed to read repository contents.
contents: read
# Needed to read workflow definitions for the Dangerous-Workflow check.
actions: read
steps:
- name: Checkout repository
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
- name: Run analysis
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
with:
results_file: results.sarif
results_format: sarif
# Publish the results to the OpenSSF Scorecard public API so the
# project appears at https://scorecard.dev/viewer/?uri=github.com/cozystack/cozystack
publish_results: true
- name: Upload SARIF as artifact
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: scorecard-sarif
path: results.sarif
retention-days: 5
- name: Upload SARIF to code-scanning
uses: github/codeql-action/upload-sarif@03e4368ac7daa2bd82b3e85262f3bf87ee112f57 # v3
with:
sarif_file: results.sarif