Vibeleaderboard
Index / tool
Visit guardrail-ai-self.vercel.app
Category
Cybersecurity
Rank
No. 2979Tools index

Previous survey · No. 2836 ·

Pricing
Open Source
Type
TOOL
Use case
Software Testing & Quality
GitHub
10 stars
Latest release
v0.1.0
Date

About

Safety layer for AI-generated code. Scans and fixes security issues, performance problems, and AI-specific anti-patterns. 22 rules, AST auto-fix, zero config.

What it does

Guardrail is a static checker for JavaScript and TypeScript written with help from a coding assistant. It parses each file into a syntax tree with Babel, runs thirty detectors over it, and reports findings with severity, line and a code excerpt. It ships as a command-line program, a GitHub Action that posts pull request annotations, and an MCP server so an agent can run the same checks on its own output.

Why it's ranked here

The ranking rests on reach and packaging rather than depth. One engine sits behind three front doors: terminal, CI and agent. The MIT license, the baseline and diff modes for adopting it on an existing codebase, and SARIF output for GitHub code scanning make it easy to try. What holds it back is that several headline detectors are simple heuristics, and the silent handling of unparseable files means a clean result proves less than it appears to.

What's good

Adoption on a codebase with existing findings is handled well: a baseline snapshot hides existing findings so only new ones fail, and diff mode scans just the files changed against a branch. Suppression comments can target a single rule instead of silencing a whole line. The MCP fix tool defaults to a dry run that returns a diff, so an agent sees the change before anything is written. Per-rule severity overrides and on-off switches live in one config file.

Tradeoffs

The hallucinated-package check is a fixed list plus a name pattern, so a real package with a generic name ending in utils, helpers or lib gets flagged high, and nothing queries the npm registry. Auto-fix covers only four of thirty rules, and the fixer splices text by line and column rather than rewriting the tree. A file that fails to parse returns zero findings with no warning, and a crashing detector is skipped silently. The comparison table against ESLint and SonarQube is the project's own claim.

How to use it well

Treat it as a fast first pass for JavaScript and TypeScript projects where an assistant writes much of the code, run in diff mode on pull requests with a baseline in place. Keep a proper linter and a dependency audit alongside it; it does not cover other languages or check whether imported packages actually exist. Verify high-severity import findings by hand before acting, and check that the scanned file count matches what you expect.

Technical notes+

packages/core/src/engine.ts parses each file and, on a parse exception, returns an empty violation list; each rule's detect call is wrapped in a try that swallows errors. Files are scanned in batches of 20. Inline ignores are matched by a line regex and keyed by line number. packages/rules/src/hallucinated-import.ts checks a bundled JSON list and a SUSPICIOUS_SUFFIX regex on the bare package name, covering import declarations and require calls. packages/rules/src/index.ts registers 30 rules. packages/fixer/src/fixer-engine.ts applies fixes bottom-to-top as line splices and emits a unified diff. packages/mcp/src/index.ts registers seven tools, more than the three in README.md. In action.yml the unguarded require of @actions/core sits outside its try block, and inputs are interpolated directly into shell commands.

Observed

License
MIT
Language
TypeScript, npm workspaces monorepo; requires Node 18 or later
Languages scanned
JavaScript and TypeScript (js, jsx, ts, tsx)
Interfaces
CLI, GitHub composite Action, MCP server over stdio
Built-in rules
30 registered in packages/rules/src/index.ts, 4 marked auto-fixable in README.md
Parse failure handling
Unparseable file returns no violations, per packages/core/src/engine.ts
Hallucinated import detection
Static list plus name-suffix regex, no registry lookup, per packages/rules/src/hallucinated-import.ts
Fix mechanism
Line and column text splice with unified diff output, per packages/fixer/src/fixer-engine.ts
Report formats
HTML, Markdown, SARIF, JSON
Tests
Vitest engine tests in packages/core/src/__tests__/engine.test.ts

Read from README.md, package.json, packages/core/src/engine.ts, packages/rules/src/hallucinated-import.ts, packages/rules/src/index.ts, packages/cli/src/index.ts, packages/mcp/src/index.ts, packages/fixer/src/fixer-engine.ts, action.yml, packages/core/src/__tests__/engine.test.ts, LICENSE.

What it can do

  • Scan AI-generated code for security vulnerabilities

    AI-generated code files → Security issue reports and identified vulnerabilities

  • Automatically fix security issues in code

    Code with security vulnerabilities → Corrected code with security fixes applied

  • Detect performance problems in AI-generated code

    AI-generated code files → Performance issue analysis and problem identification

  • Fix performance issues through AST manipulation

    Code with performance problems → Optimized code with performance improvements

  • Identify AI-specific anti-patterns in code

    AI-generated code files → Anti-pattern detection report

  • Apply automated fixes for AI anti-patterns

    Code containing AI-specific anti-patterns → Refactored code with anti-patterns resolved

  • Validate code against 22 predefined safety rules

    Source code files → Rule compliance report and violation details

Intel on Guardrail

More in Intel

Tags

ai-safetylinterstatic-analysiscode-qualitysecurity

Tech Stack

Node.jsTypeScript

Comments (0)

No comments yet

Editorially curated, with community endorsements as a secondary signal. Corrections welcome.