@securityreviewai/securityreview-kit 0.1.44 → 0.1.45
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/package.json
CHANGED
|
@@ -39,6 +39,8 @@ test('Claude generator writes .claude/CLAUDE.md, threat skill, and profiling com
|
|
|
39
39
|
assert.match(vibereviewSkill, /Do not read other/i);
|
|
40
40
|
assert.match(vibereviewSkill, /sync_ai_ide_markdown/);
|
|
41
41
|
assert.match(vibereviewSkill, /Event Identity/);
|
|
42
|
+
assert.match(vibereviewSkill, /Practice 1/);
|
|
43
|
+
assert.match(vibereviewSkill, /practice_name:/);
|
|
42
44
|
});
|
|
43
45
|
|
|
44
46
|
test('Claude generator migrates the kit-managed root CLAUDE.md block into .claude/CLAUDE.md', () => {
|
|
@@ -46,6 +46,8 @@ test('Codex generator writes AGENTS, skills, hooks, and profiling command', () =
|
|
|
46
46
|
assert.match(vibereviewSkill, /sync_ai_ide_markdown/);
|
|
47
47
|
assert.match(vibereviewSkill, /Event Identity/);
|
|
48
48
|
assert.match(vibereviewSkill, /OWASP Top 10 2025 Mappings/);
|
|
49
|
+
assert.match(vibereviewSkill, /Practice 1/);
|
|
50
|
+
assert.match(vibereviewSkill, /practice_name:/);
|
|
49
51
|
|
|
50
52
|
const hooks = JSON.parse(readFileSync(join(cwd, '.codex/hooks.json'), 'utf8'));
|
|
51
53
|
assert.equal(hooks.hooks.SessionStart[0].hooks[0].type, 'command');
|
|
@@ -212,7 +212,7 @@ When discussing designs before code exists:
|
|
|
212
212
|
The main agent writes a structured `.md` artifact under `vibereview/` and uploads it through `sync_ai_ide_markdown`. That markdown should contain:
|
|
213
213
|
|
|
214
214
|
- **Threat model findings**: threats mitigated, PWNISMS categories, severities, mitigations applied
|
|
215
|
-
- **Best practices achieved**:
|
|
215
|
+
- **Best practices achieved**: structured practice entries with `practice_name`, `description`, and `category`
|
|
216
216
|
- **Secure code snippets**: security-relevant code with explanations
|
|
217
217
|
- **Guardrails applied**: all guardrails enforced during this session — both existing ones shortlisted earlier via `get_guardrails` + `get_guardrail_by_id` (`source: "existing"`) and new ones the IDE agent created on the fly (`source: "ide_generated"`), each with satisfaction status
|
|
218
218
|
- **Workflow metadata**: `chat_session_id`, `event_name` or `title`, required `summary`, and optional `workflow_name` / `workflow_description`
|
|
@@ -229,11 +229,12 @@ The main agent writes a structured `.md` artifact under `vibereview/` and upload
|
|
|
229
229
|
- `Guardrails Applied`
|
|
230
230
|
- `OWASP Top 10 2025 Mappings`
|
|
231
231
|
5. Validate that:
|
|
232
|
-
|
|
232
|
+
- every threat entry includes `threat_name`, `pwnisms_category`, `severity`, and `mitigation_applied`
|
|
233
|
+
- every best-practice entry includes `practice_name`, `description`, and `category`
|
|
233
234
|
- every guardrail includes `title`, `rule_type`, `source`, and `satisfied`
|
|
234
235
|
- OWASP mappings use exact IDs and names
|
|
235
236
|
- snippets are grounded in actual code, not invented text
|
|
236
|
-
|
|
237
|
+
- no sibling `.md` files in `vibereview/` were read just to infer format or content
|
|
237
238
|
6. Call `sync_ai_ide_markdown` directly with the finished markdown artifact.
|
|
238
239
|
7. If sync fails, leave the artifact in `vibereview/` and report the failure clearly.
|
|
239
240
|
|
|
@@ -197,17 +197,37 @@ if not chat_session_id:
|
|
|
197
197
|
|
|
198
198
|
## Best Practices Achieved Section
|
|
199
199
|
|
|
200
|
-
Use plain bullet
|
|
200
|
+
Use structured practice entries, not plain bullet-only lists.
|
|
201
201
|
|
|
202
|
-
|
|
202
|
+
````md
|
|
203
203
|
# Best Practices Achieved
|
|
204
204
|
|
|
205
|
-
|
|
206
|
-
-
|
|
207
|
-
-
|
|
208
|
-
|
|
205
|
+
## Practice 1
|
|
206
|
+
- practice_name: Stable workflow correlation
|
|
207
|
+
- description: Used a stable chat session identifier to ensure repeated syncs map to the same workflow.
|
|
208
|
+
- category: identity
|
|
209
|
+
|
|
210
|
+
## Practice 2
|
|
211
|
+
- practice_name: Server-side workflow orchestration
|
|
212
|
+
- description: Kept workflow and event creation on the server instead of relying on IDE-side orchestration.
|
|
213
|
+
- category: design
|
|
214
|
+
|
|
215
|
+
## Practice 3
|
|
216
|
+
- practice_name: Required field validation
|
|
217
|
+
- description: Validated required event identity fields before persisting security review data.
|
|
218
|
+
- category: validation
|
|
219
|
+
````
|
|
220
|
+
|
|
221
|
+
### Best practice rules
|
|
209
222
|
|
|
210
|
-
|
|
223
|
+
- Each entry should be introduced with a stable heading such as `## Practice 1`, `## Practice 2`, and so on.
|
|
224
|
+
- Each entry must include:
|
|
225
|
+
- `practice_name`
|
|
226
|
+
- `description`
|
|
227
|
+
- `category`
|
|
228
|
+
- Keep the values concise and grounded in the actual work completed.
|
|
229
|
+
- Do not turn this section into freeform paragraphs.
|
|
230
|
+
- Do not reduce this section to plain bullet statements without field names.
|
|
211
231
|
|
|
212
232
|
## Secure Code Snippets Section
|
|
213
233
|
|
|
@@ -43,6 +43,8 @@ test('VS Code Copilot generator writes instructions, skills, and hooks', () => {
|
|
|
43
43
|
assert.match(vibereviewSkill, /Do not read other/i);
|
|
44
44
|
assert.match(vibereviewSkill, /sync_ai_ide_markdown/);
|
|
45
45
|
assert.match(vibereviewSkill, /Guardrails Applied/);
|
|
46
|
+
assert.match(vibereviewSkill, /Practice 1/);
|
|
47
|
+
assert.match(vibereviewSkill, /practice_name:/);
|
|
46
48
|
|
|
47
49
|
const hooks = JSON.parse(readFileSync(join(cwd, '.github/hooks/srai-session-policy.json'), 'utf8'));
|
|
48
50
|
assert.equal(hooks.hooks.SessionStart[0].type, 'command');
|