price.py
Code shape
1 rule fires
After the fix: shape problems: 0
Slop
Agent-written code can run and still be wrong to keep: a ladder of branches, SQL built from a string, a click on a plain box. ubench has a rule for each kind. Every rule on this page is read from the scanner source.
Sponsored by
Six small files with real slop in them. The output is the scanner's own, copied from a real run.
price.py
def price(plan): if plan == "free": return 0 elif plan == "solo": return 9 elif plan == "team": return 29 elif plan == "scale": return 99 return 0
PROBLEM repetitive_structure shape/price.py:2 4 branches test 'plan' against a value: use a lookup tablefiles: 1shape problems: 1
Each card names the rules that fired, and the last line the scanner printed after the fix.
price.py
1 rule fires
After the fix: shape problems: 0
orders.py
3 rules fire
After the fix: security problems: 0
.mcp.json
1 rule fires
After the fix: security problems: 0
Dockerfile
2 rules fire
After the fix: security problems: 0
List.tsx
3 rules fire
After the fix: react score: 100/100
card.css
4 rules fire
After the fix: ui score: 100/100
A rule only helps if the agent cannot skip it. Six scripts hold the line.
Keeps the score. Locks the check, keeps a win, undoes a loss, and says STUCK after three losses.
The done ledger. Runs each gate and writes the proof line itself.
Makes run folders and tracks tasks and bugs. A bug cannot be fixed without proof fields.
Reads touched files for hard-to-read shape, and the repo for security holes and leaked keys.
Scores screen source out of 100, twice: React health and a generated look.
Stops a turn from ending while gates are open, and blocks edits to a locked check.
Four commands. $S is the scripts folder of any ubench skill. Python 3 only.
Shape of the files you touched
python3 $S/scan.py shape srcSecurity holes and leaked keys
python3 $S/scan.py security .React health, out of 100
python3 $S/ui.py react .Generated look, out of 100
python3 $S/ui.py slop .Holes and leaked keys in the code itself.
code/cookiemediumcookie can be read by scripts or sent over plain HTTP
code/cors-anymediumlets every site call this API
code/debug-onmediumdebug mode shows internals to users
code/raw-htmlmediumputs raw HTML on the page
code/runs-datahighruns data as code
code/shell-stringhighbuilds a shell command from a string: pass a list of arguments
code/sql-stringhighbuilds SQL from a string: use parameters
code/tls-offhighturns certificate checks off
code/unsafe-loadhighloads data that can run code
code/unsigned-tokenhighaccepts unsigned tokens
code/weak-hashlowweak hash: fine for a checksum, never for a password or token
code/weak-randomhighguessable random value used for a secret
secret/cloud-keyhighcloud access key in the file
secret/env-committedhighan env file is committed
secret/private-keyhighprivate key in the file
secret/provider-tokenhighprovider token in the file
secret/public-prefixhighthis prefix ships the value to every browser
secret/written-secretmediuma secret is written in the file
Agent and tool-server settings that give too much away.
agent/auto-approvehighagent setup approves tool calls without asking
agent/injected-ordershightext that tries to give the agent new orders
agent/no-askinghighagent setup lets the agent act without asking
agent/open-shellmediumagent setup allows any shell command
agent/plain-secrethighagent setup holds a secret in plain text: read it from the environment
agent/plain-urlmediumagent setup reaches a tool server over plain HTTP
agent/private-filesmediumagent setup reaches for keys or credentials
agent/unpinned-servermediumagent setup runs a tool server with no pinned version
Containers, workflows and server config left open.
config/ci-untrustedhighworkflow runs untrusted input next to repo secrets
config/ci-widemediumworkflow has wide rights or runs an unpinned action
config/container-rootmediumcontainer runs as root or holds the Docker socket
config/direction-markshighhidden direction marks can make code read differently from how it runs
config/image-unpinnedlowbase image is not pinned
config/infra-openmediumresource is open to the internet or not encrypted
config/pod-hosthighcontainer can reach the host
config/remote-scripthighruns a script straight from the network
config/web-servermediumlists folders, allows old TLS or shows the server version
Code that runs and is still hard to read. N is a number the scanner fills in.
comment_echocommented-out code: delete it, git keeps the old version
cramped_layoutN+ lines with no blank line: group the steps
deep_nestingN levels deep: return early or move the inner part to a helper
dense_lineone line does too much: split it
duplicate_blocksame steps as an earlier block: share one helper
repetitive_structureN branches test one name against a value: use a lookup table
The marks of a generated screen.
fit/fixed-widthmediuma fixed width wider than a phone or tablet
look/attention-looplowan endless attention loop with no reason
look/default-gradientmediumthe default purple gradient: use the design system's colours
look/emoji-iconlowan emoji stands in for an icon
look/glass-everywherelowblur on four or more surfaces in one file
look/gradient-textmediumgradient text: carry emphasis with weight or size
look/side-barlowa bar down one side of a rounded box: use a full border, a tint or a label
look/stacking-warlowa huge z-index: use the layer scale
motion/animate-everythingmediumevery property is animated: name the ones that change
motion/layout-animationmediuma layout property is animated: animate transform or opacity
motion/no-calm-modemediummotion with no reduced-motion rule anywhere
theme/raw-colourmediuma colour outside the design tokens
type/justifiedlowjustified text leaves rivers of space
type/tiny-textmediumtext under 12px
words/placeholderhighplaceholder text is left in the screen
words/stock-claimmediuma claim that fits any product: say the fact it stands for
words/stock-linemediuma stock line: write what this product does
Places where a keyboard or a screen reader gets stuck.
a11y/click-no-keyshigha click on a plain box: use a button, or add a role and key handling
a11y/frame-no-titlemediuma frame with no title
a11y/image-no-texthighan image with no alt text
a11y/link-no-targetmediuma link with no href: use a button
a11y/page-no-languagemediumthe page does not name its language
a11y/tab-ordermediuma positive tab index breaks the keyboard order
a11y/zoom-offhighzoom is switched off
React code that breaks state, speed or safety.
legacy/lifecyclemediuma removed lifecycle method
legacy/root-callmediuma removed root or DOM call
render/leaked-countmediuma count of 0 renders as the text 0: compare with > 0
safety/key-in-storagehigha login secret is kept where any script can read it
safety/new-tab-openermediuma new tab with no rel: add noopener
safety/raw-htmlhighraw HTML is set: prove the value is cleaned, or render text
size/whole-librarymediumthe whole library is imported: import the one function
speed/blocking-writemediuma blocking write to the page
speed/deep-copylowa copy through text: use structuredClone
state/async-effecthighthe effect callback is async, so its cleanup is lost: call an async function inside it
state/eager-startlowthe start value is computed on every render: pass a function
state/effect-no-cleanuphighthe effect starts something and never stops it
state/index-keymediumthe list key is the position: rows keep the wrong state after a reorder
state/random-keyhighthe list key changes on every render: every row is rebuilt