appsec-agent 2.7.0 → 2.8.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/README.md +57 -0
- package/conf/appsec_agent.yaml +13 -0
- package/dist/bin/agent-run.js +2 -1
- package/dist/bin/agent-run.js.map +1 -1
- package/dist/conf/appsec_agent.yaml +13 -0
- package/dist/src/agent_actions.d.ts +21 -1
- package/dist/src/agent_actions.d.ts.map +1 -1
- package/dist/src/agent_actions.js +106 -2
- package/dist/src/agent_actions.js.map +1 -1
- package/dist/src/agent_options.d.ts +42 -6
- package/dist/src/agent_options.d.ts.map +1 -1
- package/dist/src/agent_options.js +82 -6
- package/dist/src/agent_options.js.map +1 -1
- package/dist/src/index.d.ts +1 -0
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js +7 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/main.d.ts.map +1 -1
- package/dist/src/main.js +74 -0
- package/dist/src/main.js.map +1 -1
- package/dist/src/schemas/fp_adversary_pass.d.ts +188 -0
- package/dist/src/schemas/fp_adversary_pass.d.ts.map +1 -0
- package/dist/src/schemas/fp_adversary_pass.js +258 -0
- package/dist/src/schemas/fp_adversary_pass.js.map +1 -0
- package/package.json +2 -2
|
@@ -0,0 +1,188 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* fp_adversary second-pass input/output (v2.8.0) — full-repo review false-positive filter.
|
|
3
|
+
*
|
|
4
|
+
* Used by the parent app Lane-2 (full-repo scheduled scans) Phase 2.5. Parent app
|
|
5
|
+
* passes a JSON file containing candidate findings from the first-pass
|
|
6
|
+
* `code_reviewer` plus structured project posture inputs sourced from the
|
|
7
|
+
* `projects.*_context` columns and an optional `similar_dismissed` array
|
|
8
|
+
* (top-3 prior dismissals for the same CWE, pre-built via the parent app's
|
|
9
|
+
* `queryFindingsHistory` MCP tool).
|
|
10
|
+
*
|
|
11
|
+
* Output schema is deliberately distinct from `SECURITY_REPORT_SCHEMA` so the
|
|
12
|
+
* verdict contract (`fingerprint`, `verdict`, numeric `confidence`,
|
|
13
|
+
* `rationale`, optional `cost_usd_estimate`) is locked down separately from
|
|
14
|
+
* the primary security-report shape that may drift across model upgrades.
|
|
15
|
+
* Each verdict round-trips on `fingerprint` so the parent app maps verdicts
|
|
16
|
+
* back to its `repo_finding_ledger` rows without depending on string IDs.
|
|
17
|
+
*
|
|
18
|
+
* Decision rationale: see [docs/FULL_REPO_REVIEW_QUALITY_PLAN.md] §6 and the
|
|
19
|
+
* sibling parent app plan (Phase 2.5, G1 — Option (a) "separate schema").
|
|
20
|
+
*/
|
|
21
|
+
export interface FpAdversaryPassFinding {
|
|
22
|
+
/**
|
|
23
|
+
* Stable parent-app fingerprint (sha256 of `cwe + file + normalised
|
|
24
|
+
* snippet + line range`). Required — the round-trip key the parent app
|
|
25
|
+
* uses to map each verdict back to its ledger row.
|
|
26
|
+
*/
|
|
27
|
+
fingerprint: string;
|
|
28
|
+
id?: string;
|
|
29
|
+
title: string;
|
|
30
|
+
file: string;
|
|
31
|
+
line_numbers?: string;
|
|
32
|
+
severity?: string;
|
|
33
|
+
confidence?: string;
|
|
34
|
+
category?: string;
|
|
35
|
+
cwe_id?: string;
|
|
36
|
+
cwe?: string;
|
|
37
|
+
description: string;
|
|
38
|
+
recommendation?: string;
|
|
39
|
+
code_snippet?: string;
|
|
40
|
+
impact?: string;
|
|
41
|
+
}
|
|
42
|
+
export interface FpAdversaryPassContext {
|
|
43
|
+
findings: FpAdversaryPassFinding[];
|
|
44
|
+
/** Free-form summary of the repo's purpose, tech stack, primary entry points. */
|
|
45
|
+
project_summary?: string;
|
|
46
|
+
/** Concrete security mechanisms in use: libraries, middleware, auth patterns. */
|
|
47
|
+
security_context?: string;
|
|
48
|
+
/** Deployment posture: hosted/self-hosted, network exposure, multi-tenant model. */
|
|
49
|
+
deployment_context?: string;
|
|
50
|
+
/** Security-relevant developer guidance: PHI handling rules, SQL injection conventions. */
|
|
51
|
+
developer_context?: string;
|
|
52
|
+
/**
|
|
53
|
+
* Top-3 similar dismissed findings (pre-built by parent app via
|
|
54
|
+
* `queryFindingsHistory`). The adversary uses these as a precedent
|
|
55
|
+
* check: "this CWE was dismissed before for {reason} — does that apply?"
|
|
56
|
+
*/
|
|
57
|
+
similar_dismissed?: Array<{
|
|
58
|
+
fingerprint: string;
|
|
59
|
+
file: string;
|
|
60
|
+
cwe?: string;
|
|
61
|
+
dismissal_reason?: string;
|
|
62
|
+
}>;
|
|
63
|
+
metadata?: {
|
|
64
|
+
project_name?: string;
|
|
65
|
+
};
|
|
66
|
+
}
|
|
67
|
+
export interface FpAdversaryVerdict {
|
|
68
|
+
/** Round-trip key matching one of the input findings' fingerprints. */
|
|
69
|
+
fingerprint: string;
|
|
70
|
+
verdict: 'confirm' | 'dismiss';
|
|
71
|
+
/** 0.0 (no confidence) — 1.0 (highest confidence). */
|
|
72
|
+
confidence: number;
|
|
73
|
+
/** ≤500-char justification surfaced in the auto_dismissed_findings audit row. */
|
|
74
|
+
rationale: string;
|
|
75
|
+
/**
|
|
76
|
+
* Threaded through from the Claude Agent SDK's `total_cost_usd` so the
|
|
77
|
+
* parent app's cost-cap accumulator can stop the loop deterministically
|
|
78
|
+
* without re-counting tokens. Optional for backward-compat.
|
|
79
|
+
*/
|
|
80
|
+
cost_usd_estimate?: number;
|
|
81
|
+
}
|
|
82
|
+
export interface FpAdversaryReport {
|
|
83
|
+
fp_adversary_report: {
|
|
84
|
+
verdicts: FpAdversaryVerdict[];
|
|
85
|
+
};
|
|
86
|
+
}
|
|
87
|
+
/**
|
|
88
|
+
* JSON Schema enforced by the Claude Agent SDK at generation time.
|
|
89
|
+
*
|
|
90
|
+
* The schema deliberately allows zero verdicts (an empty findings input → empty
|
|
91
|
+
* verdicts output) and requires every verdict to round-trip on `fingerprint`
|
|
92
|
+
* so the parent app can detect schema violations without per-finding heuristics.
|
|
93
|
+
*/
|
|
94
|
+
export declare const FP_ADVERSARY_REPORT_SCHEMA: {
|
|
95
|
+
readonly type: "object";
|
|
96
|
+
readonly required: readonly ["fp_adversary_report"];
|
|
97
|
+
readonly additionalProperties: false;
|
|
98
|
+
readonly properties: {
|
|
99
|
+
readonly fp_adversary_report: {
|
|
100
|
+
readonly type: "object";
|
|
101
|
+
readonly required: readonly ["verdicts"];
|
|
102
|
+
readonly additionalProperties: false;
|
|
103
|
+
readonly properties: {
|
|
104
|
+
readonly verdicts: {
|
|
105
|
+
readonly type: "array";
|
|
106
|
+
readonly items: {
|
|
107
|
+
readonly type: "object";
|
|
108
|
+
readonly required: readonly ["fingerprint", "verdict", "confidence", "rationale"];
|
|
109
|
+
readonly additionalProperties: false;
|
|
110
|
+
readonly properties: {
|
|
111
|
+
readonly fingerprint: {
|
|
112
|
+
readonly type: "string";
|
|
113
|
+
readonly description: "Round-trip key matching one of the input findings' fingerprints. Required.";
|
|
114
|
+
};
|
|
115
|
+
readonly verdict: {
|
|
116
|
+
readonly type: "string";
|
|
117
|
+
readonly enum: readonly ["confirm", "dismiss"];
|
|
118
|
+
readonly description: "`confirm` keeps the finding in scan_findings; `dismiss` routes it to auto_dismissed_findings (subject to confidence threshold + severity floor on the parent side).";
|
|
119
|
+
};
|
|
120
|
+
readonly confidence: {
|
|
121
|
+
readonly type: "number";
|
|
122
|
+
readonly minimum: 0;
|
|
123
|
+
readonly maximum: 1;
|
|
124
|
+
readonly description: "Numeric 0.0-1.0 (NOT enum HIGH/MED/LOW). Drives the auto-dismiss vs pre_dismissed branch on the parent side.";
|
|
125
|
+
};
|
|
126
|
+
readonly rationale: {
|
|
127
|
+
readonly type: "string";
|
|
128
|
+
readonly maxLength: 500;
|
|
129
|
+
readonly description: "Plain-English justification surfaced in the auto_dismissed_findings audit row + Restore UI.";
|
|
130
|
+
};
|
|
131
|
+
readonly cost_usd_estimate: {
|
|
132
|
+
readonly type: "number";
|
|
133
|
+
readonly minimum: 0;
|
|
134
|
+
readonly description: "Per-finding USD cost threaded from agent-run's SDK output. Optional for backward-compat.";
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
};
|
|
138
|
+
};
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
};
|
|
142
|
+
};
|
|
143
|
+
/**
|
|
144
|
+
* Parse and validate the fp_adversary input JSON.
|
|
145
|
+
*
|
|
146
|
+
* Required: top-level `findings` array, each with non-empty `fingerprint`,
|
|
147
|
+
* `title`, `file`, `description`. Other fields are normalized but not required.
|
|
148
|
+
* Throws on invalid input — the CLI dispatcher in `main.ts` catches and exits 1.
|
|
149
|
+
*/
|
|
150
|
+
export declare function parseFpAdversaryPassContext(data: unknown): FpAdversaryPassContext;
|
|
151
|
+
/**
|
|
152
|
+
* Normalize fingerprint-keyed findings into a stable shape for the prompt's
|
|
153
|
+
* JSON block. Mirrors `toSecurityFindings` for `pr_adversary` but preserves
|
|
154
|
+
* the parent-app `fingerprint` field that drives the verdict round-trip.
|
|
155
|
+
*/
|
|
156
|
+
export declare function toFpAdversaryFindings(ctx: FpAdversaryPassContext): Array<{
|
|
157
|
+
fingerprint: string;
|
|
158
|
+
title: string;
|
|
159
|
+
severity: string;
|
|
160
|
+
confidence: string;
|
|
161
|
+
category: string;
|
|
162
|
+
file: string;
|
|
163
|
+
line_numbers?: string;
|
|
164
|
+
cwe_id?: string;
|
|
165
|
+
cwe?: string;
|
|
166
|
+
description: string;
|
|
167
|
+
recommendation: string;
|
|
168
|
+
code_snippet?: string;
|
|
169
|
+
impact?: string;
|
|
170
|
+
}>;
|
|
171
|
+
/**
|
|
172
|
+
* Build the user message for the fp_adversary role.
|
|
173
|
+
*
|
|
174
|
+
* Layout:
|
|
175
|
+
* 1. Adversarial-review framing (verdict criteria, threshold guidance).
|
|
176
|
+
* 2. `### Project posture (from extraction)` block with the four
|
|
177
|
+
* structured context fields if present (precedes the integrator's `-c`
|
|
178
|
+
* additional context to keep parent-app posture authoritative).
|
|
179
|
+
* 3. `-c` additional context block.
|
|
180
|
+
* 4. Similar-dismissed precedent block (if any).
|
|
181
|
+
* 5. Candidate findings JSON.
|
|
182
|
+
*/
|
|
183
|
+
export declare function buildFpAdversaryUserPrompt(ctx: FpAdversaryPassContext, opts?: {
|
|
184
|
+
additionalContext?: string;
|
|
185
|
+
}): string;
|
|
186
|
+
/** Empty report shell for tests / fallbacks. */
|
|
187
|
+
export declare function emptyFpAdversaryReport(): FpAdversaryReport;
|
|
188
|
+
//# sourceMappingURL=fp_adversary_pass.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fp_adversary_pass.d.ts","sourceRoot":"","sources":["../../../src/schemas/fp_adversary_pass.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;GAmBG;AAEH,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,WAAW,EAAE,MAAM,CAAC;IACpB,EAAE,CAAC,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE,MAAM,CAAC;IACb,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,sBAAsB;IACrC,QAAQ,EAAE,sBAAsB,EAAE,CAAC;IACnC,iFAAiF;IACjF,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iFAAiF;IACjF,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B,oFAAoF;IACpF,kBAAkB,CAAC,EAAE,MAAM,CAAC;IAC5B,2FAA2F;IAC3F,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B;;;;OA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;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,CAAC,CAsBD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,0BAA0B,CACxC,GAAG,EAAE,sBAAsB,EAC3B,IAAI,GAAE;IAAE,iBAAiB,CAAC,EAAE,MAAM,CAAA;CAAO,GACxC,MAAM,CAqER;AAED,gDAAgD;AAChD,wBAAgB,sBAAsB,IAAI,iBAAiB,CAE1D"}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* fp_adversary second-pass input/output (v2.8.0) — full-repo review false-positive filter.
|
|
4
|
+
*
|
|
5
|
+
* Used by the parent app Lane-2 (full-repo scheduled scans) Phase 2.5. Parent app
|
|
6
|
+
* passes a JSON file containing candidate findings from the first-pass
|
|
7
|
+
* `code_reviewer` plus structured project posture inputs sourced from the
|
|
8
|
+
* `projects.*_context` columns and an optional `similar_dismissed` array
|
|
9
|
+
* (top-3 prior dismissals for the same CWE, pre-built via the parent app's
|
|
10
|
+
* `queryFindingsHistory` MCP tool).
|
|
11
|
+
*
|
|
12
|
+
* Output schema is deliberately distinct from `SECURITY_REPORT_SCHEMA` so the
|
|
13
|
+
* verdict contract (`fingerprint`, `verdict`, numeric `confidence`,
|
|
14
|
+
* `rationale`, optional `cost_usd_estimate`) is locked down separately from
|
|
15
|
+
* the primary security-report shape that may drift across model upgrades.
|
|
16
|
+
* Each verdict round-trips on `fingerprint` so the parent app maps verdicts
|
|
17
|
+
* back to its `repo_finding_ledger` rows without depending on string IDs.
|
|
18
|
+
*
|
|
19
|
+
* Decision rationale: see [docs/FULL_REPO_REVIEW_QUALITY_PLAN.md] §6 and the
|
|
20
|
+
* sibling parent app plan (Phase 2.5, G1 — Option (a) "separate schema").
|
|
21
|
+
*/
|
|
22
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
23
|
+
exports.FP_ADVERSARY_REPORT_SCHEMA = void 0;
|
|
24
|
+
exports.parseFpAdversaryPassContext = parseFpAdversaryPassContext;
|
|
25
|
+
exports.toFpAdversaryFindings = toFpAdversaryFindings;
|
|
26
|
+
exports.buildFpAdversaryUserPrompt = buildFpAdversaryUserPrompt;
|
|
27
|
+
exports.emptyFpAdversaryReport = emptyFpAdversaryReport;
|
|
28
|
+
/**
|
|
29
|
+
* JSON Schema enforced by the Claude Agent SDK at generation time.
|
|
30
|
+
*
|
|
31
|
+
* The schema deliberately allows zero verdicts (an empty findings input → empty
|
|
32
|
+
* verdicts output) and requires every verdict to round-trip on `fingerprint`
|
|
33
|
+
* so the parent app can detect schema violations without per-finding heuristics.
|
|
34
|
+
*/
|
|
35
|
+
exports.FP_ADVERSARY_REPORT_SCHEMA = {
|
|
36
|
+
type: 'object',
|
|
37
|
+
required: ['fp_adversary_report'],
|
|
38
|
+
additionalProperties: false,
|
|
39
|
+
properties: {
|
|
40
|
+
fp_adversary_report: {
|
|
41
|
+
type: 'object',
|
|
42
|
+
required: ['verdicts'],
|
|
43
|
+
additionalProperties: false,
|
|
44
|
+
properties: {
|
|
45
|
+
verdicts: {
|
|
46
|
+
type: 'array',
|
|
47
|
+
items: {
|
|
48
|
+
type: 'object',
|
|
49
|
+
required: ['fingerprint', 'verdict', 'confidence', 'rationale'],
|
|
50
|
+
additionalProperties: false,
|
|
51
|
+
properties: {
|
|
52
|
+
fingerprint: {
|
|
53
|
+
type: 'string',
|
|
54
|
+
description: "Round-trip key matching one of the input findings' fingerprints. Required.",
|
|
55
|
+
},
|
|
56
|
+
verdict: {
|
|
57
|
+
type: 'string',
|
|
58
|
+
enum: ['confirm', 'dismiss'],
|
|
59
|
+
description: '`confirm` keeps the finding in scan_findings; `dismiss` routes it to auto_dismissed_findings (subject to confidence threshold + severity floor on the parent side).',
|
|
60
|
+
},
|
|
61
|
+
confidence: {
|
|
62
|
+
type: 'number',
|
|
63
|
+
minimum: 0,
|
|
64
|
+
maximum: 1,
|
|
65
|
+
description: 'Numeric 0.0-1.0 (NOT enum HIGH/MED/LOW). Drives the auto-dismiss vs pre_dismissed branch on the parent side.',
|
|
66
|
+
},
|
|
67
|
+
rationale: {
|
|
68
|
+
type: 'string',
|
|
69
|
+
maxLength: 500,
|
|
70
|
+
description: 'Plain-English justification surfaced in the auto_dismissed_findings audit row + Restore UI.',
|
|
71
|
+
},
|
|
72
|
+
cost_usd_estimate: {
|
|
73
|
+
type: 'number',
|
|
74
|
+
minimum: 0,
|
|
75
|
+
description: "Per-finding USD cost threaded from agent-run's SDK output. Optional for backward-compat.",
|
|
76
|
+
},
|
|
77
|
+
},
|
|
78
|
+
},
|
|
79
|
+
},
|
|
80
|
+
},
|
|
81
|
+
},
|
|
82
|
+
},
|
|
83
|
+
};
|
|
84
|
+
const MAX_FINDINGS_PER_RUN = 500;
|
|
85
|
+
/**
|
|
86
|
+
* Parse and validate the fp_adversary input JSON.
|
|
87
|
+
*
|
|
88
|
+
* Required: top-level `findings` array, each with non-empty `fingerprint`,
|
|
89
|
+
* `title`, `file`, `description`. Other fields are normalized but not required.
|
|
90
|
+
* Throws on invalid input — the CLI dispatcher in `main.ts` catches and exits 1.
|
|
91
|
+
*/
|
|
92
|
+
function parseFpAdversaryPassContext(data) {
|
|
93
|
+
if (!data || typeof data !== 'object') {
|
|
94
|
+
throw new Error('fp_adversary context must be a JSON object');
|
|
95
|
+
}
|
|
96
|
+
const o = data;
|
|
97
|
+
if (!Array.isArray(o.findings)) {
|
|
98
|
+
throw new Error('fp_adversary context must include a "findings" array');
|
|
99
|
+
}
|
|
100
|
+
if (o.findings.length > MAX_FINDINGS_PER_RUN) {
|
|
101
|
+
throw new Error(`fp_adversary supports at most ${MAX_FINDINGS_PER_RUN} findings per run`);
|
|
102
|
+
}
|
|
103
|
+
for (const item of o.findings) {
|
|
104
|
+
if (!item || typeof item !== 'object') {
|
|
105
|
+
throw new Error('Each finding must be an object');
|
|
106
|
+
}
|
|
107
|
+
const f = item;
|
|
108
|
+
for (const k of ['fingerprint', 'title', 'file', 'description']) {
|
|
109
|
+
if (typeof f[k] !== 'string' || !String(f[k]).trim()) {
|
|
110
|
+
throw new Error(`Each finding must have a non-empty string "${k}"`);
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
const optionalString = (key) => {
|
|
115
|
+
const v = o[key];
|
|
116
|
+
return typeof v === 'string' && v.trim() ? v : undefined;
|
|
117
|
+
};
|
|
118
|
+
let similarDismissed;
|
|
119
|
+
if (Array.isArray(o.similar_dismissed)) {
|
|
120
|
+
similarDismissed = [];
|
|
121
|
+
for (const item of o.similar_dismissed) {
|
|
122
|
+
if (!item || typeof item !== 'object')
|
|
123
|
+
continue;
|
|
124
|
+
const s = item;
|
|
125
|
+
if (typeof s.fingerprint !== 'string' || !s.fingerprint.trim())
|
|
126
|
+
continue;
|
|
127
|
+
if (typeof s.file !== 'string' || !s.file.trim())
|
|
128
|
+
continue;
|
|
129
|
+
similarDismissed.push({
|
|
130
|
+
fingerprint: s.fingerprint,
|
|
131
|
+
file: s.file,
|
|
132
|
+
cwe: typeof s.cwe === 'string' ? s.cwe : undefined,
|
|
133
|
+
dismissal_reason: typeof s.dismissal_reason === 'string' ? s.dismissal_reason : undefined,
|
|
134
|
+
});
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
return {
|
|
138
|
+
findings: o.findings,
|
|
139
|
+
project_summary: optionalString('project_summary'),
|
|
140
|
+
security_context: optionalString('security_context'),
|
|
141
|
+
deployment_context: optionalString('deployment_context'),
|
|
142
|
+
developer_context: optionalString('developer_context'),
|
|
143
|
+
similar_dismissed: similarDismissed,
|
|
144
|
+
metadata: o.metadata && typeof o.metadata === 'object'
|
|
145
|
+
? {
|
|
146
|
+
project_name: typeof o.metadata.project_name === 'string'
|
|
147
|
+
? o.metadata.project_name
|
|
148
|
+
: undefined,
|
|
149
|
+
}
|
|
150
|
+
: undefined,
|
|
151
|
+
};
|
|
152
|
+
}
|
|
153
|
+
/**
|
|
154
|
+
* Normalize fingerprint-keyed findings into a stable shape for the prompt's
|
|
155
|
+
* JSON block. Mirrors `toSecurityFindings` for `pr_adversary` but preserves
|
|
156
|
+
* the parent-app `fingerprint` field that drives the verdict round-trip.
|
|
157
|
+
*/
|
|
158
|
+
function toFpAdversaryFindings(ctx) {
|
|
159
|
+
const ALLOWED_SEVERITY = new Set(['CRITICAL', 'HIGH', 'MEDIUM', 'LOW', 'INFO']);
|
|
160
|
+
const ALLOWED_CONFIDENCE = new Set(['HIGH', 'MEDIUM', 'LOW']);
|
|
161
|
+
return ctx.findings.map((f) => {
|
|
162
|
+
const sev = (f.severity || 'MEDIUM').toUpperCase();
|
|
163
|
+
const conf = (f.confidence || 'MEDIUM').toUpperCase();
|
|
164
|
+
return {
|
|
165
|
+
fingerprint: f.fingerprint,
|
|
166
|
+
title: f.title,
|
|
167
|
+
severity: ALLOWED_SEVERITY.has(sev) ? sev : 'MEDIUM',
|
|
168
|
+
confidence: ALLOWED_CONFIDENCE.has(conf) ? conf : 'MEDIUM',
|
|
169
|
+
category: f.category && f.category.trim() ? f.category : 'Security',
|
|
170
|
+
file: f.file,
|
|
171
|
+
line_numbers: f.line_numbers,
|
|
172
|
+
cwe_id: f.cwe_id,
|
|
173
|
+
cwe: f.cwe,
|
|
174
|
+
description: f.description,
|
|
175
|
+
recommendation: f.recommendation || '',
|
|
176
|
+
code_snippet: f.code_snippet,
|
|
177
|
+
impact: f.impact,
|
|
178
|
+
};
|
|
179
|
+
});
|
|
180
|
+
}
|
|
181
|
+
/**
|
|
182
|
+
* Build the user message for the fp_adversary role.
|
|
183
|
+
*
|
|
184
|
+
* Layout:
|
|
185
|
+
* 1. Adversarial-review framing (verdict criteria, threshold guidance).
|
|
186
|
+
* 2. `### Project posture (from extraction)` block with the four
|
|
187
|
+
* structured context fields if present (precedes the integrator's `-c`
|
|
188
|
+
* additional context to keep parent-app posture authoritative).
|
|
189
|
+
* 3. `-c` additional context block.
|
|
190
|
+
* 4. Similar-dismissed precedent block (if any).
|
|
191
|
+
* 5. Candidate findings JSON.
|
|
192
|
+
*/
|
|
193
|
+
function buildFpAdversaryUserPrompt(ctx, opts = {}) {
|
|
194
|
+
const lines = [
|
|
195
|
+
'## Adversarial false-positive review (full-repo, second pass)',
|
|
196
|
+
'',
|
|
197
|
+
'You are given candidate findings from an initial full-repo security scan. For each finding, return a verdict: **confirm** (a real, exploitable issue) or **dismiss** (a likely false positive).',
|
|
198
|
+
'',
|
|
199
|
+
'**Confirm** only when you can name a *concrete failure path*: a plausible input or trigger, the relevant call site in the repo, and a security-relevant outcome (data leak, RCE, auth bypass, privilege escalation, etc.). Use Read/Grep to verify reachability.',
|
|
200
|
+
'**Dismiss** when the finding is vague, already mitigated by code you can see, test-only/example code, configuration-only with no production impact, or you cannot name a specific exploit or failure path.',
|
|
201
|
+
'',
|
|
202
|
+
'For each verdict provide:',
|
|
203
|
+
'- `fingerprint` — copy verbatim from the input.',
|
|
204
|
+
'- `verdict` — `confirm` or `dismiss`.',
|
|
205
|
+
'- `confidence` — numeric 0.0–1.0. Use ≥0.85 for dismissals only when the evidence is strong (mitigation seen, code is test-only, etc.). Lower values route the finding to a pre-dismissed UI state instead of full auto-dismissal on the parent side.',
|
|
206
|
+
'- `rationale` — ≤500 chars. State the concrete evidence (which file, which mitigation, which reachability gap).',
|
|
207
|
+
'',
|
|
208
|
+
'Return one JSON object matching the `fp_adversary_report` schema. Include exactly one verdict per input finding; missing verdicts are treated as `confirm` by the parent app (no silent drops).',
|
|
209
|
+
'',
|
|
210
|
+
];
|
|
211
|
+
const posture = [];
|
|
212
|
+
if (ctx.project_summary)
|
|
213
|
+
posture.push(`**Project summary:**\n${ctx.project_summary}`);
|
|
214
|
+
if (ctx.security_context)
|
|
215
|
+
posture.push(`**Security context:**\n${ctx.security_context}`);
|
|
216
|
+
if (ctx.deployment_context)
|
|
217
|
+
posture.push(`**Deployment context:**\n${ctx.deployment_context}`);
|
|
218
|
+
if (ctx.developer_context)
|
|
219
|
+
posture.push(`**Developer context:**\n${ctx.developer_context}`);
|
|
220
|
+
if (posture.length > 0) {
|
|
221
|
+
lines.push('### Project posture (from extraction)');
|
|
222
|
+
lines.push(...posture);
|
|
223
|
+
lines.push('');
|
|
224
|
+
lines.push('Weight the posture above when assessing each finding: e.g., if `security_context` names a parameterized-query library, a SQL-injection finding on that path should require concrete evidence of bypass before confirming.');
|
|
225
|
+
lines.push('');
|
|
226
|
+
}
|
|
227
|
+
if (opts.additionalContext) {
|
|
228
|
+
lines.push('### Additional context (from integrator)');
|
|
229
|
+
lines.push(opts.additionalContext);
|
|
230
|
+
lines.push('');
|
|
231
|
+
}
|
|
232
|
+
if (ctx.similar_dismissed && ctx.similar_dismissed.length > 0) {
|
|
233
|
+
lines.push('### Similar prior dismissals (precedent)');
|
|
234
|
+
lines.push('These fingerprints were previously dismissed on this project. If a candidate finding mirrors the pattern, consider the same dismissal — but verify the code still matches.');
|
|
235
|
+
for (const s of ctx.similar_dismissed) {
|
|
236
|
+
const cweTag = s.cwe ? `, CWE=${s.cwe}` : '';
|
|
237
|
+
const reasonTag = s.dismissal_reason ? ` — ${s.dismissal_reason}` : '';
|
|
238
|
+
lines.push(`- \`${s.fingerprint}\` (${s.file}${cweTag})${reasonTag}`);
|
|
239
|
+
}
|
|
240
|
+
lines.push('');
|
|
241
|
+
}
|
|
242
|
+
if (ctx.metadata?.project_name) {
|
|
243
|
+
lines.push(`**Project:** ${ctx.metadata.project_name}`);
|
|
244
|
+
lines.push('');
|
|
245
|
+
}
|
|
246
|
+
lines.push('### Candidate findings (input)');
|
|
247
|
+
lines.push('```json');
|
|
248
|
+
lines.push(JSON.stringify({ findings: toFpAdversaryFindings(ctx) }, null, 2));
|
|
249
|
+
lines.push('```');
|
|
250
|
+
lines.push('');
|
|
251
|
+
lines.push('Analyze with Read/Grep against the source tree (and MCP tools if available — queryImportGraph for reachability, queryCodebaseGraph for callers/callees, queryRuntimeEnrichment for runtime-incident overlap) as needed, then output the verdict array JSON only (structured output).');
|
|
252
|
+
return lines.join('\n');
|
|
253
|
+
}
|
|
254
|
+
/** Empty report shell for tests / fallbacks. */
|
|
255
|
+
function emptyFpAdversaryReport() {
|
|
256
|
+
return { fp_adversary_report: { verdicts: [] } };
|
|
257
|
+
}
|
|
258
|
+
//# sourceMappingURL=fp_adversary_pass.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"fp_adversary_pass.js","sourceRoot":"","sources":["../../../src/schemas/fp_adversary_pass.ts"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;GAmBG;;;AA6IH,kEA+DC;AAOD,sDAsCC;AAcD,gEAwEC;AAGD,wDAEC;AA9QD;;;;;;GAMG;AACU,QAAA,0BAA0B,GAAG;IACxC,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE,CAAC,qBAAqB,CAAC;IACjC,oBAAoB,EAAE,KAAK;IAC3B,UAAU,EAAE;QACV,mBAAmB,EAAE;YACnB,IAAI,EAAE,QAAQ;YACd,QAAQ,EAAE,CAAC,UAAU,CAAC;YACtB,oBAAoB,EAAE,KAAK;YAC3B,UAAU,EAAE;gBACV,QAAQ,EAAE;oBACR,IAAI,EAAE,OAAO;oBACb,KAAK,EAAE;wBACL,IAAI,EAAE,QAAQ;wBACd,QAAQ,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,CAAC;wBAC/D,oBAAoB,EAAE,KAAK;wBAC3B,UAAU,EAAE;4BACV,WAAW,EAAE;gCACX,IAAI,EAAE,QAAQ;gCACd,WAAW,EACT,4EAA4E;6BAC/E;4BACD,OAAO,EAAE;gCACP,IAAI,EAAE,QAAQ;gCACd,IAAI,EAAE,CAAC,SAAS,EAAE,SAAS,CAAC;gCAC5B,WAAW,EACT,qKAAqK;6BACxK;4BACD,UAAU,EAAE;gCACV,IAAI,EAAE,QAAQ;gCACd,OAAO,EAAE,CAAC;gCACV,OAAO,EAAE,CAAC;gCACV,WAAW,EACT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ent management",
|
|
5
5
|
"author": "Sam Li",
|
|
6
|
-
"date": "May
|
|
6
|
+
"date": "May 27 2026",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"main": "dist/src/index.js",
|
|
9
9
|
"types": "dist/src/index.d.ts",
|