FLT-359 fix round 1 (Cedric)¶
The findings are in docs/review-r1/ (Cedric P1/P2, Gronktayvius Red Team, Susie). Fix every Critical, High, P1 and P2 finding, and add the multi-approver model. The feature stays disabled by default: no live calls, no secrets, nothing wired into the fleet, no push.
Must fix¶
- Red team Critical #1. The CLI exit code is not an authorization.
- Rewrite
docs/ENABLE-RUNBOOK.mdand the code contracts so that the executor holding the effect credential calls Twilio Verify itself, using a credential that never lives on the agent PCs and cannot create factors. forge-approve verifyis advisory on the agent PC. State this in code comments, the CLI help and the docs.- Add an
IApprovalVerifierabstraction that the off-PC executor would use. Pin the service SID, the entity and the factor SID(s). - Cedric P1. Bind decisions to the pinned factor. Validate the response's
factor_sidagainst the approver registry's enrolled factors. Test: a wrong factor means deny. - Red team High #2. Show what you sign.
- Put the full canonical action, including
EffectBindingandCommandSha256, in the visible challenge fields. If it can't fit without truncation, fail instead of truncating. - On create, require Twilio's echo of the message and fields to match exactly what was sent.
- Serialize the displayed target with the same camelCase options used by the canonical hash (Susie, Low).
- Red team High #3. Pavlok spawn.
- Launch it by a full, pinned path from config. Build an explicit, minimal environment block; never inherit the parent's environment.
- Keep
CreateNoWindow,UseShellExecute=falseandWindowStyle=Hidden. - Test: secrets are absent from the child process's environment.
- Cedric P2. Bound the SMTP send with a linked cancellation token and timeout. Notification failure must never block request creation; persist the request first.
- Cedric P2. Keep
ProviderUnavailabledistinct. It must not collapse intoInvalid, and it is still non-authorizing. - Red team High #4 and Susie Medium. Gates.
- Fix the
stryker-config.jsonproject path. Point mutation at Core, Twilio, Notify and Cli, using paths relative to each project. - Add a CI workflow (
.github/workflows/ci.yml): build with-warnaserror, run the tests, run Stryker with a break threshold, run gitleaks, and run Semgrep or CodeQL for C#. It must be able to fail the build. - Fix any red team Medium findings you agree with. If you reject one, give your reasoning in
docs/review-r1/RESPONSES.md.
Add: approver registry (Andrew, 2026-10-30)¶
Approvers are a registry, not a single person.
- Each Approver has a PersonId, a display name, a Twilio EntityIdentity, enrolled FactorSids, and Roles.
- Roles: Owner, QaSigner, UxSigner, TeamMember.
- Each ActionKind requires a role:
- Spend, OutwardMessage, Destructive and Login require Owner.
- Add the new kinds QaPass (requires QaSigner) and UxAccept (requires UxSigner).
- Optional m-of-n policies per kind. Example: a Release kind requiring Owner, QaSigner and UxSigner, each from a distinct person.
- Approving with the wrong role means deny. The same person signing twice does not count toward m-of-n.
- Adding or removing an approver is itself an approval-gated action requiring Owner. Agents cannot enroll signers.
- Record ApprovedBy: PersonId + Role in the decision. FLT-369 will log this as human-signed:<person>:<role>.
- Enrollment state for now: Andrew only, as Owner. Placeholder SIDs only; no real ones.
Verify¶
- Your sandbox couldn't read the NuGet config. Packages are already restored, so try
dotnet build --no-restore -warnaserroranddotnet test --no-restore. - If that's still blocked, say so plainly. Clahadore will run the gates.
- Commit in small logical commits on
wt/WT-de9e/FLT-359, staging paths explicitly. Do not push. - In your final message, list the commits and paste the real output tails.