One command type-checks your project, runs the tests, finds hardcoded secrets, catches packages your assistant made up, and checks every dependency for known CVEs. It runs on your machine, needs no account and costs nothing.
一条命令:类型检查、跑测试、找出硬编码密钥、揪出 AI 编造的依赖包、检查每个依赖的已知漏洞。在你自己电脑上跑,不用注册,完全免费。
pipx install git+https://github.com/LucasYanzy/vericodePaste a package name from AI-written code. This asks the real registry, the same way VeriCode does.
粘贴 AI 写的代码里的包名。这里会直接问真实的包注册表,和 VeriCode 的检查方式一样。
Your browser asks pypi.org or npmjs.org directly. Nothing is sent to us.
由你的浏览器直接查询 pypi.org 或 npmjs.org,不会发送到我们这里。
Code that looks right still breaks types, fails tests, leaks a key or installs a package nobody has ever published. VeriCode checks all of it before you commit.
看起来没问题的代码,照样可能类型不对、测试不过、泄露密钥,或者装了一个从来没人发布过的包。VeriCode 在你提交前把这些全查一遍。
It's called slopsquatting. A model suggests pip install for a name that sounds right but doesn't exist. The same made-up names come back again and again, so an attacker only has to publish one and wait.
这叫 slopsquatting(AI 幻觉包抢注)。模型推荐 pip install 一个听起来很合理、但其实不存在的名字。同样的假名字会被反复推荐,攻击者只要抢先发布一个,然后等着就行。
Source: Spracklen et al., “We Have a Package for You!”, USENIX Security 2025. 16 code-generating models, Python and JavaScript.
来源:Spracklen 等,“We Have a Package for You!”,USENIX Security 2025。测试了 16 个代码生成模型,Python 和 JavaScript。
fastapi-auth-helper to requirements.txt. It sounds real.fastapi-auth-helper 写进 requirements.txt,名字听起来很真。pip install -r requirements.txt. VeriCode would have stopped it at step 1.pip install -r requirements.txt。VeriCode 在第 1 步就会拦下。VeriCode detects the project type and uses the tools you already have. If a tool isn't installed it says so instead of pretending the check passed.
VeriCode 自动识别项目类型,用你已经装好的工具。工具没装就直说跳过,不会假装检查通过。
Every package in requirements, pyproject.toml and package.json is looked up on PyPI or npm. Missing is critical, published in the last 30 days is high, one letter off a popular name is medium.
requirements、pyproject.toml、package.json 里的每个包都会去 PyPI 或 npm 查一遍。不存在是 critical,30 天内才发布是 high,和热门包只差一个字母是 medium。
AWS, Stripe, GitHub, GitLab, Slack and npm tokens, private keys, JWTs and high-entropy strings. Values are masked in every output, so the report is safe to paste into a CI log.
AWS、Stripe、GitHub、GitLab、Slack、npm 令牌,私钥、JWT 和高熵字符串。所有输出里密钥值都会打码,报告可以放心贴进 CI 日志。
mypy or pyright, tsc, go vet and cargo check, then pytest, npm test, go test or cargo test. It prefers the project's own virtualenv.
mypy 或 pyright、tsc、go vet、cargo check,然后跑 pytest、npm test、go test 或 cargo test。优先使用项目自己的虚拟环境。
Lockfiles for Python, Node, Go and Rust are checked against the free OSV database. No API key, no account, nothing to sign up for.
Python、Node、Go、Rust 的锁文件会对照免费的 OSV 漏洞库检查。不要 API 密钥,不要账号,什么都不用注册。
The GitHub Action fails the job and marks each finding on its line in the Security tab. The pre-commit hook blocks the commit on your laptop.
GitHub Action 会让任务失败,并在 Security 页面把每个问题标到具体那一行。pre-commit 钩子则直接在你电脑上拦下这次提交。
# .github/workflows/vericode.yml name: VeriCode on: [push, pull_request] jobs: vericode: runs-on: ubuntu-latest permissions: { contents: read, security-events: write } steps: - uses: actions/checkout@v7 - id: vericode uses: LucasYanzy/vericode@v0.3.0 - if: always() uses: github/codeql-action/upload-sarif@v4 with: { sarif_file: "${{ steps.vericode.outputs.sarif-file }}" }
# .pre-commit-config.yaml repos: - repo: https://github.com/LucasYanzy/vericode rev: v0.3.0 hooks: - id: vericode # secrets + dependency checks # - id: vericode-offline # secrets only, no network
# everything: types, tests, secrets, dependencies vericode . # security only, fail on findings, write SARIF for any CI vericode . --no-checks --strict --sarif vericode.sarif # offline: skip CVE and registry lookups vericode . --no-cve --exclude tests
SARIF 2.1.0 works with GitHub code scanning, GitLab, Azure DevOps and any SARIF viewer. Secret values are never written to it.
SARIF 2.1.0 可用于 GitHub 代码扫描、GitLab、Azure DevOps 和任何 SARIF 查看器,文件里永远不会写入密钥原文。
| VeriCode | gitleaks | Snyk | Dependabot | osv-scanner | |
|---|---|---|---|---|---|
| Hallucinated / squatted packagesAI 编造 / 抢注的包 | ✓ | — | — | — | — |
| Secret scanning密钥扫描 | ✓ | ✓ | ✓ | — | — |
| Type-check and tests类型检查和测试 | ✓ | — | — | — | — |
| Dependency CVEs依赖漏洞 | ✓ | — | ✓ | ✓ | ✓ |
| No account needed不需要账号 | ✓ | ✓ | — | GitHub | ✓ |
| SARIF + GitHub Action + pre-commitSARIF + Action + pre-commit | ✓ | ✓ | no pre-commit无 pre-commit | — | ✓ |
Install it, run vericode . in any repository, and see what your AI left behind.
装好之后在任意仓库里运行 vericode .,看看 AI 给你留下了什么。