mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-03 18:47:04 +09:00
Address review feedback from lexfrei on .github/workflows/codeql.yml:60: v3 is on a deprecation path (the workflow's own run already warns about it) and v4 is GA. Bump init, analyze, and scorecard.yml's upload-sarif to the same v4.36.2 commit SHA. Assisted-By: Claude <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
56 lines
1.7 KiB
YAML
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@8aad20d150bbac5944a9f9d289da16a4b0d87c1e # v4.36.2
|
|
with:
|
|
sarif_file: results.sarif
|