viper-api-gateway-apigee-kong
Skill22 starsChanged 15 days agoMITView on GitHub
API Gateway, BFF & Rate-Tier Policy Auditor (Kong, AWS API Gateway, Apigee, Envoy Gateway). Reviews JWT authorizers, backend origin lockdown, and route-level quotas.
In this repository72 other files it gives its agents.
- llms.txtllms.txt
- viper-agent-skill-supplychainSkill
- viper-ai-llm-guardrailsSkill
- viper-auth-oauth-jwtSkill
- viper-aws-iam-cloud-auditSkill
- viper-bola-idorSkill
- viper-browser-extension-mv3Skill
- viper-browseros-agentSkill
- viper-cicd-hardeningSkill
- viperclawSkill
- viper-container-k8s-auditSkill
- viper-crypto-tls-auditSkill
- viper-csrf-samesite-auditSkill
- viper-dependency-sbomSkill
- viper-deserialization-parserSkill
- viper-diff-pr-reviewSkill
- viper-dns-email-domainSkill
- viper-electron-tauri-desktopSkill
- viper-fastapi-django-flaskSkill
- viper-file-upload-storageSkill
- viper-gcp-azure-cloud-auditSkill
- viper-github-repo-governanceSkill
- viper-go-service-auditSkill
- viper-graphql-wsSkill
- viper-grpc-protobuf-auditSkill
- viper-headers-csp-corsSkill
- viper-iac-terraform-auditSkill
- viper-incident-forensics-triageSkill
- viper-injection-oracleSkill
- viper-java-spring-auditSkill
- viper-js-harvesterSkill
- viper-kafka-rabbitmq-queueSkill
- viper-linux-systemd-hostSkill
- viper-logging-pii-complianceSkill
- viper-mcp-server-auditSkill
- viper-mobile-api-configSkill
- viper-multitenant-isolationSkill
- viper-nextjs-react-rscSkill
- viper-nginx-envoy-gatewaySkill
- viper-nodejs-express-nestjsSkill
- viper-oauth-oidc-complianceSkill
- viper-openapi-rest-schemaSkill
- viper-orchestratorSkill
- viper-payment-stripe-pciSkill
- viper-php-laravel-wordpressSkill
- viper-postgres-redis-mongoSkill
- viper-privacy-gdpr-hipaaSkill
- viper-proof-judgeSkill
- viper-proxy-fingerprintSkill
- viper-proxy-parser-alignmentSkill
- viper-race-logicSkill
- viper-rag-vector-auditSkill
- viper-rate-limit-dos-resilienceSkill
- viper-remediation-patch-verifierSkill
- viper-ruby-rails-auditSkill
- viper-rust-memory-unsafeSkill
- viper-saml-sso-enterpriseSkill
- viper-sbom-slsa-provenanceSkill
- viper-secrets-auditSkill
- viper-semgrep-rule-authorSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 0 are distinctive, and 3 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
3
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 60
Verify whether /health or /.well-known/* routes are intentionally public read-only endpoints.
- Very specific: line 95
Verify unauthenticated requests to protected routes return 401 and client-supplied X-Tenant-Id headers are stripped.
- Very specific: line 96
Run viperclaw iac . to verify gateway Terraform/YAML policies.
≈ “Common” is an estimate: at least 1 in 5 of the 408,460 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
API Gateway, BFF & Rate-Tier Policy Auditor (viper-api-gateway-apigee-kong)
1. Executive Scope, Standards & CWE/OWASP Mapping
- Frameworks & Standards: OWASP API Security Top 10:2023 (API2, API4, API8, API9), NIST SP 800-204B
- Primary CWE Mapping: CWE-284 (Improper Access Control), CWE-770 (Allocation of Resources Without Limits), CWE-636 (Not Failing Securely)
- ViperClaw MCP Tools:
viper_fingerprint_traffic,viper_iac_audit,viper_verify_and_report - ViperClaw CLI Command:
viperclaw fingerprint https://api.example.com && viperclaw iac .
2. Threat Model & Root-Cause Architecture
flowchart LR
Edge["API Gateway (JWT Authorizer + Rate Quota)"] --> OriginLock["mTLS / Origin Secret Header"] --> Backend["Private VPC Upstream Service"]Root-Cause Analysis
API gateways fail to protect backends when upstream microservices remain directly reachable via public ALB/EC2 IPs (skipping the gateway entirely), when gateway plugins are attached per-route instead of globally (leaving shadow or /v1/ routes unprotected), or when fail-open auth plugins pass requests during IdP outages.
3. Deterministic Discovery & Grep/AST Audit Commands
# 1. Inspect gateway headers and IaC definitions
viperclaw fingerprint https://api.example.com
viperclaw iac .
# 2. Rapid static pattern discovery in Kong / AWS API Gateway / Envoy configs
rg -n "(aws_apigatewayv2|kong\.yml|authorization_type|NONE|rate-limiting|jwt|ip-restriction)"4. Senior Security Engineer 8-Point Audit Checklist
| Control ID | Audit Verification Target | Pass Criteria | Fail / Vulnerability Indicator |
APIGW-01 | Backend Origin Lockdown | Upstream services reside in private subnets or require gateway mTLS / signed origin tokens. | Direct HTTP requests to backend ALB/IP succeed without traversing the API gateway. |
APIGW-02 | Default-Deny Global Auth Plugin | Auth plugins/authorizers are enabled by default; public routes require explicit allowlisting. | New routes inherit authorization_type = "NONE" by default. |
APIGW-03 | Fail-Closed Authorizer Behavior | Gateway rejects requests (401/503) if JWKS fetch or external auth service times out. | Fail-open fallback forwards unauthenticated requests during IdP downtime. |
APIGW-04 | Per-Tenant & Per-Route Quotas | Distinct rate limits and burst caps enforced on auth, search, export, and AI endpoints. | Single global rate limit allows one tenant to exhaust shared backend capacity. |
APIGW-05 | Trusted Header Stripping | Gateway strips client-supplied X-User-Id, X-Tenant-Id, and X-Forwarded-User before setting verified claims. | Upstream trusts X-Tenant-Id that a caller can supply directly. |
APIGW-06 | Request Size & Timeout Caps | Gateway enforces bounded body sizes (<= 1MB for JSON) and upstream timeouts (<= 30s). | Unbounded request bodies or infinite upstream timeouts cause worker exhaustion. |
APIGW-07 | Shadow & Legacy Stage Retirement | Old stages (/dev, /beta, /v1) are removed or inherit identical auth and throttling policies. | Deprecated /v1 stage remains publicly accessible without current auth rules. |
APIGW-08 | Structured Access Logging Without Secrets | Gateway logs request ID, route, status, and latency while redacting Authorization and query tokens. | Full query strings containing api_key= or token= written to log aggregators. |
5. False-Positive Elimination & CVSS v3.1 Triage Rubric
False-Positive Gate
- Confirm whether the backend service enforces independent JWT verification in addition to the gateway.
- Verify whether
/healthor/.well-known/*routes are intentionally public read-only endpoints.
| Severity Tier | Baseline CVSS v3.1 Vector | Qualifying Security Impact |
| CRITICAL (9.1) | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:N | Directly reachable backend origin or unsanitized X-Tenant-Id header trusting caller identity. |
| HIGH (7.5) | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:N/A:N | Legacy API stage missing JWT authorizer or fail-open auth configuration. |
| MEDIUM (5.3) | CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L | Missing per-route throttling or unbounded request body size at the gateway. |
6. Production Remediation Patterns (Vulnerable vs. Hardened Code)
# ✅ HARDENED: Kong declarative route with explicit JWT auth, header stripping & rate limiting
services:
- name: billing-service
url: https://billing.internal:8443
routes:
- name: billing-v2
paths: ["/api/v2/billing"]
plugins:
- name: jwt
- name: request-transformer
config:
remove:
headers: ["X-User-Id", "X-Tenant-Id", "X-Role"]
- name: rate-limiting
config:
minute: 120
policy: redis7. Regression Testing & Continuous Verification
- Verify unauthenticated requests to protected routes return
401and client-suppliedX-Tenant-Idheaders are stripped. - Run
viperclaw iac .to verify gateway Terraform/YAML policies. - Confirm direct origin access is blocked outside the gateway network boundary.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

