@acepaste/ingress 0.7.0 → 0.9.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/dist/src/acquire.d.ts +19 -1
- package/dist/src/acquire.js +130 -5
- package/dist/src/approvers.d.ts +18 -0
- package/dist/src/approvers.js +43 -0
- package/dist/src/audit-parsers.d.ts +85 -0
- package/dist/src/audit-parsers.js +333 -0
- package/dist/src/audit.d.ts +57 -0
- package/dist/src/audit.js +393 -0
- package/dist/src/broker.d.ts +178 -0
- package/dist/src/broker.js +396 -0
- package/dist/src/cli.js +115 -1
- package/dist/src/codepass.d.ts +57 -0
- package/dist/src/codepass.js +240 -0
- package/dist/src/engine.d.ts +65 -4
- package/dist/src/engine.js +214 -60
- package/dist/src/index.d.ts +18 -4
- package/dist/src/index.js +11 -2
- package/dist/src/instructions.d.ts +84 -0
- package/dist/src/instructions.js +185 -0
- package/dist/src/meaning.js +20 -12
- package/dist/src/multilingual.d.ts +33 -0
- package/dist/src/multilingual.js +89 -0
- package/dist/src/summary.d.ts +40 -0
- package/dist/src/summary.js +62 -0
- package/dist/src/supplychain.d.ts +4 -0
- package/dist/src/supplychain.js +22 -1
- package/dist/src/taint.js +1 -1
- package/dist/src/types.d.ts +35 -5
- package/dist/src/types.js +10 -2
- package/package.json +1 -1
package/dist/src/acquire.d.ts
CHANGED
|
@@ -12,6 +12,8 @@
|
|
|
12
12
|
import { type Dispatcher } from "undici";
|
|
13
13
|
import { NetPolicyError, type NetPolicy } from "./netpolicy.js";
|
|
14
14
|
import type { AcquireResult, IngressConfig } from "./types.js";
|
|
15
|
+
/** the gate's own name, used when agentUserAgents is empty */
|
|
16
|
+
export declare const HONEST_USER_AGENT = "AcePasteIngress/0.8 (+https://acepaste.xyz/ingress)";
|
|
15
17
|
export declare const MAX_REDIRECTS = 5;
|
|
16
18
|
export declare class AcquireError extends Error {
|
|
17
19
|
readonly code: "unsupported_scheme" | "too_large" | "timeout" | "network" | "binary" | "too_many_redirects" | "policy";
|
|
@@ -21,4 +23,20 @@ export declare class AcquireError extends Error {
|
|
|
21
23
|
export type FetchLike = (url: string, init: RequestInit & {
|
|
22
24
|
dispatcher?: Dispatcher;
|
|
23
25
|
}) => Promise<Response>;
|
|
24
|
-
export
|
|
26
|
+
export interface AcquireOptions {
|
|
27
|
+
/** user-agent to send (agent fingerprint); defaults to the gate's own name */
|
|
28
|
+
userAgent?: string;
|
|
29
|
+
/** HTTP(S) proxy for this fetch */
|
|
30
|
+
proxyUrl?: string;
|
|
31
|
+
}
|
|
32
|
+
export declare function acquire(url: string, fingerprint: "human" | "agent", config: IngressConfig, policy: NetPolicy, fetchImpl?: FetchLike, resolver?: (host: string) => Promise<string[]>, opts?: AcquireOptions): Promise<AcquireResult>;
|
|
33
|
+
/**
|
|
34
|
+
* Human fetch in a real headless Chromium: real browser handshake, JavaScript on,
|
|
35
|
+
* a fresh profile. Every request the page makes is checked against the network
|
|
36
|
+
* policy first, so a page cannot use the browser to reach private addresses.
|
|
37
|
+
* Returns the document after scripts have run.
|
|
38
|
+
*/
|
|
39
|
+
export declare function acquireWithBrowser(url: string, config: IngressConfig, policy: NetPolicy, resolver?: (host: string) => Promise<string[]>, opts?: {
|
|
40
|
+
proxyUrl?: string;
|
|
41
|
+
executablePath?: string;
|
|
42
|
+
}): Promise<AcquireResult>;
|
package/dist/src/acquire.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
* the connection is pinned to the addresses that were checked (DNS rebinding
|
|
10
10
|
* defense). Redirects are followed manually so each hop is checked.
|
|
11
11
|
*/
|
|
12
|
-
import { Agent, fetch as undiciFetch } from "undici";
|
|
12
|
+
import { Agent, ProxyAgent, fetch as undiciFetch } from "undici";
|
|
13
13
|
import { checkTarget, NetPolicyError } from "./netpolicy.js";
|
|
14
14
|
const HUMAN_HEADERS = {
|
|
15
15
|
"user-agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/129.0.0.0 Safari/537.36",
|
|
@@ -21,8 +21,10 @@ const HUMAN_HEADERS = {
|
|
|
21
21
|
"sec-fetch-user": "?1",
|
|
22
22
|
"upgrade-insecure-requests": "1",
|
|
23
23
|
};
|
|
24
|
+
/** the gate's own name, used when agentUserAgents is empty */
|
|
25
|
+
export const HONEST_USER_AGENT = "AcePasteIngress/0.8 (+https://acepaste.xyz/ingress)";
|
|
24
26
|
const AGENT_HEADERS = {
|
|
25
|
-
"user-agent":
|
|
27
|
+
"user-agent": HONEST_USER_AGENT,
|
|
26
28
|
accept: "text/html,application/xhtml+xml,text/markdown,text/plain;q=0.9,application/json;q=0.8,*/*;q=0.5",
|
|
27
29
|
};
|
|
28
30
|
export const MAX_REDIRECTS = 5;
|
|
@@ -44,13 +46,24 @@ function pinnedFetch(addrs) {
|
|
|
44
46
|
});
|
|
45
47
|
return (url, init) => undiciFetch(url, { ...init, dispatcher: agent });
|
|
46
48
|
}
|
|
47
|
-
|
|
49
|
+
/** undici fetch through an HTTP(S) proxy. The target was already checked against the network policy; the proxy sits outside our network, so it cannot be used to reach it. */
|
|
50
|
+
const proxyAgents = new Map();
|
|
51
|
+
function proxiedFetch(proxyUrl) {
|
|
52
|
+
let agent = proxyAgents.get(proxyUrl);
|
|
53
|
+
if (!agent) {
|
|
54
|
+
agent = new ProxyAgent(proxyUrl);
|
|
55
|
+
proxyAgents.set(proxyUrl, agent);
|
|
56
|
+
}
|
|
57
|
+
const a = agent;
|
|
58
|
+
return (url, init) => undiciFetch(url, { ...init, dispatcher: a });
|
|
59
|
+
}
|
|
60
|
+
export async function acquire(url, fingerprint, config, policy, fetchImpl, resolver, opts = {}) {
|
|
48
61
|
let current = new URL(url);
|
|
49
62
|
if (current.protocol !== "http:" && current.protocol !== "https:") {
|
|
50
63
|
throw new AcquireError(`unsupported scheme ${current.protocol}`, "unsupported_scheme");
|
|
51
64
|
}
|
|
52
65
|
const chain = [];
|
|
53
|
-
const headersIn = fingerprint === "human" ? HUMAN_HEADERS : AGENT_HEADERS;
|
|
66
|
+
const headersIn = fingerprint === "human" ? HUMAN_HEADERS : { ...AGENT_HEADERS, ...(opts.userAgent ? { "user-agent": opts.userAgent } : {}) };
|
|
54
67
|
for (let hop = 0; hop <= MAX_REDIRECTS; hop++) {
|
|
55
68
|
let addrs;
|
|
56
69
|
try {
|
|
@@ -61,7 +74,7 @@ export async function acquire(url, fingerprint, config, policy, fetchImpl, resol
|
|
|
61
74
|
throw new AcquireError(e.message, "policy", e.code);
|
|
62
75
|
throw e;
|
|
63
76
|
}
|
|
64
|
-
const doFetch = fetchImpl ?? pinnedFetch(addrs);
|
|
77
|
+
const doFetch = fetchImpl ?? (opts.proxyUrl ? proxiedFetch(opts.proxyUrl) : pinnedFetch(addrs));
|
|
65
78
|
const controller = new AbortController();
|
|
66
79
|
const timer = setTimeout(() => controller.abort(), config.fetchTimeoutMs);
|
|
67
80
|
let res;
|
|
@@ -139,8 +152,120 @@ export async function acquire(url, fingerprint, config, policy, fetchImpl, resol
|
|
|
139
152
|
contentType,
|
|
140
153
|
body,
|
|
141
154
|
fingerprint,
|
|
155
|
+
userAgent: headersIn["user-agent"],
|
|
156
|
+
via: "http",
|
|
142
157
|
fetchedAt: new Date().toISOString(),
|
|
143
158
|
};
|
|
144
159
|
}
|
|
145
160
|
throw new AcquireError("unreachable", "network");
|
|
146
161
|
}
|
|
162
|
+
/**
|
|
163
|
+
* Human fetch in a real headless Chromium: real browser handshake, JavaScript on,
|
|
164
|
+
* a fresh profile. Every request the page makes is checked against the network
|
|
165
|
+
* policy first, so a page cannot use the browser to reach private addresses.
|
|
166
|
+
* Returns the document after scripts have run.
|
|
167
|
+
*/
|
|
168
|
+
export async function acquireWithBrowser(url, config, policy, resolver, opts = {}) {
|
|
169
|
+
const first = new URL(url);
|
|
170
|
+
if (first.protocol !== "http:" && first.protocol !== "https:")
|
|
171
|
+
throw new AcquireError(`unsupported scheme ${first.protocol}`, "unsupported_scheme");
|
|
172
|
+
try {
|
|
173
|
+
await checkTarget(first, policy, resolver);
|
|
174
|
+
}
|
|
175
|
+
catch (e) {
|
|
176
|
+
if (e instanceof NetPolicyError)
|
|
177
|
+
throw new AcquireError(e.message, "policy", e.code);
|
|
178
|
+
throw e;
|
|
179
|
+
}
|
|
180
|
+
let pw;
|
|
181
|
+
try {
|
|
182
|
+
pw = await import("playwright");
|
|
183
|
+
}
|
|
184
|
+
catch {
|
|
185
|
+
throw new AcquireError("browser fetch needs playwright installed", "network");
|
|
186
|
+
}
|
|
187
|
+
let proxy;
|
|
188
|
+
if (opts.proxyUrl) {
|
|
189
|
+
const p = new URL(opts.proxyUrl);
|
|
190
|
+
proxy = { server: `${p.protocol}//${p.host}`, username: decodeURIComponent(p.username) || undefined, password: decodeURIComponent(p.password) || undefined };
|
|
191
|
+
}
|
|
192
|
+
let browser;
|
|
193
|
+
try {
|
|
194
|
+
browser = await pw.chromium.launch({
|
|
195
|
+
headless: true, proxy,
|
|
196
|
+
executablePath: opts.executablePath ?? process.env.INGRESS_CHROMIUM ?? undefined,
|
|
197
|
+
args: ["--disable-gpu", "--no-sandbox", "--disable-dev-shm-usage", "--disable-extensions", "--no-first-run"],
|
|
198
|
+
});
|
|
199
|
+
}
|
|
200
|
+
catch (e) {
|
|
201
|
+
throw new AcquireError(`browser launch failed: ${e.message.split("\n")[0]}`, "network");
|
|
202
|
+
}
|
|
203
|
+
try {
|
|
204
|
+
// headless Chromium announces itself ("HeadlessChrome", navigator.webdriver); present as ordinary desktop Chrome
|
|
205
|
+
const ctx = await browser.newContext({ userAgent: HUMAN_HEADERS["user-agent"], viewport: { width: 1280, height: 900 }, locale: "en-US", storageState: { cookies: [], origins: [] } });
|
|
206
|
+
await ctx.addInitScript(() => {
|
|
207
|
+
Object.defineProperty(navigator, "webdriver", { get: () => false });
|
|
208
|
+
Object.defineProperty(navigator, "languages", { get: () => ["en-US", "en"] });
|
|
209
|
+
});
|
|
210
|
+
const checked = new Map();
|
|
211
|
+
await ctx.route("**/*", async (route) => {
|
|
212
|
+
let u;
|
|
213
|
+
try {
|
|
214
|
+
u = new URL(route.request().url());
|
|
215
|
+
}
|
|
216
|
+
catch {
|
|
217
|
+
return route.abort("blockedbyclient");
|
|
218
|
+
}
|
|
219
|
+
if (u.protocol === "data:" || u.protocol === "blob:")
|
|
220
|
+
return route.continue();
|
|
221
|
+
if (u.protocol !== "http:" && u.protocol !== "https:")
|
|
222
|
+
return route.abort("blockedbyclient");
|
|
223
|
+
const key = `${u.protocol}//${u.host}`;
|
|
224
|
+
let ok = checked.get(key);
|
|
225
|
+
if (ok === undefined) {
|
|
226
|
+
try {
|
|
227
|
+
await checkTarget(u, policy, resolver);
|
|
228
|
+
ok = true;
|
|
229
|
+
}
|
|
230
|
+
catch {
|
|
231
|
+
ok = false;
|
|
232
|
+
}
|
|
233
|
+
checked.set(key, ok);
|
|
234
|
+
}
|
|
235
|
+
return ok ? route.continue() : route.abort("blockedbyclient");
|
|
236
|
+
});
|
|
237
|
+
const page = await ctx.newPage();
|
|
238
|
+
let status = 0;
|
|
239
|
+
let contentType = "";
|
|
240
|
+
try {
|
|
241
|
+
const res = await page.goto(url, { waitUntil: "domcontentloaded", timeout: config.fetchTimeoutMs });
|
|
242
|
+
status = res?.status() ?? 0;
|
|
243
|
+
contentType = res?.headers()["content-type"] ?? "";
|
|
244
|
+
await page.waitForTimeout(Math.min(1500, config.fetchTimeoutMs / 4));
|
|
245
|
+
}
|
|
246
|
+
catch (e) {
|
|
247
|
+
const msg = e.message.split("\n")[0];
|
|
248
|
+
throw new AcquireError(/timeout/i.test(msg) ? "browser fetch timed out" : `network error: ${msg}`, /timeout/i.test(msg) ? "timeout" : "network");
|
|
249
|
+
}
|
|
250
|
+
const finalUrl = page.url();
|
|
251
|
+
try {
|
|
252
|
+
await checkTarget(new URL(finalUrl), policy, resolver);
|
|
253
|
+
}
|
|
254
|
+
catch (e) {
|
|
255
|
+
if (e instanceof NetPolicyError)
|
|
256
|
+
throw new AcquireError(e.message, "policy", e.code);
|
|
257
|
+
throw e;
|
|
258
|
+
}
|
|
259
|
+
const body = await page.content();
|
|
260
|
+
if (body.length > config.maxBodyBytes)
|
|
261
|
+
throw new AcquireError(`body exceeds ${config.maxBodyBytes} bytes`, "too_large");
|
|
262
|
+
const userAgent = await page.evaluate(() => navigator.userAgent);
|
|
263
|
+
return {
|
|
264
|
+
url, finalUrl, redirectChain: finalUrl === url ? [] : [url], status, headers: { "content-type": contentType },
|
|
265
|
+
contentType: contentType || "text/html", body, fingerprint: "human", userAgent, via: "browser", fetchedAt: new Date().toISOString(),
|
|
266
|
+
};
|
|
267
|
+
}
|
|
268
|
+
finally {
|
|
269
|
+
await browser.close().catch(() => { });
|
|
270
|
+
}
|
|
271
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Approvers: how a person answers an approval request. Each must be a channel the model
|
|
3
|
+
* cannot drive. None of them can stop an agent that also controls the screen (computer
|
|
4
|
+
* use) or runs code as the same user; say so to anyone relying on them.
|
|
5
|
+
*/
|
|
6
|
+
import { type ApprovalRequest, type Approver } from "./broker.js";
|
|
7
|
+
/**
|
|
8
|
+
* macOS: a native dialog showing the exact action, Deny as the default button, gives up
|
|
9
|
+
* after `timeoutSec`. The text travels as an argument, never spliced into the script.
|
|
10
|
+
*/
|
|
11
|
+
export declare function macosDialogApprover(opts?: {
|
|
12
|
+
timeoutSec?: number;
|
|
13
|
+
osascript?: string;
|
|
14
|
+
}): Approver;
|
|
15
|
+
/** integrator-supplied channel (a console, a chat approval, a ticket) */
|
|
16
|
+
export declare function callbackApprover(name: string, fn: (req: ApprovalRequest) => Promise<"approved" | "denied" | "timeout">): Approver;
|
|
17
|
+
/** no approval channel: everything that needs approval is refused (the safe default when nothing else is set up) */
|
|
18
|
+
export declare const denyAllApprover: Approver;
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Approvers: how a person answers an approval request. Each must be a channel the model
|
|
3
|
+
* cannot drive. None of them can stop an agent that also controls the screen (computer
|
|
4
|
+
* use) or runs code as the same user; say so to anyone relying on them.
|
|
5
|
+
*/
|
|
6
|
+
import { execFile } from "node:child_process";
|
|
7
|
+
import { describeApproval } from "./broker.js";
|
|
8
|
+
/**
|
|
9
|
+
* macOS: a native dialog showing the exact action, Deny as the default button, gives up
|
|
10
|
+
* after `timeoutSec`. The text travels as an argument, never spliced into the script.
|
|
11
|
+
*/
|
|
12
|
+
export function macosDialogApprover(opts = {}) {
|
|
13
|
+
const timeout = Math.max(10, Math.min(600, opts.timeoutSec ?? 120));
|
|
14
|
+
const script = [
|
|
15
|
+
"on run argv",
|
|
16
|
+
" set msg to item 1 of argv",
|
|
17
|
+
` set r to display dialog msg with title "AcePaste Ingress: approve this action?" buttons {"Deny", "Approve"} default button "Deny" cancel button "Deny" with icon caution giving up after ${timeout}`,
|
|
18
|
+
" if gave up of r then return \"timeout\"",
|
|
19
|
+
" if button returned of r is \"Approve\" then return \"approved\"",
|
|
20
|
+
" return \"denied\"",
|
|
21
|
+
"end run",
|
|
22
|
+
].join("\n");
|
|
23
|
+
return {
|
|
24
|
+
name: "macos-dialog",
|
|
25
|
+
request: (req) => new Promise((resolve) => {
|
|
26
|
+
execFile(opts.osascript ?? "/usr/bin/osascript", ["-e", script, describeApproval(req)], { timeout: (timeout + 15) * 1000 }, (err, stdout) => {
|
|
27
|
+
const out = String(stdout ?? "").trim();
|
|
28
|
+
if (out === "approved")
|
|
29
|
+
return resolve("approved");
|
|
30
|
+
if (out === "timeout")
|
|
31
|
+
return resolve("timeout");
|
|
32
|
+
// the Deny (cancel) button exits with an error; any failure is a refusal
|
|
33
|
+
return resolve(err && /timed out|ETIMEDOUT/i.test(String(err)) ? "timeout" : "denied");
|
|
34
|
+
});
|
|
35
|
+
}),
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
/** integrator-supplied channel (a console, a chat approval, a ticket) */
|
|
39
|
+
export function callbackApprover(name, fn) {
|
|
40
|
+
return { name, request: fn };
|
|
41
|
+
}
|
|
42
|
+
/** no approval channel: everything that needs approval is refused (the safe default when nothing else is set up) */
|
|
43
|
+
export const denyAllApprover = { name: "none", request: async () => { throw new Error("no approver configured"); } };
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Environment audit: pure parsers and classifiers (no file or network access here, so
|
|
3
|
+
* they can be tested with fixtures). See audit.ts for the collectors.
|
|
4
|
+
*
|
|
5
|
+
* The question the audit answers: has anything on this machine been set up to change
|
|
6
|
+
* what an agent receives, before the gate ever sees it? Hosts-file and DNS overrides,
|
|
7
|
+
* per-domain resolvers, proxies and PAC files, browser search engines, browser policies
|
|
8
|
+
* and extensions that rewrite pages or results, trusted root certificates that allow TLS
|
|
9
|
+
* interception, and agent configuration (MCP servers, hooks, global instruction files).
|
|
10
|
+
*
|
|
11
|
+
* Severity: "high" = can steer what agents receive and looks out of place; "review" =
|
|
12
|
+
* changes what agents receive and may well be yours (say so and move on); "info" = noted.
|
|
13
|
+
*/
|
|
14
|
+
export type AuditArea = "hosts" | "dns" | "proxy" | "browser-search" | "browser-policy" | "browser-extension" | "certificates" | "network-extension" | "agent-config" | "agent-instructions" | "resolution";
|
|
15
|
+
export type AuditSeverity = "high" | "review" | "info";
|
|
16
|
+
export interface AuditFinding {
|
|
17
|
+
area: AuditArea;
|
|
18
|
+
severity: AuditSeverity;
|
|
19
|
+
title: string;
|
|
20
|
+
detail: string;
|
|
21
|
+
where?: string;
|
|
22
|
+
evidence?: string;
|
|
23
|
+
}
|
|
24
|
+
/** domains whose answers an agent relies on: search, AI providers, code registries, reference */
|
|
25
|
+
export declare const WATCHED_DOMAINS: string[];
|
|
26
|
+
export declare const isSinkhole: (ip: string) => boolean;
|
|
27
|
+
export declare const isPrivateAddr: (ip: string) => boolean;
|
|
28
|
+
export declare function parseHosts(text: string): Array<{
|
|
29
|
+
ip: string;
|
|
30
|
+
names: string[];
|
|
31
|
+
line: number;
|
|
32
|
+
}>;
|
|
33
|
+
/** findings from a hosts-format file (the system hosts file, dnsmasq addn-hosts, blocklists) */
|
|
34
|
+
export declare function classifyHosts(text: string, where: string): AuditFinding[];
|
|
35
|
+
/** dnsmasq: address= (answer overrides), server=/domain/ (per-domain upstreams), addn-hosts, cname */
|
|
36
|
+
export declare function classifyDnsmasq(text: string, where: string): {
|
|
37
|
+
findings: AuditFinding[];
|
|
38
|
+
addnHosts: string[];
|
|
39
|
+
confDirs: string[];
|
|
40
|
+
};
|
|
41
|
+
/** dnscrypt-proxy cloaking rules ("name ip" or "name othername") and forwarding rules ("name server") */
|
|
42
|
+
export declare function classifyDnscryptRules(text: string, where: string, kind: "cloaking" | "forwarding"): AuditFinding[];
|
|
43
|
+
/** `localPrefixes`: the /64 prefixes of this machine's own IPv6 addresses (a router on the same network hands out addresses in its prefix) */
|
|
44
|
+
export declare function classifyResolvConf(text: string, where: string, localPrefixes?: string[]): AuditFinding[];
|
|
45
|
+
/** first four groups of an IPv6 address, expanded */
|
|
46
|
+
export declare function ipv6Prefix64(addr: string): string;
|
|
47
|
+
export declare const KNOWN_PUBLIC_RESOLVERS: Set<string>;
|
|
48
|
+
/** macOS `scutil --dns`: resolvers scoped to particular domains */
|
|
49
|
+
export declare function classifyScutilDns(text: string): AuditFinding[];
|
|
50
|
+
/** macOS `scutil --proxy` output */
|
|
51
|
+
export declare function classifyScutilProxy(text: string): AuditFinding[];
|
|
52
|
+
export declare function classifyProxyEnv(env: Record<string, string | undefined>): AuditFinding[];
|
|
53
|
+
/** Chromium-family Preferences: the default search engine */
|
|
54
|
+
export declare function classifyChromiumSearch(prefs: any, where: string): AuditFinding[];
|
|
55
|
+
export interface ExtensionInfo {
|
|
56
|
+
id: string;
|
|
57
|
+
name: string;
|
|
58
|
+
version?: string;
|
|
59
|
+
permissions: string[];
|
|
60
|
+
hostPermissions: string[];
|
|
61
|
+
contentMatches: string[];
|
|
62
|
+
searchOverride?: string;
|
|
63
|
+
homepageOverride?: string;
|
|
64
|
+
startupOverride?: boolean;
|
|
65
|
+
fromStore: boolean;
|
|
66
|
+
enabled: boolean;
|
|
67
|
+
}
|
|
68
|
+
export declare function classifyExtension(x: ExtensionInfo, where: string): AuditFinding[];
|
|
69
|
+
/** Chromium policy dictionary (from a managed plist or a policies JSON file) */
|
|
70
|
+
export declare function classifyChromiumPolicy(policy: Record<string, any>, where: string): AuditFinding[];
|
|
71
|
+
/** macOS `security dump-trust-settings` output: certificates with custom trust */
|
|
72
|
+
export declare function classifyTrustSettings(text: string, domain: "admin" | "user"): AuditFinding[];
|
|
73
|
+
/** macOS `systemextensionsctl list`: active network and content-filter extensions */
|
|
74
|
+
export declare function classifySystemExtensions(text: string): AuditFinding[];
|
|
75
|
+
/** MCP server configs (Claude Desktop, Claude Code, Cursor, Windsurf, VS Code): what agents can call */
|
|
76
|
+
export declare function classifyMcpServers(config: any, where: string): AuditFinding[];
|
|
77
|
+
/** Claude Code settings: hooks run commands on agent events */
|
|
78
|
+
export declare function classifyHooks(settings: any, where: string): AuditFinding[];
|
|
79
|
+
/** compare what this machine resolves with DNS-over-HTTPS */
|
|
80
|
+
export declare function classifyResolution(name: string, local: string[], doh: string[] | undefined, tlsError?: string): AuditFinding[];
|
|
81
|
+
export declare function summarizeAudit(findings: AuditFinding[]): {
|
|
82
|
+
high: number;
|
|
83
|
+
review: number;
|
|
84
|
+
info: number;
|
|
85
|
+
};
|