@securityreviewai/security-review-mcp 0.2.15 → 0.2.16

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.
@@ -1,6 +1,32 @@
1
1
  import * as z from "zod/v4";
2
2
  import { getApiClient } from "../api/client.js";
3
3
  import { runTool } from "./common.js";
4
+ const aiIdeThreatMitigatedSchema = z.object({
5
+ threat_name: z.string(),
6
+ description: z.string(),
7
+ severity: z.enum(["critical", "high", "medium", "low"]),
8
+ mitigation_applied: z.string(),
9
+ });
10
+ const aiIdeBestPracticeSchema = z.object({
11
+ practice_name: z.string(),
12
+ description: z.string(),
13
+ category: z.string(),
14
+ });
15
+ const aiIdeSecureCodeSnippetSchema = z.object({
16
+ language: z.string(),
17
+ file_path: z.string().optional(),
18
+ code: z.string(),
19
+ explanation: z.string(),
20
+ });
21
+ const aiIdeGuardrailAppliedSchema = z.object({
22
+ title: z.string(),
23
+ rule_type: z.enum(["must", "must_not"]),
24
+ category: z.string().optional(),
25
+ instruction: z.string(),
26
+ source: z.enum(["existing", "ide_generated"]),
27
+ satisfied: z.boolean(),
28
+ notes: z.string().optional(),
29
+ });
4
30
  export function registerWorkflowTools(server) {
5
31
  server.registerTool("list_ai_ide_workflows", {
6
32
  description: "List AI IDE workflows for a project with pagination. Returns workflow records and pagination metadata.",
@@ -30,22 +56,16 @@ export function registerWorkflowTools(server) {
30
56
  inputSchema: {
31
57
  project_id: z.number().int(),
32
58
  workflow_id: z.number().int(),
33
- external_id: z.string(),
59
+ external_id: z.string().optional(),
34
60
  title: z.string(),
35
61
  summary: z.string(),
36
62
  developer_name: z.string(),
37
63
  developer_email: z.string(),
38
- threats_mitigated: z
39
- .array(z
40
- .object({
41
- severity: z.enum(["critical", "high", "medium", "low"]),
42
- })
43
- .catchall(z.unknown()))
44
- .default([]),
45
- best_practices_achieved: z.array(z.object({}).catchall(z.unknown())).default([]),
46
- secure_code_snippets: z.array(z.object({}).catchall(z.unknown())).default([]),
47
- guardrails_applied: z.array(z.object({}).catchall(z.unknown())).default([]),
48
- event_metadata: z.record(z.string(), z.unknown()).default({}),
64
+ threats_mitigated: z.array(aiIdeThreatMitigatedSchema),
65
+ best_practices_achieved: z.array(aiIdeBestPracticeSchema),
66
+ secure_code_snippets: z.array(aiIdeSecureCodeSnippetSchema).default([]),
67
+ guardrails_applied: z.array(aiIdeGuardrailAppliedSchema).default([]),
68
+ event_metadata: z.record(z.string(), z.unknown()).optional(),
49
69
  },
50
70
  }, async ({ project_id, workflow_id, external_id, title, summary, developer_name, developer_email, threats_mitigated, best_practices_achieved, secure_code_snippets, guardrails_applied, event_metadata, }) => runTool(async () => getApiClient().createAiIdeEvent(project_id, workflow_id, {
51
71
  external_id,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@securityreviewai/security-review-mcp",
3
- "version": "0.2.15",
3
+ "version": "0.2.16",
4
4
  "description": "Security Review MCP server (pure Node/TypeScript, npx-ready)",
5
5
  "license": "UNLICENSED",
6
6
  "private": false,