>_ Documentation
Get Started with ApiPosture
Installation, CLI reference, configuration, and CI/CD integration. Free & Pro editions.
Quick Start
Pick your edition in the installer above. The scan command is identical across all runtimes.
ApiPosture uses Roslyn syntax-only parsing — no compilation, no NuGet packages required. Scans complete in under 2 seconds for most projects.
- ✓ No compilation required — works with incomplete code
- ✓ Fast — typical scans complete in under 2 seconds
- ✓ No dependencies — doesn't need your NuGet packages
Scan your ASP.NET Core API project in seconds:
Or use Pro for OWASP Top 10 + secrets detection:
CLI Reference
The scan command covers all analysis options.
scan
The primary command to analyse your API project.
Arguments
<path>— Path to the directory containing your source files.
Options
| Option | Description | Default |
|---|---|---|
| --output, -o | Output format: terminal, json, markdown |
terminal |
| --fail-on | Exit non-zero if severity found: critical, high, medium, low |
— |
| --exclude | Glob patterns to exclude (repeatable) | — |
| --config | Path to config file (.json or .yaml) | .apiposture.json |
| --framework | Filter by framework: fastapi, flask, django_drf |
— |
| --no-color | Disable coloured output | false |
| --verbose, -v | Show detailed output | false |
Examples
Configuration
Create a .apiposture.json or .apiposture.yaml in your project root for persistent settings.
.NET / Node.js — JSON
.NET / Node.js — YAML
Go — .apiposture.yaml
Java — .apiposture.yaml
Configuration Options
exclude— Array of glob patterns to exclude from scanningrules— Per-rule configuration overridesdisabledRules— Array of rule IDs to disablesuppressions— Per-route rule suppressions with reasonmin_severity— Minimum severity level to report (Go / Java)
Output Formats
Three output modes to fit your workflow.
terminal
Terminal (Default)
Human-readable coloured output for local development.
json
JSON
Machine-readable output for tool integrations and scripts.
markdown
Markdown
Formatted report for documentation or PR comments.
CI/CD Integration
Catch security issues before they reach production.
GitHub Actions
Runs on every push and pull request — blocks merges on critical findings.
View configGitHub Actions
Azure DevOps
GitLab CI
Security Rules
ApiPosture Free includes 8 purpose-built rules. See the Features page for detailed explanations.
| Rule | Category | Severity | Description |
|---|---|---|---|
| AP001 | Exposure | HIGH | Unintentional Public Access |
| AP002 | Exposure | HIGH | Anonymous Write Operations |
| AP003 | Consistency | MEDIUM | Authorization Conflicts |
| AP004 | Consistency | CRITICAL | Missing Auth on Writes |
| AP005 | Privilege | LOW | Role Sprawl |
| AP006 | Privilege | LOW | Weak Role Names |
| AP007 | Surface | MEDIUM | Sensitive Routes Exposed |
| AP008 | Surface | HIGH | Minimal API Gaps |
Pro Installation
The Pro CLI includes all Free rules plus OWASP Top 10, secrets detection, diff mode, history tracking, and risk scoring. Your code never leaves your machine — all analysis runs 100% locally.
Java — Spring Boot (requires Java 11+)
Download the JAR and run directly — no installation required.
CI/CD — License via environment variable
No interactive activation needed in pipelines — set the key as a secret.
OWASP Top 10 Rules
Pro combines endpoint metadata analysis with deep source code inspection of method bodies — catching issues that surface analysis alone misses.
| Rule | Severity | Description |
|---|---|---|
| AP101 | CRITICAL | Broken Access Control — missing auth middleware, DB writes without auth, IDOR, privilege escalation |
| AP102 | HIGH | Cryptographic Failures — weak hashing (MD5/SHA1), hardcoded crypto keys, sensitive data logging |
| AP103 | CRITICAL | Injection — SQL/command injection, unsafe deserialization, eval with user input, XSS |
| AP104 | HIGH | Insecure Design — missing CSRF protection, missing input validation, no rate limiting on auth endpoints |
| AP105 | MEDIUM | Security Misconfiguration — permissive CORS, XXE, debug endpoints, missing HTTPS/HSTS |
| AP106 | MEDIUM | Vulnerable Components — legacy API patterns, deprecated frameworks, EOL runtime versions |
| AP107 | HIGH | Authentication Failures — plaintext password comparison, missing audit logging on DELETE |
| AP108 | HIGH | SSRF — HTTP client with user-controlled input, unvalidated URL construction, open redirects |
File-Level Scanning
Pro scans entire source files beyond just endpoint methods. Coverage varies by runtime:
Startup.cs / Program.cs— UseDeveloperExceptionPage without guard, missing HTTPS redirect, Swagger without env check*.cshtml—@Html.Raw()XSS vulnerabilities, innerHTML assignments*.cs— Reversible encryption in password context, hardcoded keys, BinaryFormatterappsettings.json— AllowedHosts wildcard (*) host header injection risk*.csproj— End-of-life .NET framework versions (below .NET 8.0)
Java (Spring Boot)
AP-F01 — *SecurityConfig*.java— .csrf(disable), .anyRequest().permitAll()AP-F02 — **/*.java— Logging passwords, tokens, and secretsAP-F03 — application*.properties/yml— Plaintext passwords, exposure.include=*, debug=true, H2 consoleAP-F04 — pom.xml / build.gradle— Spring Boot 2.x (EOL), Java < 17
Secrets Detection
Detects 30+ secret patterns across source files and endpoint method bodies. Available on all runtimes —
rule AP201 (.NET, Go, Java, Node.js) or AP014–AP015 (Python).
- ● AWS, Azure, GCP cloud keys
- ● GitHub, Slack, Stripe tokens
- ● Database connection strings
- ● Private keys and certificates
- ● JWT secrets and API keys
- ● Method bodies and all source files
Java: prefix each command with java -jar apiposture-pro.jar.
Diff Mode
Compare scans over time to track security improvements or regressions. Available on all runtimes.
Python: use -f baseline.json instead of --output-file when scanning.
Java — Spring Boot
History Tracking
Every scan is automatically saved to a local SQLite database at
~/.apiposture/history.db. No data leaves your machine. Available on all runtimes.
Python: pass --with-history on each scan to opt in to history saving.
Java — Spring Boot
Risk Scoring
Automated risk assessment aggregated across all findings. Available on all runtimes.
40%
Severity
Weight of critical/high/medium/low findings
25%
Exposure
Public-facing endpoints vs internal APIs
25%
Sensitivity
Data types handled — PII, auth, secrets
10%
Finding Density
Findings per endpoint scanned
Java: use java -jar apiposture-pro.jar scan . --risk-score. Python: pass --no-risk-score to skip.
Enterprise License
Everything in Pro, plus enterprise-grade support and extensibility.
Pro
Pro License
- ✓ OWASP Top 10 rules (AP101–AP108)
- ✓ Secrets detection (AP201, 30+ patterns)
- ✓ Diff mode — track regressions over time
- ✓ Historical tracking with local SQLite
- ✓ Risk scoring with four-factor model
- ✓ Standard support
Enterprise
Enterprise License
- ✓ All Pro features
- ✓ SOC 2 / ISO 27001 compliance reports (PDF & HTML)
- ✓ Compliance score + trend in scan output
- ✓ Starter kits with policy file and CI/CD workflows
- ✓ Policy enforcement (
.apiposture-policy.json) - ✓ Tamper-evident audit trail export (JSON / PDF)
- ✓ Operator attribution in findings and scan records
- ✓ Integrity verification of scan records
- ✓ Priority support with SLA
- ✓ Custom rule development & site licenses
Interested in an Enterprise license?
Contact us to discuss site licensing, custom rules, and dedicated support.
Questions or Feedback?
We're here to help you secure your APIs. Join our community or contact support.