Skip to content

Red-team a piece of code

Machine verified A machine ran this on our install and checked the result against the CLI. A test report is linked. Proven against quoxcli 0.6.1 on 2026-11-13.

How could someone abuse this?

Paste the code, ask the question, and get each attack with what the attacker gains and the line it rests on.

What you get: an attacker’s reading of a piece of code before it ships: a verdict, a confidence figure, each finding with the attack, the gain and the quoted line, and what the review could not see.

quox · talking to Quox

Could you red-team this little feedback endpoint for me and tell me how someone could abuse it? router.post('/feedback', (req, res) => { const { conversation_id, message_id, rating } = req.body; storeEnvelope({ from: 'widget.visitor', to: 'agent.quoxchat', intent: 'quoxchat.feedback', payload: { conversation_id, message_id, rating } }); res.json({ ok: true }); });

▤ AOCL │ L1 identity complete · allowed · 0ms

▤ AOCL │ L3 policy gate complete · proceed · 5ms

◐ LENS │ apply ✔ LENS │ apply │ budget_tokens_used_ceiling=[redacted] findings: 1 · 14.3s

⛓ AEE │ envelope opened · ops.tool · quoxlens_apply ok

⛓ AEE │ envelope opened · stream_success

This is a review of the code as you pasted it, not a test against a live system. The
reviewer returned a verdict of "concerns" at 72% confidence, with one finding.

Finding (medium severity, trust-boundary assumption):

• Attack: An unauthenticated, anonymous caller can forge feedback for any conversation,
  with any rating. In the reviewer's words: "The attacker POSTs {conversation_id:
  <victim id or guessed/enumerated id>, message_id: <any>, rating: <any value or 
  object>}. The handler checks neither that the caller owns the conversation, nor that
  the message exists, nor that rating is a valid value, and wraps the result in an
  envelope sent to agent.quoxchat as from 'widget.visitor'."
• Gain: "the attacker can skew or poison feedback signals on other users' conversations
  and flood the agent's intake with envelopes carrying arbitrary values (including long
  strings or nested objects, since the fields are passed through as-is), at no cost and
  with no rate limit visible. Replay is also free, since nothing binds a request to a
  moment or signer."
• Caveat from the reviewer: "If the agent or a model later reads the payload as text,
  the rating field is a free-form injection slot, but that depends on unshown code." It
  did not assert that, and neither do I.
• Quoted line:  router.post('/feedback', (req, res) => { const { conversation_id, 
  message_id, rating } = req.body;

The reviewer could only judge the code shown. It could not see anything outside this
handler, such as middleware or what the agent does with the envelope.

26.5s · 1 tool · 0 approvals

A real turn on our own install (CLI 0.6.1, 13 Nov 2026), replayed at speed. Names changed. Type the same words into quox.
✔ Machine verified against the CLI on 13 Nov 2026 · test report mwed1n

Quox ran the red team lens over the feedback endpoint you pasted. One tool, no approvals. It said up front that this was a review of the code as pasted, not a test of a live system. The lens returned “concerns” at 72% confidence, with one medium finding: an anonymous caller can forge feedback for any conversation, with any rating, because the handler checks neither who is calling, nor that the message exists, nor that the rating is a valid value. It quoted the router.post('/feedback', ...) line the attack rests on, and kept the reviewer’s own caveat that a prompt injection risk depends on code it could not see.

The same ask passed the same checks the day before, on 12 November 2026. That run was harsher: the lens failed the code at 78% confidence, with a high finding (the same forged feedback attack) and a medium one (every caller is recorded as widget.visitor, so forged requests look like a real visitor). A lens is a model reading the code, so the verdict and the number of findings can differ from run to run. The forged feedback attack was found both times.

lens show
quox lens listquox lens show adversarial-red-teamAdversarial Red Team (adversarial-red-team)Reads any artifact as the person trying to make it do something its author never intended.version:         1.1.2kind:            evaluativeunproven:        nofinding classes: prompt-injection-surface, trust-boundary-assumption, spoofable-identity, replayable-request, unvalidated-callback, privilege-escalation-path, poisonable-memory, abuse-of-function, unbounded-cost
From a real run in the same scratch workspace on 13 November 2026, after the turn above. Output trimmed: the long lists and the lens body are left out.

quox lens list gives every lens with its id. quox lens show prints one in full, including its blind spots and stored evaluation results. The proof runs did not record the lens version they used; 1.1.2 is the version read afterwards.

apply
quox lens apply adversarial-red-team --file feedback.js --target-label "Feedback endpoint"
Command from quox lens apply --help. Your verdict and findings come from your own code.

Use --file - to pipe the code in from standard input instead.

Quox ran one lens over the code you pasted, under your own login. Nothing was delegated to another agent, no shell command ran, nothing was executed against a live system, and no risk was accepted on your behalf.

Quox’s proof engine asked through chat, in a scratch workspace, and held the turn to six checks:

  • Used the lens: Quox ran a QuoxLens lens over the code.
  • Did it itself: no hand-off to another agent.
  • No shell: no shell command ran.
  • Accepted nothing: no risk was accepted on the code’s behalf.
  • Gave a verdict: the answer says pass, fail or revise.
  • Quoted the code: the answer quotes the code it is talking about.

All six passed on 12 and 13 November 2026, two UTC days, with the same checks.

The lens reads only the code you give it. Here it could not see middleware, authentication in front of the route, or what the agent does with the envelope, and it said so. It is a review, not a penetration test.

In a held-out check, five pieces of code were frozen before any run. The lens found all 3 known problems on both runs (recall 3 of 3) and raised no false flags. Those five pieces are still Quox’s own corpus, so this is not an independent measure.

  • ev_mwed1nd2_f926d8: 13 November 2026, the conversation shown above.
  • ev_mwdwy2l2_2f604f: 12 November 2026, the earlier passing run.

Both are in the proof engine’s evidence log with the verdict pass and the same checks.

Quox-verified, not independently audited: the runs were checked by Quox’s own proof engine against the running system, and their evidence ids are listed above so each run can be traced. It is not a third-party audit.

A red-team review changes nothing, so there is nothing to undo.