Skip to content

[sec-check] Run the shared workflow-safety checker on every pull request (applies the approved automation ruling) #979

Closed

Description

@hivecommons-hive

Summary: Project Bluefin's shared automation repository agreed (in its own gate proposal, #674 there) to run an automated safety checker called zizmor on its continuous-integration definitions for every pull request, so small slips — a job granted more rights than it uses, a value pasted straight into a shell command, a credential left behind on disk — are caught by a machine instead of by someone happening to read the file. That ruling covers every Project Bluefin repository, and this one, which builds and deploys the public website, does not run the checker yet. I ran it by hand against the current code and it reports nothing at the agreed threshold, so the check can go straight to blocking mode with no exception list. Adding it is one small job in the existing CI definition, but workflow files can only be changed by a person or a merge-tier agent — the hive's own token is refused by GitHub for that directory — so this issue carries the exact text to paste in rather than a pull request.

What I need from you: Add the job below to .github/workflows/ci.yml (or hand this to an ISSUES_PRS_MERGE agent).


Security Finding

Severity: low (hardening — adopting an accepted gate)
Type: permission-issue + unsafe-pattern (class-level gate)

Decision taken by hive: applying the ruling on projectbluefin/actions#674 (Option A approved by @Danathar on 2026-10-28: run zizmor at --min-severity=medium --min-confidence=medium as a required pull-request check; any accepted finding is recorded in a baseline file with its reason).

Current state of this repository (main @ 138c266)

zizmor 1.31.1 --min-severity=medium --min-confidence=medium . over the six workflows (ci.yml, copilot-setup-steps.yml, deploy.yml, images.yml, preview.yml, update-content.yml) reports 0 findings. No .github/zizmor.yml baseline is needed.

At the default persona there are two low-confidence notes, both below the agreed threshold and left visible for anyone running zizmor locally:

  • copilot-setup-steps.yml:20 artipacked — checkout without persist-credentials: false (the job holds contents: read only, and no later step uploads an artifact).
  • deploy.yml:67 cache-poisoning — setup-node with cache: 'npm' in a workflow that publishes at runtime. The npm cache key is the package-lock.json hash and npm ci verifies integrity from the lockfile, so a poisoned cache cannot change what is installed.

Why this cannot ship as a pull request from this lane

This repository has no pre-commit configuration and no other hook that the CI job already runs over .github/, and zizmor has no npm distribution, so the only place the check can live is a job in .github/workflows/ci.yml. That directory is rejected server-side for this agent's GitHub App token (refusing to allow a GitHub App to create or update workflow ... without workflows permission).

Impact

Without the check, the next over-privileged job, shell-expanded expression or persisted credential in the deploy, preview or daily content-refresh workflows — the ones that hold the Cloudflare and GitHub Pages deployment rights — is caught only if a reviewer happens to notice.

Recommendation

  • Add to .github/workflows/ci.yml, under jobs: next to test (same indentation). It runs on the same push / pull_request / merge_group triggers as the rest of the file, needs nothing from the other jobs, and finishes in well under a minute:
  # Shared workflow-safety gate (projectbluefin/actions#674): fail a change
  # that gives a job rights it does not use, pastes an expression into a
  # shell command, or leaves credentials behind. Same image, threshold and
  # flags as projectbluefin/server's lint-actions.yml.
  zizmor:
    name: Audit GitHub Actions
    runs-on: ubuntu-latest
    timeout-minutes: 10
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7
        with:
          persist-credentials: false

      # The read-only token enables the online audits (impostor commits,
      # known-vulnerable actions, ref/version mismatches).
      - name: zizmor
        uses: docker://ghcr.io/zizmorcore/zizmor:1.31.1@sha256:42d409dbb851d4c5d35a058cf042b828bea1e3f2884378c526eb0974780e18d9
        env:
          GH_TOKEN: ${{ github.token }}
        with:
          args: --format=github --min-severity=medium --min-confidence=medium .
  • Once it reports green on one pull request, add Audit GitHub Actions to the required checks for main alongside the existing CI jobs.

Verified locally: the same flags exit 0 on 138c266. Once the gate is in, this lane files no further per-site permissions/expression/credential-persistence findings in this repository; anything new fails the check instead.

Risk: credentials/infra the hive cannot access — the change lives under .github/workflows/, which this agent's GitHub App token cannot write.


Filed by sec-check agent (ACMM L6 — full mode)

— hive: agent=sec-check backend=copilot model=claude-fable-5.1 copilot=1.0.88

Activity

  1. added
    securitySecurity impact or hardening work.
    agent/sec-checkCreated by Hive for agent-filed issue provenance
    stage/045-needs-decisionIssue parked on a person: needs-human or a maintainer decision is owed before the hive picks it up
    on Oct 31, 2026
  2. Danathar commented on Nov 5, 2026

    @Danathar
    Contributor

    /hive decision Hand this to scanner, whose token can push .github/workflows: open one PR adding the zizmor job above to ci.yml, per the actions#674 ruling.

  3. added and removed
    stage/045-needs-decisionIssue parked on a person: needs-human or a maintainer decision is owed before the hive picks it up
    on Nov 5, 2026
  4. hivecommons-hive commented on Nov 5, 2026

    @hivecommons-hive
    ContributorAuthor

    Approved by @Danathar. Decision: Hand this to scanner, whose token can push .github/workflows: open one PR adding the zizmor job above to ci.yml, per the actions#674 ruling.

    approved-direction is applied and Hive's own stage/045-needs-decision removed. Any hold label is left exactly as it was.

    This issue is still outside the agent queue: project.issue_filter admits only issues labelled triage/accepted. A maintainer adding it admits this one.

  5. linked a pull request that will close this issueci: add zizmor workflow audit job #991on Nov 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    agent/sec-checkCreated by Hive for agent-filed issue provenanceapproved-directionhive/workflows-laneHive: routed to the lane that can push workflow filessecuritySecurity impact or hardening work.triage/acceptedScope accepted; ready for work.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions