Repository navigation
[CTX-1872] chore(security): record the chrono unmaintained advisory as a dated exception (bitty#3220) - #3221
Conversation
…s a dated exception (bitty#3220) RUSTSEC-2026-0543 marks chrono unmaintained with `patched = []`, so no lockfile move can clear it; the supply-chain leg went red on every branch, including PRs that touch no dependency (#3218, #3219). The crate is used for the restricted Lua `os.date` local-calendar conversion (bitty-lua/src/stdlib.rs) plus one bitty-runtime test, the advisory is informational (no source-visible vulnerability), and both recommended replacements are blocked today: `time >= 0.3.47` needs rustc 1.88 (MSRV is 1.85) and the jiff migration is its own dependency-adoption decision. Record the exception where the repo already records this class (deny.toml, ADR-0004 exception policy) with a 2027-03-31 re-audit bound, and pass the same ignore to the cargo-audit step so the two lists cannot drift apart. Verified: cargo deny check -> advisories ok, bans ok, licenses ok, sources ok.
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Xuepoo
left a comment
There was a problem hiding this comment.
Independent review (guard-dispatched, agent: auditor)
Scope: branch ctx-1872/deny-chrono-exception @ fcc1e1ce, base origin/main @ 7b3d3df7. Read-only on the lane worktree; mutated copies of deny.toml were run from /home/fuyu/.hermes/cache/scratch/reviewer-3221/ via cargo deny --config, and cargo audit was run against a copy of the shared advisory DB (db-copy, rev 233155b) so the shared ~/.cargo/advisory-db was never touched.
| # | Check | Result |
|---|---|---|
| 1 | Graph edge = bitty-lua + one bitty-runtime test | PASS |
| 2 | patched = [], no available upgrade |
PASS |
| 3 | Discrimination (main fails / PR passes) | PASS — exit 1 vs exit 0 |
| 4 | deny.toml ↔ ci.yml ignore parity | PASS — set-equal |
| 5 | actionlint clean, workflow diff scope | PASS (comment accuracy defect F1) |
| 6 | No dependency movement | PASS |
| 7 | P0-AC-034 / ADR-0004 exception hygiene | PASS |
| 8 | Scope of the ignore / recorded control | answered below |
1. Graph-edge accuracy — PASS
chrono is declared once as a workspace dependency (Cargo.toml:80, a declaration, not a consumer) and consumed by exactly two manifests:
crates/bitty-lua/Cargo.toml:18(normal dependency)crates/bitty-runtime/Cargo.toml:201, inside[dev-dependencies](header atcrates/bitty-runtime/Cargo.toml:197)
Source references are confined to crates/bitty-lua/src/stdlib.rs:206,215,647,649 and one test, crates/bitty-runtime/tests/bar_clock_tick.rs:209,212,213. grep -rnE '\bchrono\b' --include=*.rs returns nothing else in-tree (vendor/ has no chrono).
cargo tree -i chrono --offline (exit 0) reports chrono v0.4.45 with exactly two direct edges: bitty-lua and (dev) bitty-runtime.
Both specific claims in the PR body hold: fields_from_datetime exists at crates/bitty-lua/src/stdlib.rs:215, and the epoch→local conversion is crates/bitty-lua/src/stdlib.rs:647-649 (from_timestamp(0,0).with_timezone(&Local)). The deny.toml:45-46 restatement ("enters the graph only for the restricted Lua os.date local-calendar conversion … plus one bitty-runtime test") is supported. No claim in the PR body or in the deny.toml comment is contradicted by the code.
2. patched = [] — PASS
~/.cargo/advisory-db/advisory-db-3157b0e258782691/crates/chrono/RUSTSEC-2026-0543.md:
date = "2026-09-14",informational = "unmaintained"[versions] patched = []— no version anywhere is patched- recommended alternatives:
jiff,time
Cross-checked against the registry index (https://index.crates.io/ch/ro/chrono, 95 versions): the newest released chrono is 0.4.45, and Cargo.lock already pins chrono 0.4.45. So the lockfile is already at the newest release in existence — the exception is not standing in for an available upgrade. (The only other chrono advisory, RUSTSEC-2020-0159, is patched = [">=0.4.20"] and therefore not triggered at 0.4.45.)
3. Discrimination — PASS (deny.toml:55 is what clears the gate)
Run A — origin/main's deny.toml (git show origin/main:deny.toml, written to scratch, run as cargo deny --config .../deny-main.toml check):
- exit code 1, summary
advisories FAILED, bans ok, licenses ok, sources ok - exactly one advisory:
grep -c '^ ├ ID:'→1,ID: RUSTSEC-2026-0543,Solution: No safe upgrade is available!
Run B — the PR's deny.toml (cargo deny --config .../deny-pr.toml check):
- exit code 0, summary
advisories ok, bans ok, licenses ok, sources ok - zero
errorlines
The two scratch configs differ only by the deny.toml:43-54 comment block plus RUSTSEC-2026-0543 in the deny.toml:55 array, so the entry is causally the thing that clears the gate.
4. ci.yml ↔ deny.toml ignore parity — PASS
Extracted programmatically (tomllib for deny.toml, regex over the single cargo audit line for the workflow):
deny.toml:55[advisories].ignore={RUSTSEC-2024-0436, RUSTSEC-2026-0009, RUSTSEC-2026-0192, RUSTSEC-2026-0543}.github/workflows/ci.yml:1597--ignore= the same four- set difference in both directions: empty
- delta added by this PR:
{RUSTSEC-2026-0543}on both sides; theorigin/mainbaseline pair is likewise equal
Verified end-to-end against the real DB copy: cargo audit -d db-copy -n --stale with the PR's four ignores → exit 0, 1 allowed warning found (tokio). Same command with origin/main's three ignores → exit 0, 2 allowed warnings found, the extra one being ID: RUSTSEC-2026-0543. See finding F1 for what that second result means for the comment at ci.yml:1593.
5. Workflow scope — PASS (one accuracy defect, F1)
actionlint .github/workflows/ci.yml→ exit 0, no output.- The
ci.ymldiff is a single hunk (grep -c '^@@'→1). Non-comment changes: one line removed and one line added, both theAudit advisoriesrun:atci.yml:1597, adding only--ignore RUSTSEC-2026-0543. The other added lines (ci.yml:1589-1593) are comments. - No
${{ … }}expression, no env indirection, no input/shell expansion added anywhere in the diff — no new injection surface. No other step or job touched (ci.yml:1573cargo deny checkandci.yml:1580-1581tree observation are unchanged).
6. No dependency movement — PASS
git diff origin/main..HEAD --stat → only .github/workflows/ci.yml (+6/−1) and deny.toml (+13/−1). git diff --name-only confirms those are the only two paths. git diff origin/main..HEAD -- Cargo.toml Cargo.lock → 0 lines. No lockfile drift, no MSRV movement.
7. Exception hygiene (P0-AC-034 / ADR-0004) — PASS
deny.toml:43-54 carries all five required elements, in the same shape as the existing time/ttf-parser/paste entries (deny.toml:14-36):
- crate and all-versions scope —
deny.toml:43 - advisory id —
deny.toml:43 - why an upgrade is unavailable —
deny.toml:43-44(patched = []),deny.toml:49-51(both replacements blocked) - why it is not a live risk here —
deny.toml:47-49(informational/unmaintained, calendar fields only). I checked the production path:date_fields_at/fields_from_datetimeonly callfrom_timestamp,with_timezone, andDatelike/Timelikegetters (crates/bitty-lua/src/stdlib.rs:205-230); no parsing of untrusted text and nochronoformatter on the production path. The claim is supported. - dated re-audit bound —
deny.toml:51-54: "no later than 2027-03-31 or when the MSRV moves to 1.88, whichever comes first", plus "any extension needs a dated ADR-0004 revision". Dated, not open-ended.
No compensating control is claimed that does not exist: the comment says the crate "enters the graph" (deny.toml:45) — it does not claim chrono is excluded from the build. The MSRV claim is independently true: Cargo.toml:33 rust-version = "1.85", and the registry index gives time 0.3.47 rust_version: 1.88.0. The P0-AC-034/ADR-0004 policy references resolve in-repo (deny.toml:23-25,51-54, vendor/winit/PATCHES.md:232, CHANGELOG.md:1737), so this is not a dangling citation.
8. Scope of the ignore — informational (no FAIL, but read this before the 2027 re-audit)
- The ignore is id-scoped, not crate-wide:
RUSTSEC-2026-0543is chrono'sunmaintainedadvisory for all versions, so the ignore is exactly as wide as the advisory class and no wider. It cannot suppress any other advisory, because a new vulnerability gets a new id. - What it does hide, forever, until someone edits the file: (a) the unmaintained signal for any future chrono we might adopt, including a hypothetical 0.5.x, since the id matches regardless of version; (b) any future re-scoping of 0543 itself (the DB can amend the advisory body to a concrete class without changing the id). Neither is hypothetical-only in kind — but neither is a new advisory, and both are exactly what the dated bound exists to catch.
- The recorded control is the human re-audit bound of
deny.toml:51-54(2027-03-31, or MSRV 1.88, whichever first). Nothing enforces it mechanically: cargo-deny 0.20 has no expiry onignoreentries, so the bound is a process commitment, not a gate. That is consistent with the repo's other four exceptions, so it is not a defect of this PR — just do not read the bound as enforced.
Findings
F1 — .github/workflows/ci.yml:1593 states a fail-safe that does not exist. "a deny.toml ignore that audit does not share turns this leg red" is false for the advisory this paragraph is about. Measured with the pinned tool (cargo-audit 0.22.2) against the real advisory DB: cargo audit --ignore RUSTSEC-2024-0436 --ignore RUSTSEC-2026-0192 --ignore RUSTSEC-2026-0009 (i.e. origin/main's list, without RUSTSEC-2026-0543) exits 0 and prints the advisory as Warning: unmaintained / ID: RUSTSEC-2026-0543 under warning: 2 allowed warnings found. Because the advisory is informational = "unmaintained" and the step passes no -D warnings (and there is no audit.toml), the audit leg has never been able to go red on it; the only failing gate is ci.yml:1573 cargo deny check, which does exit 1 (check 3). The sentence is true only as a general invariant for vulnerability-class advisories, and it is placed here as if it covered this one. Practical consequence: when the 2027-03-31 bound is executed, a maintainer who trusts this line may remove the deny.toml id and expect a red leg to remind them about the audit --ignore at ci.yml:1597 — there will be no red leg, and the stale flag would silently keep suppressing the advisory. Fix: state the real mechanism (the shared ignore keeps the two records identical and the step's output free of this warning; cargo deny check is the gate that fails), keeping the "remove both together" instruction.
F2 — PR body, "Verification" bullet: "both with and without the entry, so the entry is what clears the gate". Self-contradictory and the first half is false: without the entry the run exits 1 (check 3, Run A). The conclusion is right and is what I measured, but the sentence as written reads as a failed discrimination test. Reword to "with the entry: exit 0, all four checks ok; with origin/main's deny.toml: exit 1 on RUSTSEC-2026-0543 alone". The honest "What this does not prove" section is appreciated and accurate.
Non-blocking notes
cargo-deny0.20 supports the structured formignore = [{ id = "RUSTSEC-2026-0543", reason = "…" }], which would put the justification wherecargo denyitself can surface it. The PR follows the repo's existing bare-string pattern (deny.toml:55), so this is a suggestion for a future sweep, not a request.- Pre-existing and out of scope, visible only because I ran
cargo auditend-to-end: the DB also warns ontokio 1.53.1(RUSTSEC-2026-0386,unsound, 2026-10-13). It is warning-level today and unrelated to this PR, but it is the next item that will start failingcargo deny checkif the feed grades it up.
Bottom line
The configuration change is correct, minimal, and does exactly what it claims: it is the single thing that turns cargo deny check from exit 1 to exit 0, the two ignore lists are provably in sync, nothing in the dependency graph moved, and the deny.toml exception record meets P0-AC-034 (crate, id, no-upgrade rationale, non-exploitability, dated bound) without inventing a control. I am blocking only on the two inaccurate statements (F1, F2) — F1 sits in the committed diff and asserts a detection mechanism that the pinned tooling does not provide, which is the one thing an exception record must not get wrong. Both are one- to two-line rewords; nothing in the configuration needs to change and I expect to approve on the next head.
VERDICT: CHANGES-REQUESTED
…eview (bitty#3220) The comment claimed a deny.toml-only ignore "turns this leg red". It does not: cargo-audit 0.22.2 reports the unmaintained class as a warning and exits 0, so `cargo deny check` is the enforcing half. Keep the ignore for list parity and state why, instead of asserting an enforcement that does not exist.
Xuepoo
left a comment
There was a problem hiding this comment.
Independent review round 2 (guard-dispatched, agent: auditor)
Reviewed head 8ee4567fa430d5ea1783c3404fedd1f695ed5982 (PR head as reported by the API; two commits on the branch: fcc1e1ce + the reword 8ee4567f). Round-1 review 5938417528 raised two reword-only findings; both are checked below against measurements, not against the diff's self-description.
F1 — ci.yml rationale (RESOLVED)
The reworded block now reads: "cargo audit 0.22.2 reports the unmaintained class as a warning and exits 0, so this step is not the enforcing half — cargo deny check is." Every clause is true of this tree:
- Installed tool is cargo-audit 0.22.2, which is exactly what the job pins (
tool: [email protected], ci.yml:1570); cargo-deny is 0.20.2, also the pinned version (:1565). The version in the comment is not a guess. - Ran the step's exact command in the lane worktree against the shared advisory DB (via
-d <db> --no-fetchso the DB is not clobbered): exit 0, outputwarning: 1 allowed warning found(RUSTSEC-2026-0386, unsound). - Ran it with only the three older ignores, i.e. without RUSTSEC-2026-0543: exit 0, printing
RUSTSEC-2026-0543 ... Warning: unmaintained. This is the round-1 measurement reproduced — a deny-only ignore does not turn this leg red, and the comment no longer claims it does. - The old sentence ("a deny.toml ignore that audit does not share turns this leg red") is gone from the tree;
grep -rn "turns this leg red"returns nothing. - The parenthetical is mechanically sound, not just plausible:
cargo audit --helpexposes-D, --deny <DENY>("exit with an error on: warnings (any), unmaintained, unsound, yanked"), and with the 0543 ignore present under-D warnings, RUSTSEC-2026-0543 does not reappear.
F2 — PR body Verification (RESOLVED)
gh pr view 3221 --json body contains no "both with and without" claim any more; the phrase is absent from the body and from the tree. The replacement discrimination statement is now checkable and correct:
- "
cargo deny checkin this worktree: advisories ok, bans ok, licenses ok, sources ok" — reproduced verbatim, exit 0, worktree left clean (git status --porcelainempty). - "the same
cargo deny checkagainstorigin/main'sdeny.toml... exits 1 with exactlyRUSTSEC-2026-0543" — reproduced withcargo deny --config <origin/main:deny.toml> check(main's config, this tree's graph):advisories FAILED, bans ok, licenses ok, sources ok, exit 1, and the only advisory emitted iserror[unmaintained]: chrono is unmaintained / ID: RUSTSEC-2026-0543. Exactly one, as stated. - "
actionlint .github/workflows/ci.yml: clean" — exit 0 (actionlint 1.7.12).
Check 3 — no config drift since fcc1e1c (PASS)
git diff --stat fcc1e1ce..8ee4567f = .github/workflows/ci.yml | 8 ++++++--, 1 file, 6 insertions / 2 deletions — all of it comment text, no key, step, name:, or run: line touched. The audit run: line is byte-identical to the round-1 head and still carries exactly four ignores in the required order: RUSTSEC-2024-0436, RUSTSEC-2026-0192, RUSTSEC-2026-0009, RUSTSEC-2026-0543.
Check 6 — new claims (PASS)
Walked each new sentence in the changed comment and the rewritten Verification section. All are true of this tree; the only two forward-looking clauses ("a future -D warnings", "an audit release that escalates the class") are correctly framed as conditionals and its -D warnings mechanism actually exists in cargo-audit. No new false claim found.
Non-blocking observation (not a finding against the bar)
RUSTSEC-2026-0386 (tokio 1.53.1, unsound — AsyncFd::new I/O safety) is live and unignored in this graph. Both legs are green today because cargo-audit treats unsound as a warning and cargo-deny defaults it to warn, so the leg is genuinely restored. But it is precisely the advisory that would fire first if anyone took the comment's -D warnings suggestion, and it would look like the chrono exception failed. Worth a follow-up issue rather than a change here; the comment's own claim (that the 0543 ignore must not resurrect that advisory) remains accurate.
Gates re-run at this head: cargo deny check → advisories ok, bans ok, licenses ok, sources ok (exit 0); actionlint → exit 0; worktree unmodified by the review.
VERDICT: APPROVE
What this does
Records
RUSTSEC-2026-0543(chronounmaintained, all versions) as a reasoned,dated exception where this repo already records this class, and restores the
Supply chain (deny/audit)leg that has been red on every branch since theadvisory feed advanced.
Closes #3220.
Why an exception, not an upgrade
The advisory carries
patched = []— there is no released chrono that clearsit, so no lockfile move can turn the leg green. The graph edge is:
bitty-lua→chronofor the restricted Luaos.datelocal-calendarconversion (
crates/bitty-lua/src/stdlib.rs,fields_from_datetimeand theepoch→local conversion), plus one
bitty-runtimetest(
tests/bar_clock_tick.rs). No other crate nameschrono.source-visible vulnerability class).
time >= 0.3.47requiresrustc 1.88 while the workspace MSRV is 1.85, and the
jiffadoption is adependency decision of its own (new crate in the graph, calendar/TZ surface
review).
Changes
deny.toml: addsRUSTSEC-2026-0543to[advisories].ignorewith thereasoning above and the re-audit bound (2027-03-31, or when MSRV moves to
1.88, whichever comes first) — the same P0-AC-034 / ADR-0004 exception form
the
ttf-parser/paste/timeentries already use..github/workflows/ci.yml: passes the same--ignoreto thecargo auditstep and states what each half actually enforces:
cargo deny checkis theenforcing leg, while
cargo audit0.22.2 reports the unmaintained class as awarning and exits 0 — the flag is kept so both tools read one exception list.
Verification
cargo deny checkin this worktree:advisories ok, bans ok, licenses ok, sources ok.cargo deny checkagainstorigin/main'sdeny.tomlin a scratch copy exits 1 with exactly
RUSTSEC-2026-0543— the entry, notanything else in the diff, is what clears the gate.
actionlint .github/workflows/ci.yml: clean.Cargo.toml/Cargo.lockchange, so no lockfile drift and no MSRVmovement.
What this does not prove
jiff(or to
timeonce MSRV reaches 1.88), tracked by the 2027-03-31 bound in thecomment; this PR is deliberately the exception path, not the replacement.
cargo auditend-to-end locally (rm -rf ~/.cargo/advisory-db+ fresh DB download is the CI step's own sequence); theignore flag is byte-identical in form to the three existing ones that the leg
already accepts.
CI / gate note
Landing this unblocks #3218 and #3219, whose only repo-wide red is this
advisory. Neither PR is gated on this change for correctness — both carry their
own review verdicts.