Sponsor60dB Token FactoryUnlimited tokens. One flat price.Buy seats
ubenchby @iuditgGitHub

Slop

What coding slop looks like, and the script that catches each kind

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.

Pick a kind. See what the scanner says.

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

$ python3 scan.py shape shape

PROBLEM repetitive_structure shape/price.py:2 4 branches test 'plan' against a value: use a lookup tablefiles: 1shape problems: 1

Six files, before and after

Each card names the rules that fired, and the last line the scanner printed after the fix.

How ubench stops slop from shipping

A rule only helps if the agent cannot skip it. Six scripts hold the line.

climb.py

Keeps the score. Locks the check, keeps a win, undoes a loss, and says STUCK after three losses.

gates.py

The done ledger. Runs each gate and writes the proof line itself.

tracker.py

Makes run folders and tracks tasks and bugs. A bug cannot be fixed without proof fields.

scan.py

Reads touched files for hard-to-read shape, and the repo for security holes and leaked keys.

ui.py

Scores screen source out of 100, twice: React health and a generated look.

hook.py

Stops a turn from ending while gates are open, and blocks edits to a locked check.

Run it on your repo

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 src

Security 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 .

Code security 18

Holes and leaked keys in the code itself.

code/cookiemedium

cookie can be read by scripts or sent over plain HTTP

code/cors-anymedium

lets every site call this API

code/debug-onmedium

debug mode shows internals to users

code/raw-htmlmedium

puts raw HTML on the page

code/runs-datahigh

runs data as code

code/shell-stringhigh

builds a shell command from a string: pass a list of arguments

code/sql-stringhigh

builds SQL from a string: use parameters

code/tls-offhigh

turns certificate checks off

code/unsafe-loadhigh

loads data that can run code

code/unsigned-tokenhigh

accepts unsigned tokens

code/weak-hashlow

weak hash: fine for a checksum, never for a password or token

code/weak-randomhigh

guessable random value used for a secret

secret/cloud-keyhigh

cloud access key in the file

secret/env-committedhigh

an env file is committed

secret/private-keyhigh

private key in the file

secret/provider-tokenhigh

provider token in the file

secret/public-prefixhigh

this prefix ships the value to every browser

secret/written-secretmedium

a secret is written in the file

Agent setup 9

Agent and tool-server settings that give too much away.

agent/auto-approvehigh

agent setup approves tool calls without asking

agent/hidden-texthigh

invisible characters can hide orders from the reader

agent/injected-ordershigh

text that tries to give the agent new orders

agent/no-askinghigh

agent setup lets the agent act without asking

agent/open-shellmedium

agent setup allows any shell command

agent/plain-secrethigh

agent setup holds a secret in plain text: read it from the environment

agent/plain-urlmedium

agent setup reaches a tool server over plain HTTP

agent/private-filesmedium

agent setup reaches for keys or credentials

agent/unpinned-servermedium

agent setup runs a tool server with no pinned version

Config and CI 9

Containers, workflows and server config left open.

config/ci-untrustedhigh

workflow runs untrusted input next to repo secrets

config/ci-widemedium

workflow has wide rights or runs an unpinned action

config/container-rootmedium

container runs as root or holds the Docker socket

config/direction-markshigh

hidden direction marks can make code read differently from how it runs

config/image-unpinnedlow

base image is not pinned

config/infra-openmedium

resource is open to the internet or not encrypted

config/pod-hosthigh

container can reach the host

config/remote-scripthigh

runs a script straight from the network

config/web-servermedium

lists folders, allows old TLS or shows the server version

Code shape 6

Code that runs and is still hard to read. N is a number the scanner fills in.

comment_echo

commented-out code: delete it, git keeps the old version

cramped_layout

N+ lines with no blank line: group the steps

deep_nesting

N levels deep: return early or move the inner part to a helper

dense_line

one line does too much: split it

duplicate_block

same steps as an earlier block: share one helper

repetitive_structure

N branches test one name against a value: use a lookup table

Screen look 17

The marks of a generated screen.

fit/fixed-widthmedium

a fixed width wider than a phone or tablet

look/attention-looplow

an endless attention loop with no reason

look/default-gradientmedium

the default purple gradient: use the design system's colours

look/emoji-iconlow

an emoji stands in for an icon

look/glass-everywherelow

blur on four or more surfaces in one file

look/gradient-textmedium

gradient text: carry emphasis with weight or size

look/side-barlow

a bar down one side of a rounded box: use a full border, a tint or a label

look/stacking-warlow

a huge z-index: use the layer scale

motion/animate-everythingmedium

every property is animated: name the ones that change

motion/layout-animationmedium

a layout property is animated: animate transform or opacity

motion/no-calm-modemedium

motion with no reduced-motion rule anywhere

theme/raw-colourmedium

a colour outside the design tokens

type/justifiedlow

justified text leaves rivers of space

type/tiny-textmedium

text under 12px

words/placeholderhigh

placeholder text is left in the screen

words/stock-claimmedium

a claim that fits any product: say the fact it stands for

words/stock-linemedium

a stock line: write what this product does

Accessibility 8

Places where a keyboard or a screen reader gets stuck.

a11y/click-no-keyshigh

a click on a plain box: use a button, or add a role and key handling

a11y/focus-hiddenhigh

the focus outline is removed and nothing replaces it

a11y/frame-no-titlemedium

a frame with no title

a11y/image-no-texthigh

an image with no alt text

a11y/page-no-languagemedium

the page does not name its language

a11y/tab-ordermedium

a positive tab index breaks the keyboard order

a11y/zoom-offhigh

zoom is switched off

React 14

React code that breaks state, speed or safety.

legacy/lifecyclemedium

a removed lifecycle method

legacy/root-callmedium

a removed root or DOM call

render/leaked-countmedium

a count of 0 renders as the text 0: compare with > 0

safety/key-in-storagehigh

a login secret is kept where any script can read it

safety/new-tab-openermedium

a new tab with no rel: add noopener

safety/raw-htmlhigh

raw HTML is set: prove the value is cleaned, or render text

size/whole-librarymedium

the whole library is imported: import the one function

speed/blocking-writemedium

a blocking write to the page

speed/deep-copylow

a copy through text: use structuredClone

state/async-effecthigh

the effect callback is async, so its cleanup is lost: call an async function inside it

state/eager-startlow

the start value is computed on every render: pass a function

state/effect-no-cleanuphigh

the effect starts something and never stops it

state/index-keymedium

the list key is the position: rows keep the wrong state after a reorder

state/random-keyhigh

the list key changes on every render: every row is rebuilt