Breaking, for the GitHub Action only: file and max-tokens are no longer
required inputs. file still works and is now a deprecated alias for target;
rename it when convenient, and the Action warns when it sees the old name.
Nothing in the library or CLI changed shape. Migration: file: → target:.
The reports now land where the review happens. trazum check and trazum diff
grow a --markdown-out <file>, and the Action writes that file to
$GITHUB_STEP_SUMMARY and — optionally — posts it as a pull request comment
that replaces its own previous one rather than adding another.
Three bugs 0.10.0 introduced in the Action, all the same shape. Config
support shipped in the CLI while action.yml kept passing --level safe and
--locale en unconditionally. The CLI layers flags over config over defaults,
so an always-present flag meant a project's own level and locale were never
read; max-tokens: required: true meant config budgets were unreachable; and
file: required: true meant neither directory mode nor diff was exposed at
all. Every optional flag is now added only when it was actually given. A
default that silently overrides a project's own setting is worse than no
default.
--markdown-outoncheckanddiff. Written before anything sets an exit code, so a report exists precisely when it is needed. A failure to write is reported and swallowed: a full disk must not turn a passing check into a failing build.- The step summary is not behind an input. It needs no token, no permission and no pull request, and has no failure mode worth a switch.
- The reporting steps carry
if: always(). A composite action skips the rest of its steps once one fails, so without it the summary would appear only on runs nobody needs a report for. The budget verdict is re-raised in a final step, and a missing outcome counts as failure — a check that never reached its own last line is not a green build. comment: trueposts the report, found by an invisible marker in the body rather than by author.gh pr comment --edit-lastmatches by author, so any other step in the job commenting asgithub-actions[bot]would have had its comment overwritten.comment-keyseparates two runs that report on different things in the same pull request.- A green report is collapsed inside
<details>; a failing one is not. A green table that stays green on every push is the thing a maintainer learns to skip — and once they skip it, they skip the red one too. - Commenting can never fail the build. No pull request, a read-only token on
a fork, comments disabled, an unreachable API: each records a notice and
carries on, because the report already reached the step summary. A tool that
turns "could not comment" into a red build gets deleted from the pipeline
rather than configured. A 401/403 says so in one line and says explicitly not
to reach for
pull_request_target, which runs a writable token against code the contributor controls. - The poster lives in
action/post-comment.mjs, outside the workspaces and in plain ESM with no dependencies. It needed no security invariant relaxed — editing one for convenience is not a reason. - Table cells are
<code>with HTML entities, not backtick spans. The obvious version — wrap in backticks, escape|as\|, widen the fence past the longest backtick run — did not handle a backslash, which CodeQL caught: givena\|b.txtit emitted`a\\|b.txt`, and whether that survives depends on whether the row splitter reads\\|as an escaped pipe or as an escaped backslash followed by a live one. It happens to work in cmark-gfm. An escaper whose correctness rests on that is not an escaper. With entities there is no|in the output at all, so no scanner can split the row; backticks inside<code>are literal, so the fence arithmetic disappears; and a backslash needs no treatment. Three hazard classes collapse into one rule. Paths come from a repository, and on a pull request from whoever opened it. - The check verdict counts only what was measured. "All 3 prompts are within budget" over a set where one had no budget claims something nobody established.
- New security invariants: every
${{ }}inaction.ymlmust be a bare env assignment or a condition; the reporting steps must carryif: always(); the comment step must be unable to fail the job; and a missing outcome must default to failure. The old "every input reaches the CLI" assertion was a usefulness check dressed as a security one, and it broke the moment an input legitimately gated a step instead of being forwarded — replaced by the positional rule, which is what actually matters. - Tests grow from 303 to 359, including a new
action/testsuite wired intonpm test.
A security guardrail was ineffective, and is now enforced with positive controls. Carried over from the previous unreleased entry.
The test asserting "inputs reach the Action's shell through the environment,
never interpolated into run:" did not do that. Two independent causes: its
run: body pattern required a newline after the optional block indicator, so a
single-line run: was never recognised as a run block at all; and it searched
that body only for ${{ inputs.* }}, which is the safest value in the set
because it is workflow-authored. The dangerous ones were outside what it looked
at entirely — github.event.pull_request.title, ...body and
github.head_ref are written by whoever opened the pull request.
action.ymlitself was never vulnerable, and still is not: every input goes throughenv:, norun:body interpolates anything. What was broken was the guardrail meant to keep it that way, andSECURITY.mdclaimed more than the test asserted. Both are corrected.- The rule is now positional and source-blind: nothing may be interpolated
into a
run:body, ever. Provenance is not something a regex can judge, and a step that derives an input from a PR title turns a "safe" source unsafe without touching the file the test inspects. - The harm never depended on the token being writable. Substitution happens before bash parses, so the payload runs on the caller's runner with whatever secrets that job has in scope.
- Five positive controls the scanner must flag, plus a negative control:
action.ymlquotes an expression inside a prose comment explaining the rule, and a test that fails when you document the reasoning teaches people to stop documenting it. The version this replaced had no positive control, which is exactly why it passed for every shape it could not see. - Also asserts that no workflow and not
action.ymlusespull_request_target— the event a reviewer reaches for the moment they find a fork PR cannot post a comment, and the one that runs a writable token against contributor-controlled code. 0.11.0's natural wrong turn now needs arguing in a pull request rather than arriving quietly. - Found while designing 0.11.0, which would have been written in exactly the two shapes the test could not see.
- Tests grow from 301 to 303.