skills/noir/SKILL.md
Run OWASP Noir for attack surface analysis and API endpoint discovery. Use when mapping API endpoints, finding shadow APIs, discovering hidden routes, or analyzing attack surface across multiple frameworks.
npx skillsauth add igbuend/grimbard noirInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Ideal scenarios:
Complements other tools:
Do NOT use this skill for:
# Homebrew (macOS/Linux)
brew install noir
# Download binary (Linux)
wget https://github.com/owasp-noir/noir/releases/latest/download/noir-linux-x86_64
chmod +x noir-linux-x86_64
sudo mv noir-linux-x86_64 /usr/local/bin/noir
# Download binary (macOS)
wget https://github.com/owasp-noir/noir/releases/latest/download/noir-macos-arm64
chmod +x noir-macos-arm64
sudo mv noir-macos-arm64 /usr/local/bin/noir
# Build from source (requires Crystal)
git clone https://github.com/owasp-noir/noir.git
cd noir
shards install
shards build --release --no-debug
sudo cp bin/noir /usr/local/bin/
# Docker
docker pull ghcr.io/owasp-noir/noir:latest
# Verify
noir --version
# Scan current directory
noir
# Scan specific path
noir -b /path/to/source
# Verbose output
noir -b /path/to/source -v
# Quiet mode
noir -b /path/to/source -q
# JSON output (default)
noir -b /path/to/source -o endpoints.json
# YAML output
noir -b /path/to/source --format yaml -o endpoints.yaml
# SARIF output
noir -b /path/to/source --format sarif -o results.sarif
# OpenAPI Specification
noir -b /path/to/source --format oas3 -o openapi.json
# HAR (HTTP Archive)
noir -b /path/to/source --format har -o endpoints.har
# Markdown Report
noir -b /path/to/source --format markdown -o report.md
# Plain text
noir -b /path/to/source --format plain
# Specify technologies to scan
noir -b /path/to/source -T express,django,spring
# Exclude specific technologies
noir -b /path/to/source --exclude fastapi
# List supported technologies
noir --list-techs
# No color output (for CI)
noir -b /path/to/source --no-color
# Include technical details
noir -b /path/to/source --include-path
# Send results to URL
noir -b /path/to/source --send-req https://api.example.com/endpoints
# Proxy through Burp/ZAP
noir -b /path/to/source --send-proxy http://127.0.0.1:8080
| Language | Frameworks | |----------|-----------| | JavaScript/TypeScript | Express.js, NestJS, Koa, Fastify, Hapi | | Python | Django, Flask, FastAPI, Tornado, Bottle | | Java | Spring Boot, JAX-RS, Micronaut, Quarkus | | Ruby | Rails, Sinatra, Grape | | Go | Gin, Echo, Fiber, Chi, Gorilla Mux | | PHP | Laravel, Symfony, Slim, CodeIgniter | | C# | ASP.NET Core, Nancy | | Rust | Actix, Rocket, Axum, Warp | | Kotlin | Ktor, Spring Boot |
# Generate SARIF for integration
noir -b /path/to/source \
--format sarif \
-o endpoints.sarif \
--no-color
# SARIF structure includes:
# - Each endpoint as a "result"
# - HTTP methods (GET, POST, PUT, DELETE, etc.)
# - Route paths
# - Parameters
# - Source file location
{
"endpoints": [
{
"method": "POST",
"url": "/api/users",
"params": ["username", "email", "password"],
"protocol": "http",
"details": {
"file": "src/routes/users.js",
"line": 42,
"code_type": "javascript"
}
}
]
}
# Generate OpenAPI spec from discovered endpoints
noir -b /path/to/source --format oas3 -o openapi.json
# Use with API testing tools
swagger-cli validate openapi.json
openapi-generator generate -i openapi.json -g postman-collection
name: Noir API Discovery
on:
push:
branches: [main]
pull_request:
schedule:
- cron: '0 0 * * 1' # Weekly
jobs:
noir:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Noir
run: |
wget -q https://github.com/owasp-noir/noir/releases/latest/download/noir-linux-x86_64
chmod +x noir-linux-x86_64
sudo mv noir-linux-x86_64 /usr/local/bin/noir
- name: Run Noir
run: |
noir -b ${{ github.workspace }} \
--format sarif \
-o noir-results.sarif \
--no-color
- name: Upload SARIF
uses: github/codeql-action/upload-sarif@v3
with:
sarif_file: noir-results.sarif
category: noir-api-discovery
- name: Generate OpenAPI
run: |
noir -b ${{ github.workspace }} \
--format oas3 \
-o openapi.json
- name: Upload Results
uses: actions/upload-artifact@v4
with:
name: noir-results
path: |
noir-results.sarif
openapi.json
# Discover all endpoints
noir -b /app/source \
--format json \
-o endpoints.json \
-v
# Generate attack surface report
noir -b /app/source \
--format markdown \
-o attack-surface.md
# Create OpenAPI for tools
noir -b /app/source \
--format oas3 \
-o openapi.json
# Scan multiple services
for service in services/*/; do
noir -b "$service" \
--format json \
-o "inventory/$(basename $service).json"
done
# Combine results
jq -s 'add' inventory/*.json > complete-inventory.json
# Scan codebase
noir -b /path/to/source -o discovered-endpoints.json
# Compare with documented API
diff <(jq -r '.endpoints[].url' discovered-endpoints.json | sort) \
<(jq -r '.paths | keys[]' openapi-spec.json | sort)
# Undocumented endpoints are "shadow APIs"
# Before migration - discover all routes
noir -b /old/app -T express -o old-endpoints.json
# After migration - verify parity
noir -b /new/app -T fastify -o new-endpoints.json
# Compare
diff <(jq -r '.endpoints[].url' old-endpoints.json | sort) \
<(jq -r '.endpoints[].url' new-endpoints.json | sort)
# Auto-detect technologies
noir -b /path/to/source --list-techs
# Show detected frameworks
noir -b /path/to/source -v | grep "Detected"
# Only GET endpoints
jq '.endpoints[] | select(.method == "GET")' endpoints.json
# Only authenticated endpoints (heuristic)
jq '.endpoints[] | select(.url | contains("auth") or contains("login"))' endpoints.json
# High-risk endpoints
jq '.endpoints[] | select(.method == "DELETE" or .method == "PUT")' endpoints.json
# Send discovered endpoints to Burp Suite
noir -b /path/to/source \
--send-proxy http://127.0.0.1:8080 \
--send-req http://target.example.com
# Creates Burp site map automatically
noir -b /app/source --format json -o endpoints.json
# Extract by risk level
jq '.endpoints[] | select(.method == "DELETE")' endpoints.json > high-risk.json
jq '.endpoints[] | select(.params | length > 0)' endpoints.json > with-params.json
jq '.endpoints[] | select(.url | test("/admin|/api/internal"))' endpoints.json > privileged.json
# Generate test scripts
jq -r '.endpoints[] | "curl -X \(.method) http://target.com\(.url)"' endpoints.json > test-requests.sh
# Or convert to OpenAPI and use Postman/Newman
noir -b /app/source --format oas3 -o openapi.json
# Create comprehensive report
noir -b /app/source --format markdown -o report.md
# Add SARIF for tracking
noir -b /app/source --format sarif -o findings.sarif
# Large codebases - use specific technology
noir -b /large/repo -T express -q
# Exclude unnecessary paths
noir -b /repo --exclude "node_modules,vendor,test"
# Minimal output for CI
noir -b /repo -q --format sarif -o results.sarif
| Shortcut | Why It's Wrong | |----------|----------------| | "Noir found all endpoints = complete coverage" | Dynamic routes, runtime-generated endpoints, and some frameworks may be missed | | "Skip endpoint discovery, review code manually" | Manual review misses endpoints; automated discovery is faster and more complete | | "Only scan main application, skip microservices" | Microservices often expose attack surface; comprehensive scan needed | | "OpenAPI docs are enough" | Documentation often lags code; Noir finds actual implemented endpoints | | "Don't need SARIF output" | SARIF enables integration with security workflows and issue tracking |
development
Security anti-pattern for Cross-Site Scripting vulnerabilities (CWE-79). Use when generating or reviewing code that renders HTML, handles user input in web pages, uses innerHTML/document.write, or builds dynamic web content. Covers Reflected, Stored, and DOM-based XSS. AI code has 86% XSS failure rate.
development
Security anti-pattern for XPath injection vulnerabilities (CWE-643). Use when generating or reviewing code that queries XML documents, constructs XPath expressions, or handles user input in XML operations. Detects unescaped quotes and special characters in XPath queries.
development
Security anti-pattern for weak password hashing (CWE-327, CWE-759). Use when generating or reviewing code that stores or verifies user passwords. Detects use of MD5, SHA1, SHA256 without salt, or missing password hashing entirely. Recommends bcrypt, Argon2, or scrypt.
development
Security anti-pattern for weak encryption (CWE-326, CWE-327). Use when generating or reviewing code that encrypts data, handles encryption keys, or uses cryptographic modes. Detects DES, ECB mode, static IVs, and custom crypto implementations.