Skip to content

Roll out immutable action pins and least-privilege permissions before blocking security audits #223

Description

@woksin

Goal

Complete the consumer security-policy rollout remaining from #187. The shared actionlint/zizmor gate is available; report mode remains the default. Adding audit coverage does not establish that consumer repositories have a clean baseline.

Work

  • Inventory current findings and mutable third-party action references in each adopting repository; do not reuse historical counts as current evidence.
  • Pin third-party actions to full commit SHAs with version comments and configure Dependabot's github-actions updates.
  • Establish read-only workflow defaults and grant required write permissions per job, preserving release and deployment behavior.
  • Resolve or narrowly justify findings in each repository before enabling blocking security audits there.
  • Track adoption and acceptance through the consuming repositories' own issues and reviewed changes; coordinate any bootstrap propagation separately.

Acceptance

Each adopting repository has an explicit disposition for its audited findings, immutable third-party action references, least-privilege permissions, and passing ordinary build/release checks. Blocking enforcement is enabled only after that repository's verified baseline is clean or narrowly justified. Do not infer rollout completion from a shared workflow change alone.

Status

State: Paused — Inventory step posted as a comment (2026-11-21). Rollout (pinning, dependabot, permissions) not started; awaits L0 decision.
Branch: l189/3241-guard-mail
Scope: Inventory step only (read-only per-repo findings, one comment), per L0 task 1343. No rollout PRs.
Plan: Collect current zizmor findings, unpinned third-party action refs, missing top-level permissions, workflow-lint adoption and dependabot github-actions coverage per consumer repo (excluding Direct, Screenplay.CritterStack, Chronicle.Wolverine, Chronicle.Dapr); post as one comment.
Delivered: Nothing yet.
Remaining: To be confirmed.
Follow-ups: None.

Activity

  1. self-assigned this
    on Nov 21, 2026
  2. woksin commented on Nov 21, 2026

    @woksin
    ContributorAuthor

    Inventory: current findings per repository (2026-11-21)

    This is the inventory step from the checklist, based on the workflow files on each repository's default branch today. It uses no historical counts. It was produced with zizmor 1.32.0 (offline, default persona) and a scan of uses: references. No repository was changed.

    Scope: 70 non-archived, non-fork Cratis repositories. Direct, Screenplay.CritterStack, Chronicle.Wolverine and Chronicle.Dapr are left out for now; their owners are mid-change. Public repositories are listed below. The 10 private repositories are summarized as one aggregate line.

    Headlines

    • No repository except Chronicle.Python configures Dependabot github-actions updates. All the others have no .github/dependabot.yml.
    • Only Chronicle, Stage and Arc call the shared workflow-lint.yml gate among the public repositories (Workflows runs its own).
    • unpinned-uses is by far the largest finding class. Pinning the shared callee workflows in this repository and the common actions/* steps in consumers removes most of it. Then come artipacked (actions/checkout without persist-credentials: false), excessive-permissions and template-injection.
    • Most repositories have at least one workflow without a top-level permissions: block. The same 2 of 4 pattern repeats across small repositories, which points at the bootstrapped wrapper workflows. If that holds, fixing the generator covers many repositories at once.

    Most common zizmor audits (total findings across all scanned repositories)

    unpinned-uses 1346 · artipacked 419 · excessive-permissions 314 · template-injection 238 · self-repository 136 · secrets-inherit 67 · adhoc-packages 29 · unsound-ternary 20 · dangerous-triggers 15 · use-trusted-publishing 6 · cache-poisoning 4 · dependabot-cooldown 2

    Most common unpinned third-party actions (number of repositories)

    actions/checkout 37 · actions/setup-node 23 · actions/setup-dotnet 18 · NuGet/login 17 · actions/upload-artifact 11 · docker/login-action 11 · actions/cache 11 · docker/setup-buildx-action 11 · DavidAnson/markdownlint-cli2-action 10 · actions/download-artifact 9 · docker/build-push-action 9 · actions/setup-java 8

    Per repository

    "Unpinned refs" counts the distinct non-Cratis uses: references whose ref is not a full 40-character commit SHA.

    Repository Workflows zizmor high/medium/low/info Unpinned refs No top-level permissions workflow-lint Dependabot actions
    Chronicle 42 270/84/36/21 26 16 of 42 yes no file
    cli 11 34/22/1/10 4 3 of 11 no no file
    Ante 8 39/13/0/4 9 2 of 8 no no file
    Screenplay 14 19/31/12/8 5 4 of 14 no no file
    Documentation 2 47/1/0/0 8 1 of 2 no no file
    Scene 7 34/13/1/4 9 3 of 7 no no file
    Choreography 11 31/12/3/7 7 4 of 11 no no file
    Stage 9 24/18/1/5 6 3 of 9 yes no file
    Stage.Axon 6 30/9/1/1 7 2 of 6 no no file
    Templates 4 27/12/2/8 7 1 of 4 no no file
    Arc 16 34/4/9/8 4 3 of 16 yes no file
    Chronicle.TypeScript 9 26/10/1/2 4 3 of 9 no no file
    Chronicle.Mcp 6 26/10/0/1 7 3 of 6 no no file
    Lens 6 25/9/0/2 7 3 of 6 no no file
    Chronicle.Kotlin 9 21/9/0/2 5 3 of 9 no no file
    Arc.Elixir 7 26/4/7/2 5 2 of 7 no no file
    Fundamentals 10 18/12/3/6 5 4 of 10 no no file
    Eventmodelers-Build-Kit-Kotlin 5 14/15/1/0 3 3 of 5 no no file
    Eventmodelers-Build-Kit-Java 5 14/15/1/0 3 3 of 5 no no file
    Cast 7 21/8/1/2 5 2 of 7 no no file
    Montage 6 21/8/0/1 9 2 of 6 no no file
    Eventmodelers-Build-Kit-CSharp 6 14/15/1/0 3 3 of 6 no no file
    Chronicle.Elixir 8 20/8/0/2 3 2 of 8 no no file
    AuthProxy 13 17/11/9/8 5 6 of 13 no no file
    Architecture 6 19/7/0/4 4 2 of 6 no no file
    .github 7 16/7/0/0 3 4 of 7 no no file
    Narrator 6 15/7/0/2 3 3 of 6 no no file
    Prologue 6 16/5/0/3 8 3 of 6 no no file
    Screenplay.Generation 6 14/7/0/5 3 3 of 6 no no file
    Dockerfiles 5 10/8/0/0 0 0 of 5 no no file
    Samples 8 4/13/0/0 0 3 of 8 no no file
    Prompter 12 3/13/0/1 0 3 of 12 no no file
    Grip 9 8/8/0/0 3 2 of 9 no no file
    Arc.Kotlin 11 3/13/1/0 0 2 of 11 no no file
    Synopsis 6 10/4/2/5 3 3 of 6 no no file
    Chronicle.Python 5 11/3/3/0 6 1 of 5 no yes
    blog.cratis.io 6 9/4/0/0 4 2 of 6 no no file
    Showrunner 7 4/7/2/0 0 2 of 7 no no file
    Specifications 7 5/6/0/3 1 3 of 7 no no file
    Fundamentals.Kotlin 6 3/7/0/0 0 2 of 6 no no file
    cratis.studio 4 6/4/0/0 2 2 of 4 no no file
    AI 4 0/8/0/11 0 0 of 4 no no file
    Components 9 4/4/6/1 0 2 of 9 no no file
    release-action 4 5/2/3/0 2 1 of 4 no no file
    cratis.no 6 4/3/0/0 0 2 of 6 no no file
    Automation 3 3/4/0/0 0 3 of 3 no no file
    Workflows 35 2/4/16/0 0 4 of 35 n/a no file
    DirectDocumentation 4 3/3/0/0 0 2 of 4 no no file
    homebrew-cratis 4 3/3/0/0 0 2 of 4 no no file
    cratis.direct 4 3/3/0/0 0 2 of 4 no no file
    docs.cratis.studio 4 3/3/0/0 0 2 of 4 no no file
    DirectPublic 4 3/3/0/0 0 2 of 4 no no file
    Common 4 3/3/0/0 0 2 of 4 no no file
    Workshops 4 3/3/0/0 0 2 of 4 no no file
    Arc.TypeScript 4 3/2/1/2 0 0 of 4 no no file
    Chronicle.Go 8 2/0/4/2 0 0 of 8 no no file
    Fundamentals.Go 7 2/0/4/0 0 0 of 7 no no file
    Arc.Go 9 2/0/4/2 0 0 of 9 no no file
    StudioIssues 1 1/1/0/0 0 1 of 1 no no file
    AI.Distribution 1 0/0/0/0 0 0 of 1 no no file
    10 private repositories (aggregate) 89 192 high / 79 medium 24 13 of 89 1 of 10 0 of 10

    Suggested order for the rollout (not started; no pull requests were opened as part of this step)

    1. Pin the third-party actions inside this repository's reusable workflows and in the bootstrapped wrapper templates. That one change reaches most consumers at once.
    2. Add a github-actions Dependabot ecosystem through the bootstrap, so the pins stay current.
    3. Then work per repository from the top of the table down: pin the repository's own steps, add top-level permissions: {} or contents: read, and set persist-credentials: false on checkouts.
    4. Triage template-injection and dangerous-triggers findings individually before any blocking mode is enabled. They need judgment, not a mechanical fix.
  3. woksin commented on Nov 21, 2026

    @woksin
    ContributorAuthor

    Part 1 is up for review in #257. Every third-party action in this repository's workflows, composite actions and bootstrapped wrapper payloads was already pinned to a full commit SHA matching its tag, so no consumer repository receives a change. #257 adds monthly, grouped Dependabot updates for this repository only, and a check that fails CI if a third-party action is referenced by a mutable tag or branch. Organization-wide Dependabot and the per-repository pinning and permissions work in the inventory above are not started.

  4. woksin commented on Nov 21, 2026

    @woksin
    ContributorAuthor

    Template-injection and dangerous-trigger triage (read-only) is done across the organization's repositories, using source review plus an offline zizmor audit.

    No finding is exploitable by an outside contributor. A few hardening items were identified, each reachable only by people who can already push to the repository:

    • pull_request_target workflows that build the pull-request head with publishing rights, guarded by a same-repository check (Chronicle, Choreography, Fundamentals).
    • An expression interpolated directly into a shell script in Scene's dotnet-build.yml.
    • A pull-request job in Templates with broader write permissions than it appears to need.

    Follow-up fixes, if any, will be small, separate changes per repository.

  5. woksin commented on Nov 21, 2026

    @woksin
    ContributorAuthor

    Hardening from the triage is merged:

    The same-repository guards on the remaining pull_request_target workflows stay as they are by design. Remaining scope for this issue: per-repository adoption of the shared workflow lint and organization-wide Dependabot for GitHub Actions, both deferred.

  6. woksin commented on Nov 21, 2026

    @woksin
    ContributorAuthor

    Workflow-lint adoption rollout status: .github/workflows/workflow-lint.yml (the reusable actionlint/zizmor caller) has been added through one small no-release pull request per repository.

    • Merged: 61 repositories. Each merged after its checks, including the new lint job, passed. Two needed small fixes in the same pull request:
      • Cratis/AI: workflow-lint.yml added to the allowed-workflows list in the repository verification.
      • Cratis/Chronicle.Mcp: actions/cache moved from v3 to v4 in publish.yml, which the linter rejected.
    • Merged with known, unrelated failures: Cratis/Samples (its main build has failed since 2026-10-29 on a NU1109 Chronicle package downgrade) and Cratis/Strategy (the validate check also fails on main-line branches over slide provenance claims). Both failures need their own fixes.
    • Not adopted, Cratis/AI.Distribution: its generated-distribution verification locks the control-plane workflow inventory, and CI validates against the previous revision. Adding a workflow there needs a staged policy change first, so the pull request was closed.
    • Blocked, Lint workflow changes with the shared Cratis workflow lint Chronicle.Python#56: branch protection requires a check named policy / verify, but the workflow reports verify / verify. This mismatch was already there and blocks every pull request in that repository. It needs a protection or workflow fix by the owner.
    • Not yet done: Cratis/Documentation (has an active work lane), Cratis/Direct and Cratis/Infrastructure (left out of this rollout on purpose).

    Org-wide Dependabot configuration stays deferred.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions