Skip to main content

prbl-scanner

Open source vulnerability scanner for AI-generated code.

Prbl finds the security vulnerabilities that AI coding tools produce systematically — the patterns that exist because of how LLMs were trained, not because of developer mistakes.

What it detects

  • PRBL-C001 — Hardcoded credentials and fallback secrets
    CWE-798 · OWASP A07 · #7 most critical web security risk
    Detects API keys, passwords, and tokens hardcoded directly in source code. Also catches the AI-specific fallback pattern: process.env.SECRET || 'default_value' where the fallback becomes the live secret for any deployment missing the environment variable.

  • PRBL-R001 — Weak randomness in security contexts
    CWE-338 · OWASP A04 · #4 most critical web security risk
    Flags Math.random(), random.random(), and related functions when used to generate tokens, session IDs, passwords, or OTPs. These functions are not cryptographically secure — their output is predictable.

  • PRBL-I001 — SQL injection including multi-line patterns
    CWE-89 · OWASP A05 · #5 most critical web security risk
    Detects user input concatenated or interpolated into SQL queries, including multi-line query construction patterns that most scanners miss.

  • PRBL-I002 — Command injection
    CWE-78 · OWASP A05 · #5 most critical web security risk
    Detects user input passed to shell commands via exec, spawn, system, popen, subprocess.run, and shell=True.

  • PRBL-I003 — Code injection (eval/exec)
    CWE-94/95 · OWASP A05 · #5 most critical web security risk
    Detects user input passed to eval(), exec(), new Function(), or compile(). Gives an attacker full code execution on the server.

  • PRBL-A001 — Missing access control including serverless handlers
    CWE-862 · OWASP A01 · #1 most critical web security risk
    Detects route handlers and serverless functions that perform sensitive operations (database access, payment processing, user data) with no visible authentication or authorization check.

  • PRBL-P001 — Hallucinated package references
    Emerging — no CWE · OWASP A03 · Supply Chain Failures
    Detects imports of packages that do not exist on PyPI or npm. AI models invent plausible-sounding package names. An attacker who registers the name with a malicious payload gets code execution on every machine that runs install.

Security Standards Mapping

Every Prbl rule maps to established security standards. When a developer asks an AI tool "how serious is this finding?" — the CWE and OWASP category give it the full context to answer accurately.

Rule Name CWE OWASP 2025 OWASP Rank
PRBL-C001 Hardcoded Credentials CWE-798 A07 — Authentication Failures #7
PRBL-R001 Weak Randomness CWE-338 A04 — Cryptographic Failures #4
PRBL-I001 SQL Injection CWE-89 A05 — Injection #5
PRBL-I002 Command Injection CWE-78 A05 — Injection #5
PRBL-I003 Code Injection CWE-94/95 A05 — Injection #5
PRBL-A001 Missing Access Control CWE-862 A01 — Broken Access Control #1
PRBL-P001 Hallucinated Packages Emerging — no CWE A03 — Supply Chain Failures #3

Why PRBL-P001 has no CWE

Hallucinated package references are a new vulnerability class created by AI coding tools. Standard CWE scanners cannot detect this by definition — there is no CWE entry because this failure mode did not exist before LLMs generated code at scale. Prbl is the only scanner that catches it.

PRBL-P001 maps to OWASP A03 (Supply Chain Failures) because a malicious actor can register the hallucinated package name on PyPI or npm — turning every project using that AI-generated import into an unintentional malware distribution point.

Why open source

Security tools that scan your code should be auditable. These are the exact rules Prbl uses. Nothing hidden.

Install

pip install prbl-scanner

Usage

prbl-scanner scan ./myproject

JSON output

Every finding includes CWE and OWASP fields for downstream tooling:

{
  "rule_id": "PRBL-C001",
  "title": "Hardcoded credential: Stripe live secret key",
  "cwe": "CWE-798",
  "owasp_category": "A07 — Authentication Failures",
  "owasp_rank": 7,
  "severity": "HIGH",
  "file": "auth/stripe.py",
  "line": 14,
  "detail": "...",
  "fix": "..."
}

Validated against

74 public repos across Django, FastAPI, Express, NestJS, and full-stack codebases. 6.25% false positive rate.

Contributing

Found a new AI vulnerability pattern? Open a PR. Rule format is documented in CONTRIBUTING.md.

License

MIT

Release files for prbl-scanner 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for prbl-scanner 0.1.0
File Size Uploaded
prbl_scanner-0.1.0.tar.gz 31.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for prbl-scanner 0.1.0
File Interpreter ABI Platform
prbl_scanner-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 63.3 kB

Release files / prbl_scanner-0.1.0.tar.gz

Download URL prbl_scanner-0.1.0.tar.gz
Size 31.8 kB
Tags Source
SHA-256 checksum
How to use checksums
c6176e1522943ecbd140a671879094f13980a51e325c65cad8cc2feacb9aa2f5
BLAKE2b-256 checksum
How to use checksums
ec13212171f6dffb65c50cfcc95b7a747ff2ad10ca800a9b3482e21b122897a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release files / prbl_scanner-0.1.0-py3-none-any.whl

Download URL prbl_scanner-0.1.0-py3-none-any.whl
Size 31.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ab01aac9e59f3d26c6498a0dd5934e70245398ccc5a817ed10285dfbd0bd3934
BLAKE2b-256 checksum
How to use checksums
af77bb340fbc8557f34369537a384a864dcc2d29fe5a7a6bb3ce4a7f22b99648
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.6

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page