Có gì mới trong 1.11.0
# [1.11.0] - 2026-10-26
### Security
• **`cargo audit` failed on `dev` itself:the YAML parser under the crate is
unmaintained** ([#688](https://github.com/kbrdn1/gwm-cli/issues/688)).
`RUSTSEC-2024-0449` marks `unsafe-libyaml` unmaintained:the repository was
archived on 2024-03-25, and the crate is a machine translation of libyaml's C
into unsafe Rust, so bugs found in it are not fixed upstream. It reached this
crate through `serde_yaml_ng 0.10.0`, a direct dependency, and the advisory
entered the database after this repo's last green `cargo audit`, which is why
a check that had been green went red without a line of code changing.
Replaced by the pair the advisory itself names, both written in safe Rust:
`serde-saphyr` for the one typed parse in `src/`, and `saphyr` for the
dynamic tree the workflow guards read. `unsafe-libyaml` is gone from the
graph entirely rather than accepted through an `ignore` in `audit.toml`,
which `ci.yml` allows with a rationale (#340) and which #688 offered as the
other outcome.
The other candidates, and why each was not taken. `serde_norway` depends on
`unsafe-libyaml-norway`, the same translated C under a new name, which
silences the advisory by renaming the crate rather than by fixing the cause.
`serde_yml` carries `RUSTSEC-2025-0068`, unsound, with a segfault reachable
through its serializer, `patched = []` and the project archived, so that one
is a disqualification.
`noyalib`, the advisory's second suggestion, is **not** disqualified, and the
first draft of this entry said it was:it carries `RUSTSEC-2026-0333`, but
that advisory is `patched = [">= 0.0.53"]` and the current release is 0.0.58,
so a current `noyalib` is clean. What it is instead is a judgement:it was at
its 58th patch release before a 0.1, it took a denial-of-service advisory two
weeks before this was written, and `serde_yml`, from the same author, is the
archived unsound crate above. `serde-saphyr` is the advisory's first
suggestion and the one taken.
A fourth route was measured and dropped, and is worth recording because it
looked free:deserialising into `serde_json::Value` through `serde-saphyr`
would have been a near-mechanical rename of every read the swap touches,
the bulk of them in `release_workflow_tests.rs`. No count is given because
three attempts at one were each wrong and none of them credited a guard with
anything:a figure derived in prose drifts exactly like the floor it
describes, with nothing to catch it. It sorts mapping
keys, so `string_keys`, which promises document order, would have lost that
guarantee while its own test kept passing on a sample that happens to be
alphabetical. It also reads the YAML key `true:` as the string `"true"`,
which leaves `string_keys` unable to fire at all and turns the guard from
#673 vacuous. Both measured before the route was abandoned.
`tests/workflow_reader_tests.rs` pins what the new reader answers, including
the one semantic that was inherited rather than chosen:an absent key and a
key whose value is YAML null read alike, because the old reader could not
tell them apart and every `must carry no X:` assertion was written against
that. While both crates were declared the two readers were compared head to
head, against the accessor that actually ships:**187 comparisons over 17
documents, zero divergence** on `is_null()`, `as_str()`, `as_bool()`,
sequence length and mapping size, including five-level paths where the old
reader cascaded to null. That is the scope of the number and not a claim
about every behaviour. An earlier measurement covered an adapter that was
replaced before this shipped, which is why it was redone rather than quoted.
Two behaviours changed, below. Separately, a form that repeats a key, even
one `gwm` reads none of (a second `name:`), no longer parses, where
`serde_yaml_ng` let it through. Two paths parse a form and they fail it
differently. `gwm new` refuses it, in `serde-saphyr`'s wording, as it does
any form it cannot parse. `gwm create --issue` and the TUI's prefill
from an issue parse the whole form to take its `title:`, and treat a form
they cannot parse as having no prefix:unless the type's config sets
`title_prefix`, the whole issue title lands in the slug
(`feature-add-config-types` rather than `add-config-types`).
**A YAML merge key now contributes its fields.** `serde_yaml_ng` did not
resolve `<<:`, so an issue form factoring fields out through an anchor lost
the optional ones with no error, or was rejected when the merge carried a
required one such as `type`; `serde-saphyr` resolves merge keys, a YAML 1.1
type. `gwm new` renders the merged fields into the issue it opens.
`gwm create --issue` and the TUI's prefill move the other way:a form
rejected for a `type` its merge carried used to contribute no prefix, and
now contributes its `title:`, so unless the type's config sets
`title_prefix` the slug drops the prefix it used to carry. None of the forms
this repo ships uses an anchor, so nothing moves here today, and it is
pinned as a contract rather than left to be discovered the first time
somebody factors two forms. Resolution is bounded by the reader's default
alias budget, so a hostile form cannot expand without limit.
**Mapping equality is now sensitive to key order**, which is test-side only.
`MappingOwned` is a `LinkedHashMap` comparing element by element, where the
old `Mapping` wrapped an `IndexMap` and compared order-insensitively, so
swapping two lines of a pinned `env:` now reddens the guard that pins it.
Stricter is the right direction for a step pinned as written, and it is what
the by-value guards of #647 and #665 were reaching for, but it is a change
rather than a no-op:a reordering that alters nothing at run time now has to
be acknowledged in the expected tree.
• **Two of the four workflow `permissions:` grants were compared by nothing**
([#681](https://github.com/kbrdn1/gwm-cli/issues/681)).
`ci.yml` (#677) and `release.yml` (#669) each had a test reading their grant
by value. `docs-sync.yml` and `pre-release.yml` were covered only by the
repo-wide sweep that asks for the key to exist, which reads that something is
declared and never what:`permissions: write-all` on either file, alone, left
all 32 tests of the suite green. Measured while reviewing #677, and older than
it, so it was filed rather than folded in.
Both are now pinned by value. `docs-sync.yml` must grant `{}`, the strongest
statement in this repo and the one an edit widens most easily, since it is
triggered by a push to `main` and authenticates its one API call with a PAT
that is not the workflow token. `pre-release.yml` must grant
`contents:write` for its publish, and is held to the same split
`release.yml` has:only `build` and `release` may inherit that grant, any
other job must carry `contents:read`. There is no such job today, which is
why the rule is written before one appears rather than after.
Compared as parsed values and never through `as_str()`, which reads `None`
for `{}` exactly as it does for a key that is not there, so a reader asking
for a string cannot tell the repo's strongest grant from no grant at all.
`write-all` is the other half of the same cause and not the same trap:it is
a string, reads `Some`, and defeats a *presence* check instead, which is how
it passed the existing sweep (#669). Four mutations, each applied alone:
both grants flipped to `write-all`, a scope written on `docs-sync.yml`'s
only job, and a third job added to `pre-release.yml` after the publish with
no grant of its own.
• **`ci.yml` declared no `permissions:`, so its nine jobs took whatever the
repository setting said**
([#677](https://github.com/kbrdn1/gwm-cli/issues/677)).
`default_workflow_permissions` reads `read` today, so the token was
harmless, by a setting no pull request shows rather than by anything the
workflow said. Every other workflow here states its own contract:
`docs-sync.yml` carries `permissions:{}`, `release.yml` and
`pre-release.yml` carry `contents:write`, and the two jobs that run after
`release.yml`'s publish carry `contents:read` (#669).
What a flip of that setting to write would hand a pushing token to, on
every pull request, is the build scripts and proc macros of the whole
dependency graph, `cargo install cargo-audit --locked` building from
source, and five third-party actions, one of which copies the token to
disk:`cachix/install-nix-action@v31` falls back to `GITHUB_TOKEN` with no
`github_access_token` input and writes `access-tokens = github.com=<token>`
into `/etc/nix/nix.conf` (`install-nix.sh` at that tag, lines 50-52,
installed at line 93), which puts back for the rest of the job what
`persist-credentials:false` keeps out of the git config (#433).
`ci.yml` now grants `contents:read` at workflow level, which is all any of
its jobs does anything with:no step of the file names a token of its own.
Some hold the default one regardless, `actions/checkout` through its `token:`
default and the nix action through its fallback, and scoping that default is
what the grant is for. A test pins that grant by value
and refuses a job that restates a different one, since a job-level
`permissions:` replaces the workflow's wholesale rather than narrowing it.
A second, deliberately weaker sweep asks every workflow in the directory to
declare something, `{}` included, at the workflow level or on every one of
its jobs, so a workflow added later cannot arrive silent the way this one
did. Eight mutations, each applied alone:the grant removed, turned to
`write`, given a second scope, restated wider on a job, emptied on a job,
`jobs:{}`, a new workflow with no `permissions:`, and one workflow file
short of the floor.
The grant holds only while the