Security scans
Berrybell can check your project for two kinds of problem: packages with known vulnerabilities, and risky patterns in your own code. Open your project settings and go to Security, then press Run security scan (after the first scan, Re-scan). The latest results are then on the Findings tab and past scans on History — see History.
The standard scan is free on every plan; Deep scan needs a paid plan. Neither uses credits.
Two scores, kept separate
- Dependencies — your app's packages checked against a public advisory database.
- Code — your source read for risky patterns.
They're scored separately on purpose: one code pattern repeated across a dozen files shouldn't drag down a dependency score that has nothing wrong with it.
The code check looks for values from your server environment being exposed to the
browser, unsafe HTML injection, eval, hardcoded secrets, SQL injection, command
injection, weak randomness, and server-side requests built from unvalidated input.
Code findings are capped at 200 per project — past that, the scan stops and tells
you there may be more.
Where the versions come from
If your project has a pnpm-lock.yaml or package-lock.json, the scan uses the
exact versions it records. A yarn.lock isn't read. With only a yarn.lock, or
no lockfile at all, you'll see "No lockfile found — scanning declared dependency
versions only. Results may be incomplete. Run preview once (so a lockfile can
sync) for better accuracy." and the result is approximate.
A scan checks up to 500 packages (currently): your direct dependencies first, then others from the lockfile or, for a deep scan, from the installed tree. In a larger project, packages past that aren't checked, and the panel doesn't warn you when this happens.
A project with no package.json at all gets "This project has no package.json"
back, though any code findings are still reported.
Deep scan
On a paid plan, once you've run a first scan, the Findings tab has a Deep scan button. Instead of the lockfile, it reads the versions actually installed in your project's preview, which catches transitive versions the lockfile doesn't pin. Results from it are labelled Deep (installed in preview).
The preview must have been started at least once. Until it has, the button is replaced by "Start the preview first — deep scan reads the dependency tree from the running preview." If the preview has stopped since then, the deep scan wakes it. If a deep scan can't read the installed packages, it scans the lockfile your preview generated instead and says so above the findings; that scan is recorded as a lockfile scan. If it can't read that lockfile either, the deep scan fails with an error saying why.
On a workspace without a paid plan, the button is replaced by an explanation and a View plans link.
Fixing what it finds
Advisories with a known fixed version get a Fix button that updates the package for you — bumping a direct dependency, or pinning an override for one buried deeper in the tree. Fix all collapses every auto-fixable advisory into a single change and one reinstall. These update your project; publish to get them onto your live app.
Everything else — code risks, and advisories with no fix available — is handed to the AI. Berrybell writes the fix instruction for you; you send it into the chat one file at a time, and afterwards it re-scans and reports the before/after issue count and score.
Scanning itself uses no credits. Sending a fix into the chat is a normal build, so it uses AI credits like any other request — see Plans & credits.
Dismissing a finding
Mark a finding a false positive and it stays dismissed on future scans and stops deducting from your score. Dismissals are matched by the content of the finding rather than its line number, so moving code around above it won't bring it back. (Adding or removing an earlier match of the same rule in the same file can retire the dismissal — if one reappears, that's usually why.)
Dismissed findings collapse into their own section, and you can restore any of them.
History
Every scan is kept. Findings always shows the latest scan and is where you fix and dismiss; History is the record of every scan.
History lists the scans newest first, 20 at a time, and charts both scores across the scans it lists — Dependencies as a solid line, Code dashed. Load older scans fetches more and adds them to the chart. Each row shows:
- when the scan ran, with a Latest or First scan tag where it applies
- both scores and the number of findings, each with its change from the scan before
- how many findings there were at each severity, and how many were dismissed
- how dependencies were read: from the lockfile, from declared versions, or by a deep scan
A code score of — means the code check didn't run on that scan.
Open a scan (click its row, or its point on the chart) to see what it read — how dependencies were resolved, how many packages and source files — everything it reported, with any dismissed findings listed separately, and how it compares with the scan before it: New in this scan, No longer reported, how many findings both scans reported, and how many were dismissed in between.
No longer reported isn't the same as fixed. A finding also leaves when its package or file is removed, or when the scan read dependencies differently — and when the method changed between the two scans, the comparison says so.
History is read-only. Fixes and dismissals act on the latest scan, in Findings.
The security card in the chat
Mentioning security, a CVE or a leaked key in the chat brings up an inline card with your latest score and a one-click re-scan, so you don't have to leave the conversation.
Permissions
Anyone with access to the workspace can read the results. Scanning, fixing and dismissing need Editor permission.