mirror of
https://github.com/coder/coder.git
synced 2026-06-04 13:38:21 +00:00
4c939a6461
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
53 lines
1.6 KiB
YAML
53 lines
1.6 KiB
YAML
name: OpenSSF Scorecard
|
|
on:
|
|
branch_protection_rule:
|
|
schedule:
|
|
- cron: "27 7 * * 3" # A random time to run weekly
|
|
push:
|
|
branches: ["main"]
|
|
|
|
permissions: read-all
|
|
|
|
jobs:
|
|
analysis:
|
|
name: Scorecard analysis
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
# Needed to upload the results to code-scanning dashboard.
|
|
security-events: write
|
|
# Needed to publish results and get a badge (see publish_results below).
|
|
id-token: write
|
|
|
|
steps:
|
|
- name: Harden Runner
|
|
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: "Checkout code"
|
|
uses: actions/checkout@d632683dd7b4114ad314bca15554477dd762a938 # v4.2.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: "Run analysis"
|
|
uses: ossf/scorecard-action@62b2cac7ed8198b15735ed49ab1e5cf35480ba46 # v2.4.0
|
|
with:
|
|
results_file: results.sarif
|
|
results_format: sarif
|
|
repo_token: ${{ secrets.GITHUB_TOKEN }}
|
|
publish_results: true
|
|
|
|
# Upload the results as artifacts.
|
|
- name: "Upload artifact"
|
|
uses: actions/upload-artifact@604373da6381bf24206979c74d06a550515601b9 # v4.4.1
|
|
with:
|
|
name: SARIF file
|
|
path: results.sarif
|
|
retention-days: 5
|
|
|
|
# Upload the results to GitHub's code scanning dashboard.
|
|
- name: "Upload to code-scanning"
|
|
uses: github/codeql-action/upload-sarif@df409f7d9260372bd5f19e5b04e83cb3c43714ae # v3.27.9
|
|
with:
|
|
sarif_file: results.sarif
|