security-mcp 1.0.4 → 1.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +77 -21
- package/defaults/checklists/ai.json +25 -0
- package/defaults/checklists/api.json +27 -0
- package/defaults/checklists/infra.json +27 -0
- package/defaults/checklists/mobile.json +25 -0
- package/defaults/checklists/payments.json +25 -0
- package/defaults/checklists/web.json +30 -0
- package/defaults/control-catalog.json +549 -0
- package/defaults/evidence-map.json +194 -0
- package/defaults/security-exceptions.json +4 -0
- package/defaults/security-policy.json +41 -2
- package/defaults/security-tools.json +41 -0
- package/dist/ci/pr-gate.js +2 -3
- package/dist/cli/index.js +63 -23
- package/dist/cli/install.js +47 -15
- package/dist/cli/onboarding.js +590 -0
- package/dist/cli/update.js +124 -0
- package/dist/gate/baseline.js +115 -0
- package/dist/gate/catalog.js +55 -0
- package/dist/gate/checks/ai-redteam.js +374 -0
- package/dist/gate/checks/ai.js +45 -14
- package/dist/gate/checks/api.js +93 -0
- package/dist/gate/checks/crypto.js +153 -0
- package/dist/gate/checks/database.js +144 -0
- package/dist/gate/checks/dependencies.js +130 -0
- package/dist/gate/checks/dlp.js +153 -0
- package/dist/gate/checks/graphql.js +122 -0
- package/dist/gate/checks/infra.js +126 -12
- package/dist/gate/checks/k8s.js +190 -0
- package/dist/gate/checks/playbook.js +160 -0
- package/dist/gate/checks/runtime.js +263 -0
- package/dist/gate/checks/sbom.js +199 -0
- package/dist/gate/checks/scanners.js +450 -0
- package/dist/gate/checks/secrets.js +119 -27
- package/dist/gate/diff.js +2 -2
- package/dist/gate/evidence.js +116 -0
- package/dist/gate/exceptions.js +85 -0
- package/dist/gate/policy.js +189 -17
- package/dist/gate/threat-intel.js +157 -0
- package/dist/mcp/server.js +938 -9
- package/dist/repo/fs.js +10 -5
- package/dist/repo/search.js +13 -1
- package/dist/review/store.js +208 -0
- package/dist/tests/run.js +103 -0
- package/package.json +13 -3
- package/prompts/SECURITY_PROMPT.md +455 -1
- package/skills/senior-security-engineer/SKILL.md +81 -4
package/README.md
CHANGED
|
@@ -45,7 +45,7 @@ security-mcp actively hardens every surface of your software:
|
|
|
45
45
|
## Quick Start
|
|
46
46
|
|
|
47
47
|
```bash
|
|
48
|
-
npx security-mcp install
|
|
48
|
+
npx -y security-mcp@latest install
|
|
49
49
|
```
|
|
50
50
|
|
|
51
51
|
That's it. The tool auto-detects your editor and writes the MCP config. Restart your editor -- done.
|
|
@@ -53,15 +53,43 @@ That's it. The tool auto-detects your editor and writes the MCP config. Restart
|
|
|
53
53
|
To target a specific editor:
|
|
54
54
|
|
|
55
55
|
```bash
|
|
56
|
-
npx security-mcp install --claude-code
|
|
57
|
-
npx security-mcp install --cursor
|
|
58
|
-
npx security-mcp install --vscode
|
|
56
|
+
npx -y security-mcp@latest install --claude-code
|
|
57
|
+
npx -y security-mcp@latest install --cursor
|
|
58
|
+
npx -y security-mcp@latest install --vscode
|
|
59
59
|
```
|
|
60
60
|
|
|
61
61
|
Preview without writing anything:
|
|
62
62
|
|
|
63
63
|
```bash
|
|
64
|
-
npx security-mcp install --dry-run
|
|
64
|
+
npx -y security-mcp@latest install --dry-run
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
### Global Install
|
|
68
|
+
|
|
69
|
+
Install the package globally, then configure editors to call the global binary directly:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
npm install -g security-mcp@latest
|
|
73
|
+
security-mcp install-global
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
Preview the global install flow without writing:
|
|
77
|
+
|
|
78
|
+
```bash
|
|
79
|
+
security-mcp install-global --dry-run
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
### Update Behavior
|
|
83
|
+
|
|
84
|
+
- `npx -y security-mcp@latest ...` always runs the latest published npm version.
|
|
85
|
+
- Global installs (`npm install -g security-mcp`) do not auto-upgrade by themselves.
|
|
86
|
+
- The CLI now checks npm for new releases and prints an update prompt when a newer version is available.
|
|
87
|
+
|
|
88
|
+
Global update command:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
npm install -g security-mcp@latest
|
|
92
|
+
security-mcp install-global
|
|
65
93
|
```
|
|
66
94
|
|
|
67
95
|
In **Claude Code**, activate the security engineer:
|
|
@@ -78,28 +106,36 @@ Your AI will now **find and fix** security issues instead of just mentioning the
|
|
|
78
106
|
|
|
79
107
|
When you invoke `/senior-security-engineer` or call any security-mcp MCP tool, your AI shifts into the role of a Senior Security Engineer. It will:
|
|
80
108
|
|
|
81
|
-
1. **
|
|
82
|
-
2. **
|
|
83
|
-
3. **
|
|
84
|
-
4. **
|
|
85
|
-
5. **
|
|
109
|
+
1. **Ask scan scope first** -- folder-by-folder, file-by-file, or recent changes
|
|
110
|
+
2. **Start a review run** -- carry a `runId` for ordered execution and attestation
|
|
111
|
+
3. **Scan your code** for vulnerabilities, misconfigurations, and security anti-patterns
|
|
112
|
+
4. **Fix what it finds** -- not just flag it; it rewrites the insecure code with the secure version
|
|
113
|
+
5. **Enforce policies** -- set up input validation, auth middleware, security headers, and rate limiting
|
|
114
|
+
6. **Block dangerous patterns** -- refuse to implement code that introduces known vulnerabilities
|
|
115
|
+
7. **Produce an attestation** -- emit a confidence summary and integrity hash for the completed review
|
|
86
116
|
|
|
87
117
|
### MCP Tools (Your AI Uses These Automatically)
|
|
88
118
|
|
|
89
119
|
| Tool | What It Does |
|
|
90
120
|
| --- | --- |
|
|
121
|
+
| `security.start_review` | Starts a stateful review run and returns the `runId` used for ordered execution and attestation |
|
|
91
122
|
| `security.get_system_prompt` | Loads the full security directive into your AI session -- activates the Senior Security Engineer mode |
|
|
92
123
|
| `security.threat_model` | Generates a complete threat model for any feature before a single line of code is written |
|
|
93
124
|
| `security.checklist` | Returns a hardened pre-ship checklist specific to your surface (web, API, mobile, AI, cloud) |
|
|
125
|
+
| `security.scan_strategy` | Forces scan mode selection (`folder_by_folder`, `file_by_file`, `recent_changes`) and builds an exhaustive review plan |
|
|
94
126
|
| `security.generate_policy` | Writes a `security-policy.json` for your project that the gate enforces on every PR |
|
|
95
|
-
| `security.
|
|
127
|
+
| `security.terraform_hardening_blueprint` | Produces an advanced Terraform hardening baseline (network, IAM, data, logging, CI controls) |
|
|
128
|
+
| `security.generate_opa_rego` | Generates preventive OPA/Rego policies for Terraform plans, CI pipelines, and Kubernetes admission (requires explicit consent) |
|
|
129
|
+
| `security.self_heal_loop` | Proposes self-healing improvements, but requires explicit human approval before any change |
|
|
130
|
+
| `security.attest_review` | Writes an auditable review attestation with integrity hash and confidence summary |
|
|
131
|
+
| `security.run_pr_gate` | Scans recent changes, selected folders, or selected files and **blocks merge** on CRITICAL/HIGH vulnerabilities; requires `runId` in MCP usage |
|
|
96
132
|
| `repo.read_file` | Reads files from your workspace for analysis |
|
|
97
133
|
| `repo.search` | Searches your codebase for vulnerable patterns |
|
|
98
134
|
|
|
99
135
|
### Security Gate (Blocks Bad Code from Shipping)
|
|
100
136
|
|
|
101
137
|
```bash
|
|
102
|
-
npx security-mcp ci:pr-gate
|
|
138
|
+
npx -y security-mcp@latest ci:pr-gate
|
|
103
139
|
```
|
|
104
140
|
|
|
105
141
|
Add this to your CI pipeline. It scans every PR and **blocks the merge** if it finds:
|
|
@@ -158,14 +194,17 @@ When your AI has security-mcp active, it will **fix these automatically** -- not
|
|
|
158
194
|
|
|
159
195
|
| Editor | Install Command | Config Location |
|
|
160
196
|
| --- | --- | --- |
|
|
161
|
-
| Claude Code | `npx security-mcp install --claude-code` | `~/.claude/settings.json` |
|
|
162
|
-
|
|
|
163
|
-
| Cursor (
|
|
164
|
-
|
|
|
197
|
+
| Claude Code | `npx -y security-mcp@latest install --claude-code` | `~/.claude/settings.json` |
|
|
198
|
+
| Claude Code (global binary) | `security-mcp install-global --claude-code` | `~/.claude/settings.json` |
|
|
199
|
+
| Cursor (global) | `npx -y security-mcp@latest install --cursor` | `~/.cursor/mcp.json` |
|
|
200
|
+
| Cursor (global binary) | `security-mcp install-global --cursor` | `~/.cursor/mcp.json` |
|
|
201
|
+
| Cursor (workspace) | `npx -y security-mcp@latest install --cursor` | `.cursor/mcp.json` |
|
|
202
|
+
| VS Code | `npx -y security-mcp@latest install --vscode` | User `settings.json` |
|
|
203
|
+
| VS Code (global binary) | `security-mcp install-global --vscode` | User `settings.json` |
|
|
165
204
|
| GitHub Copilot | Manual config (see below) | `.vscode/settings.json` |
|
|
166
205
|
| Codex | Manual config (see below) | Editor config |
|
|
167
206
|
| Replit | Manual config (see below) | `.replit` config |
|
|
168
|
-
| Any MCP-compatible | `npx security-mcp config` | Paste into editor config |
|
|
207
|
+
| Any MCP-compatible | `npx -y security-mcp@latest config` or `security-mcp config --use-global-binary` | Paste into editor config |
|
|
169
208
|
|
|
170
209
|
---
|
|
171
210
|
|
|
@@ -203,7 +242,20 @@ security-mcp applies all of them on your behalf:
|
|
|
203
242
|
"mcpServers": {
|
|
204
243
|
"security-mcp": {
|
|
205
244
|
"command": "npx",
|
|
206
|
-
"args": ["-y", "security-mcp", "serve"]
|
|
245
|
+
"args": ["-y", "security-mcp@latest", "serve"]
|
|
246
|
+
}
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
### Claude Code With Global Binary (`~/.claude/settings.json`)
|
|
252
|
+
|
|
253
|
+
```json
|
|
254
|
+
{
|
|
255
|
+
"mcpServers": {
|
|
256
|
+
"security-mcp": {
|
|
257
|
+
"command": "security-mcp",
|
|
258
|
+
"args": ["serve"]
|
|
207
259
|
}
|
|
208
260
|
}
|
|
209
261
|
}
|
|
@@ -216,7 +268,7 @@ security-mcp applies all of them on your behalf:
|
|
|
216
268
|
"mcpServers": {
|
|
217
269
|
"security-mcp": {
|
|
218
270
|
"command": "npx",
|
|
219
|
-
"args": ["-y", "security-mcp", "serve"]
|
|
271
|
+
"args": ["-y", "security-mcp@latest", "serve"]
|
|
220
272
|
}
|
|
221
273
|
}
|
|
222
274
|
}
|
|
@@ -229,7 +281,7 @@ security-mcp applies all of them on your behalf:
|
|
|
229
281
|
"mcp.servers": {
|
|
230
282
|
"security-mcp": {
|
|
231
283
|
"command": "npx",
|
|
232
|
-
"args": ["-y", "security-mcp", "serve"]
|
|
284
|
+
"args": ["-y", "security-mcp@latest", "serve"]
|
|
233
285
|
}
|
|
234
286
|
}
|
|
235
287
|
}
|
|
@@ -238,7 +290,8 @@ security-mcp applies all of them on your behalf:
|
|
|
238
290
|
Print the config snippet for any editor:
|
|
239
291
|
|
|
240
292
|
```bash
|
|
241
|
-
npx security-mcp config
|
|
293
|
+
npx -y security-mcp@latest config
|
|
294
|
+
security-mcp config --use-global-binary
|
|
242
295
|
```
|
|
243
296
|
|
|
244
297
|
---
|
|
@@ -250,6 +303,9 @@ Copy the default policy into your project:
|
|
|
250
303
|
```bash
|
|
251
304
|
cp node_modules/security-mcp/defaults/security-policy.json .mcp/policies/security-policy.json
|
|
252
305
|
cp node_modules/security-mcp/defaults/evidence-map.json .mcp/mappings/evidence-map.json
|
|
306
|
+
cp node_modules/security-mcp/defaults/control-catalog.json .mcp/catalog/control-catalog.json
|
|
307
|
+
cp node_modules/security-mcp/defaults/security-tools.json .mcp/scanners/security-tools.json
|
|
308
|
+
cp node_modules/security-mcp/defaults/security-exceptions.json .mcp/exceptions/security-exceptions.json
|
|
253
309
|
```
|
|
254
310
|
|
|
255
311
|
Or generate one tailored to your project:
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"surface": "ai",
|
|
3
|
+
"items": [
|
|
4
|
+
{ "id": "ai_input_sanitization", "description": "All AI inputs sanitized and validated before being passed to models", "critical": true },
|
|
5
|
+
{ "id": "ai_prompt_separation", "description": "System prompt structurally separated from user content — no string concatenation", "critical": true },
|
|
6
|
+
{ "id": "ai_rag_untrusted", "description": "Indirect prompt injection: retrieved RAG context treated as untrusted and isolated", "critical": true },
|
|
7
|
+
{ "id": "ai_output_schema", "description": "Model outputs validated against JSON schema before acting on them", "critical": true },
|
|
8
|
+
{ "id": "ai_pii_scan", "description": "Output PII scan in place — no SSN, card numbers, tokens in model responses", "critical": true },
|
|
9
|
+
{ "id": "ai_rate_limiting", "description": "AI endpoints rate-limited independently from regular API — token budgets enforced", "critical": true },
|
|
10
|
+
{ "id": "ai_access_logging", "description": "Model access logging enabled — user, timestamp, token counts, model version logged", "critical": false },
|
|
11
|
+
{ "id": "ai_redteam_done", "description": "Red-team test cases executed — jailbreak, injection, PII exfil probes reviewed", "critical": true },
|
|
12
|
+
{ "id": "ai_tool_allowlist", "description": "AI agent tool calls routed through allowlist — no unconstrained tool execution", "critical": true },
|
|
13
|
+
{ "id": "ai_human_in_loop", "description": "Human-in-the-loop approval required for high-impact agentic actions (delete, send, execute)", "critical": true },
|
|
14
|
+
{ "id": "ai_no_eval_output", "description": "Model output never passed to eval() or executed as code", "critical": true },
|
|
15
|
+
{ "id": "ai_no_shell_exec", "description": "Model output never passed directly to shell commands — allowlisted templates only", "critical": true },
|
|
16
|
+
{ "id": "ai_data_minimization", "description": "Only minimum necessary data included in prompts — no bulk data injection", "critical": false },
|
|
17
|
+
{ "id": "ai_model_versioning", "description": "Model version pinned — changes to model version go through security review", "critical": false },
|
|
18
|
+
{ "id": "ai_abuse_monitoring", "description": "Abuse monitoring in place — anomaly detection on token usage and response patterns", "critical": false },
|
|
19
|
+
{ "id": "ai_threat_model", "description": "AI-specific threat model completed — MITRE ATLAS and OWASP LLM Top 10 reviewed", "critical": true },
|
|
20
|
+
{ "id": "ai_rag_authz", "description": "RAG retrieval enforces authorization — documents filtered by user permissions", "critical": true },
|
|
21
|
+
{ "id": "ai_no_pii_in_prompts", "description": "No PII, credentials, or secrets in prompt templates", "critical": true },
|
|
22
|
+
{ "id": "ai_fallback_handling", "description": "Model failures handled gracefully — no sensitive error details exposed to users", "critical": false },
|
|
23
|
+
{ "id": "ai_owasp_llm_top10", "description": "OWASP LLM Top 10 controls reviewed and addressed for this AI surface", "critical": true }
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"surface": "api",
|
|
3
|
+
"items": [
|
|
4
|
+
{ "id": "api_authn_required", "description": "All new endpoints require authentication (JWT RS256/ES256 validated, not HS256)", "critical": true },
|
|
5
|
+
{ "id": "api_authz_server_side", "description": "Authorization checked server-side for every resource operation — IDOR prevention confirmed", "critical": true },
|
|
6
|
+
{ "id": "api_input_validation", "description": "Server-side schema validation on all new inputs (Zod/Valibot/Yup/Joi)", "critical": true },
|
|
7
|
+
{ "id": "api_rate_limiting", "description": "Rate limiting configured on all new endpoints — per-user and per-IP", "critical": true },
|
|
8
|
+
{ "id": "api_cors_allowlist", "description": "CORS origin allowlist reviewed — no wildcard on authenticated endpoints", "critical": true },
|
|
9
|
+
{ "id": "api_request_size", "description": "Request size limits enforced — no unbounded body parsing", "critical": false },
|
|
10
|
+
{ "id": "api_ssrf_protection", "description": "SSRF protection on any server-side HTTP client — block private IPs and metadata endpoints", "critical": true },
|
|
11
|
+
{ "id": "api_webhook_sig", "description": "Webhook signatures verified with HMAC-SHA256 and replay protection", "critical": true },
|
|
12
|
+
{ "id": "api_openapi_updated", "description": "OpenAPI spec updated for all new endpoints", "critical": false },
|
|
13
|
+
{ "id": "api_csrf", "description": "CSRF protections present on all state-mutating browser-accessible endpoints", "critical": true },
|
|
14
|
+
{ "id": "api_error_messages", "description": "Error responses reviewed — no stack traces, internal paths, or schema details", "critical": false },
|
|
15
|
+
{ "id": "api_logging", "description": "Security events logged for all auth decisions — no PII or secrets in logs", "critical": false },
|
|
16
|
+
{ "id": "api_jwt_expiry", "description": "JWT expiry enforced — access tokens max 15 minutes, refresh tokens rotated", "critical": true },
|
|
17
|
+
{ "id": "api_sql_injection", "description": "No raw SQL string concatenation — parameterized queries or ORM used throughout", "critical": true },
|
|
18
|
+
{ "id": "api_mass_assignment", "description": "Mass assignment prevention — explicit field allowlists, not object spread from request body", "critical": true },
|
|
19
|
+
{ "id": "api_sensitive_data", "description": "Sensitive data (PII, credentials) not included in API responses unless required", "critical": true },
|
|
20
|
+
{ "id": "api_versioning", "description": "API versioning strategy in place — old versions have defined deprecation timeline", "critical": false },
|
|
21
|
+
{ "id": "api_dependency_scan", "description": "Backend dependencies scanned — no CRITICAL CVEs unresolved", "critical": true },
|
|
22
|
+
{ "id": "api_secrets_scan", "description": "Secrets scan clean — no hardcoded credentials or API keys", "critical": true },
|
|
23
|
+
{ "id": "api_sast_pass", "description": "SAST scan passed with no CRITICAL findings", "critical": true },
|
|
24
|
+
{ "id": "api_threat_model", "description": "Threat model completed and reviewed for this API surface change", "critical": true },
|
|
25
|
+
{ "id": "api_health_endpoint", "description": "Health/readiness endpoints do not expose sensitive version or config info", "critical": false }
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
{
|
|
2
|
+
"surface": "infra",
|
|
3
|
+
"items": [
|
|
4
|
+
{ "id": "infra_no_public_ingress", "description": "No 0.0.0.0/0 ingress rules in any firewall or security group", "critical": true },
|
|
5
|
+
{ "id": "infra_private_endpoints", "description": "All managed services accessed via VPC endpoints or private connectivity", "critical": true },
|
|
6
|
+
{ "id": "infra_no_public_storage", "description": "No world-readable storage buckets or containers", "critical": true },
|
|
7
|
+
{ "id": "infra_secrets_manager", "description": "All secrets stored in secret manager — not in env files, CI logs, or container images", "critical": true },
|
|
8
|
+
{ "id": "infra_iam_least_privilege", "description": "IAM roles follow least privilege — no wildcard permissions or admin roles", "critical": true },
|
|
9
|
+
{ "id": "infra_network_segmentation", "description": "Network segmentation reviewed — web, app, and data tiers isolated", "critical": true },
|
|
10
|
+
{ "id": "infra_waf_rules", "description": "WAF rules updated if new public endpoints added", "critical": false },
|
|
11
|
+
{ "id": "infra_audit_logging", "description": "Cloud audit logging confirmed for all new resources", "critical": true },
|
|
12
|
+
{ "id": "infra_iac_scan", "description": "IaC scan passed (Checkov/tfsec/Terrascan) with no HIGH/CRITICAL findings", "critical": true },
|
|
13
|
+
{ "id": "infra_container_scan", "description": "Container scan passed — no CRITICAL CVEs with available fix", "critical": true },
|
|
14
|
+
{ "id": "infra_tf_state_encrypted", "description": "Terraform state stored with encryption and locking — restricted access", "critical": true },
|
|
15
|
+
{ "id": "infra_tf_versions_pinned", "description": "Provider and module versions pinned to exact versions — no floating ranges", "critical": false },
|
|
16
|
+
{ "id": "infra_drift_detection", "description": "Drift detection enabled — unauthorized changes trigger alerts", "critical": false },
|
|
17
|
+
{ "id": "infra_backup_verified", "description": "Backups configured and restore tested for all data stores", "critical": true },
|
|
18
|
+
{ "id": "infra_tls_config", "description": "TLS 1.3 configured — TLS 1.0/1.1 disabled on all endpoints", "critical": true },
|
|
19
|
+
{ "id": "infra_encryption_at_rest", "description": "Encryption at rest with CMEK/KMS for all data stores", "critical": true },
|
|
20
|
+
{ "id": "infra_mfa_enforced", "description": "MFA enforced for all console and cloud provider access", "critical": true },
|
|
21
|
+
{ "id": "infra_sbom_generated", "description": "SBOM generated for all container images included in this change", "critical": false },
|
|
22
|
+
{ "id": "infra_provenance", "description": "SLSA provenance attestation generated for release artifacts", "critical": false },
|
|
23
|
+
{ "id": "infra_threat_model", "description": "Threat model completed and reviewed for this infrastructure change", "critical": true },
|
|
24
|
+
{ "id": "infra_zero_trust", "description": "Zero Trust controls applied — explicit authentication for all service-to-service calls", "critical": true },
|
|
25
|
+
{ "id": "infra_ddos_protection", "description": "DDoS protection enabled for public-facing load balancers", "critical": false }
|
|
26
|
+
]
|
|
27
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"surface": "mobile",
|
|
3
|
+
"items": [
|
|
4
|
+
{ "id": "mobile_ios_ats", "description": "iOS: NSAllowsArbitraryLoads is false — ATS strictly enforced", "critical": true },
|
|
5
|
+
{ "id": "mobile_android_debuggable", "description": "Android: android:debuggable=false in release build manifest", "critical": true },
|
|
6
|
+
{ "id": "mobile_android_cleartext", "description": "Android: usesCleartextTraffic=false — TLS enforced for all network traffic", "critical": true },
|
|
7
|
+
{ "id": "mobile_cert_pinning", "description": "Certificate pinning implemented for high-value API calls", "critical": true },
|
|
8
|
+
{ "id": "mobile_secure_storage", "description": "Sensitive data not stored in SharedPreferences, external storage, or plist in plaintext", "critical": true },
|
|
9
|
+
{ "id": "mobile_keychain_keystore", "description": "Secrets stored in iOS Keychain / Android Keystore — not in code or config files", "critical": true },
|
|
10
|
+
{ "id": "mobile_biometric_auth", "description": "Biometric authentication properly tied to Keychain/Keystore — not bypassable", "critical": false },
|
|
11
|
+
{ "id": "mobile_screenshot_prevention", "description": "Screenshot prevention enabled for sensitive screens (payment, auth)", "critical": false },
|
|
12
|
+
{ "id": "mobile_clipboard_protection", "description": "Sensitive fields (passwords, card numbers) block clipboard access", "critical": false },
|
|
13
|
+
{ "id": "mobile_network_security_config", "description": "Android Network Security Config restricts cleartext and pins certificates", "critical": true },
|
|
14
|
+
{ "id": "mobile_obfuscation", "description": "Release build uses code obfuscation (ProGuard/R8 for Android, Swift symbol stripping for iOS)", "critical": false },
|
|
15
|
+
{ "id": "mobile_root_jailbreak_detection", "description": "Root/jailbreak detection implemented for high-risk operations", "critical": false },
|
|
16
|
+
{ "id": "mobile_deep_links", "description": "Deep links validated — no open redirect or intent injection via deep link handling", "critical": true },
|
|
17
|
+
{ "id": "mobile_api_keys_absent", "description": "No API keys, secrets, or credentials embedded in app binary or resources", "critical": true },
|
|
18
|
+
{ "id": "mobile_masvs_l2", "description": "OWASP MASVS L2 checklist completed for release build", "critical": true },
|
|
19
|
+
{ "id": "mobile_dependency_scan", "description": "Mobile dependencies scanned for known CVEs", "critical": true },
|
|
20
|
+
{ "id": "mobile_threat_model", "description": "Threat model completed and reviewed for this mobile surface change", "critical": true },
|
|
21
|
+
{ "id": "mobile_data_residency", "description": "Data residency requirements met — no user data stored on device beyond session", "critical": false },
|
|
22
|
+
{ "id": "mobile_backup_prevention", "description": "allowBackup=false in Android manifest — sensitive data not included in backups", "critical": true },
|
|
23
|
+
{ "id": "mobile_logging", "description": "No sensitive data logged in production builds — crash reporting sanitized", "critical": true }
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
{
|
|
2
|
+
"surface": "payments",
|
|
3
|
+
"items": [
|
|
4
|
+
{ "id": "pci_no_pan_in_logs", "description": "No card numbers, CVV, or PAN in any log, database, cache, or error message", "critical": true },
|
|
5
|
+
{ "id": "pci_webhook_verified", "description": "Payment processor webhook signatures verified with HMAC-SHA256 and replay protection", "critical": true },
|
|
6
|
+
{ "id": "pci_scope_documented", "description": "PCI scope clearly defined and documented — CDE boundaries explicit", "critical": true },
|
|
7
|
+
{ "id": "pci_network_segmented", "description": "Payment-adjacent systems network-segmented from non-payment systems", "critical": true },
|
|
8
|
+
{ "id": "pci_audit_trail", "description": "Complete audit trail maintained for all payment operations — tamper-evident logs", "critical": true },
|
|
9
|
+
{ "id": "pci_no_raw_card_storage", "description": "Raw card data never stored — tokenization used throughout", "critical": true },
|
|
10
|
+
{ "id": "pci_tls_required", "description": "TLS 1.2+ required on all payment data flows — no fallback to older protocols", "critical": true },
|
|
11
|
+
{ "id": "pci_strong_crypto", "description": "Strong cryptography used — no weak ciphers, MD5, SHA1 for security purposes", "critical": true },
|
|
12
|
+
{ "id": "pci_access_control", "description": "Access to payment data restricted to minimum necessary roles — least privilege", "critical": true },
|
|
13
|
+
{ "id": "pci_vulnerability_mgmt", "description": "Payment system dependencies scanned — no CRITICAL vulnerabilities unresolved", "critical": true },
|
|
14
|
+
{ "id": "pci_waf_in_place", "description": "WAF in place and tuned for payment endpoints — OWASP rule sets active", "critical": true },
|
|
15
|
+
{ "id": "pci_ids_ips", "description": "IDS/IPS monitoring payment data flows with alerting configured", "critical": false },
|
|
16
|
+
{ "id": "pci_file_integrity", "description": "File integrity monitoring on payment system files — alerts on unauthorized change", "critical": false },
|
|
17
|
+
{ "id": "pci_vendor_managed", "description": "Payment processing handled by PCI-compliant vendor (Stripe/Braintree/Adyen) — not custom", "critical": true },
|
|
18
|
+
{ "id": "pci_pen_test", "description": "Penetration test conducted within the last 12 months for payment scope", "critical": false },
|
|
19
|
+
{ "id": "pci_anti_fraud", "description": "Anti-fraud controls in place — velocity checks, geographic anomaly detection", "critical": true },
|
|
20
|
+
{ "id": "pci_chargeback_monitoring", "description": "Chargeback monitoring and alerting configured with defined response process", "critical": false },
|
|
21
|
+
{ "id": "pci_data_retention", "description": "Payment data retention policy enforced — data purged per PCI DSS schedule", "critical": true },
|
|
22
|
+
{ "id": "pci_ir_playbook", "description": "Payment fraud and PCI breach IR playbooks exist and are current", "critical": true },
|
|
23
|
+
{ "id": "pci_threat_model", "description": "Threat model completed and reviewed for this payment surface change", "critical": true }
|
|
24
|
+
]
|
|
25
|
+
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"surface": "web",
|
|
3
|
+
"items": [
|
|
4
|
+
{ "id": "web_csp_nonce", "description": "Content-Security-Policy uses nonce-based control — no unsafe-inline or unsafe-eval", "critical": true },
|
|
5
|
+
{ "id": "web_hsts", "description": "Strict-Transport-Security with includeSubDomains and preload, max-age >= 1 year", "critical": true },
|
|
6
|
+
{ "id": "web_xframe", "description": "X-Frame-Options: DENY or SAMEORIGIN", "critical": true },
|
|
7
|
+
{ "id": "web_xcto", "description": "X-Content-Type-Options: nosniff on all responses", "critical": true },
|
|
8
|
+
{ "id": "web_referrer", "description": "Referrer-Policy: strict-origin-when-cross-origin", "critical": false },
|
|
9
|
+
{ "id": "web_permissions", "description": "Permissions-Policy restricts camera, microphone, geolocation to self or none", "critical": false },
|
|
10
|
+
{ "id": "web_no_inline_js", "description": "No inline JavaScript or inline event handlers (onclick, onerror, etc.)", "critical": true },
|
|
11
|
+
{ "id": "web_sri", "description": "Subresource Integrity (SRI) on all third-party scripts and stylesheets", "critical": true },
|
|
12
|
+
{ "id": "web_csrf", "description": "CSRF protection (SameSite cookies + CSRF tokens) on all state-changing endpoints", "critical": true },
|
|
13
|
+
{ "id": "web_xss_no_dsi", "description": "dangerouslySetInnerHTML absent or sanitized with proven HTML sanitizer", "critical": true },
|
|
14
|
+
{ "id": "web_secure_cookies", "description": "Session cookies have HttpOnly, Secure, SameSite=Strict flags", "critical": true },
|
|
15
|
+
{ "id": "web_cors", "description": "CORS origin allowlist reviewed — no wildcard on authenticated endpoints", "critical": true },
|
|
16
|
+
{ "id": "web_error_messages", "description": "Error messages reviewed — no stack traces, schema details, or enum leakage", "critical": false },
|
|
17
|
+
{ "id": "web_open_redirect", "description": "No open redirect vulnerabilities — all redirects use allowlisted destinations", "critical": true },
|
|
18
|
+
{ "id": "web_clickjacking", "description": "Clickjacking prevention verified in staging (X-Frame-Options + CSP frame-ancestors)", "critical": false },
|
|
19
|
+
{ "id": "web_subresource_integrity", "description": "All CDN resources have SRI hashes verified and up-to-date", "critical": false },
|
|
20
|
+
{ "id": "web_auth_headers", "description": "Authorization tokens not stored in localStorage — use HttpOnly cookies", "critical": true },
|
|
21
|
+
{ "id": "web_rate_limiting", "description": "Rate limiting configured on login, registration, and password-reset endpoints", "critical": true },
|
|
22
|
+
{ "id": "web_ssrf_guard", "description": "SSRF protection on server-side HTTP calls — private IP ranges blocked", "critical": true },
|
|
23
|
+
{ "id": "web_dependency_scan", "description": "Frontend dependencies scanned for CVEs — no CRITICAL/HIGH unresolved", "critical": true },
|
|
24
|
+
{ "id": "web_threat_model", "description": "Threat model completed and reviewed for this web surface change", "critical": true },
|
|
25
|
+
{ "id": "web_sast_pass", "description": "SAST scan passed with no CRITICAL findings", "critical": true },
|
|
26
|
+
{ "id": "web_secrets_scan", "description": "Secrets scan clean — no credentials or tokens in source code", "critical": true },
|
|
27
|
+
{ "id": "web_logging", "description": "Required security events logged — no PII, tokens, or secrets in logs", "critical": false },
|
|
28
|
+
{ "id": "web_staging_verified", "description": "Security headers verified in staging environment with automated check", "critical": false }
|
|
29
|
+
]
|
|
30
|
+
}
|