@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/types.d.ts
CHANGED
|
@@ -5,13 +5,18 @@
|
|
|
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.
|
|
8
|
+
export declare const ENGINE_VERSION = "0.9.0";
|
|
9
9
|
/** bump whenever a detector's behavior changes; receipts carry it so verdicts are reproducible */
|
|
10
|
-
export declare const RULESET_VERSION = "2026.
|
|
11
|
-
|
|
10
|
+
export declare const RULESET_VERSION = "2026.11.03-2";
|
|
11
|
+
/**
|
|
12
|
+
* clean: delivered. suspect: refused, overridable. hostile: refused, not overridable.
|
|
13
|
+
* unreachable: nothing could be fetched or read (network error, timeout, redirect loop,
|
|
14
|
+
* binary or oversized body). Not an attack verdict, and never written to the attack log.
|
|
15
|
+
*/
|
|
16
|
+
export type Tier = "clean" | "suspect" | "hostile" | "unreachable";
|
|
12
17
|
export type ContentKind = "html" | "markdown" | "json" | "text" | "javascript";
|
|
13
|
-
export type PassName = "acquire" | "policy" | "visibility" | "character" | "script" | "supplychain" | "secrets" | "meaning" | "cloaking" | "sandbox" | "plugin";
|
|
14
|
-
export type FindingKind = "policy.denied_source" | "policy.redirect_chain" | "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" | "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" | "cloaking.agent_targeted_divergence" | `plugin.${string}`;
|
|
18
|
+
export type PassName = "acquire" | "policy" | "visibility" | "character" | "script" | "supplychain" | "secrets" | "meaning" | "cloaking" | "sandbox" | "code" | "plugin";
|
|
19
|
+
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" | "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" | "cloaking.agent_targeted_divergence" | "code.download_execute" | "code.encoded_execution" | "code.reverse_shell" | "code.secret_exfiltration" | "code.persistence" | `plugin.${string}`;
|
|
15
20
|
export interface Finding {
|
|
16
21
|
pass: PassName;
|
|
17
22
|
kind: FindingKind;
|
|
@@ -25,6 +30,8 @@ export interface Finding {
|
|
|
25
30
|
excerpt?: string;
|
|
26
31
|
/** location hint: character offset, selector path, or script index */
|
|
27
32
|
location?: string;
|
|
33
|
+
/** meaning pass: the match was in text a human would not see */
|
|
34
|
+
inHidden?: boolean;
|
|
28
35
|
/** what the engine did about it */
|
|
29
36
|
action: "none" | "neutralized" | "quarantined";
|
|
30
37
|
/** Kith & Revere evidence model, attached by the engine: a finding is a conclusion, never a Fact */
|
|
@@ -47,6 +54,10 @@ export interface AcquireResult {
|
|
|
47
54
|
body: string;
|
|
48
55
|
/** which fingerprint this acquisition used */
|
|
49
56
|
fingerprint: "human" | "agent";
|
|
57
|
+
/** the user-agent string actually sent */
|
|
58
|
+
userAgent: string;
|
|
59
|
+
/** how it was fetched: plain HTTP client, or a real browser (human fingerprint only) */
|
|
60
|
+
via: "http" | "browser";
|
|
50
61
|
fetchedAt: string;
|
|
51
62
|
}
|
|
52
63
|
export interface TextSegment {
|
|
@@ -138,6 +149,10 @@ export interface IngressResult {
|
|
|
138
149
|
receipt: TaintReceipt;
|
|
139
150
|
/** timing in milliseconds per pass, for the speed budget */
|
|
140
151
|
timings: Partial<Record<PassName | "total", number>>;
|
|
152
|
+
/** what was inspected, and what was not (code languages, units skipped). Unknown is not clean. */
|
|
153
|
+
coverage?: {
|
|
154
|
+
code?: import("./codepass.js").CodeCoverage;
|
|
155
|
+
};
|
|
141
156
|
}
|
|
142
157
|
export interface IngressConfig {
|
|
143
158
|
/** score at or above which the page is refused and cannot be overridden */
|
|
@@ -146,6 +161,21 @@ export interface IngressConfig {
|
|
|
146
161
|
suspectThreshold: number;
|
|
147
162
|
/** run the second, human-fingerprinted fetch and compare */
|
|
148
163
|
cloakingCheck: boolean;
|
|
164
|
+
/**
|
|
165
|
+
* user agents for the agent fetch, one picked at random per fetch. Defaults to the
|
|
166
|
+
* user-triggered fetchers of the major AI assistants, because those are what
|
|
167
|
+
* agent-targeted cloaking keys on. Set to one honest string to stop impersonating.
|
|
168
|
+
*/
|
|
169
|
+
agentUserAgents: string[];
|
|
170
|
+
/** random gap between the two fetches, [min, max] milliseconds; the order is random too */
|
|
171
|
+
cloakingJitterMs: [number, number];
|
|
172
|
+
/**
|
|
173
|
+
* optional HTTP(S) proxy for the human fetch only, e.g. a residential proxy, so the two
|
|
174
|
+
* fetches leave from different networks. Credentials go in the URL. Never logged.
|
|
175
|
+
*/
|
|
176
|
+
humanProxy?: string;
|
|
177
|
+
/** "http": the human fetch is a plain request with browser headers. "browser": a real headless Chromium loads the page. */
|
|
178
|
+
humanFetch: "http" | "browser";
|
|
149
179
|
/** maximum body size accepted, bytes */
|
|
150
180
|
maxBodyBytes: number;
|
|
151
181
|
/** fetch timeout, milliseconds */
|
package/dist/src/types.js
CHANGED
|
@@ -4,13 +4,21 @@
|
|
|
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.
|
|
7
|
+
export const ENGINE_VERSION = "0.9.0";
|
|
8
8
|
/** bump whenever a detector's behavior changes; receipts carry it so verdicts are reproducible */
|
|
9
|
-
export const RULESET_VERSION = "2026.
|
|
9
|
+
export const RULESET_VERSION = "2026.11.03-2";
|
|
10
10
|
export const DEFAULT_CONFIG = {
|
|
11
11
|
hostileThreshold: 0.7,
|
|
12
12
|
suspectThreshold: 0.25,
|
|
13
13
|
cloakingCheck: true,
|
|
14
|
+
agentUserAgents: [
|
|
15
|
+
// sources: OpenAI bot docs; Cloudflare Radar bot directory; Perplexity agent docs (checked 2026-11-03)
|
|
16
|
+
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko); compatible; ChatGPT-User/1.0; +https://openai.com/bot",
|
|
17
|
+
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Claude-User/1.0; +Claude-User@anthropic.com)",
|
|
18
|
+
"Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; Perplexity-User/1.0; +https://www.perplexity.ai)",
|
|
19
|
+
],
|
|
20
|
+
cloakingJitterMs: [250, 1500],
|
|
21
|
+
humanFetch: "http",
|
|
14
22
|
maxBodyBytes: 5 * 1024 * 1024,
|
|
15
23
|
fetchTimeoutMs: 15000,
|
|
16
24
|
cacheTtlSeconds: 86400,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@acepaste/ingress",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
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",
|