RedlyneDetect and patch vulnerabilities in AI-generated Python code, directly from your editor. Website · Marketplace · Issues · Discussions Redlyne is a VS Code extension that scans Python code — especially code generated by AI assistants like Copilot, ChatGPT, or Claude — for known vulnerability patterns, and proposes one-click in-editor patches you can apply with a single confirmation. It runs entirely on your machine. No code is sent to any server.
Why RedlyneAI coding assistants are fast, and they're also reliably insecure. In a 2025 study evaluating 609 Python snippets generated by GitHub Copilot, Claude 3.7 Sonnet, and DeepSeek V3, ~76% of the code contained security vulnerabilities — for GitHub Copilot specifically the rate climbs to ~84% (source). The patterns are well-known to security engineers: SQL injection from string concatenation, command injection from There's also a structural problem alongside the security one. A 2025 study analyzing 500 Python snippets across four AI assistants found that ~13% of them are incomplete — missing imports or context. For GitHub Copilot specifically, that number rises to ~31% — almost one snippet in three (source). AST-based analyzers like Bandit, CodeQL, and PyT can't process those snippets at all: without a parseable program, they can't build the tree they rely on. Redlyne sits in your editor and flags vulnerability patterns the moment you select the snippet, then offers a remediated version. Pattern-based detection works on any fragment, complete or not. Instead of relying on another LLM to find LLM bugs, it uses a curated set of deterministic rules built by people whose job is to find vulnerabilities. Features
What's inside
Measured performanceRedlyne is benchmarked on PoisonPy [Cotroneo et al., ICPC 2024], the reference dataset of 310 paired vulnerable / safe Python samples curated to evaluate AI-code-generator security. Detection on PoisonPy
Recall on PoisonPy is higher than the baseline reported in the original paper (~91%) — Redlyne extends the rule set to 459 patterns and catches more issue classes. Patching safety
Every auto-fix Redlyne emits is checked end-to-end on every benchmark sample for two correctness properties:
In other words: when Redlyne suggests a fix, applying it never breaks the file and always actually neutralizes the vulnerability. No silent broken code ever gets suggested. Reproducibility
Both produce JSON + Markdown reports under Honest disclosureRedlyne trades some precision (71.4%, vs ~97% reported in the original paper for an 85-rule subset) for the higher recall on a 459-rule rule set. Concretely: more issues are flagged, with more false positives that surface as advisory comments — never as broken code. The trade-off is fully measured, never hidden, and reproducible. Future work focuses on AST-based dataflow tracking to tighten precision without losing recall. Citing the benchmark datasetRedlyne's PoisonPy benchmark numbers are produced on the dataset published with:
InstallationFrom the VS Code Marketplace (recommended):
From the command line:
From a
Usage
The same command is also available from the Command Palette ( RequirementsRedlyne runs natively on Windows, macOS, and Linux — no WSL, no bash, no jq. Before using the extension, make sure you have:
StatusRedlyne is in early access. The detection engine is fast, cross-platform, and ready for daily code review, but the rule set is still growing:
If something doesn't work the way you expect, please open an issue — we read everything. Known Limitations
ContributingContributions of all sizes are welcome — bug reports, feature ideas, rule submissions, documentation fixes, and code.
Contact
LicenseRedlyne uses a dual-license model:
This separation keeps the engineering side fully open source — fork it, extend it, ship it commercially with attribution — while preserving the value of the curated rule set. For commercial licensing of the rules and datasets, partnership, or enterprise inquiries: redlyne.io · info@redlyne.io The names "Redlyne" and the Redlyne logo are trademarks. See NOTICE for details. |