Skip to content

open-leash/plugin-code-scanner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

☣️ Catch concrete vulnerabilities in code written by vibe-coding agents.


What it does

code-scanner observes code produced by supported coding agents, sends meaningful code and patches through OpenLeash's structured LLM evaluator, logs every completed review, and notifies the developer when a concrete vulnerability crosses the configured risk threshold.

It is advisory: it never blocks a tool or rewrites generated code.

coding-agent response or file-write tool
                  │
          code candidate filter
                  │
       structured LLM security review
                  │
       clean JSON risk assessment
          ┌───────┴────────┐
          │                │
       normal          risky code
        log        log + signal + notification

Agent scope

The manifest carries an explicit agentKinds allowlist. Non-coding SaaS agents, home automation agents, OpenClaw, and NanoClaw do not trigger this plugin.

Supported kinds include Claude Code, Codex and Codex Cloud, Cursor, GitHub Copilot, Gemini CLI, OpenCode, Cline, Continue, Windsurf, Kiro, Aider, and Zed.

Events

  • agent.response inspects code fences and code-like assistant responses.
  • tool.beforeUse inspects generated content sent to write, edit, patch, notebook, create, replace, and insert tools.

Short prose and events without code are skipped before any model call.

Structured assessment

The evaluator returns JSON containing:

  • risky, riskScore, severity, and summary;
  • up to eight concrete vulnerabilities;
  • CWE identifiers when known;
  • short source evidence; and
  • specific remediation guidance.

The prompt focuses on exploitable risks such as injection, broken authorization, secret exposure, unsafe deserialization, path traversal, SSRF, XSS, CSRF, command execution, insecure cryptography, supply-chain risk, unsafe permissions, and dangerous defaults. Style issues and unsupported speculation are explicitly excluded.

Configuration

Setting Default Purpose
enabled true Enables generated-code review.
notificationRiskThreshold 70 Minimum 0–100 score required to notify.
minimumCodeCharacters 80 Skips tiny snippets before invoking the evaluator.

OpenLeash resolves these settings for every request. A personal user may set them globally, for an agent kind, or for an exact authenticated/enrolled runtime. In organization modes, admin defaults and matching organization profiles apply first; employee settings and profiles apply only when configuration is unlocked. Mandatory installation and configuration locking are independent, so an admin may require Code Scanner while still allowing employee-specific thresholds.

The plugin receives only the effective input.config and does not branch on Individual Open Source, personal or organization OpenLeash Cloud, Private Cloud, or user role.

Development

npm install
npm run typecheck
npm test
npm run build

Privacy and safety

  • Code is sent only through the evaluation provider configured for the OpenLeash deployment.
  • Raw code is not copied into ordinary review logs; logs contain the structured assessment and bounded evidence.
  • Notifications are deduplicated per agent session and vulnerability title.
  • Image, prompt, model, and provider credentials are never owned by this plugin.

Please report security issues according to SECURITY.md.

Vibe fast. Review what matters.

About

OpenLeash plugin that scans code generated by vibe-coding agents for security risks and notifies users with structured findings.

Topics

Resources

License

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors