Gronktayvius Redteam

The executable gate can succeed before any human approves. ExecutorApprovalVerifier is not what forge-approve runs.

High — src/Forge.Approvals.Cli/Program.cs:94 and :108

request returns exit code 0 as soon as Twilio accepts the challenge, while the decision is still pending. status returns 0 for both Pending and Approved. A supervisor that does forge-approve request --action-json <file> && <effect> or forge-approve status --jti <id> && <effect> runs the effect with no approval. verify returns 0 for Approved, so process status is an authorization bit. The “ADVISORY ONLY” line is printed only on the usage-error path (Program.cs:72), which these commands never hit.

Attack: approvals enabled, real pins in place. The agent writes the action file, runs request, and the hook starts the effect while the phone prompt is still open. A later denial does not unwind it. The same hook on status also proceeds while the challenge is Pending.

Fix: return a non-zero code from request, status, and verify for every outcome, including Approved and Pending. The host that holds effect credentials must call ExecutorApprovalVerifier.VerifyAsync and branch only on that result.

High — src/Forge.Approvals.Cli/Program.cs:41-44 and :106; src/Forge.Approvals.Cli/Stores.cs:13-21

Main builds ApprovalGate only. ExecutorApprovalVerifier is never used. status calls Evaluate with consume: false, so an Approved challenge stays approved and every later status prints Approved and exits 0. verify consumes by creating {jti}.spent under Approvals:StateDirectory, which the agent sets and can delete. Twilio leaves the challenge approved, so CreateNew succeeds again after the marker is removed.

Attack: the owner approves once. The agent loops status and runs the effect on each success. If the hook uses verify, the agent deletes the .spent file and verifies again. One tap, many effects.

Fix: consume only on the off-PC executor, on a store the agent cannot delete or reset, in the same local transaction as the effect. A second consume is Denied.

High — src/Forge.Approvals.Twilio/TwilioProvider.cs:25 and :36-48

The push Details.Message is the agent-written HumanSummary (up to 256 characters). Kind, effect binding, target, and command hash are split across up to ten 128-character Details.Fields values named “Canonical action N”. The code says the person must concatenate those fields; the on-device layout still needs live-doc verification. The hash covers the summary and the effect together, so a tap approves the effect the person did not read.

Attack: summary “Approve the docs typo”, kind Destructive or Spend, effect binding set to the real command. The owner approves the message. The executor sees a pin-matched approved challenge and runs the binding.

Fix: build one device-visible message inside the verifier from kind, effect binding, target, ticket, and command hash. Refuse to create the challenge when that string exceeds the provider’s displayed limit. Keep the gate disabled until a captured device payload shows the full effect. The checked-in Twilio example (tests/Forge.Approvals.Tests/Fixtures/twilio-push-challenge.json) does not show Forge’s fields.

Medium — src/Forge.Approvals.Twilio/TwilioOptions.cs:18-20 and :31; src/Forge.Approvals.Cli/Program.cs:14 and :37; TwilioProvider basic-auth send

The agent process loads Approvals:Twilio:AuthToken and the SMTP password. HasCredentials treats the account auth token as enough to run. That token is what Verify’s REST API uses to create and delete factors and entities. Whether Update Challenge can set approved without a device auth payload needs live-doc verification. The agent can read its own environment and call Twilio outside this assembly.

Attack: read the token, delete the owner’s factor or enroll a device the agent controls. Approvals stop, or a new factor exists under the same account. Pressure then moves to turning Approvals:Enabled off.

Fix: do not put AuthToken, the API-key secret, or the SMTP password in the agent CLI. The off-PC executor keeps a challenge-read credential that cannot enroll factors. Reject a configuration that only has an account auth token.

High — .github/workflows/ci.yml:27 and :41-51

There are no test methods in this diff, only a fixture. dotnet test on this tree runs nothing and still exits 0, so a mutant that returns 0 from status, skips the factor pin, or lets one person fill two release roles survives. The mutation step title requires a score of 60, but the command sets no break threshold, and stryker-config.json, stryker-twilio.json, stryker-notify.json, and stryker-cli.json are not in the diff. dotnet-stryker is installed as 4.* (ci.yml:48), so CI runs a floating build.

Gitleaks (--exit-code=1) and Semgrep (p/csharp, --error --strict) do fail their job. No third-party NuGet package is added. No dependency-CVE scan is configured. Container-tag CVEs were not checked against a live advisory.

Fix: add tests that fail when request or pending status exits 0, when a second consume returns Approved, when service, entity, or factor pins mismatch, when one person fills two release roles, and when Approvals:Enabled is unset. Commit a Stryker config with a break score of at least 60 and pin the tool version.

These hold: unset Approvals:Enabled stays off and those commands exit 10; any other flag value exits 2; provider and parse failures become ProviderUnavailable or Invalid; the executor class keeps mandatory roles, distinct people, distinct challenge ids, and consume-before-success. That executor class is not on the exe path.

Jira FLT-359 · Vikunja · BOARD.md