control-flow-in-operator.ts 239 B

1234
  1. // `in` operator over a tainted operand: the boolean depends on the ask's keys.
  2. const report = await agent("scan").ask<Record<string, boolean>>("scan repo");
  3. const flagged = "risk" in report;
  4. return agent("act").ask(`flagged=${flagged}`);