From 6e9860c6e7bdd10451b4a6ad385cae8f88540bdd Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 29 Dec 2025 13:11:37 +0000 Subject: [PATCH 1/3] Add zizmor for GitHub Actions security linting --- .pre-commit-config.yaml | 10 ++++++++++ pyproject.toml | 1 + 2 files changed, 11 insertions(+) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 2f2e604..c144e80 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -37,6 +37,7 @@ ci: - vulture - vulture-docs - yamlfix + - zizmor - pyrefly - pyrefly-docs @@ -369,6 +370,15 @@ repos: additional_dependencies: [uv==0.9.5] stages: [pre-commit] + - id: zizmor + name: zizmor + entry: uv run --extra=dev zizmor .github + language: python + pass_filenames: false + types_or: [yaml] + additional_dependencies: [uv==0.9.5] + stages: [pre-commit] + - id: sphinx-lint name: sphinx-lint entry: uv run --extra=dev sphinx-lint --enable=all --disable=line-too-long diff --git a/pyproject.toml b/pyproject.toml index 2d16862..d47ad4b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -74,6 +74,7 @@ optional-dependencies.dev = [ "types-pyyaml==6.0.12.20250915", "vulture==2.14", "yamlfix==1.19.1", + "zizmor==1.19.0", ] optional-dependencies.release = [ "check-wheel-contents==0.6.3" ] urls.Documentation = "https://vws-python.github.io/vws-web-tools/" From 8bf961fcda4d560de5d054418dac2f885ee1a6d9 Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 29 Dec 2025 16:30:57 +0000 Subject: [PATCH 2/3] Add zizmor config and ignore in check-manifest --- pyproject.toml | 1 + zizmor.yml | 12 ++++++++++++ 2 files changed, 13 insertions(+) create mode 100644 zizmor.yml diff --git a/pyproject.toml b/pyproject.toml index d47ad4b..4504be0 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -275,6 +275,7 @@ ignore = [ "vuforia_secrets.env.example", "lint.mk", ".vscode/**", + "zizmor.yml", ] [tool.deptry] diff --git a/zizmor.yml b/zizmor.yml new file mode 100644 index 0000000..f63e179 --- /dev/null +++ b/zizmor.yml @@ -0,0 +1,12 @@ +--- +rules: + unpinned-uses: + disable: true + cache-poisoning: + disable: true + bot-conditions: + disable: true + dependabot-cooldown: + disable: true + template-injection: + disable: true From c06b48753c185c53ad32a76a3fd8f74565e7b45a Mon Sep 17 00:00:00 2001 From: Adam Dangoor Date: Mon, 29 Dec 2025 17:01:52 +0000 Subject: [PATCH 3/3] Fix zizmor issues in GitHub workflows --- .github/workflows/ci.yml | 4 ++++ .github/workflows/release.yml | 1 + 2 files changed, 5 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e6bf60e..5f47885 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,6 +12,8 @@ on: # Run at 1:00 every day - cron: 0 1 * * * +permissions: {} + jobs: build: @@ -25,6 +27,8 @@ jobs: steps: - uses: actions/checkout@v6 + with: + persist-credentials: false - name: Install uv uses: astral-sh/setup-uv@v7 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4ecf780..976a14a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,7 @@ jobs: steps: - uses: actions/checkout@v6 with: + persist-credentials: false # See # https://github.com/stefanzweifel/git-auto-commit-action?tab=readme-ov-file#push-to-protected-branches token: ${{ secrets.RELEASE_PAT }}