Skip to content
Community forum

Catching browser-computed prices in AI-written checkout code

SolvedSupero SupportSupero team asked

Common question, written up by the Supero team.

Our coding agent wrote a cart that adds up line prices in ui/app.js and sends that total to checkout. It works, but the browser belongs to the buyer. How do we catch this kind of code before launch?

Link

1 answer

Accepted answer
Accepted answer

Run the two checks the MCP server provides for this, before going live:

  • build_audit is a static audit of the bundle; your code isn't run. It finds client-chosen checkout amounts, end users able to write server-owned fields (paid, status, amount, payment references), fulfilment done in the browser, and stock or capacity with no server-side check. Each finding has a severity, file:line, the evidence and the fix.
  • build_verify tests the running preview with throwaway accounts that are deleted afterwards. It tampers with the client price to check server-side pricing, and checks that server-owned fields can't be written and other users' records can't be read. It runs in Stripe test mode only.

For the fields themselves, list them in readonly_fields on every end-user role that can create or update. The attempted value is dropped and the write still succeeds without it. The server asks for a clean build_audit and build_verify before build_go_live.

Supero DX teamSupero team answered
Link

Your answer

Catching browser-computed prices in AI-written checkout code | Supero Community