chore(ci): address CI lint findings (#545)
Some checks failed
test / lint (push) Failing after 11s
test / test-default-version (ubuntu-latest) (push) Failing after 11s
test / test-specific-version (0.3.0) (push) Failing after 11s
test / test-specific-version (0.3.2) (push) Failing after 11s
test / test-specific-version (>=0.3.0) (push) Failing after 10s
test / test-semver-range (ubuntu-latest) (push) Failing after 10s
test / test-pyproject-file-version (push) Failing after 10s
test / test-malformed-pyproject-file-fallback (push) Failing after 10s
test / test-version-file-version (push) Failing after 10s
test / test-version-file-hash-version (push) Failing after 10s
test / test-checksum (map[checksum:4d9279ad5ca596b1e2d703901d508430eb07564dc4d8837de9e2fca9c90f8ecd os:ubuntu-latest]) (push) Failing after 10s
test / test-tool-install (ubuntu-latest) (push) Failing after 10s
test / test-with-explicit-token (push) Failing after 10s
test / test-python-version (ubuntu-latest) (push) Failing after 9s
test / test-setup-cache (auto, ubuntu-latest) (push) Failing after 8s
test / test-setup-cache-requirements-txt (push) Failing after 8s
test / test-setup-cache (true, ubuntu-latest) (push) Failing after 8s
test / test-musl (push) Failing after 12s
test / test-cache-local (map[expected-cache-dir:/home/runner/work/_temp/setup-uv-cache os:ubuntu-latest]) (push) Failing after 9s
test / test-no-python-version (push) Failing after 9s
test / test-absolute-path (push) Failing after 9s
test / test-relative-path (push) Failing after 9s
CodeQL / Analyze (TypeScript) (push) Failing after 1m17s
test / test-specific-version (0.3) (push) Failing after 1m29s
test / test-specific-version (0.3.x) (push) Failing after 1m29s
test / test-pep440-version (push) Failing after 1m28s
test / test-uv-file-version (push) Failing after 1m27s
test / test-tool-versions-file-version (push) Failing after 1m27s
test / test-uvx (push) Failing after 1m26s
test / test-activate-environment (ubuntu-latest) (push) Failing after 1m25s
test / test-setup-cache (false, ubuntu-latest) (push) Failing after 1m25s
test / test-setup-cache-dependency-glob (push) Failing after 1m24s
test / test-restore-cache-dependency-glob (push) Has been skipped
test / test-custom-manifest-file (push) Failing after 1m23s
Release Drafter / ✏️ Draft release (push) Has been cancelled
test / test-default-version (macos-14) (push) Has been cancelled
test / test-default-version (macos-latest) (push) Has been cancelled
test / test-default-version (windows-latest) (push) Has been cancelled
test / test-semver-range (selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-checksum (map[checksum:a70cbfbf3bb5c08b2f84963b4f12c94e08fbb2468ba418a3bfe1066fbe9e7218 os:macos-latest]) (push) Has been cancelled
test / test-tool-install (macos-14) (push) Has been cancelled
test / test-tool-install (macos-latest) (push) Has been cancelled
test / test-tool-install (windows-latest) (push) Has been cancelled
test / test-tilde-expansion-tool-dirs (push) Has been cancelled
test / test-python-version (macos-latest) (push) Has been cancelled
test / test-python-version (windows-latest) (push) Has been cancelled
test / test-activate-environment (macos-latest) (push) Has been cancelled
test / test-activate-environment (windows-latest) (push) Has been cancelled
test / test-setup-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (auto, windows-latest) (push) Has been cancelled
test / test-setup-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (false, windows-latest) (push) Has been cancelled
test / test-setup-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-setup-cache (true, windows-latest) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:/home/ubuntu/.cache/uv os:selfhosted-ubuntu-arm64]) (push) Has been cancelled
test / test-cache-local (map[expected-cache-dir:D:\a\_temp\setup-uv-cache os:windows-latest]) (push) Has been cancelled
test / test-setup-cache-local (push) Has been cancelled
test / test-tilde-expansion-cache-local-path (push) Has been cancelled
test / test-tilde-expansion-cache-dependency-glob (push) Has been cancelled
test / test-restore-cache (auto, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (auto, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (auto, windows-latest) (push) Has been cancelled
test / test-restore-cache (false, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (false, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (false, windows-latest) (push) Has been cancelled
test / test-restore-cache (true, selfhosted-ubuntu-arm64) (push) Has been cancelled
test / test-restore-cache (true, ubuntu-latest) (push) Has been cancelled
test / test-restore-cache (true, windows-latest) (push) Has been cancelled
test / test-restore-cache-requirements-txt (push) Has been cancelled
test / test-restore-cache-local (push) Has been cancelled
test / cleanup-tilde-expansion-tests (push) Has been cancelled
test / all-tests-passed (push) Has been cancelled
Update known versions / build (push) Has been cancelled

This addresses all of zizmor's non-pedantic findings, and adds a
workflow to proactively flag any more that come in.

Key changes:

* I've hash-pinned all actions references. Dependabot will continue to
keep these updated and will update the hash comments as well.
* I've marked every `actions/checkout` with `persist-credentials: false`
except for one that actually needs persisted credentials (which I've
explicitly enabled with an explanatory comment)
* I've dropped some workflow-level permissions in favor of job-level
permissions that were already provisioned.
* I fixed two small template injections caused by expanding output
contexts. I think these were not exploitable in practice, but fixing
them is good for defense in depth (and makes spellcheck work nicely on
these steps).

---------

Signed-off-by: William Woodruff <william@astral.sh>
This commit is contained in:
William Woodruff
2025-09-02 09:29:06 -04:00
committed by GitHub
parent 557e51de59
commit b1836110f7
5 changed files with 139 additions and 45 deletions

View File

@ -21,6 +21,8 @@ on:
branches:
- main
permissions: {}
jobs:
analyze:
name: Analyze
@ -39,11 +41,13 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v5
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
with:
persist-credentials: false
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v3
uses: github/codeql-action/init@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
with:
languages: ${{ matrix.language }}
source-root: src
@ -55,7 +59,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v3
uses: github/codeql-action/autobuild@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@ -69,4 +73,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v3
uses: github/codeql-action/analyze@3c3833e0f8c1c83d449a7478aa59c036a9165498 # v3.29.11