Skip to main content
Skip to Content
interlace
SecurityPlugin: grpc-security

eslint-plugin-grpc-security

gRPC security — server reflection registered with no guard

AI-Optimized Security

Every rule includes CWE, OWASP, and CVSS metadata for AI assistants to provide precise, context-aware fixes.

Install

npm install -D eslint-plugin-grpc-security
eslint.config.js
import { configs } from 'eslint-plugin-grpc-security';export default [configs.recommended];
npm install -D oxlint-plugin-grpc-security
.oxlintrc.json
{  "jsPlugins": ["oxlint-plugin-grpc-security"],  "rules": {    "grpc-security/no-unguarded-reflection": "error"  }}
vite.config.ts
import { defineConfig } from 'vite-plus';export default defineConfig({  lint: {    jsPlugins: ['oxlint-plugin-grpc-security'],    rules: {      'grpc-security/no-unguarded-reflection': 'error',    },  },});

oxlint-plugin-grpc-security re-exports eslint-plugin-grpc-security/oxlint: the same rules under the same IDs, and no ESLint install. Why oxlint.


Live from GitHub

This content is fetched directly from README.md on GitHub and cached for 1 hour.

Live README from GitHubfrom eslint-plugin-grpc-security/README.md, cached for 1 hour.Edit on GitHub

Getting Started

npm install --save-dev eslint eslint-plugin-grpc-security
// eslint.config.mjs
import { configs } from 'eslint-plugin-grpc-security';

export default [configs.recommended];

recommended is the preset to start with. The others are listed under Configuration Presets below.

Using oxlint or Vite+? Install oxlint-plugin-grpc-security: the same rules under the same grpc-security/<rule> IDs, without ESLint. Its page has the setup.

Description

Security rules for Node gRPC servers (server reflection registered with no guard).

They target servers built on @grpc/grpc-js.

Scope: every rule gates on the gRPC package it is about being imported, and on the binding a call resolves to. addToServer is an ordinary method name, so a rule that matched it alone would fire on code that has never seen gRPC.

The first rule is no-unguarded-reflection. Server reflection answers "which services does this listener serve?" to any client, unauthenticated. Registered unconditionally it ships to production, and grpcurl -plaintext host:port list then names every service on the server, the internal ones included. The rule reports a registration with no branch between it and the program running, and stays silent once any branch decides it (if (process.env.NODE_ENV !== 'production'), a config flag, an early return).

  • Why — a linter nobody reads protects nothing. We would rather miss a finding than spend your attention on one that was never real.
  • How — evidence, not names. A rule fires on what the code does, resolved through the AST and ESLint's own scope analysis.
  • What — every finding carries its fix, in prose for a human and as structured JSON for an agent. Security rules add a CWE mapping and, where assigned, a CVSS score.

That trade costs recall, and we measure it: methodology · results · a false positive is a bug.

⚙️ Configuration Presets

PresetDescription
minimalno-unguarded-reflection.
recommendedno-unguarded-reflection.
strictEvery rule.

Usage

// eslint.config.js
import grpcSecurity from 'eslint-plugin-grpc-security';

export default [grpcSecurity.configs.recommended];

Or wire the rules yourself:

import grpcSecurity from 'eslint-plugin-grpc-security';

export default [
  {
    plugins: { 'grpc-security': grpcSecurity },
    rules: {
      'grpc-security/no-unguarded-reflection': 'error',
    },
  },
];

oxlint

Every rule in this plugin runs on oxlint as well as ESLint:

{ "jsPlugins": ["eslint-plugin-grpc-security/oxlint"] }

📦 Compatibility

PackageVersion
@grpc/reflectionnpm
ESLintnpm
Node.jsnode

See the ESLint Version Support Policy for the full matrix.

Supported library versions

The library ranges the rules were written against. Documentation only: this package installs and requires none of them.

  • @grpc/reflection: ^1.0.0
  • grpc-server-reflection: ^0.1.0

Rules

Legend

IconDescription
💼Recommended: Included in the recommended preset.
⚠️Warns: Set to warn in recommended preset.
🔧Auto-fixable: Automatically fixable by the --fix CLI option.
💡Suggestions: Providing code suggestions in IDE.
🚫Deprecated: This rule is deprecated.
🟢Type-unaware: AST-only, runs in oxlint JS-plugin tier.
🟡Type-aware (refining): pure-AST primary path; types refine precision.
🟠Type-aware (graceful): requires TS program; silent without it.
RuleCWEOWASPCVSSDescription🧠💼⚠️🔧💡🚫
no-unguarded-reflectionCWE-306A05:2021Register gRPC server reflection only behind a guard🟢

Support

Found a false positive? Open an issue: that is a bug. If the plugin helped, a star on ofri-peretz/eslint helps others find it.

Part of the Interlace ESLint ecosystem — AI-native rules with LLM-optimized error messages:

Security

PluginDownloadsDescription
eslint-plugin-anthropic-securitydownloadsAnthropic SDK security.
eslint-plugin-browser-securitydownloadsXSS, DOM security.
eslint-plugin-drizzle-securitydownloadsDrizzle security.
eslint-plugin-express-securitydownloadsExpress middleware hardening.
eslint-plugin-gemini-securitydownloadsGoogle Gemini SDK security.
eslint-plugin-jwt-securitydownloadsToken security.
eslint-plugin-knex-securitydownloadsKnex security.
eslint-plugin-lambda-securitydownloadsAWS Lambda hardening.
eslint-plugin-mcp-sdk-securitydownloadsMCP SDK security.
eslint-plugin-mongodb-securitydownloadsMongoDB injection.
eslint-plugin-mysql-securitydownloadsMySQL security.
eslint-plugin-nestjs-securitydownloadsNestJS framework hardening.
eslint-plugin-node-securitydownloadsServer-side patterns.
eslint-plugin-openai-securitydownloadsOpenAI SDK security.
eslint-plugin-postgresql-securitydownloadsPostgreSQL security.
eslint-plugin-prisma-securitydownloadsPrisma security.
eslint-plugin-secure-codingdownloadsInjection prevention.
eslint-plugin-sequelize-securitydownloadsSequelize ORM security.
eslint-plugin-sqlite-securitydownloadsSQLite security.
eslint-plugin-supabase-securitydownloadsSupabase security.
eslint-plugin-typeorm-securitydownloadsTypeORM security.
eslint-plugin-vercel-ai-securitydownloadsAI SDK security.

Code quality

PluginDownloadsDescription
eslint-plugin-conventionsdownloadsTeam-specific habits and styles.
eslint-plugin-import-nextdownloadsFast cycle + import-graph analysis.
eslint-plugin-maintainabilitydownloadsCognitive load and clean-code patterns.
eslint-plugin-modernizationdownloadsESNext migration + syntax evolution.
eslint-plugin-modularitydownloadsStructural integrity and DDD patterns.
eslint-plugin-operabilitydownloadsProduction readiness and resource health.
eslint-plugin-react-a11ydownloadsReact accessibility / WCAG.
eslint-plugin-react-featuresdownloadsReact best practices and optimization.
eslint-plugin-reliabilitydownloadsRuntime stability and error safety.

📄 License

MIT © Ofri Peretz

Building secure JavaScript with Interlace? Star the repo to get new rules and CWE coverage as we ship them — or follow the AI-code-security benchmarks behind them.