AntFleet

Disagreement · 1939cc1e-anthropic-4

`--argjson totals "{...}"` interpolates shell variables into a JSON literal without quoting/validation

mismatch
repo 6f7fc663·PR #32·reviewed 1 week ago

Primary finding

`--argjson totals "{...}"` interpolates shell variables into a JSON literal without quoting/validation

lowsecuritymedium
  • skills/fleet-state/SKILL.md:188-195
`N_TOTAL`/etc. are produced via `jq '.totals.total' file`. If `fork-cohort-state.json` is malformed or a field is missing, jq emits `null` or non-numeric output, producing JSON like `{"total":null,...}` or `{"total":,...}` which is invalid and trips the FLEET_STATE_STATE_CORRUPT path — but more importantly, the spec's Security section claims fork names/release tags are treated as untrusted, yet this same pattern would be unsafe if any value-bearing field were ever interpolated similarly. The Security claim is therefore narrower than the spec implies. Even restricted to integers, missing-key `null` corrupts the snapshot silently if jq accepts it.

Recommendation

Validate each `N_*` is a non-empty integer (`[[ "$N_TOTAL" =~ ^[0-9]+$ ]] || exit ...`) before composing the argjson literal, and fall back to 0 with a logged warning rather than `null`.

Counterpart finding

Verdict priority ordering may suppress COLD START on first run

lowbughigh
  • skills/fleet-state/SKILL.md:182-189
On the first run with no transitions or releases, rule 5 (STEADY) matches before rule 6 (COLD START), contradicting the intent to surface COLD START for initial runs.

Recommendation

Move "COLD START" above "STEADY" in the priority list or add an explicit pre-check: if FIRST_RUN=true then pick COLD START before evaluating other rules.

Why this didn't post

This finding didn't meet AntFleet's unanimous agreement threshold. Both frontier models review every PR independently; only findings they both flag with the same severity and category are posted to the PR. This one fell through.

read the methodology →

From the same review

These findings passed the unanimous gate on the same PR review. The disagreement above was filtered out; the findings below were posted.