Skip to content

ci: Resolve Zizmor static security audit findings in GitHub Actions workflows - #68

Merged
vkarampudi merged 1 commit into
google:masterfrom
vkarampudi:fix-zizmor-security
Aug 14, 2026
Merged

ci: Resolve Zizmor static security audit findings in GitHub Actions workflows#68
vkarampudi merged 1 commit into
google:masterfrom
vkarampudi:fix-zizmor-security

Conversation

@vkarampudi

Copy link
Copy Markdown
Collaborator

Description

This PR resolves all static security audit findings reported by Zizmor for GitHub Actions workflows in Struct2Tensor:

  1. Explicit Least-Privilege Permissions:

    • Added permissions: contents: read to all jobs and workflow definitions in build.yml and pre-commit.yml to prevent unintended GITHUB_TOKEN privilege escalation.
  2. Action SHA Pinning:

    • Pinned all GitHub Actions (actions/checkout, conda-incubator/setup-miniconda, actions/upload-artifact, actions/download-artifact, actions/setup-python, pre-commit/action, pypa/gh-action-pypi-publish) to immutable commit SHAs with version comments.
  3. Prevent Credential Persistence:

    • Added persist-credentials: false to all actions/checkout steps to avoid exposing GitHub workspace tokens across build steps.
  4. Security Suppressions:

    • Added # zizmor: ignore[use-trusted-publishing] on PyPI publish step to document intentional use of PYPI_API_TOKEN until OIDC publishing is configured.

Verification

Validated locally with Zizmor 1.29:

  • 0 High, 0 Medium, 0 Low findings remaining.

@vkarampudi vkarampudi changed the title ci: resolve Zizmor static security audit findings in GitHub Actions workflows ci: Resolve Zizmor static security audit findings in GitHub Actions workflows Aug 13, 2026

@rwitcher rwitcher left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@vkarampudi
vkarampudi merged commit 1dc0cd1 into google:master Aug 14, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants