Skip to content

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

  1. Red team Critical #1. The CLI exit code is not an authorization.
  2. Rewrite docs/ENABLE-RUNBOOK.md and 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.
  3. forge-approve verify is advisory on the agent PC. State this in code comments, the CLI help and the docs.
  4. Add an IApprovalVerifier abstraction that the off-PC executor would use. Pin the service SID, the entity and the factor SID(s).
  5. Cedric P1. Bind decisions to the pinned factor. Validate the response's factor_sid against the approver registry's enrolled factors. Test: a wrong factor means deny.
  6. Red team High #2. Show what you sign.
  7. Put the full canonical action, including EffectBinding and CommandSha256, in the visible challenge fields. If it can't fit without truncation, fail instead of truncating.
  8. On create, require Twilio's echo of the message and fields to match exactly what was sent.
  9. Serialize the displayed target with the same camelCase options used by the canonical hash (Susie, Low).
  10. Red team High #3. Pavlok spawn.
  11. Launch it by a full, pinned path from config. Build an explicit, minimal environment block; never inherit the parent's environment.
  12. Keep CreateNoWindow, UseShellExecute=false and WindowStyle=Hidden.
  13. Test: secrets are absent from the child process's environment.
  14. Cedric P2. Bound the SMTP send with a linked cancellation token and timeout. Notification failure must never block request creation; persist the request first.
  15. Cedric P2. Keep ProviderUnavailable distinct. It must not collapse into Invalid, and it is still non-authorizing.
  16. Red team High #4 and Susie Medium. Gates.
  17. Fix the stryker-config.json project path. Point mutation at Core, Twilio, Notify and Cli, using paths relative to each project.
  18. 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.
  19. 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 -warnaserror and dotnet 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.