mirror of
https://github.com/coder/coder.git
synced 2026-09-22 21:22:17 +08:00
Update GitHub Actions workflows to use `actions/checkout` v7.0.0 pinned to `9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0`, following the GitHub Actions checkout hardening changes announced in: - https://github.blog/changelog/2026-06-18-safer-pull_request_target-defaults-for-github-actions-checkout/ - https://github.blog/changelog/2026-06-18-control-who-and-what-triggers-github-actions-workflows/ Audited the existing `pull_request_target` workflows and did not add any `allow-unsafe-pr-checkout` opt-outs, since these workflows do not intentionally check out fork PR head code. Generated by Coder Agents. <details> <summary>Plan notes</summary> - Update all `.github/workflows` `actions/checkout` references to v7.0.0 using the pinned SHA. - Preserve SHA pinning, including the newly added MCP registry workflow. - Validate that old checkout pins are removed and no unsafe checkout opt-outs are introduced. </details>
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@f808768d1510423e83855289c910610ca9b43176 # v2.17.0
|
|
with:
|
|
egress-policy: audit
|
|
|
|
- name: "Checkout code"
|
|
uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
|
|
with:
|
|
persist-credentials: false
|
|
|
|
- name: "Run analysis"
|
|
uses: ossf/scorecard-action@4eaacf0543bb3f2c246792bd56e8cdeffafb205a # v2.4.3
|
|
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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.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@c10b8064de6f491fea524254123dbe5e09572f13 # v3.29.5
|
|
with:
|
|
sarif_file: results.sarif
|