@zivis/mcp 0.1.0-alpha.18 → 0.1.0-alpha.2
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/dist/api-client.d.ts +0 -8
- package/dist/api-client.js +3 -35
- package/dist/api-client.js.map +1 -1
- package/dist/auth/index.d.ts +5 -8
- package/dist/auth/index.js +17 -32
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/keychain.d.ts +5 -6
- package/dist/auth/keychain.js +45 -50
- package/dist/auth/keychain.js.map +1 -1
- package/dist/auth/oauth.d.ts +0 -18
- package/dist/auth/oauth.js +6 -55
- package/dist/auth/oauth.js.map +1 -1
- package/dist/auth/sessions.d.ts +4 -5
- package/dist/auth/sessions.js +14 -20
- package/dist/auth/sessions.js.map +1 -1
- package/dist/auth/token-refresh.d.ts +2 -2
- package/dist/auth/token-refresh.js +9 -42
- package/dist/auth/token-refresh.js.map +1 -1
- package/dist/cli.js +20 -32
- package/dist/cli.js.map +1 -1
- package/dist/project-binding.d.ts +0 -6
- package/dist/project-binding.js +0 -21
- package/dist/project-binding.js.map +1 -1
- package/dist/server.js +6 -62
- package/dist/server.js.map +1 -1
- package/dist/tools/check-project.d.ts +4 -4
- package/dist/tools/check-project.js +63 -109
- package/dist/tools/check-project.js.map +1 -1
- package/dist/tools/check-repo-trust.d.ts +10 -4
- package/dist/tools/check-repo-trust.js +27 -56
- package/dist/tools/check-repo-trust.js.map +1 -1
- package/dist/tools/enterprise/list-agents.d.ts +1 -1
- package/dist/tools/enterprise/manage-finding.d.ts +1 -1
- package/dist/tools/get-finding-details.d.ts +10 -4
- package/dist/tools/get-finding-details.js +10 -28
- package/dist/tools/get-finding-details.js.map +1 -1
- package/dist/tools/get-findings.d.ts +10 -4
- package/dist/tools/get-findings.js +23 -44
- package/dist/tools/get-findings.js.map +1 -1
- package/dist/tools/list-applications.d.ts +1 -1
- package/dist/tools/list-scans.d.ts +10 -4
- package/dist/tools/list-scans.js +21 -55
- package/dist/tools/list-scans.js.map +1 -1
- package/dist/tools/list-test-scenarios.d.ts +10 -4
- package/dist/tools/list-test-scenarios.js +13 -41
- package/dist/tools/list-test-scenarios.js.map +1 -1
- package/dist/tools/local-scan.d.ts +1 -1
- package/dist/tools/open-in-ide.d.ts +1 -1
- package/dist/tools/setup-red-team-target.d.ts +12 -6
- package/dist/tools/setup-red-team-target.js +20 -51
- package/dist/tools/setup-red-team-target.js.map +1 -1
- package/dist/tools/triage-finding.d.ts +10 -4
- package/dist/tools/triage-finding.js +21 -30
- package/dist/tools/triage-finding.js.map +1 -1
- package/dist/types.d.ts +2 -42
- package/dist/types.js +23 -29
- package/dist/types.js.map +1 -1
- package/package.json +1 -1
- package/dist/lib/next-steps.d.ts +0 -57
- package/dist/lib/next-steps.js +0 -45
- package/dist/lib/next-steps.js.map +0 -1
- package/dist/prompts/audit-dependencies.d.ts +0 -10
- package/dist/prompts/audit-dependencies.js +0 -56
- package/dist/prompts/audit-dependencies.js.map +0 -1
- package/dist/prompts/getting-started.d.ts +0 -12
- package/dist/prompts/getting-started.js +0 -48
- package/dist/prompts/getting-started.js.map +0 -1
- package/dist/prompts/index.d.ts +0 -14
- package/dist/prompts/index.js +0 -25
- package/dist/prompts/index.js.map +0 -1
- package/dist/prompts/prep-for-launch.d.ts +0 -9
- package/dist/prompts/prep-for-launch.js +0 -62
- package/dist/prompts/prep-for-launch.js.map +0 -1
- package/dist/prompts/secure-my-app.d.ts +0 -9
- package/dist/prompts/secure-my-app.js +0 -70
- package/dist/prompts/secure-my-app.js.map +0 -1
- package/dist/prompts/weekly-check.d.ts +0 -9
- package/dist/prompts/weekly-check.js +0 -48
- package/dist/prompts/weekly-check.js.map +0 -1
- package/dist/tools/enterprise/get-campaign.d.ts +0 -27
- package/dist/tools/enterprise/get-campaign.js +0 -31
- package/dist/tools/enterprise/get-campaign.js.map +0 -1
- package/dist/tools/enterprise/list-attack-scenarios.d.ts +0 -29
- package/dist/tools/enterprise/list-attack-scenarios.js +0 -69
- package/dist/tools/enterprise/list-attack-scenarios.js.map +0 -1
- package/dist/tools/enterprise/list-attack-step-library-tests.d.ts +0 -29
- package/dist/tools/enterprise/list-attack-step-library-tests.js +0 -61
- package/dist/tools/enterprise/list-attack-step-library-tests.js.map +0 -1
- package/dist/tools/enterprise/list-campaigns.d.ts +0 -37
- package/dist/tools/enterprise/list-campaigns.js +0 -60
- package/dist/tools/enterprise/list-campaigns.js.map +0 -1
- package/dist/tools/enterprise/list-threat-model-review-items.d.ts +0 -35
- package/dist/tools/enterprise/list-threat-model-review-items.js +0 -60
- package/dist/tools/enterprise/list-threat-model-review-items.js.map +0 -1
- package/dist/tools/enterprise/list-threat-model-versions.d.ts +0 -29
- package/dist/tools/enterprise/list-threat-model-versions.js +0 -60
- package/dist/tools/enterprise/list-threat-model-versions.js.map +0 -1
- package/dist/tools/enterprise/manage-campaign-agent-instance.d.ts +0 -42
- package/dist/tools/enterprise/manage-campaign-agent-instance.js +0 -68
- package/dist/tools/enterprise/manage-campaign-agent-instance.js.map +0 -1
- package/dist/tools/enterprise/manage-campaign-target.d.ts +0 -44
- package/dist/tools/enterprise/manage-campaign-target.js +0 -70
- package/dist/tools/enterprise/manage-campaign-target.js.map +0 -1
- package/dist/tools/enterprise/manage-campaign.d.ts +0 -62
- package/dist/tools/enterprise/manage-campaign.js +0 -114
- package/dist/tools/enterprise/manage-campaign.js.map +0 -1
- package/dist/tools/enterprise/manage-threat-model-analysis.d.ts +0 -52
- package/dist/tools/enterprise/manage-threat-model-analysis.js +0 -92
- package/dist/tools/enterprise/manage-threat-model-analysis.js.map +0 -1
- package/dist/tools/enterprise/manage-threat-model-review.d.ts +0 -47
- package/dist/tools/enterprise/manage-threat-model-review.js +0 -82
- package/dist/tools/enterprise/manage-threat-model-review.js.map +0 -1
- package/dist/tools/get-application-auth-config.d.ts +0 -27
- package/dist/tools/get-application-auth-config.js +0 -44
- package/dist/tools/get-application-auth-config.js.map +0 -1
- package/dist/tools/get-started.d.ts +0 -28
- package/dist/tools/get-started.js +0 -364
- package/dist/tools/get-started.js.map +0 -1
- package/dist/tools/manage-application.d.ts +0 -72
- package/dist/tools/manage-application.js +0 -138
- package/dist/tools/manage-application.js.map +0 -1
- package/dist/tools/manage-endpoint-lifecycle.d.ts +0 -90
- package/dist/tools/manage-endpoint-lifecycle.js +0 -191
- package/dist/tools/manage-endpoint-lifecycle.js.map +0 -1
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
import { z } from "zod";
|
|
12
12
|
import type { ApiClient } from "../api-client.js";
|
|
13
13
|
export declare const TRIAGE_FINDING_NAME = "zivis_triage_finding";
|
|
14
|
-
export declare const TRIAGE_FINDING_DESCRIPTION = "
|
|
14
|
+
export declare const TRIAGE_FINDING_DESCRIPTION = "Submit a triage decision for a security finding back to ZIVIS.\n\nUse this after investigating a finding to record the outcome:\n- \"resolve\" \u2014 the vulnerability has been fixed\n- \"dismiss\" \u2014 the finding is a false positive or not applicable\n- \"accept_risk\" \u2014 the risk is known and accepted\n\nA reasoning field is REQUIRED. Explain why this action is appropriate \u2014 this creates an audit trail and helps ZIVIS learn from your decisions.\n\nThis action is logged with your identity and timestamp. Bulk operations are not supported \u2014 triage one finding at a time.\n\nIMPORTANT: After resolving a finding (action=\"resolve\"), you MUST document the fix:\n1. Create .zivis/ directory if it doesn't exist\n2. Append to .zivis/remediations.md using the markdown template in the response\n3. This creates a security audit trail that stays with the project\n\nThe response includes a \"documentation\" field with pre-formatted markdown to append.";
|
|
15
15
|
export declare const TRIAGE_FINDING_SCHEMA: {
|
|
16
16
|
finding_id: z.ZodString;
|
|
17
17
|
action: z.ZodEnum<{
|
|
@@ -33,9 +33,15 @@ export declare function createTriageFindingHandler(apiClient: ApiClient): (param
|
|
|
33
33
|
reasoning: string;
|
|
34
34
|
dismiss_reason?: string;
|
|
35
35
|
}) => Promise<{
|
|
36
|
-
content:
|
|
36
|
+
content: {
|
|
37
37
|
type: "text";
|
|
38
38
|
text: string;
|
|
39
|
-
}
|
|
40
|
-
isError
|
|
39
|
+
}[];
|
|
40
|
+
isError: boolean;
|
|
41
|
+
} | {
|
|
42
|
+
content: {
|
|
43
|
+
type: "text";
|
|
44
|
+
text: string;
|
|
45
|
+
}[];
|
|
46
|
+
isError?: undefined;
|
|
41
47
|
}>;
|
|
@@ -9,20 +9,24 @@
|
|
|
9
9
|
* in the dashboard.
|
|
10
10
|
*/
|
|
11
11
|
import { z } from "zod";
|
|
12
|
-
import { withNextSteps } from "../lib/next-steps.js";
|
|
13
12
|
export const TRIAGE_FINDING_NAME = "zivis_triage_finding";
|
|
14
|
-
export const TRIAGE_FINDING_DESCRIPTION = `
|
|
13
|
+
export const TRIAGE_FINDING_DESCRIPTION = `Submit a triage decision for a security finding back to ZIVIS.
|
|
15
14
|
|
|
16
|
-
|
|
17
|
-
- "resolve" — the
|
|
18
|
-
- "dismiss" — the finding is
|
|
19
|
-
- "accept_risk" — the
|
|
15
|
+
Use this after investigating a finding to record the outcome:
|
|
16
|
+
- "resolve" — the vulnerability has been fixed
|
|
17
|
+
- "dismiss" — the finding is a false positive or not applicable
|
|
18
|
+
- "accept_risk" — the risk is known and accepted
|
|
20
19
|
|
|
21
|
-
A reasoning field is REQUIRED
|
|
20
|
+
A reasoning field is REQUIRED. Explain why this action is appropriate — this creates an audit trail and helps ZIVIS learn from your decisions.
|
|
22
21
|
|
|
23
|
-
|
|
22
|
+
This action is logged with your identity and timestamp. Bulk operations are not supported — triage one finding at a time.
|
|
24
23
|
|
|
25
|
-
|
|
24
|
+
IMPORTANT: After resolving a finding (action="resolve"), you MUST document the fix:
|
|
25
|
+
1. Create .zivis/ directory if it doesn't exist
|
|
26
|
+
2. Append to .zivis/remediations.md using the markdown template in the response
|
|
27
|
+
3. This creates a security audit trail that stays with the project
|
|
28
|
+
|
|
29
|
+
The response includes a "documentation" field with pre-formatted markdown to append.`;
|
|
26
30
|
export const TRIAGE_FINDING_SCHEMA = {
|
|
27
31
|
finding_id: z.string().describe("The finding ID to triage"),
|
|
28
32
|
action: z
|
|
@@ -91,27 +95,14 @@ export function createTriageFindingHandler(apiClient) {
|
|
|
91
95
|
instructions: "Append the markdownToAppend to .zivis/remediations.md (create directory and file if needed). Add finding title, severity, vulnerable code description, and files changed above the reasoning.",
|
|
92
96
|
}
|
|
93
97
|
: { shouldDocument: false };
|
|
94
|
-
return
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
},
|
|
103
|
-
...(params.action === "resolve"
|
|
104
|
-
? [
|
|
105
|
-
{
|
|
106
|
-
id: "run_new_scan",
|
|
107
|
-
label: "Run a new scan to verify the fix held",
|
|
108
|
-
tool: "zivis_list_test_scenarios",
|
|
109
|
-
why: "Confirm the vulnerability is gone by re-testing after your code change.",
|
|
110
|
-
requires_tier: "free",
|
|
111
|
-
},
|
|
112
|
-
]
|
|
113
|
-
: []),
|
|
114
|
-
], `Finding ${params.finding_id} marked as ${statusMap[params.action]}.`);
|
|
98
|
+
return {
|
|
99
|
+
content: [
|
|
100
|
+
{
|
|
101
|
+
type: "text",
|
|
102
|
+
text: JSON.stringify({ ...response, documentation }, null, 2),
|
|
103
|
+
},
|
|
104
|
+
],
|
|
105
|
+
};
|
|
115
106
|
}
|
|
116
107
|
catch (err) {
|
|
117
108
|
const message = err instanceof Error ? err.message : "Failed to triage finding";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"triage-finding.js","sourceRoot":"","sources":["../../src/tools/triage-finding.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;
|
|
1
|
+
{"version":3,"file":"triage-finding.js","sourceRoot":"","sources":["../../src/tools/triage-finding.ts"],"names":[],"mappings":"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"}
|
package/dist/types.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export interface OAuthTokens {
|
|
5
5
|
access_token: string;
|
|
6
|
-
refresh_token
|
|
6
|
+
refresh_token: string;
|
|
7
7
|
expires_at: number;
|
|
8
8
|
id_token?: string;
|
|
9
9
|
}
|
|
@@ -198,25 +198,6 @@ export interface ProjectBinding {
|
|
|
198
198
|
applicationId?: string;
|
|
199
199
|
/** Display name for that application (optional) */
|
|
200
200
|
applicationName?: string;
|
|
201
|
-
/**
|
|
202
|
-
* Environment overrides — stored here so `zivis` CLI commands run from
|
|
203
|
-
* this directory automatically hit the right environment without requiring
|
|
204
|
-
* env vars to be set in the shell. Takes precedence over env vars.
|
|
205
|
-
*/
|
|
206
|
-
/** ZIVIS API base URL (e.g. "https://staging.zivis.ai") */
|
|
207
|
-
apiBaseUrl?: string;
|
|
208
|
-
/** OAuth / AuthKit API URL */
|
|
209
|
-
oauthApiUrl?: string;
|
|
210
|
-
/** OAuth client ID */
|
|
211
|
-
oauthClientId?: string;
|
|
212
|
-
/** Keychain/credential storage prefix */
|
|
213
|
-
keychainPrefix?: string;
|
|
214
|
-
/** Config directory name under ~/.config/ */
|
|
215
|
-
configDir?: string;
|
|
216
|
-
}
|
|
217
|
-
export interface CredentialStorage {
|
|
218
|
-
keychainPrefix: string;
|
|
219
|
-
configDir: string;
|
|
220
201
|
}
|
|
221
202
|
export interface ZivisConfig {
|
|
222
203
|
apiBaseUrl: string;
|
|
@@ -225,23 +206,6 @@ export interface ZivisConfig {
|
|
|
225
206
|
callbackPort: number;
|
|
226
207
|
/** Named session for multi-tenant isolation (from ZIVIS_SESSION env var) */
|
|
227
208
|
session?: string;
|
|
228
|
-
/**
|
|
229
|
-
* Override OS keychain / encrypted-file credential namespace (default: ENV_CONFIG).
|
|
230
|
-
* MUST match MCP's ZIVIS_KEYCHAIN_PREFIX or CLI auth and MCP will read different buckets.
|
|
231
|
-
*/
|
|
232
|
-
keychainPrefix?: string;
|
|
233
|
-
/**
|
|
234
|
-
* Override ~/.config subdirectory for sessions.json etc. (default: ENV_CONFIG).
|
|
235
|
-
* MUST match MCP's ZIVIS_CONFIG_DIR.
|
|
236
|
-
*/
|
|
237
|
-
configDir?: string;
|
|
238
|
-
/**
|
|
239
|
-
* Absolute path to the workspace root passed via `zivis mcp serve --workspace`.
|
|
240
|
-
* When set, project binding is detected from this path instead of process.cwd().
|
|
241
|
-
* This is the primary tenant-isolation mechanism: each IDE workspace gets its own
|
|
242
|
-
* MCP process with a fixed, immutable workspace path → no runtime session switching.
|
|
243
|
-
*/
|
|
244
|
-
workspacePath?: string;
|
|
245
209
|
}
|
|
246
210
|
interface EnvConfig {
|
|
247
211
|
apiBaseUrl: string;
|
|
@@ -250,11 +214,7 @@ interface EnvConfig {
|
|
|
250
214
|
keychainPrefix: string;
|
|
251
215
|
configDir: string;
|
|
252
216
|
}
|
|
217
|
+
export declare const BUILD_ENV: "staging" | "production";
|
|
253
218
|
export declare const ENV_CONFIG: EnvConfig;
|
|
254
219
|
export declare const DEFAULT_CONFIG: ZivisConfig;
|
|
255
|
-
/**
|
|
256
|
-
* Resolved credential storage bucket for keychain + ~/.config/<dir>.
|
|
257
|
-
* Prefer explicit ZivisConfig fields, then ENV (set by MCP IDE config).
|
|
258
|
-
*/
|
|
259
|
-
export declare function credentialStorageFromConfig(config?: ZivisConfig): CredentialStorage;
|
|
260
220
|
export {};
|
package/dist/types.js
CHANGED
|
@@ -1,39 +1,33 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* Shared types for the ZIVIS MCP Security Server
|
|
3
3
|
*/
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
configDir: process.env.ZIVIS_CONFIG_DIR || PRODUCTION_DEFAULTS.configDir,
|
|
4
|
+
const ENVIRONMENT_CONFIGS = {
|
|
5
|
+
staging: {
|
|
6
|
+
apiBaseUrl: "https://staging.zivis.ai",
|
|
7
|
+
oauthClientId: "client_01KGCMZ482H9SJPKTVRCC213K0",
|
|
8
|
+
oauthApiUrl: "https://delightful-abundance-65-staging.authkit.app",
|
|
9
|
+
keychainPrefix: "io.zivis.mcp.staging",
|
|
10
|
+
configDir: "zivis-staging",
|
|
11
|
+
},
|
|
12
|
+
production: {
|
|
13
|
+
apiBaseUrl: "https://app.zivis.ai",
|
|
14
|
+
oauthClientId: "client_01KGCPA567YEEVXV307AERCB93",
|
|
15
|
+
oauthApiUrl: "https://api.workos.com",
|
|
16
|
+
keychainPrefix: "io.zivis.mcp",
|
|
17
|
+
configDir: "zivis",
|
|
18
|
+
},
|
|
20
19
|
};
|
|
20
|
+
// Build-time environment (defaults to staging for development)
|
|
21
|
+
export const BUILD_ENV = (process.env.ZIVIS_BUILD_ENV || "staging");
|
|
22
|
+
// Get the config for the current build environment
|
|
23
|
+
export const ENV_CONFIG = ENVIRONMENT_CONFIGS[BUILD_ENV] || ENVIRONMENT_CONFIGS.staging;
|
|
21
24
|
export const DEFAULT_CONFIG = {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
+
// Runtime env vars override build-time defaults (useful for testing)
|
|
26
|
+
apiBaseUrl: process.env.ZIVIS_API_URL || ENV_CONFIG.apiBaseUrl,
|
|
27
|
+
oauthClientId: process.env.ZIVIS_OAUTH_CLIENT_ID || ENV_CONFIG.oauthClientId,
|
|
28
|
+
oauthApiUrl: process.env.ZIVIS_OAUTH_API_URL || ENV_CONFIG.oauthApiUrl,
|
|
25
29
|
callbackPort: 8741,
|
|
26
30
|
// Session isolation for multi-tenant safety
|
|
27
31
|
session: process.env.ZIVIS_SESSION || undefined,
|
|
28
32
|
};
|
|
29
|
-
/**
|
|
30
|
-
* Resolved credential storage bucket for keychain + ~/.config/<dir>.
|
|
31
|
-
* Prefer explicit ZivisConfig fields, then ENV (set by MCP IDE config).
|
|
32
|
-
*/
|
|
33
|
-
export function credentialStorageFromConfig(config) {
|
|
34
|
-
return {
|
|
35
|
-
keychainPrefix: config?.keychainPrefix ?? ENV_CONFIG.keychainPrefix,
|
|
36
|
-
configDir: config?.configDir ?? ENV_CONFIG.configDir,
|
|
37
|
-
};
|
|
38
|
-
}
|
|
39
33
|
//# sourceMappingURL=types.js.map
|
package/dist/types.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAoPH,MAAM,mBAAmB,GAA8B;IACrD,OAAO,EAAE;QACP,UAAU,EAAE,0BAA0B;QACtC,aAAa,EAAE,mCAAmC;QAClD,WAAW,EAAE,qDAAqD;QAClE,cAAc,EAAE,sBAAsB;QACtC,SAAS,EAAE,eAAe;KAC3B;IACD,UAAU,EAAE;QACV,UAAU,EAAE,sBAAsB;QAClC,aAAa,EAAE,mCAAmC;QAClD,WAAW,EAAE,wBAAwB;QACrC,cAAc,EAAE,cAAc;QAC9B,SAAS,EAAE,OAAO;KACnB;CACF,CAAC;AAEF,+DAA+D;AAC/D,MAAM,CAAC,MAAM,SAAS,GAAG,CAAC,OAAO,CAAC,GAAG,CAAC,eAAe,IAAI,SAAS,CAElD,CAAC;AAEjB,mDAAmD;AACnD,MAAM,CAAC,MAAM,UAAU,GACrB,mBAAmB,CAAC,SAAS,CAAC,IAAI,mBAAmB,CAAC,OAAO,CAAC;AAEhE,MAAM,CAAC,MAAM,cAAc,GAAgB;IACzC,qEAAqE;IACrE,UAAU,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,UAAU,CAAC,UAAU;IAC9D,aAAa,EAAE,OAAO,CAAC,GAAG,CAAC,qBAAqB,IAAI,UAAU,CAAC,aAAa;IAC5E,WAAW,EAAE,OAAO,CAAC,GAAG,CAAC,mBAAmB,IAAI,UAAU,CAAC,WAAW;IACtE,YAAY,EAAE,IAAI;IAClB,4CAA4C;IAC5C,OAAO,EAAE,OAAO,CAAC,GAAG,CAAC,aAAa,IAAI,SAAS;CAChD,CAAC"}
|
package/package.json
CHANGED
package/dist/lib/next-steps.d.ts
DELETED
|
@@ -1,57 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* next-steps — Shared helper for the guided UX layer
|
|
3
|
-
*
|
|
4
|
-
* Every ZIVIS tool response can include a next_steps array so the LLM
|
|
5
|
-
* organically guides the user through the funnel without them needing to
|
|
6
|
-
* know which tool to call next.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* import { withNextSteps } from "../lib/next-steps.js";
|
|
10
|
-
* return withNextSteps(myResult, [
|
|
11
|
-
* { id: "...", label: "...", tool: "...", why: "..." },
|
|
12
|
-
* ], "One-line summary for the LLM to paraphrase");
|
|
13
|
-
*/
|
|
14
|
-
export interface NextStep {
|
|
15
|
-
/** Stable, snake_case id used for referencing (e.g. "triage_finding") */
|
|
16
|
-
id: string;
|
|
17
|
-
/** Plain-English label with no security jargon */
|
|
18
|
-
label: string;
|
|
19
|
-
/** The MCP tool the LLM should call to execute this step */
|
|
20
|
-
tool: string;
|
|
21
|
-
/** Pre-filled argument suggestions the LLM should pass to the tool */
|
|
22
|
-
args_hint?: Record<string, unknown>;
|
|
23
|
-
/** One-line, plain-English reason this step is suggested */
|
|
24
|
-
why: string;
|
|
25
|
-
/** Optional tier gate — LLM should not surface if user is below this tier */
|
|
26
|
-
requires_tier?: "free" | "pro" | "enterprise";
|
|
27
|
-
}
|
|
28
|
-
export interface ZivisToolPayload<T> {
|
|
29
|
-
result: T;
|
|
30
|
-
next_steps?: NextStep[];
|
|
31
|
-
/** Free-form one-line summary for the LLM to paraphrase to the user */
|
|
32
|
-
summary?: string;
|
|
33
|
-
}
|
|
34
|
-
/**
|
|
35
|
-
* Wrap any tool result with a next_steps array and optional summary.
|
|
36
|
-
*
|
|
37
|
-
* The LLM will read next_steps and use them to naturally suggest the
|
|
38
|
-
* next action, converting discrete tool calls into a guided funnel.
|
|
39
|
-
*/
|
|
40
|
-
export declare function withNextSteps<T>(result: T, nextSteps: NextStep[], summary?: string): {
|
|
41
|
-
content: Array<{
|
|
42
|
-
type: "text";
|
|
43
|
-
text: string;
|
|
44
|
-
}>;
|
|
45
|
-
isError?: boolean;
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Wrap an error result with next_steps guidance so even failures give users
|
|
49
|
-
* a clear path forward.
|
|
50
|
-
*/
|
|
51
|
-
export declare function withNextStepsError(message: string, nextSteps: NextStep[], summary?: string): {
|
|
52
|
-
content: Array<{
|
|
53
|
-
type: "text";
|
|
54
|
-
text: string;
|
|
55
|
-
}>;
|
|
56
|
-
isError: true;
|
|
57
|
-
};
|
package/dist/lib/next-steps.js
DELETED
|
@@ -1,45 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* next-steps — Shared helper for the guided UX layer
|
|
3
|
-
*
|
|
4
|
-
* Every ZIVIS tool response can include a next_steps array so the LLM
|
|
5
|
-
* organically guides the user through the funnel without them needing to
|
|
6
|
-
* know which tool to call next.
|
|
7
|
-
*
|
|
8
|
-
* Usage:
|
|
9
|
-
* import { withNextSteps } from "../lib/next-steps.js";
|
|
10
|
-
* return withNextSteps(myResult, [
|
|
11
|
-
* { id: "...", label: "...", tool: "...", why: "..." },
|
|
12
|
-
* ], "One-line summary for the LLM to paraphrase");
|
|
13
|
-
*/
|
|
14
|
-
/**
|
|
15
|
-
* Wrap any tool result with a next_steps array and optional summary.
|
|
16
|
-
*
|
|
17
|
-
* The LLM will read next_steps and use them to naturally suggest the
|
|
18
|
-
* next action, converting discrete tool calls into a guided funnel.
|
|
19
|
-
*/
|
|
20
|
-
export function withNextSteps(result, nextSteps, summary) {
|
|
21
|
-
const payload = {
|
|
22
|
-
result,
|
|
23
|
-
next_steps: nextSteps,
|
|
24
|
-
...(summary ? { summary } : {}),
|
|
25
|
-
};
|
|
26
|
-
return {
|
|
27
|
-
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
|
|
28
|
-
};
|
|
29
|
-
}
|
|
30
|
-
/**
|
|
31
|
-
* Wrap an error result with next_steps guidance so even failures give users
|
|
32
|
-
* a clear path forward.
|
|
33
|
-
*/
|
|
34
|
-
export function withNextStepsError(message, nextSteps, summary) {
|
|
35
|
-
const payload = {
|
|
36
|
-
result: { error: message },
|
|
37
|
-
next_steps: nextSteps,
|
|
38
|
-
...(summary ? { summary } : {}),
|
|
39
|
-
};
|
|
40
|
-
return {
|
|
41
|
-
content: [{ type: "text", text: JSON.stringify(payload, null, 2) }],
|
|
42
|
-
isError: true,
|
|
43
|
-
};
|
|
44
|
-
}
|
|
45
|
-
//# sourceMappingURL=next-steps.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"next-steps.js","sourceRoot":"","sources":["../../src/lib/next-steps.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;GAYG;AAwBH;;;;;GAKG;AACH,MAAM,UAAU,aAAa,CAC3B,MAAS,EACT,SAAqB,EACrB,OAAgB;IAEhB,MAAM,OAAO,GAAwB;QACnC,MAAM;QACN,UAAU,EAAE,SAAS;QACrB,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChC,CAAC;IACF,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;KAC7E,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB,CAChC,OAAe,EACf,SAAqB,EACrB,OAAgB;IAEhB,MAAM,OAAO,GAAwC;QACnD,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,EAAE;QAC1B,UAAU,EAAE,SAAS;QACrB,GAAG,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC;KAChC,CAAC;IACF,OAAO;QACL,OAAO,EAAE,CAAC,EAAE,IAAI,EAAE,MAAe,EAAE,IAAI,EAAE,IAAI,CAAC,SAAS,CAAC,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,EAAE,CAAC;QAC5E,OAAO,EAAE,IAAI;KACd,CAAC;AACJ,CAAC"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* audit-dependencies prompt
|
|
3
|
-
*
|
|
4
|
-
* The zero-setup, zero-auth entry point. Walks through package.json /
|
|
5
|
-
* requirements.txt / go.mod and runs zivis_check_repo_trust on each dep.
|
|
6
|
-
* This is the perfect "first taste" — no binding needed.
|
|
7
|
-
* In Cursor: /zivis-audit-dependencies
|
|
8
|
-
*/
|
|
9
|
-
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
10
|
-
export declare function registerAuditDependenciesPrompt(server: McpServer): void;
|
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* audit-dependencies prompt
|
|
3
|
-
*
|
|
4
|
-
* The zero-setup, zero-auth entry point. Walks through package.json /
|
|
5
|
-
* requirements.txt / go.mod and runs zivis_check_repo_trust on each dep.
|
|
6
|
-
* This is the perfect "first taste" — no binding needed.
|
|
7
|
-
* In Cursor: /zivis-audit-dependencies
|
|
8
|
-
*/
|
|
9
|
-
export function registerAuditDependenciesPrompt(server) {
|
|
10
|
-
server.registerPrompt("audit-dependencies", {
|
|
11
|
-
description: "Check the open source libraries this project depends on for security risks. No account setup needed.",
|
|
12
|
-
argsSchema: {},
|
|
13
|
-
}, async () => ({
|
|
14
|
-
messages: [
|
|
15
|
-
{
|
|
16
|
-
role: "user",
|
|
17
|
-
content: {
|
|
18
|
-
type: "text",
|
|
19
|
-
text: `I want to check whether the open source libraries I'm using are safe.
|
|
20
|
-
|
|
21
|
-
Please do the following:
|
|
22
|
-
|
|
23
|
-
1. Look at the dependency files in this project. In priority order, check:
|
|
24
|
-
- package.json (look for the "dependencies" and "devDependencies" keys)
|
|
25
|
-
- requirements.txt or pyproject.toml
|
|
26
|
-
- go.mod
|
|
27
|
-
- Any other manifest files you can see
|
|
28
|
-
|
|
29
|
-
2. From those files, find all external dependencies that have a GitHub repository.
|
|
30
|
-
- Skip internal packages (those starting with "@my-company/" or similar private namespaces).
|
|
31
|
-
- Skip built-in packages (e.g. node built-ins like "fs", "path").
|
|
32
|
-
|
|
33
|
-
3. For each external dependency that has a public GitHub repo, call \`zivis_check_repo_trust\`
|
|
34
|
-
with the owner/repo string (e.g. "openai/openai-node").
|
|
35
|
-
|
|
36
|
-
4. After checking each one, give me a summary table with columns:
|
|
37
|
-
- Package name
|
|
38
|
-
- Trust grade (A+ through F)
|
|
39
|
-
- Risk level (Safe / Low risk / Moderate / High / Critical)
|
|
40
|
-
- Any critical or high findings (one line each)
|
|
41
|
-
|
|
42
|
-
5. Flag any package with grade C or below and explain in plain English why it's risky.
|
|
43
|
-
|
|
44
|
-
6. At the end, suggest the two highest-priority actions to take based on the results.
|
|
45
|
-
|
|
46
|
-
Ground rules:
|
|
47
|
-
- Process dependencies one at a time so I can follow along.
|
|
48
|
-
- If a package doesn't have a GitHub repo, skip it and say "(no GitHub repo found)".
|
|
49
|
-
- Don't make up trust data — only use what zivis_check_repo_trust returns.
|
|
50
|
-
- Speak in plain English. "High risk" is better than "critical severity threat vector".`,
|
|
51
|
-
},
|
|
52
|
-
},
|
|
53
|
-
],
|
|
54
|
-
}));
|
|
55
|
-
}
|
|
56
|
-
//# sourceMappingURL=audit-dependencies.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"audit-dependencies.js","sourceRoot":"","sources":["../../src/prompts/audit-dependencies.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAIH,MAAM,UAAU,+BAA+B,CAAC,MAAiB;IAC/D,MAAM,CAAC,cAAc,CACnB,oBAAoB,EACpB;QACE,WAAW,EACT,sGAAsG;QACxG,UAAU,EAAE,EAAE;KACf,EACD,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;wFA+BsE;iBAC7E;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* getting-started prompt
|
|
3
|
-
*
|
|
4
|
-
* The front-door slash command for new users who don't know what to do.
|
|
5
|
-
* In Cursor: /zivis-getting-started
|
|
6
|
-
* In Claude Code: /mcp__zivis-security__getting-started
|
|
7
|
-
*
|
|
8
|
-
* Instructs the LLM to call zivis_check_project and zivis_get_started
|
|
9
|
-
* and present the results as a numbered list — no jargon, no assumptions.
|
|
10
|
-
*/
|
|
11
|
-
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
12
|
-
export declare function registerGettingStartedPrompt(server: McpServer): void;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* getting-started prompt
|
|
3
|
-
*
|
|
4
|
-
* The front-door slash command for new users who don't know what to do.
|
|
5
|
-
* In Cursor: /zivis-getting-started
|
|
6
|
-
* In Claude Code: /mcp__zivis-security__getting-started
|
|
7
|
-
*
|
|
8
|
-
* Instructs the LLM to call zivis_check_project and zivis_get_started
|
|
9
|
-
* and present the results as a numbered list — no jargon, no assumptions.
|
|
10
|
-
*/
|
|
11
|
-
export function registerGettingStartedPrompt(server) {
|
|
12
|
-
server.registerPrompt("getting-started", {
|
|
13
|
-
description: "Walk me through ZIVIS for this project. Use this if you're new or unsure what to test.",
|
|
14
|
-
argsSchema: {},
|
|
15
|
-
}, async () => ({
|
|
16
|
-
messages: [
|
|
17
|
-
{
|
|
18
|
-
role: "user",
|
|
19
|
-
content: {
|
|
20
|
-
type: "text",
|
|
21
|
-
text: `I want to use ZIVIS for security on this project but I'm not sure where to start.
|
|
22
|
-
|
|
23
|
-
Please do the following, in order:
|
|
24
|
-
|
|
25
|
-
1. Call \`zivis_check_project\` (no arguments) to confirm the project is connected correctly.
|
|
26
|
-
- If it returns any problems, explain them in plain English and tell me the exact terminal command to run to fix them. Stop here and wait for me.
|
|
27
|
-
- If it's OK, continue to step 2.
|
|
28
|
-
|
|
29
|
-
2. Call \`zivis_get_started\` (no arguments).
|
|
30
|
-
|
|
31
|
-
3. Present the \`recommended_next_steps\` from the response as a numbered list.
|
|
32
|
-
- Use the \`label\` as the item text.
|
|
33
|
-
- Add one sentence from the \`why\` field below each item.
|
|
34
|
-
- Do NOT invent additional steps or add security advice of your own.
|
|
35
|
-
|
|
36
|
-
4. Ask me which number I want to do. Wait for my answer before calling anything else.
|
|
37
|
-
|
|
38
|
-
Ground rules for this conversation:
|
|
39
|
-
- I'm a developer, not a security person. Speak plainly.
|
|
40
|
-
- Avoid these words unless I use them first: "actor", "attack vector", "threat model", "STRIDE", "kill chain", "TTPs".
|
|
41
|
-
- Use plain alternatives: "tester", "how someone might break in", "security plan", "types of attacks".
|
|
42
|
-
- If I seem unsure which option to pick, suggest the one flagged as \`if_user_unsure\` in the response.`,
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
],
|
|
46
|
-
}));
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=getting-started.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"getting-started.js","sourceRoot":"","sources":["../../src/prompts/getting-started.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAIH,MAAM,UAAU,4BAA4B,CAAC,MAAiB;IAC5D,MAAM,CAAC,cAAc,CACnB,iBAAiB,EACjB;QACE,WAAW,EACT,wFAAwF;QAC1F,UAAU,EAAE,EAAE;KACf,EACD,KAAK,IAAI,EAAE,CAAC,CAAC;QACX,QAAQ,EAAE;YACR;gBACE,IAAI,EAAE,MAAe;gBACrB,OAAO,EAAE;oBACP,IAAI,EAAE,MAAe;oBACrB,IAAI,EAAE;;;;;;;;;;;;;;;;;;;;;wGAqBsF;iBAC7F;aACF;SACF;KACF,CAAC,CACH,CAAC;AACJ,CAAC"}
|
package/dist/prompts/index.d.ts
DELETED
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP Prompts — guided slash commands for non-security engineers
|
|
3
|
-
*
|
|
4
|
-
* These prompts appear as slash commands in IDEs:
|
|
5
|
-
* Cursor: /zivis-getting-started, /zivis-secure-my-app, etc.
|
|
6
|
-
* Claude Code: /mcp__zivis-security__getting-started, etc.
|
|
7
|
-
* Cline: Listed in the Prompts picker
|
|
8
|
-
*
|
|
9
|
-
* Each prompt injects a detailed instruction set as a "user" message,
|
|
10
|
-
* telling the LLM exactly how to orchestrate the ZIVIS tools in
|
|
11
|
-
* plain English — no security vocabulary required.
|
|
12
|
-
*/
|
|
13
|
-
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
14
|
-
export declare function registerAllPrompts(server: McpServer): void;
|
package/dist/prompts/index.js
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* MCP Prompts — guided slash commands for non-security engineers
|
|
3
|
-
*
|
|
4
|
-
* These prompts appear as slash commands in IDEs:
|
|
5
|
-
* Cursor: /zivis-getting-started, /zivis-secure-my-app, etc.
|
|
6
|
-
* Claude Code: /mcp__zivis-security__getting-started, etc.
|
|
7
|
-
* Cline: Listed in the Prompts picker
|
|
8
|
-
*
|
|
9
|
-
* Each prompt injects a detailed instruction set as a "user" message,
|
|
10
|
-
* telling the LLM exactly how to orchestrate the ZIVIS tools in
|
|
11
|
-
* plain English — no security vocabulary required.
|
|
12
|
-
*/
|
|
13
|
-
import { registerGettingStartedPrompt } from "./getting-started.js";
|
|
14
|
-
import { registerSecureMyAppPrompt } from "./secure-my-app.js";
|
|
15
|
-
import { registerAuditDependenciesPrompt } from "./audit-dependencies.js";
|
|
16
|
-
import { registerPrepForLaunchPrompt } from "./prep-for-launch.js";
|
|
17
|
-
import { registerWeeklyCheckPrompt } from "./weekly-check.js";
|
|
18
|
-
export function registerAllPrompts(server) {
|
|
19
|
-
registerGettingStartedPrompt(server);
|
|
20
|
-
registerSecureMyAppPrompt(server);
|
|
21
|
-
registerAuditDependenciesPrompt(server);
|
|
22
|
-
registerPrepForLaunchPrompt(server);
|
|
23
|
-
registerWeeklyCheckPrompt(server);
|
|
24
|
-
}
|
|
25
|
-
//# sourceMappingURL=index.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/prompts/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAGH,OAAO,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AACpE,OAAO,EAAE,yBAAyB,EAAE,MAAM,oBAAoB,CAAC;AAC/D,OAAO,EAAE,+BAA+B,EAAE,MAAM,yBAAyB,CAAC;AAC1E,OAAO,EAAE,2BAA2B,EAAE,MAAM,sBAAsB,CAAC;AACnE,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,MAAM,UAAU,kBAAkB,CAAC,MAAiB;IAClD,4BAA4B,CAAC,MAAM,CAAC,CAAC;IACrC,yBAAyB,CAAC,MAAM,CAAC,CAAC;IAClC,+BAA+B,CAAC,MAAM,CAAC,CAAC;IACxC,2BAA2B,CAAC,MAAM,CAAC,CAAC;IACpC,yBAAyB,CAAC,MAAM,CAAC,CAAC;AACpC,CAAC"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* prep-for-launch prompt
|
|
3
|
-
*
|
|
4
|
-
* Pre-deploy checklist: dependency audit + open findings review + scan status.
|
|
5
|
-
* Returns a go / no-go summary based on severity counts.
|
|
6
|
-
* In Cursor: /zivis-prep-for-launch
|
|
7
|
-
*/
|
|
8
|
-
import type { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
|
|
9
|
-
export declare function registerPrepForLaunchPrompt(server: McpServer): void;
|
|
@@ -1,62 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* prep-for-launch prompt
|
|
3
|
-
*
|
|
4
|
-
* Pre-deploy checklist: dependency audit + open findings review + scan status.
|
|
5
|
-
* Returns a go / no-go summary based on severity counts.
|
|
6
|
-
* In Cursor: /zivis-prep-for-launch
|
|
7
|
-
*/
|
|
8
|
-
export function registerPrepForLaunchPrompt(server) {
|
|
9
|
-
server.registerPrompt("prep-for-launch", {
|
|
10
|
-
description: "Run a pre-launch security checklist. Checks open findings, recent scans, and dependency risks. Returns a go / no-go recommendation.",
|
|
11
|
-
argsSchema: {},
|
|
12
|
-
}, async () => ({
|
|
13
|
-
messages: [
|
|
14
|
-
{
|
|
15
|
-
role: "user",
|
|
16
|
-
content: {
|
|
17
|
-
type: "text",
|
|
18
|
-
text: `I'm about to launch / deploy to production and I want to make sure there are no known security issues.
|
|
19
|
-
|
|
20
|
-
Please run through this checklist and give me a go / no-go recommendation at the end.
|
|
21
|
-
|
|
22
|
-
**Step 1 — Check open findings**
|
|
23
|
-
Call \`zivis_get_findings\` with status="open".
|
|
24
|
-
- If there are any critical or high findings, list them by title and severity.
|
|
25
|
-
- Note how many medium and low findings exist (don't list them all — just the count).
|
|
26
|
-
|
|
27
|
-
**Step 2 — Check recent scans**
|
|
28
|
-
Call \`zivis_list_scans\` with limit=5.
|
|
29
|
-
- Tell me when the most recent scan ran and whether it completed successfully.
|
|
30
|
-
- If no scan has run in the last 7 days, flag this as a gap.
|
|
31
|
-
|
|
32
|
-
**Step 3 — Check dependency risks (if time permits)**
|
|
33
|
-
If the project has a package.json, requirements.txt, or go.mod, identify the 3-5 most important AI or security-sensitive dependencies and call \`zivis_check_repo_trust\` for each.
|
|
34
|
-
- Flag any with grade C or below.
|
|
35
|
-
|
|
36
|
-
**Step 4 — Go / No-go recommendation**
|
|
37
|
-
Based on the above, give me a clear recommendation:
|
|
38
|
-
|
|
39
|
-
🔴 NO-GO if:
|
|
40
|
-
- Any critical open findings exist
|
|
41
|
-
- No scan has run (ever)
|
|
42
|
-
- Any dependency has grade D or F
|
|
43
|
-
|
|
44
|
-
🟡 PROCEED WITH CAUTION if:
|
|
45
|
-
- Any high-severity open findings exist
|
|
46
|
-
- Last scan ran more than 7 days ago
|
|
47
|
-
- Any dependency has grade C
|
|
48
|
-
|
|
49
|
-
🟢 GO if:
|
|
50
|
-
- No critical or high open findings
|
|
51
|
-
- A scan ran within the last 7 days
|
|
52
|
-
- No high-risk dependencies
|
|
53
|
-
|
|
54
|
-
After the recommendation, list the top 3 things I should fix before or immediately after launch, in priority order.
|
|
55
|
-
|
|
56
|
-
Speak in plain English. I'm a developer, not a security engineer.`,
|
|
57
|
-
},
|
|
58
|
-
},
|
|
59
|
-
],
|
|
60
|
-
}));
|
|
61
|
-
}
|
|
62
|
-
//# sourceMappingURL=prep-for-launch.js.map
|