Forge and continuous integration
proposed checked A convention of ontrack-engineering 0.6.0. How ontrack ruled on it.
traits: forge: gate: audit:Status
Proposed
What is this file? A question governance asks your repository, with the answer it recommends. While it says
status: proposed, you may edit it freely.revision:dates the question, not the file: you do not fill it, and it only moves when the question changes. rejected is a full answer: when the question does not apply here, rule rejected, remove the wholetraits:block, and say what stands in for it. ADR-0001 explains the mechanics.
Context
governance assumes GitHub as the forge: pull requests, GitHub Actions
workflows in .github/workflows/, secrets in repository or environment
settings, and branch protection in rulesets. A repository on another forge
rules this ADR rejected and names its forge in the reason.
While the key is empty, an agent opening a pull request does not know whether a red pipeline blocks the merge or only reports. It either spends time fixing a red that had no consequence, or merges a red that did.
A red pipeline blocks nothing on its own. It blocks a merge only once a ruleset on the repository (or the organisation) names the check as required. That setting lives on GitHub, not in a file of the repository, so the value written here is a statement of intent that the ruleset makes real.
The workflows are code an agent writes, and nothing reads them. The
rules below are written for whoever writes a workflow. Measured on
governance’s own workflows with zizmor 1.32.0, five findings slipped past
them, among them a template injection and write permissions granted to the
whole workflow, while every action was correctly pinned. While
forge.audit is empty, an agent does not know whether a tool will read
what it wrote.
What a pipeline runs on which branch follows from other ADRs: the branching model (ADR-0009), the delivery (ADR-0012), the languages and tests (ADR-0004, ADR-0007).
Decision
What governance recommends, and why.
| Key | Recommended value | Reason |
|---|---|---|
forge.gate |
blocking |
a check that prevents nothing is not a check, it is a report. Make it real with a ruleset that requires the pipeline’s checks on the default branch |
forge.audit |
zizmor |
it reads workflows for what this ADR’s rules forbid: a movable action reference, pull_request_target, a template expanded into run:, permissions wider than a job needs. actionlint checks that a workflow parses, not that it is safe |
none is how a repository says it has no pipeline at all: keep traits:
and write none. rejected has one use only, a forge other than GitHub.
Who reviews a change to this repository, and who merges it, is
ADR-0022’s question: review.by.
What governance fixes, whatever you rule. Five rules apply to every workflow job, not only to deployment:
- Deploy only from the default branch. A pushed feature branch deploys
nothing. Bind each deploy job to the default branch in its workflow
on:and its jobif:, and protect the environment it uses. - Deploy secrets are protected. They live in repository secrets, or in environment secrets when rule 1 needs them, never in a file.
- Pin actions and images immutably. An action tag such as
actions/checkout@v4can be moved, so the only immutable form is the commit SHA, with the tag in a comment. An image is pinned by digest or by a tag nobody moves, neverlatest. - No job writes a secret’s value to a log. The rule targets the fact, not a list of commands. Printing what the pipeline publishes anyway (a staging URL, a commit) is fine.
- An untrusted contribution receives no secrets, and a job running with
the repository’s rights does not execute proposed code: that is
pull_request_targetchecking out the fork’s head. Secret-free CI still runs on pull requests from forks: what stops is the secret, not the test.
What governance fixes when you rule forge.audit: zizmor:
- A job runs zizmor on every pull request, through
zizmorcore/zizmor-actionpinned by SHA (rule 3). In CI it also runs the online audits, with the job’sGITHUB_TOKEN. - A finding is silenced only inline, on its line, with its reason:
# zizmor: ignore[template-injection] the title is only echoed. The agent proposes it and a person approves or merges it, as ADR-0022’sreview.bysays and as ADR-0019 rule 4 has for an ignore rule. Azizmor.ymlthat loosens or disables an audit is not a way to silence: the check does not read it. - Every action is pinned by hash, GitHub’s own (
actions/*) included. zizmor’s default policy already requires it.
Secrets are named, never given. An agent produces the list of secret names a workflow needs; a person sets the values on GitHub. A token, a password or a kubeconfig never goes into a change, a commit or a reply to the agent.
Departing from a rule is declared in your own ADR, with its reason. A silent bypass is not a departure.
Which jobs exist follows from other ADRs, not from the agent’s judgement.
| Stage | Exists when | Its form comes from |
|---|---|---|
lint |
a tracked file (a package.json script, a Makefile target, a pyproject.toml section) carries a lint command |
that command; the workflow cites the file |
test |
the same, for a test command | that command; the failing threshold is tests.coverage_target (ADR-0007) |
scan |
vulnerabilities.scanner is not none (ADR-0019), on pull requests and on a schedule |
that scanner; the failing threshold is vulnerabilities.fail_on (ADR-0019) |
audit |
forge.audit is not none |
that tool, on the files under .github/workflows/ |
build |
always | languages.main.name (ADR-0004), plus the frontend (ADR-0013) if ruled |
image |
delivery.target: container (ADR-0012) |
the registry in delivery.registry |
release |
delivery.release_tool is neither manual nor none |
that tool (ADR-0012), plus the SBOM when vulnerabilities.sbom is not none (ADR-0019) |
deploy |
deployment.manifests is a relative path; one job per entry of delivery.environments, in order, each with its own trigger |
the manifests in that path |
| propose elsewhere | deployment.manifests is a URL; this replaces deploy |
that address |
An absent stage is a full answer: an agent that adds a job in these cases
has invented one. A command named only in an agent instructions file does
not create a stage. If deployment.manifests is neither a relative path to
an existing directory nor a URL with a scheme, the agent asks and writes
nothing. The table never writes a job’s content.
Ask before writing, once. None of the following follows from a trait: the names of the registry and cluster credentials, the namespace or the platform’s service declaration, the apply tool (governance prescribes none), who reviews a change proposed elsewhere, and the service URL. The order is: rule ADR-0012, collect these, then write.
What a deploy job prints. The staging URL, the deployed commit, and a dated line naming that commit. On failure, the stage that failed and a link to the job log, with three known causes: a policy refused the manifest (fix the manifest, not the policy), a secret is missing (set it, named as listed), an image is not found (check it was pushed and matches the pin).
Everything below disappears when you rule, from this sentence up to the Consequences heading, which stays.
How to rule: five steps, all in this file. Read all of them before doing any, because the last one deletes the other four, and do them in one commit.
- Write the value of each key under
traits:in the frontmatter, or, if you rule rejected, remove the wholetraits:block. - Change
status:from proposed to accepted or rejected. - Fill
date:andauthors::date:asYYYY-MM-DD, the day you rule;authors:, the names of the people who decided, without email addresses. - Rewrite the Positive, Negative and Neutral lists under Consequences for your verdict: what it makes easier, and what it costs.
- Last, delete this block, from its first sentence up to the Consequences heading, which stays. In its place, write the reason for your decision wherever you depart from the recommendation, or, if you adopt it as is, one line that says so.
The first step is the one people forget: a decision written only in prose leaves an agent guessing. This is what the frontmatter looks like once filled, and it is the one part of the file an agent reads without interpreting it:
---adr: ADR-0011slug: forge-and-cititle: Forge and continuous integrationstatus: acceptedrevision: 4date: 2026-11-15authors: [Your Name]supersedes: []check: npx --no-install ontrack-engineering-check ADR-0011traits: forge: gate: blocking audit: zizmor---The check: line stays. Once this ADR is accepted, ontrack check
runs it from your repository’s root. It reads the keys you ruled:
forge.gate: withblockingorinformative, at least one workflow in.github/workflows/. This checks presence only. It does not verify the ruleset that makes the pipeline required on the default branch: that is a GitHub setting, outside the repository, and the check’s output says so.forge.audit: withzizmor, it runszizmor --offline --no-configon the committed workflows and fails on any finding no inline ignore covers. This one reads what the workflows say. It loads no configuration, so azizmor.ymlin your repository does not change its verdict. It takes zizmor from mise when ADR-0025 rulestools.manager: mise, from thePATHotherwise, never fromnode_modules/.bin, and prints the version it ran. The online audits run only in CI.forge.review, left from revision 3: the check fails and names ADR-0022’sreview.by, where the key moved.
Any other value has nothing to check, and passes.
The Alternatives Considered below were weighed by governance without knowing your context. Weighing them against yours is still to do, and it is what makes a decision different from an accepted default.
Consequences
Positive
- A red pipeline means the same thing to every agent and reviewer: with a required check, nothing merges on red.
- The five rules close the common leaks: moved action tags, secrets in logs, deploys from feature branches, secrets handed to forks.
- Which jobs exist is derived from the other ADRs, so two agents write the same workflow.
Negative
- A flaky pipeline blocks everyone, and the pressure to bypass the check grows with it.
- Pinning actions by SHA makes updates a deliberate chore, unless a tool proposes them: ADR-0018 decides which.
- zizmor enforces rule 3 for actions and part of rule 5. Rules 1, 2 and 4,
and image pins, stay with review, which reads every
uses:,image:andrun:. - A new zizmor release can add an audit that fails a workflow that passed the day before.
Neutral
- The ruleset that makes
blockingreal is a GitHub setting, outside the repository, and is not checked by anything here.
Alternatives Considered
blocking
Nothing merges on red. Recommended. The cost is real: an unstable pipeline blocks people who did nothing wrong.
informative
The pipeline reports, review decides. Less friction, and no guarantee: a red that is reported gets ignored.
none
No pipeline; review is the only control. Tenable for a repository with no executable code.
forge.audit: none
Nothing reads the workflows but review. Tenable when no workflow exists, or when a person writes and reads every one of them.
actionlint only
It catches a workflow that does not parse or a wrong expression type. It
does not flag a movable tag, pull_request_target or a secret in a log
(measured below): it is a linter, not an audit. It is still worth running
before pushing.
CodeQL’s actions language
GitHub’s code scanning analyses workflows too. Measured on governance’s workflows on 2026-11-15, its 17 queries reported nothing where zizmor found five issues.
Honouring the repository’s zizmor.yml
The usual way to configure zizmor. It lets a file turn an audit off while the check still passes, which is the silent bypass the rules above forbid.
A forge other than GitHub
Rule rejected and name the forge. The five rules then no longer apply from here; copy those you keep into your own ADR.
References
- Suggested skills:
setupfromactionlint@melodic-software, to install and wire actionlint. - Adapted from surdesrails SDR-0010, revision 2 (GitHub only:
forge.vendorand the sections for the other forge dropped; theimagestage followsdelivery.targetinstead ofhosting.offer). - ADR-0001: how governance ADRs are ruled on.
- actionlint and act.
- zizmor: audits, usage and ignores, configuration, zizmorcore/zizmor-action. Measured with zizmor 1.32.0 on 2026-11-15.
The key.
| Key | What it holds | Allowed values |
|---|---|---|
forge.gate |
what a red pipeline prevents | blocking (nothing merges on red), informative (it reports, review decides), none (no pipeline) |
forge.audit |
what reads the workflows for what the rules forbid | zizmor, another named tool, or none |
Testing a workflow before pushing, in three steps, cheapest first. Install
actionlint and act as standalone binaries from their GitHub releases,
checked against the checksum file each project publishes, in
$HOME/.local/bin, without sudo.
| Step | Command | Expect |
|---|---|---|
| 1. the configuration parses | actionlint (it finds .github/workflows itself) |
no error |
| 2. the predicted jobs are there | act -l (needs no Docker daemon) |
at least the jobs the stage table predicts, and none it excludes |
| 3. they run | act -P ubuntu-latest=catthehacker/ubuntu:act-latest --env-file /dev/null --secret-file /dev/null --var-file /dev/null |
lint, test and build green; deploy red, since it runs against nothing |
Notes on act, measured in surdesrails on 2026-09-20:
- Always pass
-P. Otherwiseactasks which image to use, and a non-interactive run fails with a barelevel=fatal msg=EOF. - Always pass the three empty files.
actloads.env(printed in clear),.secretsand.varsfrom the repository root by default. - Never pass
-s GITHUB_TOKEN="$(gh auth token)".actreplacesactions/checkoutwith a local copy that needs no token, and the jobs that really need the GitHub API cannot be tested locally anyway. act -ldoes not evaluateif:. It lists the static graph, so distrust a job it shows.- On Apple Silicon, add
--container-architecture linux/amd64.act -j <job>runs a single job. - Do not lift these flags to get green.
- Three greens do not make a working deploy. Registry access, the apply tool, the namespace and admission policies are untouched.
What the tools do not catch, measured with actionlint v1.7.12:
- Not flagged: a movable action tag (
@v5),echo ${{ secrets.X }}, a bareenv,curl -u user:pass, andpull_request_target. - Flagged: direct interpolation of
github.event.pull_request.titleinrun:. - Flagging is not enforcing: you run it by hand, and it refuses no merge.
Measured with zizmor 1.32.0, offline, without configuration:
- Flagged: a movable action tag, GitHub’s own included (
unpinned-uses),pull_request_target(dangerous-triggers), the pull request title inrun:(template-injection), a checkout that keeps its credentials (artipacked), andcontents: writeat workflow level when the workflow has several jobs (excessive-permissions). - Not flagged:
echo ${{ secrets.X }}, a bareenv,curl -u user:pass, and workflow-levelcontents: writein a single-job workflow. Rule 4 stays with review, as does rule 1.
Checking rule 1 by hand. Run
grep -rn --include='*.yml' --include='*.yaml' 'environment:' .github/workflows/,
then check that each hit is bound to the default branch through on: and
if:. This is a floor, not a guarantee:
- It misses a deploy with no
environment:, a branch condition set elsewhere, environment protections and rulesets. - A job that publishes Pages, for example, is a false positive.
An empty key is not an answer: both are required. The value is written in this file and nowhere else; whoever needs it links here. See ADR-0001 for the check command.
Revisions. What changed in the question at each revision, and what a repository that already ruled must re-answer.
- Revision 2: a new key,
forge.audit(zizmor, another tool ornone, recommendedzizmor), three rules forzizmor, and anauditstage. Answerforge.audit; nothing else to re-answer. - Revision 3: a new key,
forge.review(peer,authororagent, recommendedpeer), which says who can accept a change, and whatauthorleaves beside each value offorge.gate. Answerforge.review; nothing else to re-answer. - Revision 4:
forge.reviewmoves to ADR-0022 asreview.by, with what it leaves beside each value offorge.gate. Answerreview.bythere, then deleteforge.reviewfrom this file: the check fails while it remains.
