The LintLiot SDK ships two CLI commands you can run withDocumentation Index
Fetch the complete documentation index at: https://docs.lintliot.com/llms.txt
Use this file to discover all available pages before exploring further.
npx — no global install required. Use lintliot init to connect your project and auto-insert middleware, and lintliot-scan to scan your codebase for hardcoded secrets, insecure patterns, and infrastructure misconfigurations.
Commands
The@lintliot/sdk package exposes two binaries:
| Binary | Invocation | Purpose |
|---|---|---|
lintliot | npx lintliot init | Project setup and middleware insertion |
lintliot-scan | npx lintliot-scan | Static security scanning |
npx lintliot init
lintliot init wires LintLiot into your project in roughly 60 seconds. It:
- Detects your framework by reading
package.jsondependencies. It recognizes Next.js, Express, Fastify, Koa, Hono, and Elysia. - Detects your auth provider (Clerk, NextAuth, Auth0, Supabase Auth) and database (Supabase, Prisma, Drizzle, MongoDB, PostgreSQL).
- Provisions an API key by authenticating with your LintLiot account. The key is written to
.env.localasLINTLIOT_API_KEY. - Creates middleware for your detected framework:
- Next.js — creates
middleware.ts(orsrc/middleware.ts) that runs on every/api/*request via the Edge Runtime. - Express / Hono — prints the
app.use(lintliot.protect())snippet to add before your routes.
- Next.js — creates
- Adds a
security:scanscript topackage.jsonpointing atlintliot-scan.
If
middleware.ts already exists, init will not overwrite it. Instead it prints the manual snippet to add to your existing file.init, set LINTLIOT_API_KEY in any environment where you deploy your app (Vercel, Railway, Fly.io, etc.). The key written to .env.local is for local development only.
npx lintliot-scan
lintliot-scan is a static security scanner that looks for hardcoded secrets, infrastructure misconfigurations, and insecure code patterns across your entire codebase. It covers 40+ secret patterns (API keys, tokens, private keys), IaC files (Terraform, Docker, Kubernetes, GitHub Actions), and common code vulnerabilities.
Flags
Directory to scan. Accepts any path relative to the working directory.
Minimum severity level to report. Findings below this threshold are omitted from output.
Accepted values:
critical, high, medium, low.Output format. Accepted values:
pretty— human-readable terminal output with colors and iconsjson— machine-readable JSON object with afindingsarraysarif— SARIF 2.1.0 for GitHub Code Scanning and IDE integrations
Comma-separated list of path fragments to skip. Useful for vendored code or generated files.
When set, skips files matching test path patterns (
*.test.ts, *.spec.ts, __tests__/, etc.).
Some rules (hardcoded passwords, eval()) are already suppressed in test files by default.Exit codes
| Code | Meaning |
|---|---|
0 | No findings at or above the minimum severity level |
1 | One or more CRITICAL findings detected |
Detection categories
| Category | Examples |
|---|---|
secret | AWS keys, Stripe secret keys, GitHub tokens, OpenAI/Anthropic keys, Supabase service role keys, JWT secrets, RSA/EC private keys, database connection strings |
iac | Terraform hardcoded credentials, Docker ARG secrets, Kubernetes stringData secrets, GitHub Actions hardcoded env values |
code | eval(), dangerouslySetInnerHTML, unparameterized SQL, Math.random() for tokens, MD5/SHA1 for security, disabled SSL verification, exec() with user input |
GitHub Actions integration
Add a security scan step to your CI workflow so findings are caught before code reaches production. Use--format sarif to push results directly to GitHub Code Scanning.
JSON output format
When using--format json, the scanner outputs a single object:
match field are always masked — only the first 6 and last 4 characters are shown.