Files
youtube-generator/.github/workflows/security.yml
T
poli0981andClaude Opus 5.5 1e3e20c6d4 chore(deps): fold the newer Dependabot bumps; fix the @vitest/mocker alerts
- vitest + @vitest/coverage-v8 4.1.12: @vitest/mocker 4.1.12 fixes alerts
  #44 and #45 (manual-mock code injection, Windows redirect traversal).
  Dependabot's security update could not land on its own: vitest 4.1.11
  pins @vitest/mocker 4.1.11.
- i18n: i18next 26.4.5
- tauri: @tauri-apps/api 2.12.4, plugin-opener 2.7.2, cli 2.12.3
- ui: lucide-react 1.57.0, radix-ui 1.8.1
- lint-and-format: typescript-eslint 8.71.2
- build-tooling: postcss 8.5.30
- actions: setup-java 6.1.0, zizmor-action 0.7.1
- THIRD_PARTY_NOTICES regenerated

Supersedes #197 #198 #199 #206 #207 #208.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-22 15:01:16 +07:00

88 lines
3.0 KiB
YAML

name: Security
on:
pull_request:
branches: [main]
push:
branches: [main]
schedule:
# Mondays 04:17 UTC — new advisories and Scorecard drift surface weekly
# even when nothing is being merged.
- cron: "17 4 * * 1"
workflow_dispatch:
permissions:
contents: read
concurrency:
group: security-${{ github.ref }}
cancel-in-progress: ${{ github.ref != 'refs/heads/main' }}
jobs:
# Blocks a PR that ADDS a dependency with a known high/critical advisory.
# Licenses are checked by `npm run check:licenses` (ci.yml) instead: the
# dependency graph's license data is patchy for npm and would flag noise.
dependency-review:
if: github.event_name == 'pull_request'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: actions/dependency-review-action@a1d282b36b6f3519aa1f3fc636f609c47dddb294 # v5.0.0
with:
fail-on-severity: high
license-check: false
# Lint the workflows themselves: syntax/expressions (actionlint) and
# security smells — template injection, over-broad permissions, credential
# persistence, unpinned actions (zizmor, config in .github/zizmor.yml).
workflow-lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- name: actionlint
uses: docker://rhysd/actionlint:1.7.12
with:
args: -color
- name: zizmor
uses: zizmorcore/zizmor-action@85b2b9fb8e3325e7a23d7d0a9d7ba5ae0f999e3e # v0.7.1
with:
# Report in the log and fail the job; no SARIF upload, so findings
# are fixed in the PR instead of piling up as code-scanning alerts.
advanced-security: false
min-severity: medium
# OpenSSF Scorecard: supply-chain posture (pinned deps, token permissions,
# branch protection …). Informational — results go to the job summary and
# scorecard.dev, not to code scanning.
scorecard:
if: github.event_name != 'pull_request'
runs-on: ubuntu-latest
permissions:
contents: read
id-token: write # publish_results: signs the result for scorecard.dev
actions: read
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false
- uses: ossf/scorecard-action@fa7117db83c52d787ae5a89f350999701505d78e # v2.5.0
with:
results_file: scorecard.json
results_format: json
publish_results: true
- name: Summarise
run: |
{
echo "### OpenSSF Scorecard"
echo
echo "| Check | Score |"
echo "| --- | --- |"
jq -r '.checks[] | "| \(.name) | \(.score) |"' scorecard.json
echo
echo "Aggregate: **$(jq -r '.score' scorecard.json) / 10**"
} >> "$GITHUB_STEP_SUMMARY"