Gronktayvius Redteam
High — src/Forge.Approvals.Twilio/TwilioProvider.cs:46
The device body is built as Kind, then EffectBinding, then Target, Ticket, command hash, and Label. EffectBinding and the other labels have no length cap (src/Forge.Approvals.Core/Models.cs:146). The only per-field cap is HumanSummary at 80 characters (TwilioProvider.cs:42). The total cap defaults to 256 and IsComplete allows it up to 4096 (src/Forge.Approvals.Twilio/TwilioOptions.cs:24, TwilioOptions.cs:34). That budget is not tied to a verified device viewport. ParseChallenge accepts the challenge once Twilio echoes the full string.
Attack: the agent sets EffectBinding to a long benign sentence (printable ASCII), including a fake Target: fragment on that same line. At a 4096 limit this pushes the real target, ticket, and command hash off any phone preview. At the default 256 it does the same if the push or lock-screen preview shows only the head of the body (needs live-doc verification of the current Twilio Verify push viewport). The approver confirms the visible prefix. The provider echoes the full message, the verifier returns approved, and the ledger commits the real target (spend, publish, or destructive action).
Fix: place Target, Ticket, and the command hash immediately after Kind. Hard-cap EffectBinding and every target field so those prefix fields always fit in a viewport checked against current Twilio Verify docs. Reject MessageCharacterLimit above that viewport. Add a test where a max-length effect cannot move Target out of the prefix, and keep a Stryker mutant that reorders the fields or drops the cap able to fail CI.
Medium — src/Forge.Approvals.Core/Models.cs:98
ActionJson.Parse runs Jcs.Canonicalize and JsonDocument.Parse on caller JSON with no byte limit. ValidateLabel (Models.cs:146) also allows arbitrarily long labels and recipient lists.
Attack: the agent sends an action whose effectBinding or recipients is hundreds of megabytes of printable ASCII. The executor allocates that document before BuildDeviceMessage rejects the oversized text. One request can exhaust the executor and stall later approvals. This stays fail-closed for the effect itself.
Fix: reject a body over a few kilobytes, under the device cap, before parsing. Cap recipient count and each label. Add a test that a just-over-limit body returns Invalid.
The ledger consume-once path, factor/service/entity pins, disabled-by-default CLI, non-zero approval exits, Pavlok path checks, and the secret split held up under review. I did not run an exploit.