smart-spec-kit-mcp 2.1.2 → 2.1.4
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 +9 -2
- package/dist/cli.js +8 -2
- package/dist/cli.js.map +1 -1
- package/dist/tools/promptTools.d.ts.map +1 -1
- package/dist/tools/promptTools.js +203 -1
- package/dist/tools/promptTools.js.map +1 -1
- package/dist/utils/starterKitInstaller.d.ts.map +1 -1
- package/dist/utils/starterKitInstaller.js +49 -6
- package/dist/utils/starterKitInstaller.js.map +1 -1
- package/docs/DOCUMENTATION.md +141 -0
- package/package.json +1 -1
- package/starter-kit/copilot-instructions.md +17 -0
- package/starter-kit/prompts/implement.md +42 -1
- package/starter-kit/prompts/validate.md +89 -0
- package/starter-kit/rules/rgpd-rules.md +187 -0
- package/starter-kit/rules/security-rules.md +138 -0
- package/starter-kit/workflows/bugfix.yaml +99 -0
- package/starter-kit/workflows/feature-full.yaml +344 -0
- package/starter-kit/workflows/feature-quick.yaml +69 -0
- package/starter-kit/workflows/feature-standard.yaml +92 -0
- package/workflows/feature-quick.yaml +69 -0
package/docs/DOCUMENTATION.md
CHANGED
|
@@ -238,6 +238,89 @@ speckit: memory ajouter une décision technique
|
|
|
238
238
|
2. Structures content with dates and context
|
|
239
239
|
3. Auto mode analyzes conversation to extract insights
|
|
240
240
|
|
|
241
|
+
### speckit_validate
|
|
242
|
+
|
|
243
|
+
**Purpose**: Validate compliance against customizable rules (security, RGPD, architecture, etc.).
|
|
244
|
+
|
|
245
|
+
**Triggers**: `speckit: validate`, `valider`, `vérifier`
|
|
246
|
+
|
|
247
|
+
**Parameters** (all optional):
|
|
248
|
+
|
|
249
|
+
- `ruleType`: Type of validation to perform
|
|
250
|
+
- `security` - Validate against security rules (OWASP, encryption, auth...)
|
|
251
|
+
- `rgpd` - Validate GDPR compliance
|
|
252
|
+
- Custom rule file name (e.g., `architecture-rules`)
|
|
253
|
+
- `phase`: Phase being validated
|
|
254
|
+
- `spec` - Validating a specification
|
|
255
|
+
- `plan` - Validating a plan
|
|
256
|
+
- `implementation` - Validating code
|
|
257
|
+
- `targetPath`: Path to the file/folder to validate
|
|
258
|
+
|
|
259
|
+
**Examples**:
|
|
260
|
+
|
|
261
|
+
```text
|
|
262
|
+
speckit: validate security
|
|
263
|
+
speckit: validate rgpd phase=spec
|
|
264
|
+
speckit: valider la sécurité du code
|
|
265
|
+
speckit: vérifier conformité RGPD
|
|
266
|
+
speckit: validate architecture-rules
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
**Behavior**:
|
|
270
|
+
|
|
271
|
+
1. Loads rules from `.spec-kit/rules/{ruleType}-rules.md`
|
|
272
|
+
2. Loads validation prompt from `.spec-kit/prompts/validate.md`
|
|
273
|
+
3. Analyzes target against each rule
|
|
274
|
+
4. Generates validation report with checklist
|
|
275
|
+
5. Output saved to `specs/validations/{ruleType}-validation-{date}.md`
|
|
276
|
+
|
|
277
|
+
**Available Rules** (default):
|
|
278
|
+
|
|
279
|
+
| Rule Type | File | Description |
|
|
280
|
+
|-----------|------|-------------|
|
|
281
|
+
| `security` | `security-rules.md` | OWASP Top 10, authentication, encryption, API security |
|
|
282
|
+
| `rgpd` | `rgpd-rules.md` | GDPR Articles 6, 12-22, 28, 30, 32, 35 compliance |
|
|
283
|
+
|
|
284
|
+
**Creating Custom Rules**:
|
|
285
|
+
|
|
286
|
+
Create a new file in `.spec-kit/rules/`:
|
|
287
|
+
|
|
288
|
+
```markdown
|
|
289
|
+
# .spec-kit/rules/my-custom-rules.md
|
|
290
|
+
|
|
291
|
+
# My Custom Rules
|
|
292
|
+
|
|
293
|
+
## Category 1
|
|
294
|
+
|
|
295
|
+
- [ ] **RULE-001**: Rule description
|
|
296
|
+
- Details about the rule
|
|
297
|
+
- How to check compliance
|
|
298
|
+
|
|
299
|
+
- [ ] **RULE-002**: Another rule
|
|
300
|
+
- Details
|
|
301
|
+
```
|
|
302
|
+
|
|
303
|
+
Then use: `speckit: validate my-custom`
|
|
304
|
+
|
|
305
|
+
**Validation Report Format**:
|
|
306
|
+
|
|
307
|
+
```markdown
|
|
308
|
+
# Validation Report: Security
|
|
309
|
+
|
|
310
|
+
**Date**: 2024-01-15
|
|
311
|
+
**Phase**: implementation
|
|
312
|
+
**Target**: src/auth/
|
|
313
|
+
|
|
314
|
+
## Summary
|
|
315
|
+
- ✅ Compliant: 8
|
|
316
|
+
- ⚠️ Partial: 2
|
|
317
|
+
- ❌ Non-compliant: 1
|
|
318
|
+
- ➖ Not applicable: 1
|
|
319
|
+
|
|
320
|
+
## Detailed Results
|
|
321
|
+
...
|
|
322
|
+
```
|
|
323
|
+
|
|
241
324
|
---
|
|
242
325
|
|
|
243
326
|
## Customization Guide
|
|
@@ -405,6 +488,23 @@ npx smart-spec-kit-mcp setup --project . --force
|
|
|
405
488
|
|
|
406
489
|
## Workflow Reference
|
|
407
490
|
|
|
491
|
+
### feature-quick
|
|
492
|
+
|
|
493
|
+
Lightweight workflow for quick wins and simple features.
|
|
494
|
+
|
|
495
|
+
**Best for**: Small features, quick wins, simple changes
|
|
496
|
+
|
|
497
|
+
**Steps**:
|
|
498
|
+
|
|
499
|
+
1. Quick spec (minimal documentation)
|
|
500
|
+
2. Implement directly
|
|
501
|
+
3. Auto-update memory
|
|
502
|
+
|
|
503
|
+
**Example**:
|
|
504
|
+
```text
|
|
505
|
+
speckit: start_workflow workflow_name="feature-quick"
|
|
506
|
+
```
|
|
507
|
+
|
|
408
508
|
### feature-standard
|
|
409
509
|
|
|
410
510
|
Standard feature specification workflow.
|
|
@@ -448,6 +548,47 @@ Bug fix workflow.
|
|
|
448
548
|
|
|
449
549
|
---
|
|
450
550
|
|
|
551
|
+
## Auto-Memory Enrichment
|
|
552
|
+
|
|
553
|
+
After each feature or bugfix implementation, Spec-Kit **automatically** enriches project memory with relevant learnings.
|
|
554
|
+
|
|
555
|
+
### What Gets Captured
|
|
556
|
+
|
|
557
|
+
| Category | File | Content |
|
|
558
|
+
|----------|------|---------|
|
|
559
|
+
| **Decisions** | `decisions.md` | Architectural and technical decisions |
|
|
560
|
+
| **Conventions** | `conventions.md` | Coding patterns and standards |
|
|
561
|
+
| **Learnings** | `learnings.md` | Lessons learned, gotchas, insights |
|
|
562
|
+
|
|
563
|
+
### Memory Entry Format
|
|
564
|
+
|
|
565
|
+
```markdown
|
|
566
|
+
## {Type}: {Title}
|
|
567
|
+
**Date:** YYYY-MM-DD
|
|
568
|
+
**Context:** Which task/feature triggered this
|
|
569
|
+
**Description:** What was decided/learned
|
|
570
|
+
**Rationale:** Why - the reasoning behind it
|
|
571
|
+
```
|
|
572
|
+
|
|
573
|
+
### Example Entry
|
|
574
|
+
|
|
575
|
+
```markdown
|
|
576
|
+
## Decision: Use Repository Pattern for Data Access
|
|
577
|
+
**Date:** 2024-01-30
|
|
578
|
+
**Context:** Task #3 - Implement user authentication
|
|
579
|
+
**Description:** Created UserRepository interface with InMemory and SQL implementations
|
|
580
|
+
**Rationale:** Allows easy testing and future database changes without affecting business logic
|
|
581
|
+
```
|
|
582
|
+
|
|
583
|
+
### Benefits
|
|
584
|
+
|
|
585
|
+
- **Knowledge retention**: Project learnings are preserved
|
|
586
|
+
- **Onboarding**: New team members can learn from history
|
|
587
|
+
- **Consistency**: Decisions are documented and traceable
|
|
588
|
+
- **AI context**: Future Copilot sessions have richer context
|
|
589
|
+
|
|
590
|
+
---
|
|
591
|
+
|
|
451
592
|
## Best Practices
|
|
452
593
|
|
|
453
594
|
### Writing Good Requirements
|
package/package.json
CHANGED
|
@@ -13,6 +13,7 @@ When the user mentions **"speckit:"** followed by a command, or uses these keywo
|
|
|
13
13
|
| `speckit: tasks`, `générer les tâches`, `créer les tâches` | `speckit_tasks` | Generate task breakdown |
|
|
14
14
|
| `speckit: implement`, `implémenter`, `coder` | `speckit_implement` | Implement tasks |
|
|
15
15
|
| `speckit: clarify`, `clarifier`, `préciser` | `speckit_clarify` | Clarify requirements |
|
|
16
|
+
| `speckit: validate`, `valider`, `vérifier` | `speckit_validate` | Validate compliance (security, RGPD, etc.) |
|
|
16
17
|
| `speckit: memory`, `enrichir la mémoire`, `ajouter au contexte` | `speckit_memory` | Manage project memory |
|
|
17
18
|
| `speckit: help`, `aide sur speckit`, questions about spec-kit | `speckit_help` | Get help and documentation |
|
|
18
19
|
|
|
@@ -51,16 +52,22 @@ speckit_specify → speckit_plan → speckit_tasks → speckit_implement
|
|
|
51
52
|
│ ├── tasks.md
|
|
52
53
|
│ ├── implement.md
|
|
53
54
|
│ ├── clarify.md
|
|
55
|
+
│ ├── validate.md
|
|
54
56
|
│ └── memory.md
|
|
55
57
|
├── templates/ # Document templates
|
|
56
58
|
│ ├── functional-spec.md
|
|
57
59
|
│ ├── plan-template.md
|
|
58
60
|
│ └── tasks-template.md
|
|
61
|
+
├── rules/ # Validation rules
|
|
62
|
+
│ ├── security-rules.md
|
|
63
|
+
│ └── rgpd-rules.md
|
|
59
64
|
├── memory/ # Project context
|
|
60
65
|
│ └── constitution.md
|
|
61
66
|
└── workflows/ # Automated workflows
|
|
67
|
+
└── feature-quick.yaml # Quick wins (lightweight)
|
|
62
68
|
|
|
63
69
|
specs/ # Generated specifications (output)
|
|
70
|
+
└── validations/ # Validation reports
|
|
64
71
|
```
|
|
65
72
|
|
|
66
73
|
## Important Conventions
|
|
@@ -86,6 +93,7 @@ For multi-step automation, use `start_workflow`:
|
|
|
86
93
|
|
|
87
94
|
| User Says | Action |
|
|
88
95
|
|-----------|--------|
|
|
96
|
+
| `speckit: start_workflow workflow_name="feature-quick"` | Start quick feature workflow (lightweight) |
|
|
89
97
|
| `speckit: start_workflow workflow_name="feature-standard" PiP Support` | Start feature workflow for PiP Support |
|
|
90
98
|
| `speckit: start_workflow workflow_name="bugfix" auto=true` | Start bugfix workflow in AUTO mode |
|
|
91
99
|
|
|
@@ -111,6 +119,15 @@ For multi-step automation, use `start_workflow`:
|
|
|
111
119
|
**User**: "speckit: memory auto"
|
|
112
120
|
**Action**: Call `speckit_memory` with `action: "auto"` to auto-enrich from context
|
|
113
121
|
|
|
122
|
+
**User**: "speckit: validate security"
|
|
123
|
+
**Action**: Call `speckit_validate` with `ruleType: "security"`
|
|
124
|
+
|
|
125
|
+
**User**: "speckit: valider la conformité RGPD de la spec"
|
|
126
|
+
**Action**: Call `speckit_validate` with `ruleType: "rgpd"`, `phase: "spec"`
|
|
127
|
+
|
|
128
|
+
**User**: "speckit: validate architecture-rules"
|
|
129
|
+
**Action**: Call `speckit_validate` with `ruleType: "architecture"` (uses custom rules file)
|
|
130
|
+
|
|
114
131
|
**User**: "speckit: start_workflow workflow_name="feature-standard" PiP Support auto=true"
|
|
115
132
|
**Action**: Call `start_workflow` with `workflow_name: "feature-standard"`, `context_id: "PiP Support"`, `auto: true`
|
|
116
133
|
|
|
@@ -71,7 +71,48 @@ Report:
|
|
|
71
71
|
- Any deviations from plan
|
|
72
72
|
- Next task to implement (if continuing)
|
|
73
73
|
|
|
74
|
-
## 8.
|
|
74
|
+
## 8. Auto-Enrich Memory
|
|
75
|
+
|
|
76
|
+
After each implementation, **automatically** save relevant learnings to `.spec-kit/memory/`:
|
|
77
|
+
|
|
78
|
+
### What to capture:
|
|
79
|
+
|
|
80
|
+
**Decisions** (save to `decisions.md`):
|
|
81
|
+
- Architectural choices made during implementation
|
|
82
|
+
- Technology/library selections
|
|
83
|
+
- Trade-offs considered
|
|
84
|
+
|
|
85
|
+
**Conventions** (save to `conventions.md`):
|
|
86
|
+
- New patterns established
|
|
87
|
+
- Code conventions discovered or enforced
|
|
88
|
+
- Best practices applied
|
|
89
|
+
|
|
90
|
+
**Learnings** (save to `learnings.md`):
|
|
91
|
+
- Problems encountered and solutions found
|
|
92
|
+
- Performance insights
|
|
93
|
+
- Gotchas or edge cases discovered
|
|
94
|
+
|
|
95
|
+
### Format for memory entries:
|
|
96
|
+
|
|
97
|
+
```markdown
|
|
98
|
+
## {Type}: {Title}
|
|
99
|
+
**Date:** {YYYY-MM-DD}
|
|
100
|
+
**Context:** {Brief context - which task/feature}
|
|
101
|
+
**Description:** {What was decided/learned}
|
|
102
|
+
**Rationale:** {Why - reasoning behind it}
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
### Example:
|
|
106
|
+
|
|
107
|
+
```markdown
|
|
108
|
+
## Decision: Use Repository Pattern for Data Access
|
|
109
|
+
**Date:** 2024-01-30
|
|
110
|
+
**Context:** Task #3 - Implement user authentication
|
|
111
|
+
**Description:** Created UserRepository interface with InMemory and SQL implementations
|
|
112
|
+
**Rationale:** Allows easy testing and future database changes without affecting business logic
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
## 9. Iteration
|
|
75
116
|
|
|
76
117
|
Ask the user:
|
|
77
118
|
- "Task {ID} completed. Continue with {next task}? (yes/no)"
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# Validation Prompt
|
|
2
|
+
|
|
3
|
+
## Purpose
|
|
4
|
+
|
|
5
|
+
Execute validation checks against customizable rules after specific workflow phases.
|
|
6
|
+
|
|
7
|
+
## Validation Types
|
|
8
|
+
|
|
9
|
+
Spec-Kit supports multiple validation types:
|
|
10
|
+
|
|
11
|
+
1. **Security Validation** - Check security rules compliance
|
|
12
|
+
2. **RGPD Validation** - Check GDPR/RGPD compliance
|
|
13
|
+
3. **Architecture Validation** - Check architecture principles
|
|
14
|
+
4. **Custom Validation** - Check custom project rules
|
|
15
|
+
|
|
16
|
+
## Process
|
|
17
|
+
|
|
18
|
+
### 1. Load Rules
|
|
19
|
+
|
|
20
|
+
Load the appropriate rules file from `.spec-kit/rules/`:
|
|
21
|
+
- `security-rules.md` for security validation
|
|
22
|
+
- `rgpd-rules.md` for RGPD/GDPR validation
|
|
23
|
+
- Custom files as defined by user
|
|
24
|
+
|
|
25
|
+
### 2. Load Target Document
|
|
26
|
+
|
|
27
|
+
Load the document to validate:
|
|
28
|
+
- For **spec** phase: Load from `specs/*-spec.md`
|
|
29
|
+
- For **plan** phase: Load from `specs/plan.md`
|
|
30
|
+
- For **implementation** phase: Analyze recent code changes
|
|
31
|
+
|
|
32
|
+
### 3. Evaluate Each Rule
|
|
33
|
+
|
|
34
|
+
For each rule in the rules file:
|
|
35
|
+
|
|
36
|
+
1. Determine if the rule is applicable to this feature
|
|
37
|
+
2. Check if the requirement is addressed
|
|
38
|
+
3. Mark status: ✅ Compliant | ⚠️ Partial | ❌ Non-Compliant | ➖ N/A
|
|
39
|
+
4. Document evidence or gaps
|
|
40
|
+
|
|
41
|
+
### 4. Generate Report
|
|
42
|
+
|
|
43
|
+
Create a validation report with:
|
|
44
|
+
- Summary statistics
|
|
45
|
+
- Critical issues (blocking)
|
|
46
|
+
- Warnings (should fix)
|
|
47
|
+
- Recommendations (nice to have)
|
|
48
|
+
|
|
49
|
+
## Validation Triggers
|
|
50
|
+
|
|
51
|
+
Validations can be triggered:
|
|
52
|
+
|
|
53
|
+
- **Manually**: `speckit: validate security` or `speckit: validate rgpd`
|
|
54
|
+
- **In Workflow**: As a step in feature-full or custom workflows
|
|
55
|
+
- **After Phase**: Automatically after spec or implementation
|
|
56
|
+
|
|
57
|
+
## Output
|
|
58
|
+
|
|
59
|
+
Save validation reports to:
|
|
60
|
+
- `specs/validations/{type}-{date}.md`
|
|
61
|
+
|
|
62
|
+
## Instructions for Copilot
|
|
63
|
+
|
|
64
|
+
When performing validation:
|
|
65
|
+
|
|
66
|
+
1. **Be Thorough**: Check every applicable rule
|
|
67
|
+
2. **Be Specific**: Cite specific sections or code that address rules
|
|
68
|
+
3. **Be Constructive**: Provide actionable recommendations
|
|
69
|
+
4. **Be Honest**: Mark non-compliant if not addressed, don't assume
|
|
70
|
+
|
|
71
|
+
## Custom Rules
|
|
72
|
+
|
|
73
|
+
Users can create custom rules files in `.spec-kit/rules/`:
|
|
74
|
+
|
|
75
|
+
```markdown
|
|
76
|
+
# My Custom Rules
|
|
77
|
+
|
|
78
|
+
## Category Name
|
|
79
|
+
|
|
80
|
+
### RULE-001: Rule Title
|
|
81
|
+
- [ ] Checklist item 1
|
|
82
|
+
- [ ] Checklist item 2
|
|
83
|
+
|
|
84
|
+
### RULE-002: Another Rule
|
|
85
|
+
- [ ] Check this
|
|
86
|
+
- [ ] Check that
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Then trigger with: `speckit: validate my-custom-rules`
|
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
# RGPD/GDPR Validation Rules
|
|
2
|
+
|
|
3
|
+
These rules are used by Spec-Kit to validate GDPR compliance after specification or implementation phases.
|
|
4
|
+
|
|
5
|
+
> **Customization**: Edit this file to match your organization's data protection policies and local regulations.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Data Identification
|
|
10
|
+
|
|
11
|
+
### RGPD-001: Personal Data Inventory
|
|
12
|
+
- [ ] All personal data collected is identified and documented
|
|
13
|
+
- [ ] Data categories are classified (standard, sensitive, special)
|
|
14
|
+
- [ ] Data sources are documented (user input, API, third-party)
|
|
15
|
+
|
|
16
|
+
### RGPD-002: Data Mapping
|
|
17
|
+
- [ ] Data flow is documented (collection → processing → storage → deletion)
|
|
18
|
+
- [ ] All data processors are identified
|
|
19
|
+
- [ ] Cross-border transfers documented (if applicable)
|
|
20
|
+
|
|
21
|
+
---
|
|
22
|
+
|
|
23
|
+
## Legal Basis (Article 6)
|
|
24
|
+
|
|
25
|
+
### RGPD-010: Lawful Processing
|
|
26
|
+
- [ ] Legal basis for each processing activity is documented
|
|
27
|
+
- [ ] Consent (freely given, specific, informed, unambiguous)
|
|
28
|
+
- [ ] Contract execution
|
|
29
|
+
- [ ] Legal obligation
|
|
30
|
+
- [ ] Vital interests
|
|
31
|
+
- [ ] Public interest
|
|
32
|
+
- [ ] Legitimate interests (with balancing test)
|
|
33
|
+
|
|
34
|
+
### RGPD-011: Consent Management
|
|
35
|
+
- [ ] Consent is obtained before processing (if consent-based)
|
|
36
|
+
- [ ] Consent can be withdrawn as easily as given
|
|
37
|
+
- [ ] Consent records are maintained
|
|
38
|
+
- [ ] Age verification for minors (< 16 years)
|
|
39
|
+
|
|
40
|
+
---
|
|
41
|
+
|
|
42
|
+
## Data Subject Rights (Articles 12-22)
|
|
43
|
+
|
|
44
|
+
### RGPD-020: Right to Information (Art. 13-14)
|
|
45
|
+
- [ ] Privacy notice provided at data collection
|
|
46
|
+
- [ ] Purpose of processing clearly stated
|
|
47
|
+
- [ ] Data retention period communicated
|
|
48
|
+
- [ ] Third-party sharing disclosed
|
|
49
|
+
|
|
50
|
+
### RGPD-021: Right of Access (Art. 15)
|
|
51
|
+
- [ ] Users can request copy of their data
|
|
52
|
+
- [ ] Response within 30 days
|
|
53
|
+
- [ ] Data provided in machine-readable format
|
|
54
|
+
|
|
55
|
+
### RGPD-022: Right to Rectification (Art. 16)
|
|
56
|
+
- [ ] Users can correct inaccurate data
|
|
57
|
+
- [ ] Users can complete incomplete data
|
|
58
|
+
- [ ] Updates propagated to third parties
|
|
59
|
+
|
|
60
|
+
### RGPD-023: Right to Erasure / RTBF (Art. 17)
|
|
61
|
+
- [ ] Users can request data deletion
|
|
62
|
+
- [ ] Deletion includes backups (within reasonable time)
|
|
63
|
+
- [ ] Third parties notified of erasure requests
|
|
64
|
+
- [ ] Exceptions documented (legal retention, public interest)
|
|
65
|
+
|
|
66
|
+
### RGPD-024: Right to Data Portability (Art. 20)
|
|
67
|
+
- [ ] Data exportable in structured format (JSON, CSV)
|
|
68
|
+
- [ ] Direct transfer to another controller (if feasible)
|
|
69
|
+
|
|
70
|
+
### RGPD-025: Right to Object (Art. 21)
|
|
71
|
+
- [ ] Users can object to processing
|
|
72
|
+
- [ ] Objection mechanism easily accessible
|
|
73
|
+
- [ ] Processing stops unless compelling grounds exist
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## Data Protection Principles
|
|
78
|
+
|
|
79
|
+
### RGPD-030: Data Minimization
|
|
80
|
+
- [ ] Only necessary data collected
|
|
81
|
+
- [ ] No "nice to have" data collection
|
|
82
|
+
- [ ] Optional fields clearly marked
|
|
83
|
+
|
|
84
|
+
### RGPD-031: Purpose Limitation
|
|
85
|
+
- [ ] Data used only for stated purposes
|
|
86
|
+
- [ ] New purposes require new consent/basis
|
|
87
|
+
- [ ] No data repurposing without user knowledge
|
|
88
|
+
|
|
89
|
+
### RGPD-032: Storage Limitation
|
|
90
|
+
- [ ] Retention periods defined for each data type
|
|
91
|
+
- [ ] Automatic deletion after retention period
|
|
92
|
+
- [ ] Archival vs. active data distinguished
|
|
93
|
+
|
|
94
|
+
### RGPD-033: Accuracy
|
|
95
|
+
- [ ] Data kept up-to-date
|
|
96
|
+
- [ ] Users can update their data
|
|
97
|
+
- [ ] Inaccurate data corrected promptly
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Security Measures (Article 32)
|
|
102
|
+
|
|
103
|
+
### RGPD-040: Technical Measures
|
|
104
|
+
- [ ] Encryption at rest and in transit
|
|
105
|
+
- [ ] Pseudonymization where possible
|
|
106
|
+
- [ ] Access controls implemented
|
|
107
|
+
- [ ] Regular security testing
|
|
108
|
+
|
|
109
|
+
### RGPD-041: Organizational Measures
|
|
110
|
+
- [ ] Staff trained on data protection
|
|
111
|
+
- [ ] Data protection policies documented
|
|
112
|
+
- [ ] Incident response procedures in place
|
|
113
|
+
|
|
114
|
+
---
|
|
115
|
+
|
|
116
|
+
## Third Parties & Processors
|
|
117
|
+
|
|
118
|
+
### RGPD-050: Processor Agreements (Art. 28)
|
|
119
|
+
- [ ] DPA (Data Processing Agreement) with all processors
|
|
120
|
+
- [ ] Processor security measures verified
|
|
121
|
+
- [ ] Sub-processors documented and approved
|
|
122
|
+
|
|
123
|
+
### RGPD-051: International Transfers
|
|
124
|
+
- [ ] Adequacy decision exists (for destination country)
|
|
125
|
+
- [ ] Standard Contractual Clauses (SCCs) in place
|
|
126
|
+
- [ ] Supplementary measures if required
|
|
127
|
+
|
|
128
|
+
---
|
|
129
|
+
|
|
130
|
+
## Documentation & Accountability
|
|
131
|
+
|
|
132
|
+
### RGPD-060: Records of Processing (Art. 30)
|
|
133
|
+
- [ ] Processing activities documented
|
|
134
|
+
- [ ] ROPA (Record of Processing Activities) maintained
|
|
135
|
+
- [ ] Available for supervisory authority
|
|
136
|
+
|
|
137
|
+
### RGPD-061: DPIA (Art. 35)
|
|
138
|
+
- [ ] DPIA required? (high-risk processing)
|
|
139
|
+
- [ ] DPIA completed if required
|
|
140
|
+
- [ ] Residual risks documented and accepted
|
|
141
|
+
|
|
142
|
+
---
|
|
143
|
+
|
|
144
|
+
## Validation Instructions
|
|
145
|
+
|
|
146
|
+
When validating against these rules:
|
|
147
|
+
|
|
148
|
+
1. **For Specifications**: Verify that data protection requirements are documented and RGPD compliance is designed-in
|
|
149
|
+
2. **For Implementation**: Verify that code implements data protection measures and user rights mechanisms
|
|
150
|
+
3. **Mark Status**:
|
|
151
|
+
- ✅ **Compliant**: Rule is fully addressed
|
|
152
|
+
- ⚠️ **Partial**: Rule is partially addressed, needs improvement
|
|
153
|
+
- ❌ **Non-Compliant**: Rule is not addressed, blocking issue
|
|
154
|
+
- ➖ **N/A**: Rule does not apply to this feature
|
|
155
|
+
|
|
156
|
+
## Report Format
|
|
157
|
+
|
|
158
|
+
```markdown
|
|
159
|
+
## RGPD Compliance Report
|
|
160
|
+
|
|
161
|
+
**Feature**: {feature_name}
|
|
162
|
+
**Date**: {date}
|
|
163
|
+
**Phase**: {spec|implementation}
|
|
164
|
+
**DPO Review Required**: {yes|no}
|
|
165
|
+
|
|
166
|
+
### Data Inventory
|
|
167
|
+
| Data Type | Category | Legal Basis | Retention | Processors |
|
|
168
|
+
|-----------|----------|-------------|-----------|------------|
|
|
169
|
+
| email | Personal | Consent | 2 years | SendGrid |
|
|
170
|
+
|
|
171
|
+
### Summary
|
|
172
|
+
- Compliant: X rules
|
|
173
|
+
- Partial: X rules
|
|
174
|
+
- Non-Compliant: X rules
|
|
175
|
+
- N/A: X rules
|
|
176
|
+
|
|
177
|
+
### Findings
|
|
178
|
+
|
|
179
|
+
#### Critical Issues (Blocking)
|
|
180
|
+
{list blocking compliance issues}
|
|
181
|
+
|
|
182
|
+
#### Warnings
|
|
183
|
+
{list partial compliance items}
|
|
184
|
+
|
|
185
|
+
#### Recommendations
|
|
186
|
+
{list improvements for future}
|
|
187
|
+
```
|
|
@@ -0,0 +1,138 @@
|
|
|
1
|
+
# Security Validation Rules
|
|
2
|
+
|
|
3
|
+
These rules are used by Spec-Kit to validate security compliance after specification or implementation phases.
|
|
4
|
+
|
|
5
|
+
> **Customization**: Edit this file to match your organization's security policies.
|
|
6
|
+
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
## Authentication & Authorization
|
|
10
|
+
|
|
11
|
+
### AUTH-001: Authentication Required
|
|
12
|
+
- [ ] All endpoints accessing sensitive data require authentication
|
|
13
|
+
- [ ] Authentication mechanism is industry-standard (OAuth2, OIDC, SAML)
|
|
14
|
+
- [ ] No credentials stored in plain text
|
|
15
|
+
|
|
16
|
+
### AUTH-002: Authorization Controls
|
|
17
|
+
- [ ] Role-based access control (RBAC) implemented
|
|
18
|
+
- [ ] Principle of least privilege applied
|
|
19
|
+
- [ ] Authorization checked on every request (not just UI)
|
|
20
|
+
|
|
21
|
+
### AUTH-003: Session Management
|
|
22
|
+
- [ ] Session tokens are cryptographically secure
|
|
23
|
+
- [ ] Session timeout implemented
|
|
24
|
+
- [ ] Session invalidation on logout
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Data Protection
|
|
29
|
+
|
|
30
|
+
### DATA-001: Data at Rest
|
|
31
|
+
- [ ] Sensitive data encrypted at rest (AES-256 or equivalent)
|
|
32
|
+
- [ ] Encryption keys managed securely (HSM, Key Vault)
|
|
33
|
+
- [ ] Database credentials not hardcoded
|
|
34
|
+
|
|
35
|
+
### DATA-002: Data in Transit
|
|
36
|
+
- [ ] TLS 1.2+ required for all communications
|
|
37
|
+
- [ ] Certificate validation enabled
|
|
38
|
+
- [ ] No sensitive data in URLs
|
|
39
|
+
|
|
40
|
+
### DATA-003: Data Sanitization
|
|
41
|
+
- [ ] Input validation on all user inputs
|
|
42
|
+
- [ ] Output encoding to prevent XSS
|
|
43
|
+
- [ ] Parameterized queries to prevent SQL injection
|
|
44
|
+
|
|
45
|
+
---
|
|
46
|
+
|
|
47
|
+
## API Security
|
|
48
|
+
|
|
49
|
+
### API-001: Input Validation
|
|
50
|
+
- [ ] All inputs validated (type, length, format, range)
|
|
51
|
+
- [ ] Request size limits enforced
|
|
52
|
+
- [ ] File upload restrictions (type, size)
|
|
53
|
+
|
|
54
|
+
### API-002: Rate Limiting
|
|
55
|
+
- [ ] Rate limiting implemented on all endpoints
|
|
56
|
+
- [ ] Brute force protection on authentication
|
|
57
|
+
- [ ] DDoS mitigation considered
|
|
58
|
+
|
|
59
|
+
### API-003: Error Handling
|
|
60
|
+
- [ ] No stack traces exposed to users
|
|
61
|
+
- [ ] Generic error messages for security failures
|
|
62
|
+
- [ ] Detailed errors logged server-side only
|
|
63
|
+
|
|
64
|
+
---
|
|
65
|
+
|
|
66
|
+
## Infrastructure
|
|
67
|
+
|
|
68
|
+
### INFRA-001: Secrets Management
|
|
69
|
+
- [ ] Secrets stored in secure vault (Azure Key Vault, AWS Secrets Manager)
|
|
70
|
+
- [ ] No secrets in source code or config files
|
|
71
|
+
- [ ] Secrets rotated regularly
|
|
72
|
+
|
|
73
|
+
### INFRA-002: Logging & Monitoring
|
|
74
|
+
- [ ] Security events logged (auth failures, access denied)
|
|
75
|
+
- [ ] No sensitive data in logs
|
|
76
|
+
- [ ] Logs protected from tampering
|
|
77
|
+
|
|
78
|
+
### INFRA-003: Dependencies
|
|
79
|
+
- [ ] Dependencies scanned for vulnerabilities
|
|
80
|
+
- [ ] Regular security updates applied
|
|
81
|
+
- [ ] No known vulnerable dependencies
|
|
82
|
+
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
## Compliance Checks
|
|
86
|
+
|
|
87
|
+
### COMP-001: OWASP Top 10
|
|
88
|
+
- [ ] Injection vulnerabilities addressed
|
|
89
|
+
- [ ] Broken authentication prevented
|
|
90
|
+
- [ ] Sensitive data exposure mitigated
|
|
91
|
+
- [ ] XXE attacks prevented
|
|
92
|
+
- [ ] Broken access control fixed
|
|
93
|
+
- [ ] Security misconfiguration avoided
|
|
94
|
+
- [ ] XSS vulnerabilities prevented
|
|
95
|
+
- [ ] Insecure deserialization handled
|
|
96
|
+
- [ ] Components with known vulnerabilities updated
|
|
97
|
+
- [ ] Insufficient logging addressed
|
|
98
|
+
|
|
99
|
+
---
|
|
100
|
+
|
|
101
|
+
## Validation Instructions
|
|
102
|
+
|
|
103
|
+
When validating against these rules:
|
|
104
|
+
|
|
105
|
+
1. **For Specifications**: Verify that security requirements are documented and address each applicable rule
|
|
106
|
+
2. **For Implementation**: Verify that code implements the security controls described in the specification
|
|
107
|
+
3. **Mark Status**:
|
|
108
|
+
- ✅ **Compliant**: Rule is fully addressed
|
|
109
|
+
- ⚠️ **Partial**: Rule is partially addressed, needs improvement
|
|
110
|
+
- ❌ **Non-Compliant**: Rule is not addressed, blocking issue
|
|
111
|
+
- ➖ **N/A**: Rule does not apply to this feature
|
|
112
|
+
|
|
113
|
+
## Report Format
|
|
114
|
+
|
|
115
|
+
```markdown
|
|
116
|
+
## Security Validation Report
|
|
117
|
+
|
|
118
|
+
**Feature**: {feature_name}
|
|
119
|
+
**Date**: {date}
|
|
120
|
+
**Phase**: {spec|implementation}
|
|
121
|
+
|
|
122
|
+
### Summary
|
|
123
|
+
- Compliant: X rules
|
|
124
|
+
- Partial: X rules
|
|
125
|
+
- Non-Compliant: X rules
|
|
126
|
+
- N/A: X rules
|
|
127
|
+
|
|
128
|
+
### Findings
|
|
129
|
+
|
|
130
|
+
#### Critical Issues
|
|
131
|
+
{list critical non-compliant items}
|
|
132
|
+
|
|
133
|
+
#### Warnings
|
|
134
|
+
{list partial compliance items}
|
|
135
|
+
|
|
136
|
+
#### Recommendations
|
|
137
|
+
{list improvements}
|
|
138
|
+
```
|