mirror of
https://github.com/cozystack/cozystack.git
synced 2026-11-22 12:43:32 +09:00
Scorecard posts one code-scanning alert per check, which floods Security > Code scanning and buries CodeQL's first-party findings. The public scorecard.dev badge (publish_results) is the canonical view, so drop the upload-sarif step and the now-unneeded security-events: write. Also drop the push:[main] trigger — the weekly cron and branch_protection_rule already cover it. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Myasnikov Daniil <myasnikovdaniil2001@gmail.com>
52 lines
1.8 KiB
YAML
52 lines
1.8 KiB
YAML
name: OpenSSF Scorecard
|
|
|
|
on:
|
|
branch_protection_rule:
|
|
schedule:
|
|
# Run weekly on Mondays at 06:00 UTC.
|
|
- cron: '0 6 * * 1'
|
|
workflow_dispatch:
|
|
|
|
# Declare default permissions as read-only.
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
analysis:
|
|
name: Scorecard analysis
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
# 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
|
|
|
|
# SARIF is kept as a downloadable artifact only. It is intentionally NOT
|
|
# uploaded to GitHub code-scanning: Scorecard posts one alert per check,
|
|
# which floods the Security > Code scanning dashboard and buries CodeQL's
|
|
# first-party findings. The public scorecard.dev badge (publish_results
|
|
# above) is the canonical view of these results.
|
|
- name: Upload SARIF as artifact
|
|
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
|
|
with:
|
|
name: scorecard-sarif
|
|
path: results.sarif
|
|
retention-days: 5
|