JSPM

@redpillsec/cli

1.0.1
  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 5
  • Score
    100M100P100Q25905F
  • License MIT

RedPill Security CLI - OpenAPI security scanner that reveals vulnerabilities in your API specifications

Package Exports

  • @redpillsec/cli
  • @redpillsec/cli/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@redpillsec/cli) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

πŸ”΄ RedPill Security CLI

See how deep the vulnerability hole goes

npm version License: MIT Node.js Version

πŸš€ Quick Start

# Install globally
npm install -g @redpillsec/cli

# Scan your OpenAPI specification
redpill scan openapi api.yaml

# Get help
redpill --help

πŸ“– About

RedPill Security CLI is a powerful OpenAPI security scanner that reveals vulnerabilities in your API specifications. Take the red pill and see the security issues you didn't know existed.

🎯 Features

  • OpenAPI Security Scanning: Comprehensive analysis of OpenAPI/Swagger specifications
  • Multiple Output Formats: Text, JSON, CSV, and Markdown reports
  • Configurable Rules: Customize security rules via configuration files
  • CI/CD Ready: Perfect for automated security testing in pipelines
  • Detailed Reports: Clear explanations of vulnerabilities and recommendations

πŸ”§ Installation

npm install -g @redpillsec/cli

Local Installation

npm install --save-dev @redpillsec/cli

πŸ“‹ Usage

Basic Scanning

# Scan a single OpenAPI file
redpill scan openapi api.yaml

# Scan with JSON output
redpill scan openapi api.yaml --format json

# Save results to file
redpill scan openapi api.yaml --output results.json

Advanced Options

# Use custom configuration
redpill scan openapi api.yaml --config custom-rules.json

# Verbose output
redpill scan openapi api.yaml --verbose

# Quiet mode (errors only)
redpill scan openapi api.yaml --quiet

Configuration Management

# Create default configuration file
redpill init-config

# Create config with custom path
redpill init-config my-config.json

βš™οΈ Configuration

Create a redpill.config.json file to customize security rules:

{
  "rules": {
    "security-definition-required": true,
    "no-http-basic": true,
    "security-schemes-defined": true,
    "no-secrets-in-url": true,
    "https-required": true
  },
  "output": {
    "format": "text",
    "verbose": false
  }
}

πŸ“Š Output Formats

Text (Default)

Human-readable format perfect for terminal output and quick reviews.

JSON

redpill scan openapi api.yaml --format json

Machine-readable format ideal for CI/CD integration and automated processing.

CSV

redpill scan openapi api.yaml --format csv

Spreadsheet-compatible format for reporting and analysis.

Markdown

redpill scan openapi api.yaml --format markdown

Documentation-friendly format for reports and wikis.

πŸ” Security Rules

RedPill Security CLI checks for various OpenAPI security issues:

  • Missing Security Definitions: APIs without proper security schemes
  • Weak Authentication: HTTP Basic auth and other weak methods
  • Insecure Protocols: HTTP instead of HTTPS
  • Exposed Secrets: API keys and tokens in URLs
  • Missing Security Requirements: Endpoints without security enforcement
  • And many more...

πŸ› οΈ CI/CD Integration

GitHub Actions

- name: Install RedPill Security CLI
  run: npm install -g @redpillsec/cli

- name: Scan OpenAPI Spec
  run: redpill scan openapi api.yaml --format json --output security-report.json

Jenkins

sh 'npm install -g @redpillsec/cli'
sh 'redpill scan openapi api.yaml --format json --output security-report.json'

πŸ“š Examples

Check out our examples directory for:

  • Sample OpenAPI specifications
  • Configuration examples
  • CI/CD pipeline templates
  • Output format samples

🀝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

πŸ’¬ Support

πŸ—ΊοΈ Roadmap

  • πŸ”œ AI-powered vulnerability analysis
  • πŸ”œ OWASP API Top 10 scanner
  • πŸ”œ Real-time API monitoring
  • πŸ”œ Integration with popular API gateways
  • πŸ”œ Custom rule development framework

Take the red pill. See the vulnerabilities. Fix them. πŸ”΄

Made with ❀️ by the RedPill Security team