@acepaste/ingress 0.9.24 → 0.9.26
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/agent-hooks.d.ts +50 -0
- package/dist/src/agent-hooks.js +155 -6
- package/dist/src/blocklist-update.d.ts +57 -0
- package/dist/src/blocklist-update.js +133 -0
- package/dist/src/broker.d.ts +12 -0
- package/dist/src/broker.js +10 -0
- package/dist/src/cli.js +168 -34
- package/dist/src/egress-proxy.d.ts +182 -0
- package/dist/src/egress-proxy.js +567 -0
- package/dist/src/engine.d.ts +13 -0
- package/dist/src/engine.js +71 -16
- package/dist/src/index.d.ts +6 -1
- package/dist/src/index.js +4 -1
- package/dist/src/policyfile.js +2 -0
- package/dist/src/summary.d.ts +2 -0
- package/dist/src/summary.js +4 -0
- package/dist/src/types.d.ts +10 -3
- package/dist/src/types.js +3 -2
- package/package.json +1 -1
package/dist/src/engine.js
CHANGED
|
@@ -123,21 +123,9 @@ export class IngressEngine {
|
|
|
123
123
|
}
|
|
124
124
|
timings.acquire = performance.now() - ta;
|
|
125
125
|
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
if (q)
|
|
130
|
-
return this.refuse(url, [{ pass: "policy", kind: "policy.denied_source", confidence: 1, severity: 1, message: `redirected to a source quarantined by your organization: ${q}`, action: "none" }], timings, t0, "text", "hostile", true);
|
|
131
|
-
}
|
|
132
|
-
}
|
|
133
|
-
if (agentRes.redirectChain.length) {
|
|
134
|
-
const hosts = new Set(agentRes.redirectChain.concat(agentRes.finalUrl).map(hostOf));
|
|
135
|
-
if (hosts.size > 2)
|
|
136
|
-
findings.push({ pass: "policy", kind: "policy.redirect_chain", confidence: 0.4, severity: 0.3, message: `redirected through ${hosts.size} hosts: ${[...hosts].join(" -> ")}`, action: "none" });
|
|
137
|
-
const finalRule = this.domainRule(agentRes.finalUrl);
|
|
138
|
-
if (finalRule?.deny)
|
|
139
|
-
return this.refuse(url, [{ pass: "policy", kind: "policy.denied_source", confidence: 1, severity: 1, message: `redirect target ${hostOf(agentRes.finalUrl)} is denied by policy`, action: "none" }], timings, t0, "text");
|
|
140
|
-
}
|
|
126
|
+
const hopRefusal = this.checkHops(url, agentRes, opts, timings, t0, findings);
|
|
127
|
+
if (hopRefusal)
|
|
128
|
+
return hopRefusal;
|
|
141
129
|
// Many sites refuse AI-assistant user agents outright. When the browser fetch got through, fetch
|
|
142
130
|
// once more under the gate's own name so the page can still be read and compared.
|
|
143
131
|
if (cloaking && [401, 403, 429].includes(agentRes.status) && humanRes && humanRes.status < 400 && agentUA !== HONEST_USER_AGENT) {
|
|
@@ -151,6 +139,12 @@ export class IngressEngine {
|
|
|
151
139
|
// An error page is not the page. If the site refused the AI fetcher (many block AI user agents or
|
|
152
140
|
// challenge non-browsers), there is nothing to deliver and nothing to compare: unreachable, not an attack.
|
|
153
141
|
if (agentRes.status >= 400) {
|
|
142
|
+
// Unless the operator chose to read the browser's copy in that case (challengedFetch: "browser-view").
|
|
143
|
+
if (this.config.challengedFetch === "browser-view" && humanRes && humanRes.status < 400) {
|
|
144
|
+
const view = await this.browserView(url, humanRes, `the site answered the AI fetcher with HTTP ${agentRes.status}`, opts, rule, findings, timings, t0);
|
|
145
|
+
if (view)
|
|
146
|
+
return view;
|
|
147
|
+
}
|
|
154
148
|
const both = humanRes ? `; the browser fetch got HTTP ${humanRes.status}` : "";
|
|
155
149
|
return this.refuse(url, [{ pass: "acquire", kind: "acquire.unreachable", confidence: 0, severity: 0, message: `the site answered the AI fetcher with HTTP ${agentRes.status}${both}`, action: "none" }], timings, t0, "text", "unreachable");
|
|
156
150
|
}
|
|
@@ -167,15 +161,74 @@ export class IngressEngine {
|
|
|
167
161
|
({ hidden: externalRules, color: externalColorRules } = await this.fetchStylesheets(agentRes.body, agentRes.finalUrl));
|
|
168
162
|
timings.visibility = performance.now() - ts;
|
|
169
163
|
}
|
|
164
|
+
const standIn = { agent: false };
|
|
170
165
|
const result = await this.guarded(url, kind, t0, () => this.analyze({
|
|
171
166
|
url, finalUrl: agentRes.finalUrl, redirectChain: agentRes.redirectChain, raw: agentRes.body, kind,
|
|
172
|
-
humanRaw: humanRes?.body, humanContentType: humanRes?.contentType, externalRules, externalColorRules, timings, t0, override: !!opts.override, extraFindings: findings, rule,
|
|
167
|
+
humanRaw: humanRes?.body, humanContentType: humanRes?.contentType, externalRules, externalColorRules, timings, t0, override: !!opts.override, extraFindings: findings, rule, standIn,
|
|
173
168
|
}));
|
|
169
|
+
// the AI fetcher got a stand-in with a success status, and the operator chose to read the browser's copy then
|
|
170
|
+
if (result.tier === "unreachable" && standIn.agent && humanRes && this.config.challengedFetch === "browser-view") {
|
|
171
|
+
const view = await this.browserView(url, humanRes, "the site gave the AI fetcher a challenge, block or error page", opts, rule, findings, timings, t0);
|
|
172
|
+
if (view)
|
|
173
|
+
return view;
|
|
174
|
+
}
|
|
174
175
|
// a stand-in page (a challenge, a block notice) is a passing state of the site, like any failed fetch: not cached
|
|
175
176
|
if (result.tier !== "unreachable")
|
|
176
177
|
this.cacheSet(url, opts, result);
|
|
177
178
|
return result;
|
|
178
179
|
}
|
|
180
|
+
/** Policy over where a fetch ended up: a quarantined or denied hop refuses it; a long chain is recorded. */
|
|
181
|
+
checkHops(url, res, opts, timings, t0, findings) {
|
|
182
|
+
if (opts.quarantineCheck) {
|
|
183
|
+
for (const hop of [...res.redirectChain, res.finalUrl]) {
|
|
184
|
+
const q = opts.quarantineCheck(hop);
|
|
185
|
+
if (q)
|
|
186
|
+
return this.refuse(url, [{ pass: "policy", kind: "policy.denied_source", confidence: 1, severity: 1, message: `redirected to a source quarantined by your organization: ${q}`, action: "none" }], timings, t0, "text", "hostile", true);
|
|
187
|
+
}
|
|
188
|
+
}
|
|
189
|
+
if (res.redirectChain.length) {
|
|
190
|
+
const hosts = new Set(res.redirectChain.concat(res.finalUrl).map(hostOf));
|
|
191
|
+
if (hosts.size > 2)
|
|
192
|
+
findings.push({ pass: "policy", kind: "policy.redirect_chain", confidence: 0.4, severity: 0.3, message: `redirected through ${hosts.size} hosts: ${[...hosts].join(" -> ")}`, action: "none" });
|
|
193
|
+
const finalRule = this.domainRule(res.finalUrl);
|
|
194
|
+
if (finalRule?.deny)
|
|
195
|
+
return this.refuse(url, [{ pass: "policy", kind: "policy.denied_source", confidence: 1, severity: 1, message: `redirect target ${hostOf(res.finalUrl)} is denied by policy`, action: "none" }], timings, t0, "text");
|
|
196
|
+
}
|
|
197
|
+
return undefined;
|
|
198
|
+
}
|
|
199
|
+
/**
|
|
200
|
+
* challengedFetch: "browser-view" (off by default). The AI fetcher was given a stand-in: an error status, a
|
|
201
|
+
* bot challenge, a block notice. The browser-fingerprint fetch of the same address got a page. That copy is
|
|
202
|
+
* judged by every pass and delivered, with a note saying which copy it is. There is no second copy to compare
|
|
203
|
+
* it with, so the cloaking pass does not run. Returns undefined when the browser's copy is itself a stand-in
|
|
204
|
+
* or empty: then there is still nothing to deliver.
|
|
205
|
+
*
|
|
206
|
+
* This is the operator's choice because it reads a page the site declined to give an AI fetcher. A site that
|
|
207
|
+
* instructs only the AI fetcher never reaches here: that page is refused as cloaking before any fallback.
|
|
208
|
+
*/
|
|
209
|
+
async browserView(url, human, why, opts, rule, notes, timings, t0) {
|
|
210
|
+
const kind = detectKind(human.contentType, human.body, human.finalUrl);
|
|
211
|
+
const text = kind === "html" ? analyzeHtml(human.body, [], []).visibleText : human.body;
|
|
212
|
+
if (!servedWords(text).length || looksLikeInterstitial(text))
|
|
213
|
+
return undefined;
|
|
214
|
+
// notes about how the fetch went travel with it; the AI fetcher's own redirect chain does not describe this copy
|
|
215
|
+
const findings = notes.filter((f) => f.pass === "acquire");
|
|
216
|
+
const refused = this.checkHops(url, human, opts, timings, t0, findings);
|
|
217
|
+
if (refused)
|
|
218
|
+
return refused;
|
|
219
|
+
findings.push({ pass: "acquire", kind: "acquire.browser_view_used", confidence: 0, severity: 0, message: `${why}; what follows is the copy a browser-fingerprint fetch of the same address was given, judged like any page. The two copies could not be compared`, action: "none" });
|
|
220
|
+
let externalRules = [];
|
|
221
|
+
let externalColorRules = [];
|
|
222
|
+
if (kind === "html" && this.config.fetchStylesheets)
|
|
223
|
+
({ hidden: externalRules, color: externalColorRules } = await this.fetchStylesheets(human.body, human.finalUrl));
|
|
224
|
+
const result = await this.guarded(url, kind, t0, () => this.analyze({
|
|
225
|
+
url, finalUrl: human.finalUrl, redirectChain: human.redirectChain, raw: human.body, kind,
|
|
226
|
+
externalRules, externalColorRules, timings, t0, override: !!opts.override, extraFindings: findings, rule,
|
|
227
|
+
}));
|
|
228
|
+
if (result.tier !== "unreachable")
|
|
229
|
+
this.cacheSet(url, opts, result);
|
|
230
|
+
return result;
|
|
231
|
+
}
|
|
179
232
|
/** Gate text or HTML already in hand (paste, tool result, file). */
|
|
180
233
|
async scan(content, opts = {}) {
|
|
181
234
|
const t0 = performance.now();
|
|
@@ -411,6 +464,8 @@ export class IngressEngine {
|
|
|
411
464
|
const told = wholesale ? this.agentOnlyShape(visibleText, humanText) : [];
|
|
412
465
|
if (wholesale && !told.length && looksLikeInterstitial(visibleText)) {
|
|
413
466
|
// a stand-in page is not the page: nothing to deliver, nothing to compare, and not an attack
|
|
467
|
+
if (a.standIn)
|
|
468
|
+
a.standIn.agent = true;
|
|
414
469
|
return this.refuse(a.url, [...a.extraFindings, {
|
|
415
470
|
pass: "acquire", kind: "acquire.unreachable", confidence: 0, severity: 0,
|
|
416
471
|
message: `the site gave the AI fetcher a challenge, block or error page instead of the page a browser gets (${cmp.agentWords} words, ${(cmp.agentOnlyShare * 100).toFixed(0)}% of them not on the browser's page)`,
|
package/dist/src/index.d.ts
CHANGED
|
@@ -48,10 +48,15 @@ export type { ShortcutSummary, ShortcutAction } from "./shortcuts.js";
|
|
|
48
48
|
export { ProvenanceLedger, describeMark, downloadOrigin } from "./provenance.js";
|
|
49
49
|
export type { ProvenanceMark } from "./provenance.js";
|
|
50
50
|
export type { ShellGateOptions } from "./shell-commands.js";
|
|
51
|
-
export { postToolUse, preToolUse, localPortProgram, userPromptSubmit, preCompact, postCompact, sessionStart, remoteGate, withheld, PASTE_OVERRIDE } from "./agent-hooks.js";
|
|
51
|
+
export { postToolUse, preToolUse, preToolUseAnswered, localPortProgram, userPromptSubmit, preCompact, postCompact, sessionStart, remoteGate, withheld, PASTE_OVERRIDE } from "./agent-hooks.js";
|
|
52
52
|
export type { HookGate, HookOptions, EgressHookOptions } from "./agent-hooks.js";
|
|
53
53
|
export { oneTimeCodes, carriesCode, credentialsLeaving, hostsMentioned, Blocklist, BLOCKLIST_FEEDS, peripheralEgress, loopbackPorts, isForwarder, HomeCalls } from "./egress.js";
|
|
54
54
|
export type { PeripheralEgress } from "./egress.js";
|
|
55
|
+
export { updateBlocklists, blocklistsRefreshedAt, blocklistRefreshDue, claimBlocklistRefresh, startBlocklistRefresh, BLOCKLIST_MAX_AGE_MS, BLOCKLIST_RETRY_MS } from "./blocklist-update.js";
|
|
56
|
+
export type { FeedOutcome, RefreshStart } from "./blocklist-update.js";
|
|
57
|
+
export { startEgressProxy, decideConnection, egressProxyOptionsFromEnv, egressProxyOn, ensureEgressProxy, proxyHealth, proxySecret, sessionToken, sessionOfToken, proxyEnv, noteVisibleHosts, isVisibleHost, noteCommandStart, commandStart, connectionsSince, sandboxProfile, sandboxSecrets, sandboxUsable, runSandboxed, EGRESS_PROXY_PORT, DEFAULT_PROXY_POLICY, VISIBLE_HOST_TTL_MS, } from "./egress-proxy.js";
|
|
58
|
+
export type { EgressProxyOptions, RunningEgressProxy, ProxyPolicy, ProxyConnection, ConnectionDecision } from "./egress-proxy.js";
|
|
59
|
+
export { egressProxyBefore } from "./agent-hooks.js";
|
|
55
60
|
export { StreamScanner, scanStream } from "./stream.js";
|
|
56
61
|
export type { StreamOptions, StreamStep, StreamSummary } from "./stream.js";
|
|
57
62
|
export { runSandbox, DEFAULT_SCRIPT_HOSTS } from "./sandbox.js";
|
package/dist/src/index.js
CHANGED
|
@@ -29,8 +29,11 @@ export { inspectAudio, readAudioTags, detectAudioFormat, commandRunner } from ".
|
|
|
29
29
|
export { adaptNearby, parseNearby, looksLikeNearbyJson, collectNearby, parseDnsSdBrowse, parseBluetoothProfile, parseLpstatPrinters } from "./nearby.js";
|
|
30
30
|
export { adaptShortcut, summarizeShortcut, looksLikeShortcut, parsePlistXml } from "./shortcuts.js";
|
|
31
31
|
export { ProvenanceLedger, describeMark, downloadOrigin } from "./provenance.js";
|
|
32
|
-
export { postToolUse, preToolUse, localPortProgram, userPromptSubmit, preCompact, postCompact, sessionStart, remoteGate, withheld, PASTE_OVERRIDE } from "./agent-hooks.js";
|
|
32
|
+
export { postToolUse, preToolUse, preToolUseAnswered, localPortProgram, userPromptSubmit, preCompact, postCompact, sessionStart, remoteGate, withheld, PASTE_OVERRIDE } from "./agent-hooks.js";
|
|
33
33
|
export { oneTimeCodes, carriesCode, credentialsLeaving, hostsMentioned, Blocklist, BLOCKLIST_FEEDS, peripheralEgress, loopbackPorts, isForwarder, HomeCalls } from "./egress.js";
|
|
34
|
+
export { updateBlocklists, blocklistsRefreshedAt, blocklistRefreshDue, claimBlocklistRefresh, startBlocklistRefresh, BLOCKLIST_MAX_AGE_MS, BLOCKLIST_RETRY_MS } from "./blocklist-update.js";
|
|
35
|
+
export { startEgressProxy, decideConnection, egressProxyOptionsFromEnv, egressProxyOn, ensureEgressProxy, proxyHealth, proxySecret, sessionToken, sessionOfToken, proxyEnv, noteVisibleHosts, isVisibleHost, noteCommandStart, commandStart, connectionsSince, sandboxProfile, sandboxSecrets, sandboxUsable, runSandboxed, EGRESS_PROXY_PORT, DEFAULT_PROXY_POLICY, VISIBLE_HOST_TTL_MS, } from "./egress-proxy.js";
|
|
36
|
+
export { egressProxyBefore } from "./agent-hooks.js";
|
|
34
37
|
export { StreamScanner, scanStream } from "./stream.js";
|
|
35
38
|
export { runSandbox, DEFAULT_SCRIPT_HOSTS } from "./sandbox.js";
|
|
36
39
|
export { createTaintGuard } from "./taint.js";
|
package/dist/src/policyfile.js
CHANGED
|
@@ -44,6 +44,8 @@ export function loadPolicyFile(path) {
|
|
|
44
44
|
out.sandbox = raw.sandbox;
|
|
45
45
|
if (typeof raw.cloakingCheck === "boolean")
|
|
46
46
|
out.cloakingCheck = raw.cloakingCheck;
|
|
47
|
+
if (raw.challengedFetch === "browser-view" || raw.challengedFetch === "unreachable")
|
|
48
|
+
out.challengedFetch = raw.challengedFetch;
|
|
47
49
|
if (typeof raw.fetchStylesheets === "boolean")
|
|
48
50
|
out.fetchStylesheets = raw.fetchStylesheets;
|
|
49
51
|
return out;
|
package/dist/src/summary.d.ts
CHANGED
|
@@ -36,5 +36,7 @@ export declare function summarize(result: IngressResult, topN?: number): ResultS
|
|
|
36
36
|
* INGRESS_CLOAKING_JITTER "min,max" milliseconds between the two fetches
|
|
37
37
|
* INGRESS_HUMAN_PROXY HTTP(S) proxy URL for the browser-fingerprint fetch (e.g. a residential proxy)
|
|
38
38
|
* INGRESS_HUMAN_FETCH "browser" to make that fetch in a real headless Chromium
|
|
39
|
+
* INGRESS_CHALLENGED_FETCH "browser-view" to read the browser's copy when the site gives the AI fetcher a challenge,
|
|
40
|
+
* a block or an error instead of the page (default: nothing is delivered)
|
|
39
41
|
*/
|
|
40
42
|
export declare function cloakingConfigFromEnv(env: Record<string, string | undefined>, honestUserAgent: string): Partial<import("./types.js").IngressConfig>;
|
package/dist/src/summary.js
CHANGED
|
@@ -45,6 +45,8 @@ export function summarize(result, topN = 6) {
|
|
|
45
45
|
* INGRESS_CLOAKING_JITTER "min,max" milliseconds between the two fetches
|
|
46
46
|
* INGRESS_HUMAN_PROXY HTTP(S) proxy URL for the browser-fingerprint fetch (e.g. a residential proxy)
|
|
47
47
|
* INGRESS_HUMAN_FETCH "browser" to make that fetch in a real headless Chromium
|
|
48
|
+
* INGRESS_CHALLENGED_FETCH "browser-view" to read the browser's copy when the site gives the AI fetcher a challenge,
|
|
49
|
+
* a block or an error instead of the page (default: nothing is delivered)
|
|
48
50
|
*/
|
|
49
51
|
export function cloakingConfigFromEnv(env, honestUserAgent) {
|
|
50
52
|
const cfg = {};
|
|
@@ -58,5 +60,7 @@ export function cloakingConfigFromEnv(env, honestUserAgent) {
|
|
|
58
60
|
cfg.humanProxy = env.INGRESS_HUMAN_PROXY;
|
|
59
61
|
if (env.INGRESS_HUMAN_FETCH === "browser" || env.INGRESS_HUMAN_FETCH === "http")
|
|
60
62
|
cfg.humanFetch = env.INGRESS_HUMAN_FETCH;
|
|
63
|
+
if (env.INGRESS_CHALLENGED_FETCH === "browser-view" || env.INGRESS_CHALLENGED_FETCH === "unreachable")
|
|
64
|
+
cfg.challengedFetch = env.INGRESS_CHALLENGED_FETCH;
|
|
61
65
|
return cfg;
|
|
62
66
|
}
|
package/dist/src/types.d.ts
CHANGED
|
@@ -5,9 +5,9 @@
|
|
|
5
5
|
* at the same source would not see is suspect by default.
|
|
6
6
|
*/
|
|
7
7
|
import type { NetPolicy } from "./netpolicy.js";
|
|
8
|
-
export declare const ENGINE_VERSION = "0.9.
|
|
8
|
+
export declare const ENGINE_VERSION = "0.9.26";
|
|
9
9
|
/** bump whenever a detector's behavior changes; receipts carry it so verdicts are reproducible */
|
|
10
|
-
export declare const RULESET_VERSION = "2026.11.19-
|
|
10
|
+
export declare const RULESET_VERSION = "2026.11.19-3";
|
|
11
11
|
/**
|
|
12
12
|
* clean: delivered. suspect: refused, overridable. hostile: refused, not overridable.
|
|
13
13
|
* unreachable: nothing could be fetched or read (network error, timeout, redirect loop,
|
|
@@ -50,7 +50,7 @@ export declare function parseScanHints(o: {
|
|
|
50
50
|
/** multiplier on the suspect threshold per trust level: strangers and broadcasts need less evidence */
|
|
51
51
|
export declare const TRUST_SUSPECT_FACTOR: Record<TrustLevel, number>;
|
|
52
52
|
export type PassName = "acquire" | "policy" | "visibility" | "character" | "script" | "supplychain" | "secrets" | "meaning" | "cloaking" | "sandbox" | "code" | "channel" | "classifier" | "plugin";
|
|
53
|
-
export type FindingKind = "policy.denied_source" | "policy.redirect_chain" | "acquire.unreachable" | "acquire.cloaking_check_incomplete" | "acquire.ai_agent_refused" | "unicode.tag_characters" | "unicode.zero_width" | "unicode.bidi_control" | "unicode.variation_selector_smuggling" | "unicode.mixed_script_confusable" | "unicode.fullwidth_or_math_lookalike" | "unicode.combining_flood" | "unicode.encoded_payload" | "unicode.entity_smuggling" | "unicode.whitespace_channel" | "visibility.css_hidden" | "visibility.offscreen" | "visibility.attribute_only" | "visibility.html_comment" | "visibility.tiny_or_transparent" | "visibility.markdown_hidden" | "visibility.terminal_hidden" | "visibility.terminal_control" | "email.part_divergence" | "email.sender_mismatch" | "email.authentication_failed" | "email.remote_content" | "email.uninspected_part" | "calendar.alarm_action" | "calendar.description_divergence" | "message.text_divergence" | "message.sender_impersonation" | "message.scam_shape" | "message.verification_code" | "message.uninspected_part" | "notification.source_mismatch" | "nearby.authority_name" | "nearby.lookalike" | "nearby.link" | "nearby.oversized_field" | "automation.private_outside_send" | "automation.runs_code" | "automation.destination" | "automation.unreadable" | "image.clickfix" | "image.screen_not_in_source" | "captions.hidden_cue" | "captions.unreadable_cue" | "captions.not_spoken" | "captions.addressed_to_notetaker" | "captions.spoken_approval" | "audio.quiet_speech" | "audio.transcript_unstable" | "audio.metadata_text" | "audio.not_transcribed" | "image.text_only_when_resized" | "image.low_contrast_text" | "image.transparency_text" | "image.later_frame_text" | "image.metadata_text" | "image.trailing_data" | "image.active_content" | "image.code_payload" | "image.code_action" | "image.caption_mismatch" | "image.pixels_not_inspected" | "classifier.injection_likely" | "script.obfuscation" | "script.runtime_codegen" | "script.automation_detection" | "script.post_load_text_injection" | "script.exfil_beacon" | "script.binary_decoding" | "supplychain.lifecycle_script" | "supplychain.url_dependency" | "supplychain.offregistry_resolution" | "supplychain.install_instruction" | "secrets.credential_in_content" | "sandbox.text_injected_after_load" | "sandbox.webdriver_keyed_divergence" | "sandbox.computed_hidden_text" | "sandbox.blocked_egress_attempt" | "meaning.instruction_shaped" | "meaning.role_token" | "meaning.system_prompt_imitation" | "meaning.tool_call_shaped" | "meaning.exfil_markdown_image" | "meaning.exfil_link" | "meaning.adversarial_suffix" | "cloaking.agent_targeted_divergence" | "code.download_execute" | "code.encoded_execution" | "code.reverse_shell" | "code.secret_exfiltration" | "code.persistence" | `plugin.${string}`;
|
|
53
|
+
export type FindingKind = "policy.denied_source" | "policy.redirect_chain" | "acquire.unreachable" | "acquire.cloaking_check_incomplete" | "acquire.ai_agent_refused" | "acquire.browser_view_used" | "unicode.tag_characters" | "unicode.zero_width" | "unicode.bidi_control" | "unicode.variation_selector_smuggling" | "unicode.mixed_script_confusable" | "unicode.fullwidth_or_math_lookalike" | "unicode.combining_flood" | "unicode.encoded_payload" | "unicode.entity_smuggling" | "unicode.whitespace_channel" | "visibility.css_hidden" | "visibility.offscreen" | "visibility.attribute_only" | "visibility.html_comment" | "visibility.tiny_or_transparent" | "visibility.markdown_hidden" | "visibility.terminal_hidden" | "visibility.terminal_control" | "email.part_divergence" | "email.sender_mismatch" | "email.authentication_failed" | "email.remote_content" | "email.uninspected_part" | "calendar.alarm_action" | "calendar.description_divergence" | "message.text_divergence" | "message.sender_impersonation" | "message.scam_shape" | "message.verification_code" | "message.uninspected_part" | "notification.source_mismatch" | "nearby.authority_name" | "nearby.lookalike" | "nearby.link" | "nearby.oversized_field" | "automation.private_outside_send" | "automation.runs_code" | "automation.destination" | "automation.unreadable" | "image.clickfix" | "image.screen_not_in_source" | "captions.hidden_cue" | "captions.unreadable_cue" | "captions.not_spoken" | "captions.addressed_to_notetaker" | "captions.spoken_approval" | "audio.quiet_speech" | "audio.transcript_unstable" | "audio.metadata_text" | "audio.not_transcribed" | "image.text_only_when_resized" | "image.low_contrast_text" | "image.transparency_text" | "image.later_frame_text" | "image.metadata_text" | "image.trailing_data" | "image.active_content" | "image.code_payload" | "image.code_action" | "image.caption_mismatch" | "image.pixels_not_inspected" | "classifier.injection_likely" | "script.obfuscation" | "script.runtime_codegen" | "script.automation_detection" | "script.post_load_text_injection" | "script.exfil_beacon" | "script.binary_decoding" | "supplychain.lifecycle_script" | "supplychain.url_dependency" | "supplychain.offregistry_resolution" | "supplychain.install_instruction" | "secrets.credential_in_content" | "sandbox.text_injected_after_load" | "sandbox.webdriver_keyed_divergence" | "sandbox.computed_hidden_text" | "sandbox.blocked_egress_attempt" | "meaning.instruction_shaped" | "meaning.role_token" | "meaning.system_prompt_imitation" | "meaning.tool_call_shaped" | "meaning.exfil_markdown_image" | "meaning.exfil_link" | "meaning.adversarial_suffix" | "cloaking.agent_targeted_divergence" | "code.download_execute" | "code.encoded_execution" | "code.reverse_shell" | "code.secret_exfiltration" | "code.persistence" | `plugin.${string}`;
|
|
54
54
|
export interface Finding {
|
|
55
55
|
pass: PassName;
|
|
56
56
|
kind: FindingKind;
|
|
@@ -215,6 +215,13 @@ export interface IngressConfig {
|
|
|
215
215
|
humanProxy?: string;
|
|
216
216
|
/** "http": the human fetch is a plain request with browser headers. "browser": a real headless Chromium loads the page. */
|
|
217
217
|
humanFetch: "http" | "browser";
|
|
218
|
+
/**
|
|
219
|
+
* What to do when the site gives the AI fetcher a stand-in (an error status, a bot challenge, a block notice)
|
|
220
|
+
* and gives the browser-fingerprint fetch a page. "unreachable" (the default): nothing is delivered.
|
|
221
|
+
* "browser-view": the browser's copy is judged by every pass and delivered, with a note saying which copy it
|
|
222
|
+
* is. The second reads a page the site declined to give an AI fetcher; that is the operator's decision.
|
|
223
|
+
*/
|
|
224
|
+
challengedFetch: "unreachable" | "browser-view";
|
|
218
225
|
/** maximum body size accepted, bytes */
|
|
219
226
|
maxBodyBytes: number;
|
|
220
227
|
/** fetch timeout, milliseconds */
|
package/dist/src/types.js
CHANGED
|
@@ -4,9 +4,9 @@
|
|
|
4
4
|
* Governing principle: anything the model would receive that a human looking
|
|
5
5
|
* at the same source would not see is suspect by default.
|
|
6
6
|
*/
|
|
7
|
-
export const ENGINE_VERSION = "0.9.
|
|
7
|
+
export const ENGINE_VERSION = "0.9.26";
|
|
8
8
|
/** bump whenever a detector's behavior changes; receipts carry it so verdicts are reproducible */
|
|
9
|
-
export const RULESET_VERSION = "2026.11.19-
|
|
9
|
+
export const RULESET_VERSION = "2026.11.19-3";
|
|
10
10
|
export const CONTENT_KINDS = ["html", "markdown", "json", "text", "javascript", "log", "email", "calendar", "message", "notification", "nearby", "automation", "captions", "image", "audio"];
|
|
11
11
|
/** Read a content kind and source from untyped input (an HTTP body, tool arguments). Unknown values are dropped, never guessed. */
|
|
12
12
|
export function parseScanHints(o) {
|
|
@@ -31,6 +31,7 @@ export const DEFAULT_CONFIG = {
|
|
|
31
31
|
],
|
|
32
32
|
cloakingJitterMs: [250, 1500],
|
|
33
33
|
humanFetch: "http",
|
|
34
|
+
challengedFetch: "unreachable",
|
|
34
35
|
maxBodyBytes: 5 * 1024 * 1024,
|
|
35
36
|
fetchTimeoutMs: 15000,
|
|
36
37
|
cacheTtlSeconds: 86400,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acepaste/ingress",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.26",
|
|
4
4
|
"description": "AcePaste Ingress engine: acquire, visibility, character, script, supply-chain, sandbox, meaning, verdict, envelope, receipts.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/src/index.js",
|