Add zizmor + actionlint workflow analysis to CI; evaluate the new actions.lock workflow lockfile

Ouverte
#1,213 1 commentaire 0 réactions 0 personnes assignées Voir sur GitHub

Les mainteneurs répondent en général sous 1 jour

Personne n'a encore pris cette issue.

Évaluation

Difficulté
3/5
Temps estimé
1-2 jours
Accessibilité débutants
76/100
Type d'issue
Fonctionnalité
Clarté
Clairement spécifiée
Activité
Active
Stack technique
github-actions, shell, yaml
Domaine
ci-cd, security

Piste de recherche

Start with .github/workflows/security-scan.yml, scripts/validate-github-actions-shas.sh, scripts/check-workflow-hygiene.sh, and .github/workflows/yaml-lint.yml to understand the existing workflow gates. Add the proposed zizmor analysis and SARIF upload, then determine whether actionlint needs separate work because it is already covered by yaml-lint.yml. Done means the CI job runs successfully, reports zizmor findings in code scanning, follows the repository’s SHA-pinning policy, and includes a documented decision on .github/workflows/actions.lock.

Rédigé par le modèle d'indexation à partir du texte de l'issue.

Description

ci priority: medium security

Summary

This repo already does the hard parts of Actions supply-chain hygiene: all uses: refs are SHA-pinned, scripts/validate-github-actions-shas.sh enforces it, and every workflow declares a permissions: block. Two 2026-era additions would close the remaining gap above the pin:

  1. zizmor static analysis of .github/workflows/*.yml (injection, dangerous permissions, pull_request_target misuse, ref-confusion, impostor-commit — a SHA that only exists in an attacker's fork still resolves under the parent repo's name, which SHA-pinning alone does not catch).
  2. actionlint for workflow syntax/schema errors — already covered: yaml-lint.yml runs reviewdog/action-actionlint (SHA-pinned); see the status comment.
  3. Evaluate .github/workflows/actions.lock — GitHub's workflow dependency lockfile (public preview 14 Oct 2026) records the commit of every direct and transitive action dependency; Actions then runs the recorded commit even if a tag moves. This closes the transitive-trust gap that a direct-dependency pin cannot.

Evidence

  • Existing hygiene: scripts/validate-github-actions-shas.sh + scripts/check-workflow-hygiene.sh + yaml-lint.yml — but none perform security-pattern audits.
  • 2026 incident record: tj-actions/changed-files (CVE-2025-30066), TanStack May 2026 (CVE-2026-45321) — every publicly documented Actions compromise ran through a gap one of these controls closes.

Impact

  • Security: upgrades the workflow gate from "SHA matches a tag" to "workflow is free of known dangerous patterns"; catches impostor-commit SHAs and expression injection that current validators are blind to.
  • Low cost: zizmor runs as a single CI step; SARIF upload lands findings in code scanning alongside the existing gitleaks step in security-scan.yml.

Proposed approach

  1. Add a job to .github/workflows/security-scan.yml running zizmorcore/zizmor-action (SHA-pinned, per repo policy) with SARIF upload.
  2. Add actionlint step (or a BATS test in tests/ if the repo prefers the local-gate pattern).
  3. Add both to scripts/quality_gate.sh only if runtime cost stays within the gate budget.
  4. Spike/ADR for actions.lock while it is in preview; revisit before GA.

References

Langage dominant
TypeScript
Étoiles
3
Forks
2
Merge moyen
11 h 49 min
PR mergées (30 j)
102

Préparer son environnement

Ouvrir dans Codespaces

Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.

Par où commencer

  1. Lisez l'issue en entier, puis le guide de contribution du projet.
  2. Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
  3. Forkez le dépôt et travaillez sur une branche.
  4. Ouvrez une pull request qui référence le numéro de l'issue.

Autres issues de d-oit/do-knowledge-studio

Toutes les issues de d-oit/do-knowledge-studio

Issues similaires

Plus d'issues TypeScript

Recevez les nouvelles issues par e-mail

Un résumé court des issues GitHub adaptées aux débutants.