Blog
Ten of fifty open-source apps were blocked for code that was never dangerous.
Tofu checks the code before an app goes online. In October we ran that check over the fifty open-source apps in our gallery, and it blocked ten of them, over shapes of code that do nothing wrong. We changed the rule, ran it again over the same fifty and over the libraries our own code uses, and wrote down what it still refuses.
Updated
The short version
The check is a tripwire: it reads the files an upload carries and refuses a known shape of harm — code that hides what it runs, downloads something at install time, reads secrets it has no business reading. One of its rules was too broad. It read three ordinary things as hiding:
Function("return this"), a line libraries use to find the global object in any environment.- A minified bundle that only runs what it builds — chart and parser libraries, mostly.
- A method named
evalthat never evaluates anything.
On the fifty gallery apps, that cost ten blocks. After the change, none; over the 17,000 JavaScript files in the libraries our own code uses, the files the same rule blocked went from 17 to 0.
What it flagged
A refusal is expensive in a way a warning is not: the person has done the work, and the app does not go online. The ten were all shapes a build tool produces by itself — nobody wrote them by hand to do harm, and nobody reading the refusal could have told what to change. A check that stops honest work does not make anyone safer; it teaches people to route around the check.
The rule was written against obfuscation: code that hides what it will run until the moment it runs it. A minifier does the opposite — it prints the same program more compactly — and the global-object line is the standard way to find window when the code may also run on a server.
What we changed
The rule now reads what the code does rather than what it is called. Code that decodes a value and hands the result to eval or Function is still refused, and so is the classic packer's bootstrap. A method that happens to be named eval is not refused, and neither is a minified bundle that only runs what it builds. Code that builds a string and runs it, with nothing decoded, is reported as a warning that does not stop a deploy. The change is one pull request, with the three shapes above written into its tests so they cannot come back.
What it still refuses
- Obfuscated code that decodes and runs what it decoded.
- A package that downloads something when it is installed, rather than shipping it.
- Code that reads a secret and sends it somewhere.
- Code that reaches for a wallet or a key it was not given.
- Clone-time hooks that run on someone else's computer.
- A dependency version on the list of versions that shipped malware.
The security page lists what is checked and where the boundary sits.
What a pass does not mean
A pass means the files matched no known shape of harm. It is not a proof that an app is safe, and we do not describe it as one: the check cannot see what the code does once it runs, what a third-party service does on the other end of a request, or anything that changes after the build. Treat it as one lock on one door — worth having, never the whole of the door.
The deploy documentation explains what runs when an app goes online, and the ChatGPT guide walks through a first app with the check in the path.
Describe an app, or bring one from your agent. Tofu puts it online.
Works with any coding agent
© 2026 Tofu
trytofu.ai