From c60f16502c5bd896b71156c0a3e290de7bf44c0c Mon Sep 17 00:00:00 2001 From: Taylan Pince Date: Fri, 4 Dec 2026 10:29:47 +0100 Subject: [PATCH] ci: add dependency review and zizmor - Dependency review on every PR: fails on high or critical advisories (runtime, development and unknown scopes) and on licences outside the allowlist. Packages already in the tree under another licence are listed as exemptions; a new one still fails. - zizmor on every PR and weekly, reporting to code scanning. - Dependabot keeps the pinned actions current (minor/patch, 7-day cooldown). - CODEOWNERS covers .github/, so changes to the gates need an owner's review once the default-branch ruleset requires it. Co-Authored-By: Claude Opus 5.5 --- .github/dependabot.yml | 14 ++++++++ .github/workflows/dependency-review.yml | 46 +++++++++++++++++++++++++ .github/workflows/zizmor.yml | 33 ++++++++++++++++++ CODEOWNERS | 3 ++ 4 files changed, 96 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/dependency-review.yml create mode 100644 .github/workflows/zizmor.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000..4318f030c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,14 @@ +version: 2 +updates: + # GitHub Actions: version updates, so pinned commit SHAs stay current. + - package-ecosystem: github-actions + directories: + - "/" + schedule: + interval: weekly + cooldown: + default-days: 7 + groups: + actions: + update-types: [minor, patch] + patterns: ["*"] diff --git a/.github/workflows/dependency-review.yml b/.github/workflows/dependency-review.yml new file mode 100644 index 000000000..4cf32b6fa --- /dev/null +++ b/.github/workflows/dependency-review.yml @@ -0,0 +1,46 @@ +name: Dependency review + +# PR gate: fails when the PR adds a dependency with a known vulnerability of +# high severity or above, or one whose licence is outside the allowlist below. +# Changes to this file need a code owner's review (see CODEOWNERS). +on: + pull_request: + +permissions: {} + +jobs: + dependency-review: + name: Dependency review + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read + pull-requests: write # comment-summary-in-pr + steps: + # Reads the PR's dependency diff through the API; no checkout needed. + - uses: actions/dependency-review-action@bbc44d14a204704ccc493733616cd1e93a0321ec # v5.0.1 + with: + fail-on-severity: high + fail-on-scopes: runtime, development, unknown + allow-licenses: >- + MIT, + Apache-2.0, + BSD-2-Clause, + BSD-3-Clause, + ISC, + 0BSD, + MPL-2.0, + Unlicense, + CC0-1.0, + BlueOak-1.0.0, + BSD-2-Clause-Views, + CC-BY-3.0, + CC-BY-4.0, + MIT-0, + MITNFA, + PostgreSQL, + Python-2.0, + Unicode-3.0, + Zlib, + LicenseRef-scancode-google-patent-license-golang + comment-summary-in-pr: on-failure diff --git a/.github/workflows/zizmor.yml b/.github/workflows/zizmor.yml new file mode 100644 index 000000000..6a2479297 --- /dev/null +++ b/.github/workflows/zizmor.yml @@ -0,0 +1,33 @@ +name: Workflow lint + +# Lints the GitHub Actions workflows, composite actions and Dependabot config +# with zizmor. Findings go to code scanning and the job passes; a "Require code +# scanning results" ruleset rule for zizmor makes new findings block a PR. +# No path filter on purpose: a required check skipped by a path filter stays +# pending and blocks the merge. +on: + pull_request: + schedule: + - cron: "41 6 * * 1" + +permissions: {} + +jobs: + zizmor: + name: zizmor + runs-on: ubuntu-latest + timeout-minutes: 10 + permissions: + contents: read # checkout; implicit on public repos + actions: read # SARIF upload on private repos + security-events: write # SARIF upload + steps: + - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 + with: + persist-credentials: false + - uses: zizmorcore/zizmor-action@1b4550e929643b8b26a62303c6bd64814271a4f1 # v0.9.2 + with: + version: 1.33.1 # the action defaults to latest; bump deliberately + min-severity: medium + min-confidence: medium + advanced-security: true diff --git a/CODEOWNERS b/CODEOWNERS index 398ab3490..9657863a0 100644 --- a/CODEOWNERS +++ b/CODEOWNERS @@ -1 +1,4 @@ * @0xsequence/zemind-unreal @0xsequence/web3-unity-unreal-sdks + +# Workflows, Dependabot and the CI security gates. +/.github/ @0xsequence/zemind-unreal @0xsequence/web3-unity-unreal-sdks @0xsequence/core