universal-dev-standards 5.4.0 → 5.6.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/bundled/ai/options/testing/integration-testing.ai.yaml +2 -2
- package/bundled/ai/options/testing/unit-testing.ai.yaml +2 -2
- package/bundled/ai/standards/adversarial-test.ai.yaml +277 -0
- package/bundled/ai/standards/audit-trail.ai.yaml +113 -0
- package/bundled/ai/standards/browser-compatibility-standards.ai.yaml +63 -0
- package/bundled/ai/standards/chaos-injection-tests.ai.yaml +91 -0
- package/bundled/ai/standards/container-image-standards.ai.yaml +88 -0
- package/bundled/ai/standards/container-security.ai.yaml +331 -0
- package/bundled/ai/standards/contract-testing-standards.ai.yaml +62 -0
- package/bundled/ai/standards/cost-budget-test.ai.yaml +96 -0
- package/bundled/ai/standards/cross-flow-regression.ai.yaml +61 -0
- package/bundled/ai/standards/data-contract.ai.yaml +110 -0
- package/bundled/ai/standards/data-migration-testing.ai.yaml +96 -0
- package/bundled/ai/standards/data-pipeline.ai.yaml +113 -0
- package/bundled/ai/standards/disaster-recovery-drill.ai.yaml +89 -0
- package/bundled/ai/standards/flaky-test-management.ai.yaml +89 -0
- package/bundled/ai/standards/flow-based-testing.ai.yaml +240 -0
- package/bundled/ai/standards/full-coverage-testing.ai.yaml +192 -0
- package/bundled/ai/standards/iac-design-principles.ai.yaml +83 -0
- package/bundled/ai/standards/incident-response.ai.yaml +107 -0
- package/bundled/ai/standards/license-compliance.ai.yaml +106 -0
- package/bundled/ai/standards/llm-output-validation.ai.yaml +269 -0
- package/bundled/ai/standards/mock-boundary.ai.yaml +250 -0
- package/bundled/ai/standards/mutation-testing.ai.yaml +192 -0
- package/bundled/ai/standards/pii-classification.ai.yaml +109 -0
- package/bundled/ai/standards/policy-as-code-testing.ai.yaml +227 -0
- package/bundled/ai/standards/prd-standards.ai.yaml +88 -0
- package/bundled/ai/standards/product-metrics-standards.ai.yaml +111 -0
- package/bundled/ai/standards/prompt-regression.ai.yaml +94 -0
- package/bundled/ai/standards/property-based-testing.ai.yaml +105 -0
- package/bundled/ai/standards/release-quality-manifest.ai.yaml +135 -0
- package/bundled/ai/standards/release-readiness-gate.ai.yaml +77 -0
- package/bundled/ai/standards/replay-test.ai.yaml +111 -0
- package/bundled/ai/standards/runbook.ai.yaml +104 -0
- package/bundled/ai/standards/sast-advanced.ai.yaml +135 -0
- package/bundled/ai/standards/schema-evolution.ai.yaml +111 -0
- package/bundled/ai/standards/secret-management-standards.ai.yaml +105 -0
- package/bundled/ai/standards/secure-op.ai.yaml +365 -0
- package/bundled/ai/standards/security-testing.ai.yaml +171 -0
- package/bundled/ai/standards/server-ops-security.ai.yaml +274 -0
- package/bundled/ai/standards/slo-sli.ai.yaml +97 -0
- package/bundled/ai/standards/smoke-test.ai.yaml +87 -0
- package/bundled/ai/standards/supply-chain-attestation.ai.yaml +109 -0
- package/bundled/ai/standards/test-completeness-dimensions.ai.yaml +52 -5
- package/bundled/ai/standards/testing.ai.yaml +20 -13
- package/bundled/ai/standards/user-story-mapping.ai.yaml +108 -0
- package/bundled/core/accessibility-standards.md +58 -0
- package/bundled/core/adversarial-test.md +212 -0
- package/bundled/core/branch-completion.md +4 -0
- package/bundled/core/browser-compatibility-standards.md +220 -0
- package/bundled/core/chaos-injection-tests.md +116 -0
- package/bundled/core/checkin-standards.md +1 -0
- package/bundled/core/container-security.md +521 -0
- package/bundled/core/contract-testing-standards.md +182 -0
- package/bundled/core/cost-budget-test.md +69 -0
- package/bundled/core/cross-flow-regression.md +190 -0
- package/bundled/core/data-migration-testing.md +110 -0
- package/bundled/core/disaster-recovery-drill.md +73 -0
- package/bundled/core/flaky-test-management.md +73 -0
- package/bundled/core/flow-based-testing.md +275 -0
- package/bundled/core/full-coverage-testing.md +183 -0
- package/bundled/core/llm-output-validation.md +178 -0
- package/bundled/core/mock-boundary.md +100 -0
- package/bundled/core/mutation-testing.md +97 -0
- package/bundled/core/performance-standards.md +65 -0
- package/bundled/core/policy-as-code-testing.md +188 -0
- package/bundled/core/prompt-regression.md +72 -0
- package/bundled/core/property-based-testing.md +73 -0
- package/bundled/core/release-quality-manifest.md +193 -0
- package/bundled/core/release-readiness-gate.md +184 -0
- package/bundled/core/replay-test.md +86 -0
- package/bundled/core/sast-advanced.md +300 -0
- package/bundled/core/secure-op.md +314 -0
- package/bundled/core/security-testing.md +87 -0
- package/bundled/core/server-ops-security.md +493 -0
- package/bundled/core/smoke-test.md +65 -0
- package/bundled/core/supply-chain-attestation.md +117 -0
- package/bundled/locales/zh-CN/CHANGELOG.md +3 -3
- package/bundled/locales/zh-CN/README.md +1 -1
- package/bundled/locales/zh-CN/skills/ai-instruction-standards/SKILL.md +5 -5
- package/bundled/locales/zh-TW/CHANGELOG.md +3 -3
- package/bundled/locales/zh-TW/README.md +1 -1
- package/bundled/locales/zh-TW/core/browser-compatibility-standards.md +11 -0
- package/bundled/locales/zh-TW/core/contract-testing-standards.md +11 -0
- package/bundled/locales/zh-TW/core/cross-flow-regression.md +11 -0
- package/bundled/locales/zh-TW/core/release-readiness-gate.md +11 -0
- package/bundled/locales/zh-TW/skills/ai-instruction-standards/SKILL.md +183 -79
- package/bundled/skills/README.md +4 -3
- package/bundled/skills/SKILL_NAMING.md +94 -0
- package/bundled/skills/ai-instruction-standards/SKILL.md +181 -88
- package/bundled/skills/atdd-assistant/SKILL.md +8 -0
- package/bundled/skills/bdd-assistant/SKILL.md +7 -0
- package/bundled/skills/checkin-assistant/SKILL.md +8 -0
- package/bundled/skills/code-review-assistant/SKILL.md +7 -0
- package/bundled/skills/journey-test-assistant/SKILL.md +203 -0
- package/bundled/skills/orchestrate/SKILL.md +167 -0
- package/bundled/skills/plan/SKILL.md +234 -0
- package/bundled/skills/pr-automation-assistant/SKILL.md +8 -0
- package/bundled/skills/push/SKILL.md +49 -2
- package/bundled/skills/{process-automation → skill-builder}/SKILL.md +1 -1
- package/bundled/skills/{forward-derivation → spec-derivation}/SKILL.md +1 -1
- package/bundled/skills/spec-driven-dev/SKILL.md +7 -0
- package/bundled/skills/sweep/SKILL.md +145 -0
- package/bundled/skills/tdd-assistant/SKILL.md +7 -0
- package/package.json +6 -6
- package/src/commands/check.js +43 -0
- package/src/commands/flow.js +8 -0
- package/src/commands/init.js +2 -1
- package/src/commands/start.js +14 -0
- package/src/commands/sweep.js +8 -0
- package/src/commands/update.js +10 -0
- package/src/commands/workflow.js +8 -0
- package/standards-registry.json +483 -5
- package/bundled/locales/zh-CN/skills/ac-coverage-assistant/SKILL.md +0 -190
- package/bundled/locales/zh-CN/skills/forward-derivation/SKILL.md +0 -71
- package/bundled/locales/zh-CN/skills/forward-derivation/guide.md +0 -130
- package/bundled/locales/zh-CN/skills/methodology-system/SKILL.md +0 -88
- package/bundled/locales/zh-CN/skills/methodology-system/create-methodology.md +0 -350
- package/bundled/locales/zh-CN/skills/methodology-system/guide.md +0 -131
- package/bundled/locales/zh-CN/skills/methodology-system/runtime.md +0 -279
- package/bundled/locales/zh-CN/skills/process-automation/SKILL.md +0 -143
- package/bundled/locales/zh-TW/skills/ac-coverage-assistant/SKILL.md +0 -195
- package/bundled/locales/zh-TW/skills/deploy-assistant/SKILL.md +0 -178
- package/bundled/locales/zh-TW/skills/forward-derivation/SKILL.md +0 -69
- package/bundled/locales/zh-TW/skills/forward-derivation/guide.md +0 -415
- package/bundled/locales/zh-TW/skills/methodology-system/SKILL.md +0 -86
- package/bundled/locales/zh-TW/skills/methodology-system/create-methodology.md +0 -350
- package/bundled/locales/zh-TW/skills/methodology-system/guide.md +0 -131
- package/bundled/locales/zh-TW/skills/methodology-system/runtime.md +0 -279
- package/bundled/locales/zh-TW/skills/process-automation/SKILL.md +0 -144
- /package/bundled/skills/{ac-coverage-assistant → ac-coverage}/SKILL.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/SKILL.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/create-methodology.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/guide.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/integrated-flow.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/prerequisite-check.md +0 -0
- /package/bundled/skills/{methodology-system → dev-methodology}/runtime.md +0 -0
- /package/bundled/skills/{forward-derivation → spec-derivation}/guide.md +0 -0
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
# Advanced SAST Standards
|
|
2
|
+
|
|
3
|
+
> **Language**: English | [繁體中文](../locales/zh-TW/core/sast-advanced.md)
|
|
4
|
+
|
|
5
|
+
**Version**: 1.0.0
|
|
6
|
+
**Last Updated**: 2026-05-05
|
|
7
|
+
**Applicability**: TypeScript / JavaScript projects
|
|
8
|
+
**Scope**: CI/CD security enforcement
|
|
9
|
+
**References**: [CodeQL documentation](https://codeql.github.com/), [gitleaks](https://github.com/gitleaks/gitleaks), [Biome linter](https://biomejs.dev/)
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Purpose
|
|
14
|
+
|
|
15
|
+
This standard defines Advanced Static Application Security Testing (SAST) practices that complement dependency auditing (`npm audit`). It covers three independent but complementary layers:
|
|
16
|
+
|
|
17
|
+
1. **CodeQL semantic analysis** — finds injection vulnerabilities in first-party code
|
|
18
|
+
2. **Secret scanning** — prevents committing API keys and credentials
|
|
19
|
+
3. **Biome security lint rules** — enforces safe coding patterns at the editor and CI level
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Why npm audit Is Not Enough
|
|
24
|
+
|
|
25
|
+
`npm audit` scans your `package-lock.json` against the NPM advisory database. It only finds **known CVEs in third-party dependencies**.
|
|
26
|
+
|
|
27
|
+
It does **not** find:
|
|
28
|
+
|
|
29
|
+
| Vulnerability | Example | Detection Method |
|
|
30
|
+
|---|---|---|
|
|
31
|
+
| **Command injection** | `exec(\`git log ${userInput}\`)` | CodeQL data-flow |
|
|
32
|
+
| **Path traversal** | `fs.readFile(path.join(base, req.params.file))` | CodeQL data-flow |
|
|
33
|
+
| **Prototype pollution** | `target[req.body.key] = req.body.value` | CodeQL taint analysis |
|
|
34
|
+
| **XSS via DOM sink** | `element.innerHTML = userContent` | CodeQL data-flow |
|
|
35
|
+
| **SQL injection** | `db.query("SELECT * FROM users WHERE id = " + id)` | CodeQL data-flow |
|
|
36
|
+
| **Hardcoded secrets** | `const apiKey = "sk-live-abc123..."` | gitleaks pattern matching |
|
|
37
|
+
|
|
38
|
+
---
|
|
39
|
+
|
|
40
|
+
## Layer 1: CodeQL Semantic Analysis
|
|
41
|
+
|
|
42
|
+
### What CodeQL Does
|
|
43
|
+
|
|
44
|
+
CodeQL builds a semantic model of your TypeScript code, then runs queries that track data flows from **sources** (user input, request parameters, environment variables) to **sinks** (command execution, file system access, DOM manipulation).
|
|
45
|
+
|
|
46
|
+
### GitHub Actions Workflow
|
|
47
|
+
|
|
48
|
+
Create `.github/workflows/codeql.yml`:
|
|
49
|
+
|
|
50
|
+
```yaml
|
|
51
|
+
# SPDX-License-Identifier: MIT
|
|
52
|
+
name: CodeQL Analysis
|
|
53
|
+
|
|
54
|
+
on:
|
|
55
|
+
push:
|
|
56
|
+
branches: [main]
|
|
57
|
+
pull_request:
|
|
58
|
+
branches: [main]
|
|
59
|
+
schedule:
|
|
60
|
+
- cron: '0 2 * * 1' # Weekly Monday 02:00 UTC
|
|
61
|
+
|
|
62
|
+
jobs:
|
|
63
|
+
analyze:
|
|
64
|
+
name: Analyze TypeScript
|
|
65
|
+
runs-on: ubuntu-latest
|
|
66
|
+
permissions:
|
|
67
|
+
actions: read
|
|
68
|
+
contents: read
|
|
69
|
+
security-events: write
|
|
70
|
+
|
|
71
|
+
steps:
|
|
72
|
+
- name: Checkout repository
|
|
73
|
+
uses: actions/checkout@v4
|
|
74
|
+
|
|
75
|
+
- name: Initialize CodeQL
|
|
76
|
+
uses: github/codeql-action/init@v3
|
|
77
|
+
with:
|
|
78
|
+
languages: javascript-typescript
|
|
79
|
+
queries: security-extended
|
|
80
|
+
query-filters: |
|
|
81
|
+
- include:
|
|
82
|
+
tags contain: security
|
|
83
|
+
|
|
84
|
+
- name: Autobuild
|
|
85
|
+
uses: github/codeql-action/autobuild@v3
|
|
86
|
+
|
|
87
|
+
- name: Perform CodeQL Analysis
|
|
88
|
+
uses: github/codeql-action/analyze@v3
|
|
89
|
+
with:
|
|
90
|
+
category: "/language:javascript-typescript"
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Key Configuration Options
|
|
94
|
+
|
|
95
|
+
| Option | Value | Reason |
|
|
96
|
+
|---|---|---|
|
|
97
|
+
| `languages` | `javascript-typescript` | Covers both `.ts` and `.js` files |
|
|
98
|
+
| `queries` | `security-extended` | Includes injection/XSS/path-traversal queries absent from default |
|
|
99
|
+
| `schedule` | `0 2 * * 1` | Weekly catch for new query packs published by GitHub |
|
|
100
|
+
| `security-events: write` | Required | Uploads SARIF results to GitHub Security tab |
|
|
101
|
+
|
|
102
|
+
### Branch Protection Configuration
|
|
103
|
+
|
|
104
|
+
After adding the workflow, configure branch protection:
|
|
105
|
+
|
|
106
|
+
1. Settings → Branches → Branch protection rules → Edit main
|
|
107
|
+
2. Enable "Require status checks to pass before merging"
|
|
108
|
+
3. Add `CodeQL` and `sast` as required checks
|
|
109
|
+
|
|
110
|
+
---
|
|
111
|
+
|
|
112
|
+
## Layer 2: Secret Scanning with gitleaks
|
|
113
|
+
|
|
114
|
+
### What gitleaks Detects
|
|
115
|
+
|
|
116
|
+
gitleaks uses pattern matching and entropy analysis to detect:
|
|
117
|
+
- AWS access keys (`AKIA[0-9A-Z]{16}`)
|
|
118
|
+
- GitHub tokens (`ghp_`, `gho_`, `ghs_`, `ghr_`)
|
|
119
|
+
- Private key PEM blocks (`-----BEGIN RSA PRIVATE KEY-----`)
|
|
120
|
+
- Generic high-entropy strings that match credential patterns
|
|
121
|
+
- Custom patterns defined in `.gitleaks.toml`
|
|
122
|
+
|
|
123
|
+
### CI Integration
|
|
124
|
+
|
|
125
|
+
Add a `sast` job to your CI workflow:
|
|
126
|
+
|
|
127
|
+
```yaml
|
|
128
|
+
sast:
|
|
129
|
+
name: Secret Scanning
|
|
130
|
+
runs-on: ubuntu-latest
|
|
131
|
+
steps:
|
|
132
|
+
- uses: actions/checkout@v4
|
|
133
|
+
with:
|
|
134
|
+
fetch-depth: 0 # Full history for accurate scanning
|
|
135
|
+
- name: Run gitleaks
|
|
136
|
+
uses: gitleaks/gitleaks-action@v2
|
|
137
|
+
env:
|
|
138
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
### `.gitleaks.toml` Configuration Example
|
|
142
|
+
|
|
143
|
+
```toml
|
|
144
|
+
title = "VibeOps Gitleaks Configuration"
|
|
145
|
+
version = "8"
|
|
146
|
+
|
|
147
|
+
[extend]
|
|
148
|
+
# Extend default rules from gitleaks base config
|
|
149
|
+
useDefault = true
|
|
150
|
+
|
|
151
|
+
[[rules]]
|
|
152
|
+
id = "vibeops-license-key"
|
|
153
|
+
description = "VibeOps license key"
|
|
154
|
+
regex = '''vibeops[_\-]?license[_\-]?key\s*[:=]\s*["']?([A-Za-z0-9\-]{32,})["']?'''
|
|
155
|
+
severity = "CRITICAL"
|
|
156
|
+
tags = ["license", "vibeops"]
|
|
157
|
+
|
|
158
|
+
[[allowlist.commits]]
|
|
159
|
+
# Example: allow a specific commit hash that was remediated
|
|
160
|
+
# commits = ["abc1234"]
|
|
161
|
+
|
|
162
|
+
[[allowlist.regexes]]
|
|
163
|
+
# Whitelist test fixture values
|
|
164
|
+
description = "Test fixture placeholder keys"
|
|
165
|
+
regex = '''PLACEHOLDER_KEY_FOR_TESTING'''
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
### Handling False Positives
|
|
169
|
+
|
|
170
|
+
When gitleaks flags a false positive:
|
|
171
|
+
|
|
172
|
+
1. Identify the exact pattern causing the match
|
|
173
|
+
2. Add a targeted `allowlist.regexes` entry in `.gitleaks.toml` with a description
|
|
174
|
+
3. Document the justification in a code comment adjacent to the flagged value
|
|
175
|
+
4. Review all allowlist entries quarterly
|
|
176
|
+
|
|
177
|
+
---
|
|
178
|
+
|
|
179
|
+
## Layer 3: Biome Security Rules
|
|
180
|
+
|
|
181
|
+
### Why Biome Instead of ESLint
|
|
182
|
+
|
|
183
|
+
Projects that adopt Biome as their linter gain built-in security-relevant rules without additional ESLint plugin installation. Key security rules in Biome:
|
|
184
|
+
|
|
185
|
+
| Rule | Category | What It Prevents |
|
|
186
|
+
|---|---|---|
|
|
187
|
+
| `suspicious/noGlobalEval` | suspicious | Dynamic code execution via `eval()` |
|
|
188
|
+
| `suspicious/noWith` | suspicious | Scope pollution via `with` statement |
|
|
189
|
+
| `suspicious/noConsoleLog` | suspicious | Accidental secret logging via `console.log` |
|
|
190
|
+
| `correctness/noUnusedVariables` | correctness | Dead code that may contain sensitive logic |
|
|
191
|
+
| `security/noBlankTarget` | security | Tab hijacking via `target="_blank"` without `rel="noopener"` |
|
|
192
|
+
|
|
193
|
+
### `biome.json` Configuration
|
|
194
|
+
|
|
195
|
+
```json
|
|
196
|
+
{
|
|
197
|
+
"$schema": "https://biomejs.dev/schemas/1.9.0/schema.json",
|
|
198
|
+
"linter": {
|
|
199
|
+
"enabled": true,
|
|
200
|
+
"rules": {
|
|
201
|
+
"recommended": true,
|
|
202
|
+
"suspicious": {
|
|
203
|
+
"noGlobalEval": "error",
|
|
204
|
+
"noWith": "error"
|
|
205
|
+
},
|
|
206
|
+
"security": {
|
|
207
|
+
"noBlankTarget": "error"
|
|
208
|
+
}
|
|
209
|
+
}
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
### CI Integration
|
|
215
|
+
|
|
216
|
+
```yaml
|
|
217
|
+
- name: Lint (Biome)
|
|
218
|
+
run: npm run lint # Maps to: biome check .
|
|
219
|
+
```
|
|
220
|
+
|
|
221
|
+
The `biome check .` command runs both formatter checks and linter rules. Security rule failures produce a non-zero exit code, blocking CI.
|
|
222
|
+
|
|
223
|
+
---
|
|
224
|
+
|
|
225
|
+
## Quality Gate Thresholds
|
|
226
|
+
|
|
227
|
+
| Severity | Merge Policy | Resolution SLA |
|
|
228
|
+
|---|---|---|
|
|
229
|
+
| **CRITICAL** | Block merge — no exceptions | Immediate |
|
|
230
|
+
| **HIGH** | Block merge — 0 HIGH on main | Immediate |
|
|
231
|
+
| **MEDIUM** | Do not block; open tracking issue | 30 days |
|
|
232
|
+
| **LOW** | Do not block; log for visibility | Optional |
|
|
233
|
+
|
|
234
|
+
### Configuring GitHub Code Scanning Block Policy
|
|
235
|
+
|
|
236
|
+
In the repository security settings:
|
|
237
|
+
1. Security → Code scanning → Protection rules
|
|
238
|
+
2. Set "Security severity level" to "High or higher"
|
|
239
|
+
3. This blocks PR merge when CodeQL reports any HIGH or CRITICAL finding
|
|
240
|
+
|
|
241
|
+
---
|
|
242
|
+
|
|
243
|
+
## npm test Integration
|
|
244
|
+
|
|
245
|
+
Add a `test:sast` script to `package.json` as a developer-facing alias:
|
|
246
|
+
|
|
247
|
+
```json
|
|
248
|
+
{
|
|
249
|
+
"scripts": {
|
|
250
|
+
"test:sast": "npm audit --audit-level=high"
|
|
251
|
+
}
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
This allows local pre-push checks via `npm run test:sast`. Note this only covers dependency vulnerabilities; the full SAST pipeline runs in CI.
|
|
256
|
+
|
|
257
|
+
---
|
|
258
|
+
|
|
259
|
+
## Summary: Defense-in-Depth Security Scanning
|
|
260
|
+
|
|
261
|
+
```
|
|
262
|
+
Commit → pre-push hook (npm audit)
|
|
263
|
+
│
|
|
264
|
+
└─→ CI: sast job (gitleaks secret scan)
|
|
265
|
+
│
|
|
266
|
+
└─→ CI: check job (biome lint — security rules)
|
|
267
|
+
│
|
|
268
|
+
└─→ CI: codeql.yml (semantic analysis — injection/XSS/traversal)
|
|
269
|
+
│
|
|
270
|
+
└─→ GitHub Code Scanning (SARIF results — blocks PR on HIGH+)
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
No single scanner catches everything. This layered approach provides:
|
|
274
|
+
- **Dependency vulnerabilities**: npm audit (fast, every push)
|
|
275
|
+
- **Committed secrets**: gitleaks (every push, full history)
|
|
276
|
+
- **Code quality/safety**: Biome rules (every commit, editor feedback)
|
|
277
|
+
- **First-party vulnerabilities**: CodeQL (deep analysis, PR and weekly)
|
|
278
|
+
|
|
279
|
+
---
|
|
280
|
+
|
|
281
|
+
## Related Standards
|
|
282
|
+
|
|
283
|
+
- [Security Standards](security-standards.md)
|
|
284
|
+
- [Secret Management Standards](secret-management-standards.md)
|
|
285
|
+
- [Check-in Standards](checkin-standards.md)
|
|
286
|
+
- [Container Security](container-security.md)
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
## Version History
|
|
291
|
+
|
|
292
|
+
| Version | Date | Changes |
|
|
293
|
+
|---|---|---|
|
|
294
|
+
| 1.0.0 | 2026-05-05 | Initial release (XSPEC-161) |
|
|
295
|
+
|
|
296
|
+
---
|
|
297
|
+
|
|
298
|
+
## License
|
|
299
|
+
|
|
300
|
+
This standard is released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/).
|
|
@@ -0,0 +1,314 @@
|
|
|
1
|
+
# Secure-Op:AI Agent 安全操作標準
|
|
2
|
+
|
|
3
|
+
**版本**:1.0.0
|
|
4
|
+
**最後更新**:2026-05-04
|
|
5
|
+
**適用範圍**:所有部署 AI Agent 的系統
|
|
6
|
+
**範疇**:AI Agent 安全操作
|
|
7
|
+
**產業標準**:ISO/IEC 27001:2022、NIST SP 800-207、OWASP LLM Top 10 2025
|
|
8
|
+
|
|
9
|
+
---
|
|
10
|
+
|
|
11
|
+
## 標準概述
|
|
12
|
+
|
|
13
|
+
**Secure-Op** 是針對 AI Agent 系統的安全操作方法論,定義 AI Agent 在執行高風險操作時必須遵循的六大安全支柱。
|
|
14
|
+
|
|
15
|
+
本標準源自 VibeOps Guardian OPA Sidecar(XSPEC-146)的實作經驗,並沉澱為通用 UDS 標準,供任何採用 UDS 的 AI Agent 系統套用。
|
|
16
|
+
|
|
17
|
+
### 核心理念
|
|
18
|
+
|
|
19
|
+
傳統軟體安全假設操作主體是人類使用者。AI Agent 系統帶來新的威脅模型:
|
|
20
|
+
- **Agent 可能被提示注入(Prompt Injection)操控**,偽裝成合法操作
|
|
21
|
+
- **LLM 推論不確定性**,相同輸入可能產生不同決策
|
|
22
|
+
- **操作範圍不可預測**,一個指令可能觸發連鎖副作用
|
|
23
|
+
|
|
24
|
+
Secure-Op 的回應是:**確定性系統守護邊界,機率性系統只做輔助**。
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## 六大支柱
|
|
29
|
+
|
|
30
|
+
### 支柱一:Veto-Based Decision(否決式決策)
|
|
31
|
+
|
|
32
|
+
決策邏輯必須以「否決權」為基礎,不得使用投票制。
|
|
33
|
+
|
|
34
|
+
#### 核心原則
|
|
35
|
+
|
|
36
|
+
| 原則 | 說明 |
|
|
37
|
+
|------|------|
|
|
38
|
+
| Deterministic > Probabilistic | 確定性系統(Policy Engine、Rule Engine)的決策優先於 LLM 推論 |
|
|
39
|
+
| Policy-as-Code | 所有安全規則必須版本控制,可回歸測試 |
|
|
40
|
+
| 否決即終止 | 任一層 DENY 即立刻終止管線,不繼續下一層 |
|
|
41
|
+
|
|
42
|
+
#### 決策管線(Decision Pipeline)
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
輸入操作請求
|
|
46
|
+
│
|
|
47
|
+
▼
|
|
48
|
+
[M1] Prompt Injection 偵測
|
|
49
|
+
│ DENY → 終止
|
|
50
|
+
▼
|
|
51
|
+
[M2] Policy Engine(OPA / Rule Engine)
|
|
52
|
+
│ DENY → 終止
|
|
53
|
+
▼
|
|
54
|
+
[M3] SOBR 風險評分
|
|
55
|
+
│ ≥76 → DENY;51-75 → HITL;≤50 → 繼續
|
|
56
|
+
▼
|
|
57
|
+
[M4] Semantic Review(選配,LLM)
|
|
58
|
+
│ DENY → 終止
|
|
59
|
+
▼
|
|
60
|
+
執行操作 + 記錄 Audit
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
**參考實作**:OPA(Open Policy Agent)或等效 Policy Engine
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
### 支柱二:SOBR Risk Scoring(四維風險評分)
|
|
68
|
+
|
|
69
|
+
量化風險分數,提供一致且可解釋的決策依據。
|
|
70
|
+
|
|
71
|
+
#### 公式
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
RiskScore = S×0.30 + O×0.25 + B×0.25 + R×0.20
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
#### 四個維度
|
|
78
|
+
|
|
79
|
+
| 維度 | 權重 | 說明 | 範例高分 | 範例低分 |
|
|
80
|
+
|------|------|------|---------|---------|
|
|
81
|
+
| **S** Sensitivity | 0.30 | 目標資源敏感度 | 使用者憑證(100)| 公開文件(5)|
|
|
82
|
+
| **O** OperationType | 0.25 | 操作危險程度 | 執行任意程式碼(100)| 讀取公開資料(10)|
|
|
83
|
+
| **B** BlastRadius | 0.25 | 操作影響範圍 | 影響所有正式環境(100)| 隔離開發沙箱(10)|
|
|
84
|
+
| **R** Reversibility | 0.20 | 不可逆程度(越不可逆分數越高)| 永久刪除無備份(100)| 唯讀操作(0)|
|
|
85
|
+
|
|
86
|
+
#### 決策閾值
|
|
87
|
+
|
|
88
|
+
| 分數範圍 | 決策 | 行動 |
|
|
89
|
+
|---------|------|------|
|
|
90
|
+
| 0–25 | **ALLOW** | 正常執行,記錄 Audit |
|
|
91
|
+
| 26–50 | **ALLOW_WITH_MONITORING** | 執行並加強監控,標記人工事後審查 |
|
|
92
|
+
| 51–75 | **REQUIRE_HITL** | 觸發人工審核升級(Human-in-the-Loop)|
|
|
93
|
+
| 76–100 | **DENY** | 拒絕,記錄決策路徑與違規項目 |
|
|
94
|
+
|
|
95
|
+
---
|
|
96
|
+
|
|
97
|
+
### 支柱三:Fail-Closed(故障關閉原則)
|
|
98
|
+
|
|
99
|
+
任何安全組件故障時,**預設行為必須是 DENY**,禁止 fail-open。
|
|
100
|
+
|
|
101
|
+
#### 故障情境對應
|
|
102
|
+
|
|
103
|
+
| 故障情境 | 必要回應 | 例外 |
|
|
104
|
+
|---------|---------|------|
|
|
105
|
+
| Policy Engine 不可達 | DENY ALL | 唯讀操作可由操作者明確設定例外 |
|
|
106
|
+
| SOBR 評分計算失敗 | REQUIRE_HITL(保守升級)| 無 |
|
|
107
|
+
| Signature 驗證失敗 | DENY ALL | 無 |
|
|
108
|
+
| 任何未知錯誤 | DENY | 無 |
|
|
109
|
+
|
|
110
|
+
#### 禁止的反模式
|
|
111
|
+
|
|
112
|
+
- **Fail-Open**:錯誤時預設 ALLOW(嚴重度:CRITICAL)
|
|
113
|
+
- **部分驗證繼續執行**:某層驗證失敗但仍繼續(嚴重度:HIGH)
|
|
114
|
+
- **靜默吞噬錯誤**:catch 錯誤但不改變決策(嚴重度:HIGH)
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
### 支柱四:Audit Chain(不可竄改審計軌跡)
|
|
119
|
+
|
|
120
|
+
所有安全決策必須記錄在**可驗證的不可竄改審計軌跡**中。
|
|
121
|
+
|
|
122
|
+
#### 每筆 Audit 紀錄必要欄位
|
|
123
|
+
|
|
124
|
+
| 欄位 | 型別 | 說明 |
|
|
125
|
+
|------|------|------|
|
|
126
|
+
| `request_id` | UUID v4 | 每次決策的唯一識別碼 |
|
|
127
|
+
| `decision` | enum | ALLOW / ALLOW_WITH_MONITORING / REQUIRE_HITL / DENY |
|
|
128
|
+
| `risk_score` | number (0-100) | SOBR 計算結果 |
|
|
129
|
+
| `timestamp` | ISO 8601 UTC | 毫秒精度時間戳 |
|
|
130
|
+
| `violations` | string[] | 違規政策列表(ALLOW 時為空陣列)|
|
|
131
|
+
| `signature` | base64 Ed25519 | 對核心欄位的非對稱簽章 |
|
|
132
|
+
| `prev_hash` | SHA-256 hex | 前一筆紀錄的 hash(構成 hash chain)|
|
|
133
|
+
|
|
134
|
+
#### Hash Chain 設計
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
Record[0]: prev_hash = "0000...0000" (genesis)
|
|
138
|
+
Record[1]: prev_hash = SHA-256(Record[0])
|
|
139
|
+
Record[2]: prev_hash = SHA-256(Record[1])
|
|
140
|
+
...
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
必須提供 `verify_chain()` 函式,可偵測任何中間紀錄的竄改。
|
|
144
|
+
|
|
145
|
+
#### 簽章規格
|
|
146
|
+
|
|
147
|
+
- **演算法**:Ed25519(非對稱加密)
|
|
148
|
+
- **簽署內容**:`{request_id}:{decision}:{risk_score}:{timestamp}`
|
|
149
|
+
- **禁止**:使用 HMAC(對稱)作為審計簽章
|
|
150
|
+
|
|
151
|
+
#### 儲存等級
|
|
152
|
+
|
|
153
|
+
| 等級 | 儲存媒介 | 適用環境 |
|
|
154
|
+
|------|---------|---------|
|
|
155
|
+
| Level 0(最低)| 本地 append-only file | 開發/測試 |
|
|
156
|
+
| Level 1(推薦)| WORM 儲存(S3 Object Lock / Azure Immutable Blob)| 正式環境 |
|
|
157
|
+
| Level 2(最高)| 不可變雲端 + Remote Attestation | 法規要求環境(SOC2, ISO 27001 認證)|
|
|
158
|
+
|
|
159
|
+
---
|
|
160
|
+
|
|
161
|
+
### 支柱五:HITL Escalation(人工審核升級)
|
|
162
|
+
|
|
163
|
+
Risk Score 落在 51–75(REQUIRE_HITL 區間)時,必須有明確的人工審核升級機制。
|
|
164
|
+
|
|
165
|
+
#### 兩種 HITL 模式
|
|
166
|
+
|
|
167
|
+
| 模式 | 行為 | 適用情境 |
|
|
168
|
+
|------|------|---------|
|
|
169
|
+
| **Non-Blocking** | 發送通知,執行繼續(加強監控)| 分數 51–62,低敏感操作 |
|
|
170
|
+
| **Blocking** | 暫停執行,等待人工確認 | 分數 63–75,高敏感環境 |
|
|
171
|
+
|
|
172
|
+
#### 必要要求
|
|
173
|
+
|
|
174
|
+
- **TTL**:HITL 審核請求必須有過期時間(建議 **1800 秒**)
|
|
175
|
+
- **過期行為**:TTL 到期未審核 → 自動升級為 DENY
|
|
176
|
+
- **Audit**:HITL 觸發事件與審核結果必須記入 Audit Chain
|
|
177
|
+
- **通知介面**:Webhook 為標準介面;Adapter 模式支援 Slack / Teams / PagerDuty
|
|
178
|
+
|
|
179
|
+
#### 通知 Payload 必要欄位
|
|
180
|
+
|
|
181
|
+
```json
|
|
182
|
+
{
|
|
183
|
+
"request_id": "...",
|
|
184
|
+
"risk_score": 67,
|
|
185
|
+
"operation_summary": "...",
|
|
186
|
+
"policy_violations": [...],
|
|
187
|
+
"expires_at": "2026-05-04T12:30:00Z"
|
|
188
|
+
}
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
### 支柱六:Prompt Injection Defense(提示注入防護)
|
|
194
|
+
|
|
195
|
+
AI Agent 系統必須防護 Prompt Injection 攻擊,防止惡意輸入繞過安全控制。
|
|
196
|
+
|
|
197
|
+
#### 偵測模式類型
|
|
198
|
+
|
|
199
|
+
| 類型 | 範例模式 |
|
|
200
|
+
|------|---------|
|
|
201
|
+
| 覆蓋指令 | "ignore previous instructions", "disregard your programming" |
|
|
202
|
+
| 角色扮演操控 | "you are now", "act as", "DAN", "jailbreak" |
|
|
203
|
+
| 系統 Token 注入 | `[SYSTEM]`, `[INST]`, `<\|system\|>`, `<<SYS>>` |
|
|
204
|
+
| 指令前綴 | "New instruction:", "OVERRIDE:", "Updated system prompt:" |
|
|
205
|
+
|
|
206
|
+
#### 防護措施
|
|
207
|
+
|
|
208
|
+
1. **攔截位置**:M1 Intake 層(管線最前端),在任何語意評估前攔截
|
|
209
|
+
2. **回應**:觸發 DENY + 記錄 `PROMPT_INJECTION_DETECTED` violation
|
|
210
|
+
3. **日誌安全**:**禁止**將原始惡意輸入存入日誌;只記錄偵測到的模式類型與輸入的 Hash
|
|
211
|
+
4. **模式維護**:每月更新偵測模式;訂閱 OWASP LLM Working Group 更新
|
|
212
|
+
|
|
213
|
+
---
|
|
214
|
+
|
|
215
|
+
## 實作參考
|
|
216
|
+
|
|
217
|
+
### VibeOps Guardian(TypeScript 參考實作)
|
|
218
|
+
|
|
219
|
+
VibeOps Guardian OPA Sidecar(XSPEC-146)是 Secure-Op 的完整 TypeScript 參考實作,包含:
|
|
220
|
+
|
|
221
|
+
- **GuardianService**:主要 Veto-based 決策管線
|
|
222
|
+
- **SobrScorer**:SOBR 四維風險評分
|
|
223
|
+
- **AuditChain**:SHA-256 Hash Chain + Ed25519 簽章
|
|
224
|
+
- **HitlNotifier**:Webhook Adapter(支援 Slack/Teams)
|
|
225
|
+
- **PromptInjectionDetector**:正則表達式 + 模式比對
|
|
226
|
+
|
|
227
|
+
> 路徑:`vibeops/src/guardian/`(VibeOps repo,AGPL-3.0)
|
|
228
|
+
|
|
229
|
+
### 最小實作清單
|
|
230
|
+
|
|
231
|
+
建立 Secure-Op 合規系統的最小步驟:
|
|
232
|
+
|
|
233
|
+
```
|
|
234
|
+
□ Step 1:建立 Policy Engine(OPA 或等效工具)並連接至 Agent 管線
|
|
235
|
+
□ Step 2:實作 SOBR 評分計算(4 維度 + 權重公式)
|
|
236
|
+
□ Step 3:設定決策閾值路由(ALLOW / MONITORING / HITL / DENY)
|
|
237
|
+
□ Step 4:建立 Audit Chain(append-only + hash + signature)
|
|
238
|
+
□ Step 5:實作 HITL 通知 + TTL 機制
|
|
239
|
+
□ Step 6:加入 Prompt Injection 偵測(M1 位置)
|
|
240
|
+
□ Step 7:在所有錯誤路徑確認 Fail-Closed 行為
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
---
|
|
244
|
+
|
|
245
|
+
## ISO / NIST / OWASP 對映
|
|
246
|
+
|
|
247
|
+
| 支柱 | 標準對映 |
|
|
248
|
+
|------|---------|
|
|
249
|
+
| Veto-Based Decision | ISO/IEC 27001:2022 A.8.24 |
|
|
250
|
+
| SOBR Risk Scoring | ISO/IEC 27001:2022 Annex A.8.24;ISO/IEC 27005 |
|
|
251
|
+
| Fail-Closed | NIST SP 800-207 Zero Trust Architecture(2.1節);ISO/IEC 27001:2022 A.8.22 |
|
|
252
|
+
| Audit Chain | ISO/IEC 27001:2022 A.8.15(Logging);ISO/IEC 27001:2022 A.5.33(Protection of records)|
|
|
253
|
+
| HITL Escalation | ISO/IEC 27001:2022 A.8.2;NIST SP 800-53 AC-2 |
|
|
254
|
+
| Prompt Injection Defense | OWASP LLM Top 10 2025 LLM01;ISO/IEC 27001:2022 A.8.24 |
|
|
255
|
+
|
|
256
|
+
---
|
|
257
|
+
|
|
258
|
+
## 等級分類
|
|
259
|
+
|
|
260
|
+
Secure-Op 標準分為三個實作等級(Priority Levels):
|
|
261
|
+
|
|
262
|
+
### P0a:審查層(必須)
|
|
263
|
+
|
|
264
|
+
最低基準要求,所有 AI Agent 系統必須實作:
|
|
265
|
+
|
|
266
|
+
- Policy Engine 連接並設定 Fail-Closed
|
|
267
|
+
- SOBR 風險評分(任何操作請求觸發)
|
|
268
|
+
- Prompt Injection 偵測(M1 位置)
|
|
269
|
+
|
|
270
|
+
### P0b:執行驗證層(必須)
|
|
271
|
+
|
|
272
|
+
在 P0a 基礎上,強化執行時的決策保障:
|
|
273
|
+
|
|
274
|
+
- 完整決策路由(ALLOW / MONITORING / HITL / DENY)
|
|
275
|
+
- HITL 升級機制(含 TTL)
|
|
276
|
+
- 所有決策記入 Audit Log
|
|
277
|
+
|
|
278
|
+
### P0c:強化層(高安全需求環境)
|
|
279
|
+
|
|
280
|
+
在 P0b 基礎上,達到法規合規等級:
|
|
281
|
+
|
|
282
|
+
- Hash Chain + Ed25519 簽章的 Audit Chain
|
|
283
|
+
- WORM 儲存(Level 1 或 Level 2)
|
|
284
|
+
- Remote Attestation 支援
|
|
285
|
+
- 定期 Audit Chain 完整性驗證
|
|
286
|
+
|
|
287
|
+
---
|
|
288
|
+
|
|
289
|
+
## 快速開始建議
|
|
290
|
+
|
|
291
|
+
### 對於小型 AI Agent 系統(MVP / Prototype)
|
|
292
|
+
|
|
293
|
+
從 SOBR 評分 + 基本 DENY 閾值開始:
|
|
294
|
+
|
|
295
|
+
1. 為每個操作類型定義 S / O / B / R 值
|
|
296
|
+
2. 計算 RiskScore;≥76 直接拒絕
|
|
297
|
+
3. 記錄決策到 append-only log
|
|
298
|
+
|
|
299
|
+
### 對於生產環境 AI Agent 系統
|
|
300
|
+
|
|
301
|
+
完整實作六大支柱,使用 VibeOps Guardian 作為參考或直接引用。
|
|
302
|
+
|
|
303
|
+
### 對於法規要求環境(金融、醫療、政府)
|
|
304
|
+
|
|
305
|
+
P0c 等級 + 外部稽核師可存取的 Audit Chain 匯出功能。
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## 相關標準
|
|
310
|
+
|
|
311
|
+
- `security-standards`:架構層安全設計(輸入驗證、認證設計)
|
|
312
|
+
- `security-testing`:安全測試方法論(SAST、DAST、依賴審計)
|
|
313
|
+
- `audit-trail`:一般 Audit Trail 標準
|
|
314
|
+
- `mock-boundary`:測試中禁止 mock 安全控制
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# Security Testing Standards
|
|
2
|
+
|
|
3
|
+
**Version**: 1.0.0
|
|
4
|
+
**Last Updated**: 2026-05-04
|
|
5
|
+
**Applicability**: All software projects
|
|
6
|
+
**Scope**: universal
|
|
7
|
+
**Industry Standards**: OWASP Testing Guide v4, NIST SP 800-115, ISO/IEC 27001
|
|
8
|
+
**References**: OWASP Top 10, CWE/SANS Top 25
|
|
9
|
+
|
|
10
|
+
[English](.) | [繁體中文](../locales/zh-TW/core/security-testing.md)
|
|
11
|
+
|
|
12
|
+
---
|
|
13
|
+
|
|
14
|
+
## Purpose
|
|
15
|
+
|
|
16
|
+
This document defines the security testing methodology for software projects. It complements `security-standards.md` (architecture-level security design) with execution-level guidance: which tools to run, when to run them, and how to respond to findings.
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Four Security Testing Layers
|
|
21
|
+
|
|
22
|
+
### 1. SAST — Static Analysis
|
|
23
|
+
|
|
24
|
+
Analyze source code without executing it. Runs in pre-commit and CI.
|
|
25
|
+
|
|
26
|
+
| Language | Tool | Detects |
|
|
27
|
+
|----------|------|---------|
|
|
28
|
+
| TypeScript/JS | eslint-plugin-security | eval injection, regex DoS, path traversal |
|
|
29
|
+
| Python | bandit | SQL injection, hardcoded credentials |
|
|
30
|
+
| Java | SpotBugs + FindSecBugs | SQL injection, XSS |
|
|
31
|
+
|
|
32
|
+
**Gate**: High/Critical → block merge
|
|
33
|
+
|
|
34
|
+
### 2. Dependency Auditing
|
|
35
|
+
|
|
36
|
+
Scan third-party packages for known CVEs. Runs on pre-push and weekly.
|
|
37
|
+
|
|
38
|
+
| Ecosystem | Tool | Command |
|
|
39
|
+
|-----------|------|---------|
|
|
40
|
+
| Node.js | npm audit | `npm audit --audit-level=high` |
|
|
41
|
+
| Python | pip-audit | `pip-audit` |
|
|
42
|
+
|
|
43
|
+
**Gate**: High/Critical CVE → block release (document exceptions with expiry date)
|
|
44
|
+
|
|
45
|
+
### 3. Secret Scanning
|
|
46
|
+
|
|
47
|
+
Detect accidentally committed secrets. Runs on every commit.
|
|
48
|
+
|
|
49
|
+
Tools: gitleaks, truffleHog
|
|
50
|
+
|
|
51
|
+
**Gate**: Any detected secret → block commit immediately
|
|
52
|
+
|
|
53
|
+
### 4. DAST — Dynamic Analysis
|
|
54
|
+
|
|
55
|
+
Test the running application via HTTP. Runs post-staging-deployment.
|
|
56
|
+
|
|
57
|
+
Tools: OWASP ZAP, Nuclei
|
|
58
|
+
|
|
59
|
+
**Gate**: High/Critical finding → block production promotion
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## CVE Response Policy
|
|
64
|
+
|
|
65
|
+
| Severity | Response |
|
|
66
|
+
|----------|----------|
|
|
67
|
+
| Critical | Patch within 24h; block all deploys |
|
|
68
|
+
| High | Resolve before next release |
|
|
69
|
+
| Moderate | Resolve within 14 days |
|
|
70
|
+
| Low | Track; resolve in maintenance window |
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Anti-Patterns
|
|
75
|
+
|
|
76
|
+
- Treating all CVEs as equal urgency
|
|
77
|
+
- Running DAST against production (use staging)
|
|
78
|
+
- Ignoring `npm audit` indefinitely
|
|
79
|
+
- Mocking auth middleware in tests (see mock-boundary.md)
|
|
80
|
+
|
|
81
|
+
---
|
|
82
|
+
|
|
83
|
+
## Relationship to Other Standards
|
|
84
|
+
|
|
85
|
+
- `security-standards`: Architecture-level controls (input validation, auth design)
|
|
86
|
+
- `mock-boundary`: Never mock security controls in tests
|
|
87
|
+
- `deployment-standards`: DAST runs as part of deployment pipeline
|