omniqa 0.6.1 → 0.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 +10 -1
- package/dist/.tsbuildinfo +1 -1
- package/dist/cli.js +9 -1
- package/dist/cli.js.map +1 -1
- package/dist/commands/doctor.d.ts +7 -0
- package/dist/commands/doctor.d.ts.map +1 -1
- package/dist/commands/doctor.js +77 -5
- package/dist/commands/doctor.js.map +1 -1
- package/dist/commands/init.d.ts +15 -0
- package/dist/commands/init.d.ts.map +1 -1
- package/dist/commands/init.js +219 -26
- package/dist/commands/init.js.map +1 -1
- package/dist/commands/install.d.ts.map +1 -1
- package/dist/commands/install.js +20 -3
- package/dist/commands/install.js.map +1 -1
- package/dist/commands/knowledge.d.ts +23 -0
- package/dist/commands/knowledge.d.ts.map +1 -1
- package/dist/commands/knowledge.js +215 -39
- package/dist/commands/knowledge.js.map +1 -1
- package/dist/commands/plan-add.d.ts.map +1 -1
- package/dist/commands/plan-add.js +23 -1
- package/dist/commands/plan-add.js.map +1 -1
- package/dist/commands/plan.d.ts.map +1 -1
- package/dist/commands/plan.js +10 -6
- package/dist/commands/plan.js.map +1 -1
- package/dist/commands/security.d.ts +7 -0
- package/dist/commands/security.d.ts.map +1 -0
- package/dist/commands/security.js +76 -0
- package/dist/commands/security.js.map +1 -0
- package/dist/commands/status.d.ts.map +1 -1
- package/dist/commands/status.js +2 -2
- package/dist/commands/status.js.map +1 -1
- package/dist/commands/test.d.ts +10 -0
- package/dist/commands/test.d.ts.map +1 -1
- package/dist/commands/test.js +61 -7
- package/dist/commands/test.js.map +1 -1
- package/dist/commands/write.d.ts.map +1 -1
- package/dist/commands/write.js +52 -5
- package/dist/commands/write.js.map +1 -1
- package/dist/coverage-page.d.ts.map +1 -1
- package/dist/coverage-page.js +2 -2
- package/dist/coverage-page.js.map +1 -1
- package/dist/devices.d.ts +4 -2
- package/dist/devices.d.ts.map +1 -1
- package/dist/devices.js +3 -3
- package/dist/devices.js.map +1 -1
- package/dist/mcp/tools.d.ts.map +1 -1
- package/dist/mcp/tools.js +3 -2
- package/dist/mcp/tools.js.map +1 -1
- package/dist/planner.d.ts.map +1 -1
- package/dist/planner.js +13 -9
- package/dist/planner.js.map +1 -1
- package/dist/qa.d.ts.map +1 -1
- package/dist/qa.js +2 -1
- package/dist/qa.js.map +1 -1
- package/dist/runner.d.ts +1 -1
- package/dist/runner.d.ts.map +1 -1
- package/dist/runner.js +64 -56
- package/dist/runner.js.map +1 -1
- package/dist/security-checks.d.ts +146 -0
- package/dist/security-checks.d.ts.map +1 -0
- package/dist/security-checks.js +661 -0
- package/dist/security-checks.js.map +1 -0
- package/dist/security-gates.d.ts +37 -0
- package/dist/security-gates.d.ts.map +1 -0
- package/dist/security-gates.js +46 -0
- package/dist/security-gates.js.map +1 -0
- package/dist/security-mask.d.ts +35 -0
- package/dist/security-mask.d.ts.map +1 -0
- package/dist/security-mask.js +104 -0
- package/dist/security-mask.js.map +1 -0
- package/dist/security-report.d.ts +93 -0
- package/dist/security-report.d.ts.map +1 -0
- package/dist/security-report.js +170 -0
- package/dist/security-report.js.map +1 -0
- package/dist/security-request.d.ts +109 -0
- package/dist/security-request.d.ts.map +1 -0
- package/dist/security-request.js +254 -0
- package/dist/security-request.js.map +1 -0
- package/dist/security-research.d.ts +131 -0
- package/dist/security-research.d.ts.map +1 -0
- package/dist/security-research.js +581 -0
- package/dist/security-research.js.map +1 -0
- package/dist/security-scan.d.ts +98 -0
- package/dist/security-scan.d.ts.map +1 -0
- package/dist/security-scan.js +415 -0
- package/dist/security-scan.js.map +1 -0
- package/dist/security-sources.d.ts +55 -0
- package/dist/security-sources.d.ts.map +1 -0
- package/dist/security-sources.js +75 -0
- package/dist/security-sources.js.map +1 -0
- package/dist/security.d.ts +65 -0
- package/dist/security.d.ts.map +1 -0
- package/dist/security.js +624 -0
- package/dist/security.js.map +1 -0
- package/dist/sync.d.ts +12 -1
- package/dist/sync.d.ts.map +1 -1
- package/dist/sync.js +11 -3
- package/dist/sync.js.map +1 -1
- package/dist/test.d.ts +85 -0
- package/dist/test.d.ts.map +1 -1
- package/dist/test.js +337 -19
- package/dist/test.js.map +1 -1
- package/dist/writer.d.ts +5 -1
- package/dist/writer.d.ts.map +1 -1
- package/dist/writer.js +15 -12
- package/dist/writer.js.map +1 -1
- package/package.json +7 -7
- package/skills/security-research.md +57 -0
- package/skills/security-review.md +27 -0
|
@@ -0,0 +1,581 @@
|
|
|
1
|
+
import { readFile } from "node:fs/promises";
|
|
2
|
+
import { join, resolve, sep } from "node:path";
|
|
3
|
+
import { PRODUCT_FILE, renderHits, runAgent } from "@omniqa/core";
|
|
4
|
+
import { expectLogin, NoAnswer, requestRoute, seedContext } from "@omniqa/web";
|
|
5
|
+
import { endpointGroups } from "./knowledge.js";
|
|
6
|
+
import { gate } from "./security-gates.js";
|
|
7
|
+
import { accountSecrets, mask, sessionSecrets, unmask, window } from "./security-mask.js";
|
|
8
|
+
import { ANTI_FORGERY, parseRequest, renderRequest, withCookies, withHeader, withoutHeaders } from "./security-request.js";
|
|
9
|
+
export const SEVERITIES = ["critical", "high", "medium", "low"];
|
|
10
|
+
const WHOSE = { researcher: "the researcher", reviewer: "the reviewer", recheck: "the re-check of the report's claims" };
|
|
11
|
+
const str = (description) => ({ type: "string", description });
|
|
12
|
+
const int = (description) => ({ type: "integer", description });
|
|
13
|
+
const object = (properties, required = []) => ({ type: "object", properties, required, additionalProperties: false });
|
|
14
|
+
const strings = (description) => ({ type: "object", description });
|
|
15
|
+
const firstLine = (err) => err.message.split("\n")[0] || "failed";
|
|
16
|
+
const plural = (n, word) => `${n} ${word}${n === 1 ? "" : "s"}`;
|
|
17
|
+
/** The requests a claim is proved by at most: a proof is the answers that show the hole, not the search for it. */
|
|
18
|
+
const PROOF_REQUESTS = 6;
|
|
19
|
+
/** The rows of the capture an agent is listed at once. */
|
|
20
|
+
const LISTED = 150;
|
|
21
|
+
/** The headers a session rides in: what `as` puts in or takes out. */
|
|
22
|
+
const sessionHeader = (name) => ["cookie", "authorization"].includes(name.toLowerCase()) || ANTI_FORGERY.test(name);
|
|
23
|
+
const OWASP = ["A01", "A02", "A03", "A04", "A05", "A06", "A07", "A08", "A09", "A10"];
|
|
24
|
+
export function openScan(o) {
|
|
25
|
+
const { product, environment, sidecar } = o;
|
|
26
|
+
const origin = new URL(environment.url).origin;
|
|
27
|
+
const names = ["guest", ...Object.keys(product.accounts)];
|
|
28
|
+
const actors = new Map();
|
|
29
|
+
/** Who made a request of the capture: the actor whose page was open, or who an agent sent it as. */
|
|
30
|
+
const who = new Map();
|
|
31
|
+
const ledger = [];
|
|
32
|
+
const counts = { researcher: { sent: 0, read: 0 }, reviewer: { sent: 0, read: 0 }, recheck: { sent: 0, read: 0 } };
|
|
33
|
+
const claims = [];
|
|
34
|
+
const tried = [];
|
|
35
|
+
const refused = [];
|
|
36
|
+
/** Every secret the scan has held, the newest of a placeholder first: a session the product renewed is still masked in what was captured before. */
|
|
37
|
+
let held = [];
|
|
38
|
+
/** Whatever passed the proxy is known once Interceptor has answered anything. */
|
|
39
|
+
const settled = async () => void (await sidecar.findings());
|
|
40
|
+
const refuse = (reason) => {
|
|
41
|
+
if (!refused.includes(reason))
|
|
42
|
+
refused.push(reason);
|
|
43
|
+
return `not sent: ${reason}`;
|
|
44
|
+
};
|
|
45
|
+
/** An actor's browser: a context of its own behind the sidecar, signed in when it is an account. Opened when first asked for. */
|
|
46
|
+
const actor = (name) => {
|
|
47
|
+
if (!names.includes(name))
|
|
48
|
+
return Promise.reject(new Error(`${JSON.stringify(name)} is no actor of this scan: there ${names.length === 1 ? "is" : "are"} ${names.join(", ")}, and nobody (no session at all)`));
|
|
49
|
+
// A sign-in is a request that writes: the environment's switch keeps it out, as it keeps a basic check that signs in.
|
|
50
|
+
if (name !== "guest" && !environment.mutations)
|
|
51
|
+
return Promise.reject(new Error(`${name} cannot sign in: ${environment.name} is read-only (mutations: false in ${PRODUCT_FILE})`));
|
|
52
|
+
const opened = actors.get(name) ?? (async () => {
|
|
53
|
+
await settled();
|
|
54
|
+
const before = new Set(sidecar.flows().map((flow) => flow.id));
|
|
55
|
+
const context = await o.browser.newContext({ baseURL: environment.url, testIdAttribute: o.testIdAttribute });
|
|
56
|
+
try {
|
|
57
|
+
await seedContext(context, environment, environment.url);
|
|
58
|
+
const page = await context.newPage();
|
|
59
|
+
const headers = new Map();
|
|
60
|
+
page.on("request", (request) => {
|
|
61
|
+
for (const [header, value] of Object.entries(request.headers()))
|
|
62
|
+
if (header.toLowerCase() !== "cookie" && sessionHeader(header))
|
|
63
|
+
headers.set(header.toLowerCase(), value);
|
|
64
|
+
});
|
|
65
|
+
if (name !== "guest")
|
|
66
|
+
await expectLogin(page, environment.url, product.crawl.loginPath, product.accounts[name], name);
|
|
67
|
+
await settled();
|
|
68
|
+
for (const flow of sidecar.flows())
|
|
69
|
+
if (!before.has(flow.id))
|
|
70
|
+
who.set(flow.id, name);
|
|
71
|
+
return { name, context, page, headers };
|
|
72
|
+
}
|
|
73
|
+
catch (err) {
|
|
74
|
+
await context.close().catch(() => undefined);
|
|
75
|
+
throw err;
|
|
76
|
+
}
|
|
77
|
+
})();
|
|
78
|
+
actors.set(name, opened);
|
|
79
|
+
// One that could not sign in is tried again when asked again.
|
|
80
|
+
opened.catch(() => actors.delete(name));
|
|
81
|
+
return opened;
|
|
82
|
+
};
|
|
83
|
+
const secrets = async () => {
|
|
84
|
+
const now = accountSecrets(product.accounts);
|
|
85
|
+
for (const opened of actors.values()) {
|
|
86
|
+
const a = await opened.catch(() => undefined);
|
|
87
|
+
if (a === undefined)
|
|
88
|
+
continue;
|
|
89
|
+
const authorization = a.headers.get("authorization");
|
|
90
|
+
now.push(...sessionSecrets(a.name, (await a.context.cookies()).map((cookie) => [cookie.name, cookie.value]), authorization === undefined ? [] : [authorization]));
|
|
91
|
+
}
|
|
92
|
+
held = [...now, ...held.filter((old) => !now.some((s) => s.value === old.value))];
|
|
93
|
+
return held;
|
|
94
|
+
};
|
|
95
|
+
const shown = async (text) => mask(text, await secrets());
|
|
96
|
+
/**
|
|
97
|
+
* `text` carrying the session of `as` as it is now, and no other: its browser's cookies for that url, and each further
|
|
98
|
+
* session header the request has as that actor's pages send it. A request made from nothing (`bare`) has no header to
|
|
99
|
+
* swap, so it gets the Authorization that actor's pages send: where the session is a token, that is the session.
|
|
100
|
+
*/
|
|
101
|
+
const withSession = async (text, url, as, bare = false) => {
|
|
102
|
+
if (as === "nobody")
|
|
103
|
+
return withoutHeaders(text, ["cookie", "authorization"]);
|
|
104
|
+
const a = await actor(as);
|
|
105
|
+
let out = withCookies(text, (await a.context.cookies(url.href)).map((cookie) => [cookie.name, cookie.value]));
|
|
106
|
+
for (const [header] of text.headers) {
|
|
107
|
+
if (header.toLowerCase() === "cookie" || !sessionHeader(header))
|
|
108
|
+
continue;
|
|
109
|
+
const theirs = a.headers.get(header.toLowerCase());
|
|
110
|
+
out = theirs === undefined ? withoutHeaders(out, [header]) : withHeader(out, header, theirs);
|
|
111
|
+
}
|
|
112
|
+
const authorization = a.headers.get("authorization");
|
|
113
|
+
return !bare || authorization === undefined || out.headers.some(([header]) => header.toLowerCase() === "authorization") ? out : withHeader(out, "Authorization", authorization);
|
|
114
|
+
};
|
|
115
|
+
/** A request of the capture for the repeater to send a copy of: the newest that is no asset. */
|
|
116
|
+
const captured = () => sidecar.flows().findLast((flow) => !flow.asset)?.id ?? sidecar.flows()[0]?.id;
|
|
117
|
+
/** The one way a request leaves: the gates on what would be sent, the sender's budget, then the repeater. Resolves to the request as it was answered, or to why it did not leave. */
|
|
118
|
+
const leave = async (by, as, text, url, why) => {
|
|
119
|
+
const refusal = gate(environment, { method: text.method, url: url.href, body: text.body, headers: text.headers.map(([header]) => header) }, counts[by].sent, { requests: o.budgets[by], whose: WHOSE[by] });
|
|
120
|
+
if (refusal !== undefined)
|
|
121
|
+
return refuse(refusal.replace(/^.*? is not sent: /, `${text.method.toUpperCase()} ${requestRoute(url.pathname)}: `));
|
|
122
|
+
await settled();
|
|
123
|
+
// The repeater sends a copy of a captured request: any one will do, since the text is the whole request and its url says where it goes.
|
|
124
|
+
let on = captured();
|
|
125
|
+
if (on === undefined) {
|
|
126
|
+
// Nothing was captured yet (a proof sent again before any page was opened): the start page, as a guest, is one.
|
|
127
|
+
await (await actor("guest")).page.goto(environment.url).catch(() => undefined);
|
|
128
|
+
await settled();
|
|
129
|
+
on = captured();
|
|
130
|
+
}
|
|
131
|
+
if (on === undefined)
|
|
132
|
+
return "not sent: the product's start page could not be opened, and a request leaves through the proxy on top of a captured one";
|
|
133
|
+
counts[by].sent++;
|
|
134
|
+
const entry = { id: "", by, as, method: text.method.toUpperCase(), url: url.href, why };
|
|
135
|
+
try {
|
|
136
|
+
const answer = await sidecar.replay(on, { raw: renderRequest({ ...text, target: url.href }), label: `${by}: ${why}`.slice(0, 200) });
|
|
137
|
+
Object.assign(entry, { id: answer.id, status: answer.status }, answer.location === undefined ? {} : { location: answer.location });
|
|
138
|
+
}
|
|
139
|
+
catch (err) {
|
|
140
|
+
if (!(err instanceof NoAnswer))
|
|
141
|
+
throw err;
|
|
142
|
+
}
|
|
143
|
+
// One that got no answer is part of what was sent all the same; it has no flow to read or to prove with.
|
|
144
|
+
ledger.push(entry);
|
|
145
|
+
if (entry.id !== "")
|
|
146
|
+
who.set(entry.id, as);
|
|
147
|
+
// By its route: the transcript says what was asked and why, never a value.
|
|
148
|
+
await o.transcript.append({ kind: "request", by, as, request: `${entry.method} ${requestRoute(url.pathname)}`, ...(entry.status === undefined ? {} : { status: entry.status }), why });
|
|
149
|
+
return entry;
|
|
150
|
+
};
|
|
151
|
+
/** An answer as an agent reads it: the status, the headers, 8 KB of the body from `from`. */
|
|
152
|
+
const answerText = async (id, from = 0) => {
|
|
153
|
+
const answer = await sidecar.answer(id);
|
|
154
|
+
if (answer === undefined)
|
|
155
|
+
return "no answer";
|
|
156
|
+
const all = await secrets();
|
|
157
|
+
const body = window(mask(answer.body, all), from);
|
|
158
|
+
return from > 0 ? `the answer's body from ${from}:\n${body}` : `${answer.status}\n${mask(answer.headers.map(([name, value]) => `${name}: ${value}`).join("\n"), all)}\n\n${body}`;
|
|
159
|
+
};
|
|
160
|
+
const left = (by) => `${o.budgets[by] - counts[by].sent} of ${o.budgets[by]} requests left`;
|
|
161
|
+
const sentText = async (by, out, as, text, url) => {
|
|
162
|
+
if (typeof out === "string")
|
|
163
|
+
return out;
|
|
164
|
+
const line = `${text.method.toUpperCase()} ${await shown(`${url.pathname}${url.search}`)} as ${as}`;
|
|
165
|
+
if (out.id === "")
|
|
166
|
+
return `${line}: no answer (the connection failed, or nothing came in time); ${left(by)}`;
|
|
167
|
+
return `${out.id}: ${line} → ${await answerText(out.id)}\n(${left(by)})`;
|
|
168
|
+
};
|
|
169
|
+
/** A request of an agent's own design: a captured one with what the agent changes, or what it names on nothing. What the agent wrote gets its placeholders' values back; what it took from the capture stays as it was captured. */
|
|
170
|
+
const compose = async (base, edit) => {
|
|
171
|
+
const all = await secrets();
|
|
172
|
+
const real = (written) => unmask(String(written), all);
|
|
173
|
+
let text = { method: "GET", target: "/", version: "HTTP/1.1", headers: [], body: "" };
|
|
174
|
+
let at = new URL(origin);
|
|
175
|
+
if (base !== undefined) {
|
|
176
|
+
const raw = await sidecar.raw(base);
|
|
177
|
+
const flow = sidecar.flows().find((f) => f.id === base);
|
|
178
|
+
const sent = ledger.find((s) => s.id === base);
|
|
179
|
+
if (raw === undefined || (flow === undefined && sent === undefined))
|
|
180
|
+
return `not sent: no request ${base} to start from (list_requests shows the ids; a streamed request or one over 5 MB has no text to edit)`;
|
|
181
|
+
text = parseRequest(raw);
|
|
182
|
+
at = sent === undefined ? new URL(text.target, `${flow?.scheme}://${flow?.host}:${flow?.port}`) : new URL(sent.url);
|
|
183
|
+
}
|
|
184
|
+
if (edit.method !== undefined)
|
|
185
|
+
text = { ...text, method: edit.method.toUpperCase() };
|
|
186
|
+
if (edit.path !== undefined) {
|
|
187
|
+
const path = real(edit.path);
|
|
188
|
+
if (!/^(\/|https?:\/\/)/i.test(path))
|
|
189
|
+
return `not sent: a path starts with / (or is a whole url of the product): ${JSON.stringify(edit.path)}`;
|
|
190
|
+
at = new URL(path, at.origin);
|
|
191
|
+
}
|
|
192
|
+
for (const [name, value] of Object.entries(edit.query ?? {}))
|
|
193
|
+
at.searchParams.set(name, real(value));
|
|
194
|
+
text = withHeader(text, "Host", at.host);
|
|
195
|
+
for (const [name, value] of Object.entries(edit.headers ?? {}))
|
|
196
|
+
text = String(value) === "" ? withoutHeaders(text, [name]) : withHeader(text, name, real(value));
|
|
197
|
+
if (edit.body !== undefined)
|
|
198
|
+
text = { ...text, body: real(edit.body) };
|
|
199
|
+
return { text: { ...text, target: `${at.pathname}${at.search}` }, url: at, ...(base === undefined ? {} : { from: who.get(base) }) };
|
|
200
|
+
};
|
|
201
|
+
const AS = `guest, an account (${names.slice(1).join(", ") || "product.yaml names none"}) or nobody (no session at all)`;
|
|
202
|
+
const EDIT = {
|
|
203
|
+
base: str("The id of a captured request to start from: its method, path, headers and body are kept where you name nothing else. Without it the request is only what you name"),
|
|
204
|
+
as: str(`Whose session it carries: ${AS}. Default: whoever made the base, or nobody without one`),
|
|
205
|
+
method: str("GET, POST, PUT, PATCH, DELETE, …"),
|
|
206
|
+
path: str("The path with its query, e.g. /api/orders/2?expand=items"),
|
|
207
|
+
query: strings('Query parameters to set, as an object of strings: {"page": "2"}'),
|
|
208
|
+
headers: strings('Headers to set, as an object of strings; an empty string takes a header out: {"X-Role": "admin", "Origin": ""}'),
|
|
209
|
+
body: str("The body, as it is sent"),
|
|
210
|
+
why: str("What you expect this request to show, in a sentence: it is kept with the request"),
|
|
211
|
+
};
|
|
212
|
+
/** send_request for one of the agents: composed, given its session, sent through the gates. */
|
|
213
|
+
const sendRequest = async (by, a) => {
|
|
214
|
+
let composed;
|
|
215
|
+
try {
|
|
216
|
+
composed = await compose(a.base, a);
|
|
217
|
+
}
|
|
218
|
+
catch (err) {
|
|
219
|
+
return shown(`not sent: ${firstLine(err)}`);
|
|
220
|
+
}
|
|
221
|
+
if (typeof composed === "string")
|
|
222
|
+
return composed;
|
|
223
|
+
const as = a.as ?? composed.from ?? "nobody";
|
|
224
|
+
let text = composed.text;
|
|
225
|
+
try {
|
|
226
|
+
// A request whose maker nobody knows keeps the session it was captured with.
|
|
227
|
+
if (as !== "?")
|
|
228
|
+
text = await withSession(text, composed.url, as, a.base === undefined);
|
|
229
|
+
// What the agent names itself is its own to say, a session header too.
|
|
230
|
+
const all = await secrets();
|
|
231
|
+
for (const [name, value] of Object.entries((a.headers ?? {})))
|
|
232
|
+
if (sessionHeader(name))
|
|
233
|
+
text = String(value) === "" ? withoutHeaders(text, [name]) : withHeader(text, name, unmask(String(value), all));
|
|
234
|
+
}
|
|
235
|
+
catch (err) {
|
|
236
|
+
// What a failed sign-in says may quote the page: it is shown like everything else an agent reads.
|
|
237
|
+
return shown(`not sent: ${firstLine(err)}`);
|
|
238
|
+
}
|
|
239
|
+
return sentText(by, await leave(by, as, text, composed.url, String(a.why)), as, text, composed.url);
|
|
240
|
+
};
|
|
241
|
+
const readRequest = (by) => ({
|
|
242
|
+
name: "read_request",
|
|
243
|
+
description: "A request of the capture and its answer, by id: the request as text, then the answer's status, headers and body, credentials masked. A body is shown 8 KB at a time; `from` asks for the next part.",
|
|
244
|
+
schema: object({ id: str("The request's id, as browse, list_requests and send_request give it"), from: int("Where in the answer's body to start (default 0)") }, ["id"]),
|
|
245
|
+
run: async (a) => {
|
|
246
|
+
const id = String(a.id);
|
|
247
|
+
await settled();
|
|
248
|
+
if (id === "" || (!ledger.some((s) => s.id === id) && !sidecar.flows().some((flow) => flow.id === id)))
|
|
249
|
+
return `no request ${id} in the capture (list_requests shows the ids)`;
|
|
250
|
+
const raw = await sidecar.raw(id);
|
|
251
|
+
const from = a.from ?? 0;
|
|
252
|
+
const answer = await answerText(id, from);
|
|
253
|
+
counts[by].read++;
|
|
254
|
+
if (from > 0)
|
|
255
|
+
return answer;
|
|
256
|
+
return [`a request of ${who.get(id) ?? "nobody the scan knows"}:`, raw === undefined ? "(its text is not kept: streamed, or over 5 MB)" : window(await shown(raw)), "", "its answer:", answer].join("\n");
|
|
257
|
+
},
|
|
258
|
+
});
|
|
259
|
+
const compare = {
|
|
260
|
+
name: "compare",
|
|
261
|
+
description: "Two answers of the capture side by side: what differs between them, line by line (status, headers, body; a JSON body field by field).",
|
|
262
|
+
schema: object({ a: str("A request's id"), b: str("Another request's id"), which: { type: "string", enum: ["response", "request"], description: "response (default): the answers; request: what was sent" } }, ["a", "b"]),
|
|
263
|
+
run: async (a) => {
|
|
264
|
+
try {
|
|
265
|
+
return window(await shown(await sidecar.diff(String(a.a), String(a.b), a.which ?? "response")));
|
|
266
|
+
}
|
|
267
|
+
catch (err) {
|
|
268
|
+
return `not compared: ${firstLine(err).replace(/^Interceptor refused the diff: /, "")}`;
|
|
269
|
+
}
|
|
270
|
+
},
|
|
271
|
+
};
|
|
272
|
+
const resend = async (proof, by) => {
|
|
273
|
+
const out = [];
|
|
274
|
+
for (const [i, p] of proof.entries()) {
|
|
275
|
+
try {
|
|
276
|
+
// Whoever the request needs is signed in first: who it was sent as, and whoever's session it names.
|
|
277
|
+
const owners = new Set([p.as, ...[...p.request.matchAll(/<(?:session|authorization):([^:<>|]+)/g)].map((m) => m[1])]);
|
|
278
|
+
for (const owner of owners) {
|
|
279
|
+
if (!names.includes(owner))
|
|
280
|
+
continue;
|
|
281
|
+
const a = await actor(owner);
|
|
282
|
+
// A session header that actor's pages have not sent yet in this scan (a token a page's script fetches): the page the
|
|
283
|
+
// request came from is opened once, as that actor, so its script sends it.
|
|
284
|
+
const from = URL.parse(parseRequest(p.request).headers.find(([header]) => header.toLowerCase() === "referer")?.[1] ?? "");
|
|
285
|
+
const wanted = p.request.includes(`<authorization:${owner}>`) && !a.headers.has("authorization");
|
|
286
|
+
if (wanted && from !== null && from.origin === origin && gate(environment, { method: "GET", url: from.href }, counts[by].sent, { requests: o.budgets[by], whose: WHOSE[by] }) === undefined) {
|
|
287
|
+
await a.page.goto(`${from.origin}${from.pathname}`).catch(() => undefined);
|
|
288
|
+
await a.page.waitForLoadState("networkidle", { timeout: 5_000 }).catch(() => undefined);
|
|
289
|
+
}
|
|
290
|
+
}
|
|
291
|
+
let text = parseRequest(unmask(p.request, await secrets()));
|
|
292
|
+
const url = new URL(text.target);
|
|
293
|
+
text = { ...text, target: `${url.pathname}${url.search}` };
|
|
294
|
+
if (p.as !== "?")
|
|
295
|
+
text = await withSession(text, url, p.as);
|
|
296
|
+
const sent = await leave(by, p.as, text, url, `request ${i + 1} of a proof, again`);
|
|
297
|
+
out.push(typeof sent === "string" ? { refused: sent.replace(/^not sent: /, "") } : sent.id === "" ? {} : { id: sent.id, ...(sent.status === undefined ? {} : { status: sent.status }), ...(sent.location === undefined ? {} : { location: sent.location }) });
|
|
298
|
+
}
|
|
299
|
+
catch (err) {
|
|
300
|
+
out.push({ refused: firstLine(err) });
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
return out;
|
|
304
|
+
};
|
|
305
|
+
return {
|
|
306
|
+
claims,
|
|
307
|
+
tried,
|
|
308
|
+
refused,
|
|
309
|
+
spent: (by) => ({ ...counts[by] }),
|
|
310
|
+
sent: (by) => ledger.filter((s) => s.by === by).map((s) => `${s.method} ${requestRoute(new URL(s.url).pathname)} as ${s.as} → ${s.status ?? "no answer"}: ${s.why}`),
|
|
311
|
+
shown,
|
|
312
|
+
resend,
|
|
313
|
+
researcher: () => [
|
|
314
|
+
{
|
|
315
|
+
name: "browse",
|
|
316
|
+
description: "Opens a page of the product in a browser behind the proxy, as a guest or as an account (signed in the first time it is asked for), and lists the requests the page made, each with its id. Counts as one request of yours.",
|
|
317
|
+
schema: object({ as: str(`guest, or an account: ${names.slice(1).join(", ") || "product.yaml names none"}`), path: str("The page's path with its query, e.g. /orders?page=2") }, ["as", "path"]),
|
|
318
|
+
run: async (a) => {
|
|
319
|
+
const as = String(a.as);
|
|
320
|
+
const path = String(a.path);
|
|
321
|
+
if (!path.startsWith("/"))
|
|
322
|
+
return `not opened: a page is named by its path, e.g. /orders: ${JSON.stringify(path)}`;
|
|
323
|
+
let url;
|
|
324
|
+
let opened;
|
|
325
|
+
try {
|
|
326
|
+
url = new URL(unmask(path, await secrets()), origin);
|
|
327
|
+
const refusal = gate(environment, { method: "GET", url: url.href }, counts.researcher.sent, { requests: o.budgets.researcher, whose: WHOSE.researcher });
|
|
328
|
+
if (refusal !== undefined)
|
|
329
|
+
return refuse(refusal.replace(/^.*? is not sent: /, `GET ${requestRoute(url.pathname)}: `)).replace(/^not sent/, "not opened");
|
|
330
|
+
opened = await actor(as);
|
|
331
|
+
}
|
|
332
|
+
catch (err) {
|
|
333
|
+
return shown(`not opened: ${firstLine(err)}`);
|
|
334
|
+
}
|
|
335
|
+
counts.researcher.sent++;
|
|
336
|
+
await settled();
|
|
337
|
+
const before = new Set(sidecar.flows().map((flow) => flow.id));
|
|
338
|
+
const failed = await opened.page.goto(url.href).then(() => undefined, firstLine);
|
|
339
|
+
// A page that never goes quiet (it polls) is left after five seconds, as a walk leaves it.
|
|
340
|
+
await opened.page.waitForLoadState("networkidle", { timeout: 5_000 }).catch(() => undefined);
|
|
341
|
+
await settled();
|
|
342
|
+
const made = sidecar.flows().filter((flow) => !before.has(flow.id));
|
|
343
|
+
for (const flow of made)
|
|
344
|
+
who.set(flow.id, as);
|
|
345
|
+
await o.transcript.append({ kind: "request", by: "researcher", as, request: `GET ${requestRoute(url.pathname)}`, why: "a page opened in the browser" });
|
|
346
|
+
const requests = made.filter((flow) => !flow.asset);
|
|
347
|
+
return shown([
|
|
348
|
+
failed === undefined ? `${as} is on ${opened.page.url()} (${JSON.stringify(await opened.page.title().catch(() => ""))})` : `the page did not load: ${failed}`,
|
|
349
|
+
`${plural(requests.length, "request")}${made.length === requests.length ? "" : `, and ${plural(made.length - requests.length, "asset")} not listed`}:`,
|
|
350
|
+
...requests.map((flow) => `${flow.id} ${flow.method} ${flow.path}${flow.query ? " (with a query)" : ""} → ${flow.status ?? "no answer yet"}`),
|
|
351
|
+
`(${left("researcher")})`,
|
|
352
|
+
].join("\n"));
|
|
353
|
+
},
|
|
354
|
+
},
|
|
355
|
+
{
|
|
356
|
+
name: "list_requests",
|
|
357
|
+
description: "The capture: every request the pages made and every one you sent, each with its id, who made it and how it was answered. `match` keeps the rows that hold that text (a path, a method, an actor).",
|
|
358
|
+
schema: object({ match: str("Text a row must hold, e.g. /api/ or POST") }),
|
|
359
|
+
run: async (a) => {
|
|
360
|
+
await settled();
|
|
361
|
+
const match = a.match?.toLowerCase();
|
|
362
|
+
const pages = sidecar.flows().filter((flow) => !flow.asset).map((flow) => `${flow.id} ${who.get(flow.id) ?? "?"} ${flow.method} ${flow.path}${flow.query ? " (with a query)" : ""} → ${flow.status ?? "no answer"}`);
|
|
363
|
+
const own = ledger.map((s) => `${s.id || "(unanswered)"} ${s.as} ${s.method} ${new URL(s.url).pathname}${new URL(s.url).search} → ${s.status ?? "no answer"} (sent by ${WHOSE[s.by]}: ${s.why})`);
|
|
364
|
+
const rows = [...pages, ...own].filter((row) => match === undefined || row.toLowerCase().includes(match));
|
|
365
|
+
return shown([`${plural(rows.length, "request")}${match === undefined ? "" : ` with ${JSON.stringify(a.match)}`} (id, who, request → status):`, ...(rows.length > LISTED ? [`… ${rows.length - LISTED} earlier ones not shown: narrow with match`] : []), ...rows.slice(-LISTED)].join("\n"));
|
|
366
|
+
},
|
|
367
|
+
},
|
|
368
|
+
readRequest("researcher"),
|
|
369
|
+
{
|
|
370
|
+
name: "send_request",
|
|
371
|
+
description: "Sends a request of your own design through the proxy's repeater and shows its answer: a captured request with what you change (base), or only what you name. Code checks the environment's switches before it leaves (its hosts, its deny list, whether it may change state) and your budget, and says why when it does not send. One at a time, 200 ms apart.",
|
|
372
|
+
schema: object(EDIT, ["why"]),
|
|
373
|
+
run: (a) => sendRequest("researcher", a),
|
|
374
|
+
},
|
|
375
|
+
compare,
|
|
376
|
+
{
|
|
377
|
+
name: "claim",
|
|
378
|
+
description: "Keeps one hole you can prove, for the reviewer: only what an answer of the capture shows. The reviewer sends the proof again and discards what it cannot see.",
|
|
379
|
+
schema: object({
|
|
380
|
+
title: str("The hole in one sentence: who can do what they should not"),
|
|
381
|
+
category: { type: "string", enum: OWASP, description: "Its OWASP Top 10:2025 category" },
|
|
382
|
+
severity: { type: "string", enum: SEVERITIES, description: "How bad it is for this product" },
|
|
383
|
+
proof: { type: "array", items: { type: "string" }, description: `The ids of the requests whose answers prove it, in order, ${PROOF_REQUESTS} at most` },
|
|
384
|
+
steps: str("How to see it again, one step a line"),
|
|
385
|
+
impact: str("What an attacker gains"),
|
|
386
|
+
fix: str("The fix, in a sentence"),
|
|
387
|
+
}, ["title", "category", "severity", "proof", "steps", "impact", "fix"]),
|
|
388
|
+
run: async (a) => {
|
|
389
|
+
const ids = a.proof;
|
|
390
|
+
if (ids.length === 0 || ids.length > PROOF_REQUESTS)
|
|
391
|
+
return `not kept: a claim is proved by one to ${PROOF_REQUESTS} requests of the capture, the ones whose answers show the hole`;
|
|
392
|
+
const all = await secrets();
|
|
393
|
+
const proof = [];
|
|
394
|
+
for (const id of ids) {
|
|
395
|
+
const sent = ledger.find((s) => s.id === id);
|
|
396
|
+
const flow = sidecar.flows().find((f) => f.id === id);
|
|
397
|
+
const raw = sent === undefined && flow === undefined ? undefined : await sidecar.raw(id);
|
|
398
|
+
if (raw === undefined)
|
|
399
|
+
return `not kept: no request ${id} in the capture to prove it with (a claim names requests you read or sent, by their ids)`;
|
|
400
|
+
const status = sent?.status ?? flow?.status;
|
|
401
|
+
if (status === undefined)
|
|
402
|
+
return `not kept: ${id} got no answer, and an answer is what proves`;
|
|
403
|
+
const text = parseRequest(raw);
|
|
404
|
+
const url = sent?.url ?? new URL(text.target, `${flow?.scheme}://${flow?.host}:${flow?.port}`).href;
|
|
405
|
+
proof.push({ as: who.get(id) ?? "?", request: mask(renderRequest({ ...text, target: url }), all), status, ...(sent?.location === undefined ? {} : { location: sent.location }) });
|
|
406
|
+
}
|
|
407
|
+
claims.push({ title: String(a.title), category: String(a.category), severity: a.severity, steps: String(a.steps).split("\n").map((line) => line.trim()).filter((line) => line !== ""), impact: String(a.impact), fix: String(a.fix), proof });
|
|
408
|
+
return `claim ${claims.length} kept: ${String(a.title)}. Go on with what is left to look at, or call done.`;
|
|
409
|
+
},
|
|
410
|
+
},
|
|
411
|
+
{
|
|
412
|
+
name: "done",
|
|
413
|
+
description: "Ends the scan when you have nothing more to try, with what you tried and found closed: one line each, so the report says what was looked at.",
|
|
414
|
+
schema: object({ tried: { type: "array", items: { type: "string" }, description: "What you tried and the product turned down, one line each" } }, ["tried"]),
|
|
415
|
+
final: true,
|
|
416
|
+
run: async (a) => {
|
|
417
|
+
tried.push(...a.tried.map((line) => line.trim()).filter((line) => line !== ""));
|
|
418
|
+
return `done: ${plural(claims.length, "claim")}, ${plural(tried.length, "thing")} tried and found closed`;
|
|
419
|
+
},
|
|
420
|
+
},
|
|
421
|
+
],
|
|
422
|
+
reviewer: (claim) => {
|
|
423
|
+
const resent = new Set();
|
|
424
|
+
let control = false;
|
|
425
|
+
let decided;
|
|
426
|
+
return {
|
|
427
|
+
verdict: () => decided,
|
|
428
|
+
tools: [
|
|
429
|
+
readRequest("reviewer"),
|
|
430
|
+
{
|
|
431
|
+
name: "resend",
|
|
432
|
+
description: "Sends one request of the claim's proof again, as it was sent, with the session as it is now, and shows what answers. A proof you have not seen answered again proves nothing.",
|
|
433
|
+
schema: object({ n: int("Which request of the proof: 1 for the first") }, ["n"]),
|
|
434
|
+
run: async (a) => {
|
|
435
|
+
const n = a.n;
|
|
436
|
+
const p = claim.proof[n - 1];
|
|
437
|
+
if (p === undefined)
|
|
438
|
+
return `the proof has ${plural(claim.proof.length, "request")}: 1 to ${claim.proof.length}`;
|
|
439
|
+
const [again = {}] = await resend([p], "reviewer");
|
|
440
|
+
if (again.refused !== undefined)
|
|
441
|
+
return shown(`not sent: ${again.refused}`);
|
|
442
|
+
if (again.id === undefined)
|
|
443
|
+
return `request ${n} got no answer now (the connection failed, or nothing came in time); it was answered ${p.status} when it was claimed`;
|
|
444
|
+
resent.add(n);
|
|
445
|
+
return `${again.id}: request ${n} is answered ${again.status} now and was answered ${p.status} when it was claimed → ${await answerText(again.id)}\n(${left("reviewer")})`;
|
|
446
|
+
},
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
name: "send_request",
|
|
450
|
+
description: "One request of your own, as a control: what the rightful owner is answered for the same thing, or the same request without what the claim says makes the difference. Through the same switches as every request; a review has one.",
|
|
451
|
+
schema: object(EDIT, ["why"]),
|
|
452
|
+
run: async (a) => {
|
|
453
|
+
if (control)
|
|
454
|
+
return "not sent: a review has one request of its own, and it is spent";
|
|
455
|
+
const out = await sendRequest("reviewer", a);
|
|
456
|
+
control = !out.startsWith("not sent");
|
|
457
|
+
return out;
|
|
458
|
+
},
|
|
459
|
+
},
|
|
460
|
+
compare,
|
|
461
|
+
{
|
|
462
|
+
name: "verdict",
|
|
463
|
+
description: "Your answer to the claim, which ends its review: confirmed, with the severity you stand behind, or discarded, with the reason (not reproduced: the proof sent again does not show it).",
|
|
464
|
+
schema: object({ verdict: { type: "string", enum: ["confirmed", "discarded"] }, severity: { type: "string", enum: SEVERITIES, description: "The severity you stand behind; the claim's own for a discarded one" }, reason: str("What the answers show, in a sentence or two") }, ["verdict", "severity", "reason"]),
|
|
465
|
+
final: true,
|
|
466
|
+
run: async (a) => {
|
|
467
|
+
// Code, not the skill: a claim is confirmed by what answers now, whatever the claim's text says of itself.
|
|
468
|
+
if (a.verdict === "confirmed" && resent.size < claim.proof.length)
|
|
469
|
+
throw new Error(`not recorded: a claim is confirmed by what answers now, and ${plural(claim.proof.length - resent.size, "request")} of its proof ${claim.proof.length - resent.size === 1 ? "was" : "were"} not sent again (resend 1 to ${claim.proof.length})`);
|
|
470
|
+
decided = { verdict: a.verdict, severity: a.severity, reason: String(a.reason) };
|
|
471
|
+
return `recorded: ${decided.verdict}`;
|
|
472
|
+
},
|
|
473
|
+
},
|
|
474
|
+
],
|
|
475
|
+
};
|
|
476
|
+
},
|
|
477
|
+
async close() {
|
|
478
|
+
for (const opened of actors.values())
|
|
479
|
+
await opened.then((a) => a.context.close(), () => undefined).catch(() => undefined);
|
|
480
|
+
},
|
|
481
|
+
};
|
|
482
|
+
}
|
|
483
|
+
const MAX_FILE = 16_000;
|
|
484
|
+
const clip = (text) => (text.length <= MAX_FILE ? text : `${text.slice(0, MAX_FILE)}\n… truncated: ${text.length - MAX_FILE} more characters`);
|
|
485
|
+
/** The knowledge base as every agent reads it: a file, a search, the endpoint map. */
|
|
486
|
+
export function knowledgeTools(knowledgeDir, index) {
|
|
487
|
+
return [
|
|
488
|
+
{
|
|
489
|
+
name: "read_knowledge",
|
|
490
|
+
description: "A knowledge file by its path under .omniqa/knowledge: security.md (what the security pass saw: pages, findings, sessions, requests, the planned checks), api/auth.md, crawl/<route>.md, xref.md, repos/<name>/map.md (the code maps).",
|
|
491
|
+
schema: object({ path: str("Path relative to .omniqa/knowledge") }, ["path"]),
|
|
492
|
+
run: async (a) => {
|
|
493
|
+
const target = resolve(knowledgeDir, String(a.path));
|
|
494
|
+
if (target !== knowledgeDir && !target.startsWith(knowledgeDir + sep))
|
|
495
|
+
throw new Error("path leaves .omniqa/knowledge");
|
|
496
|
+
return clip(await readFile(target, "utf8"));
|
|
497
|
+
},
|
|
498
|
+
},
|
|
499
|
+
{
|
|
500
|
+
name: "search_knowledge",
|
|
501
|
+
description: "Full-text hits from the knowledge base (the code maps, the crawled pages, the docs); each hit names its file and heading.",
|
|
502
|
+
schema: object({ query: str("Words to look for"), limit: int("Hits at most (default 5)") }, ["query"]),
|
|
503
|
+
run: async (a) => {
|
|
504
|
+
if (index === undefined)
|
|
505
|
+
throw new Error("no knowledge index: omniqa knowledge build");
|
|
506
|
+
const hits = index.search(String(a.query), a.limit ?? 5);
|
|
507
|
+
return [`${plural(hits.length, "hit")} for ${JSON.stringify(a.query)}`, ...renderHits(hits, 1500, String(a.query))].join("\n");
|
|
508
|
+
},
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
name: "read_endpoints",
|
|
512
|
+
description: "api/endpoints.md: the API calls the crawl observed with the pages that make them and the status codes per actor; a prefix narrows it.",
|
|
513
|
+
schema: object({ prefix: str("A path prefix such as /api/v1/users (default: the whole file)") }),
|
|
514
|
+
run: async (a) => {
|
|
515
|
+
const text = await readFile(join(knowledgeDir, "api", "endpoints.md"), "utf8").catch(() => undefined);
|
|
516
|
+
return text === undefined ? "no api/endpoints.md: omniqa knowledge build writes it" : endpointGroups(text, a.prefix);
|
|
517
|
+
},
|
|
518
|
+
},
|
|
519
|
+
];
|
|
520
|
+
}
|
|
521
|
+
/** The steps whose results an agent of a scan keeps whole in its prompt: a scan is hundreds of steps, and an answer read thirty steps ago can be read again. */
|
|
522
|
+
const RECENT = 8;
|
|
523
|
+
/**
|
|
524
|
+
* The security researcher: the role `security` on the kernel with its skill, the knowledge tools and the tools on the sidecar,
|
|
525
|
+
* within `calls` model calls. Each step's prompt says what is left of both budgets. It ends by calling done, or when a budget
|
|
526
|
+
* does; what it found is in `scan.claims` and `scan.tried` either way.
|
|
527
|
+
*/
|
|
528
|
+
export function research(scan, o) {
|
|
529
|
+
return runAgent({
|
|
530
|
+
role: "security",
|
|
531
|
+
skill: o.skill,
|
|
532
|
+
tools: [...o.knowledge, ...scan.researcher()],
|
|
533
|
+
input: o.input,
|
|
534
|
+
models: o.models,
|
|
535
|
+
transcript: o.transcript,
|
|
536
|
+
budget: o.calls,
|
|
537
|
+
recent: RECENT,
|
|
538
|
+
status: (callsLeft) => `Left: ${callsLeft} of ${o.calls} model calls, ${o.requests - scan.spent("researcher").sent} of ${o.requests} requests of your own. Claims kept: ${scan.claims.length}.`,
|
|
539
|
+
product: o.product,
|
|
540
|
+
...(o.projects === undefined ? {} : { projects: o.projects }),
|
|
541
|
+
...(o.instructions === undefined ? {} : { instructions: o.instructions }),
|
|
542
|
+
...(o.log === undefined ? {} : { log: o.log }),
|
|
543
|
+
});
|
|
544
|
+
}
|
|
545
|
+
/** A claim as the reviewer is handed it: what is said, and the proof by request, each as it was sent and answered. */
|
|
546
|
+
export function claimText(claim) {
|
|
547
|
+
return [
|
|
548
|
+
`Claim: ${claim.title}`,
|
|
549
|
+
`OWASP ${claim.category}; the researcher says ${claim.severity}`,
|
|
550
|
+
`Impact, as claimed: ${claim.impact}`,
|
|
551
|
+
"Steps, as claimed:",
|
|
552
|
+
...claim.steps.map((step, i) => `${i + 1}. ${step}`),
|
|
553
|
+
"The proof, as it was sent (credentials masked):",
|
|
554
|
+
...claim.proof.flatMap((p, i) => [`--- request ${i + 1}, sent as ${p.as}, answered ${p.status}${p.location === undefined ? "" : ` to ${p.location}`} ---`, p.request]),
|
|
555
|
+
].join("\n");
|
|
556
|
+
}
|
|
557
|
+
/**
|
|
558
|
+
* The security reviewer on one claim: the role `securityReviewer` with its skill and its own tools, within `calls` model calls.
|
|
559
|
+
* Its verdict is what its `verdict` tool recorded; a review that ends without one (a budget, a model that declined) gave none.
|
|
560
|
+
*/
|
|
561
|
+
export async function review(scan, claim, o) {
|
|
562
|
+
const { tools, verdict } = scan.reviewer(claim);
|
|
563
|
+
const run = await runAgent({
|
|
564
|
+
role: "securityReviewer",
|
|
565
|
+
skill: o.skill,
|
|
566
|
+
tools,
|
|
567
|
+
input: `Review this claim of the security researcher on ${o.product.name}: send its proof again and say whether it holds.\n\n${claimText(claim)}`,
|
|
568
|
+
models: o.models,
|
|
569
|
+
transcript: o.transcript,
|
|
570
|
+
budget: o.calls,
|
|
571
|
+
recent: RECENT,
|
|
572
|
+
status: (callsLeft) => `Left for this claim: ${callsLeft} model calls; ${o.requests - scan.spent("reviewer").sent} of ${o.requests} requests for the whole review.`,
|
|
573
|
+
product: o.product,
|
|
574
|
+
...(o.projects === undefined ? {} : { projects: o.projects }),
|
|
575
|
+
...(o.instructions === undefined ? {} : { instructions: o.instructions }),
|
|
576
|
+
...(o.log === undefined ? {} : { log: o.log }),
|
|
577
|
+
});
|
|
578
|
+
const decided = verdict();
|
|
579
|
+
return { run, ...(decided === undefined ? {} : { verdict: decided }) };
|
|
580
|
+
}
|
|
581
|
+
//# sourceMappingURL=security-research.js.map
|