cyrus-core 0.2.44 → 0.2.45
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/agent-runner-types.d.ts +1 -1
- package/dist/agent-runner-types.d.ts.map +1 -1
- package/dist/config-schemas.d.ts +111 -0
- package/dist/config-schemas.d.ts.map +1 -1
- package/dist/config-schemas.js +122 -0
- package/dist/config-schemas.js.map +1 -1
- package/dist/config-types.d.ts +2 -1
- package/dist/config-types.d.ts.map +1 -1
- package/dist/config-types.js +2 -1
- package/dist/config-types.js.map +1 -1
- package/dist/constants.d.ts +12 -0
- package/dist/constants.d.ts.map +1 -1
- package/dist/constants.js +18 -0
- package/dist/constants.js.map +1 -1
- package/dist/index.d.ts +5 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +4 -2
- package/dist/index.js.map +1 -1
- package/dist/security/WebhookIpValidator.d.ts +92 -0
- package/dist/security/WebhookIpValidator.d.ts.map +1 -0
- package/dist/security/WebhookIpValidator.js +175 -0
- package/dist/security/WebhookIpValidator.js.map +1 -0
- package/dist/security/index.d.ts +3 -0
- package/dist/security/index.d.ts.map +1 -0
- package/dist/security/index.js +2 -0
- package/dist/security/index.js.map +1 -0
- package/dist/trusted-domains.d.ts +8 -0
- package/dist/trusted-domains.d.ts.map +1 -0
- package/dist/trusted-domains.js +242 -0
- package/dist/trusted-domains.js.map +1 -0
- package/package.json +2 -2
- package/schemas/EdgeConfig.json +86 -0
- package/schemas/EdgeConfigPayload.json +86 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebhookIpValidator.d.ts","sourceRoot":"","sources":["../../src/security/WebhookIpValidator.ts"],"names":[],"mappings":"AASA,OAAO,EAAgB,KAAK,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAEjE;;;;;;GAMG;AACH,eAAO,MAAM,kBAAkB,mHAOrB,CAAC;AAEX;;;GAGG;AACH,eAAO,MAAM,6BAA6B,uFAKhC,CAAC;A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;IAIpB;;OAEG;IACH,YAAY,CAAC,QAAQ,EAAE,eAAe,GAAG,SAAS,MAAM,EAAE;CAG1D"}
|
|
@@ -0,0 +1,175 @@
|
|
|
1
|
+
import { createLogger } from "../logging/index.js";
|
|
2
|
+
/**
|
|
3
|
+
* Known webhook source IPs/CIDRs for supported providers.
|
|
4
|
+
*
|
|
5
|
+
* Linear: https://linear.app/developers/webhooks#securing-webhooks
|
|
6
|
+
* GitHub: https://api.github.com/meta (hooks field)
|
|
7
|
+
* GitLab: https://docs.gitlab.com/ee/user/gitlab_com/#ip-range
|
|
8
|
+
*/
|
|
9
|
+
export const LINEAR_WEBHOOK_IPS = [
|
|
10
|
+
"35.231.147.226",
|
|
11
|
+
"35.243.134.228",
|
|
12
|
+
"34.140.253.14",
|
|
13
|
+
"34.38.87.206",
|
|
14
|
+
"34.134.222.122",
|
|
15
|
+
"35.222.25.142",
|
|
16
|
+
];
|
|
17
|
+
/**
|
|
18
|
+
* Fallback GitHub webhook CIDRs (from /meta API as of 2025).
|
|
19
|
+
* These are used when the /meta API is unavailable.
|
|
20
|
+
*/
|
|
21
|
+
export const GITHUB_WEBHOOK_CIDRS_FALLBACK = [
|
|
22
|
+
"192.30.252.0/22",
|
|
23
|
+
"185.199.108.0/22",
|
|
24
|
+
"140.82.112.0/20",
|
|
25
|
+
"143.55.64.0/20",
|
|
26
|
+
];
|
|
27
|
+
/**
|
|
28
|
+
* GitLab.com webhook source IPs.
|
|
29
|
+
* https://docs.gitlab.com/ee/user/gitlab_com/#ip-range
|
|
30
|
+
*/
|
|
31
|
+
export const GITLAB_WEBHOOK_CIDRS = [
|
|
32
|
+
"34.74.90.64/28",
|
|
33
|
+
"34.74.226.0/24",
|
|
34
|
+
];
|
|
35
|
+
/**
|
|
36
|
+
* Parse a CIDR notation string into a base IP (as 32-bit number) and mask.
|
|
37
|
+
* Supports both plain IPs ("1.2.3.4") and CIDR notation ("1.2.3.4/24").
|
|
38
|
+
*/
|
|
39
|
+
export function parseCidr(cidr) {
|
|
40
|
+
const slashIdx = cidr.indexOf("/");
|
|
41
|
+
const ip = slashIdx === -1 ? cidr : cidr.slice(0, slashIdx);
|
|
42
|
+
const prefixLen = slashIdx === -1 ? 32 : Number.parseInt(cidr.slice(slashIdx + 1), 10);
|
|
43
|
+
const octets = ip.split(".").map((o) => Number.parseInt(o, 10));
|
|
44
|
+
const ipNum = ((octets[0] << 24) |
|
|
45
|
+
(octets[1] << 16) |
|
|
46
|
+
(octets[2] << 8) |
|
|
47
|
+
octets[3]) >>>
|
|
48
|
+
0;
|
|
49
|
+
// Create mask: e.g. /24 → 0xFFFFFF00
|
|
50
|
+
const mask = prefixLen === 0 ? 0 : (~0 << (32 - prefixLen)) >>> 0;
|
|
51
|
+
return { base: (ipNum & mask) >>> 0, mask };
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* Convert an IPv4 address string to a 32-bit unsigned integer.
|
|
55
|
+
*/
|
|
56
|
+
export function ipToNumber(ip) {
|
|
57
|
+
const octets = ip.split(".").map((o) => Number.parseInt(o, 10));
|
|
58
|
+
return (((octets[0] << 24) |
|
|
59
|
+
(octets[1] << 16) |
|
|
60
|
+
(octets[2] << 8) |
|
|
61
|
+
octets[3]) >>>
|
|
62
|
+
0);
|
|
63
|
+
}
|
|
64
|
+
/**
|
|
65
|
+
* Check if an IPv4 address matches a CIDR range or exact IP.
|
|
66
|
+
*/
|
|
67
|
+
export function ipMatchesCidr(ip, cidr) {
|
|
68
|
+
const { base, mask } = parseCidr(cidr);
|
|
69
|
+
const ipNum = ipToNumber(ip);
|
|
70
|
+
return (ipNum & mask) >>> 0 === base;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Normalize an IP address by stripping IPv4-mapped IPv6 prefix (::ffff:).
|
|
74
|
+
* Returns the raw IPv4 string if it was mapped, otherwise returns the original.
|
|
75
|
+
*/
|
|
76
|
+
export function normalizeIp(ip) {
|
|
77
|
+
if (ip.startsWith("::ffff:")) {
|
|
78
|
+
return ip.slice(7);
|
|
79
|
+
}
|
|
80
|
+
return ip;
|
|
81
|
+
}
|
|
82
|
+
/**
|
|
83
|
+
* Check if an IP address matches any entry in an allowlist of IPs/CIDRs.
|
|
84
|
+
*/
|
|
85
|
+
export function ipMatchesAllowlist(ip, allowlist) {
|
|
86
|
+
const normalizedIp = normalizeIp(ip);
|
|
87
|
+
// Only validate IPv4 addresses (IPv6 webhooks are uncommon for these providers)
|
|
88
|
+
if (!normalizedIp.match(/^\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}$/)) {
|
|
89
|
+
return false;
|
|
90
|
+
}
|
|
91
|
+
return allowlist.some((entry) => ipMatchesCidr(normalizedIp, entry));
|
|
92
|
+
}
|
|
93
|
+
/**
|
|
94
|
+
* Validates webhook source IPs against known provider allowlists.
|
|
95
|
+
*
|
|
96
|
+
* For GitHub, call `refreshGitHubAllowlist()` after construction to fetch
|
|
97
|
+
* the latest CIDRs from the /meta API. Falls back to a static list if
|
|
98
|
+
* the API is unavailable.
|
|
99
|
+
*/
|
|
100
|
+
export class WebhookIpValidator {
|
|
101
|
+
allowlists;
|
|
102
|
+
enabled;
|
|
103
|
+
logger;
|
|
104
|
+
constructor(options = {}) {
|
|
105
|
+
this.enabled = options.enabled ?? true;
|
|
106
|
+
this.logger =
|
|
107
|
+
options.logger ?? createLogger({ component: "WebhookIpValidator" });
|
|
108
|
+
const custom = options.customAllowlists ?? {};
|
|
109
|
+
this.allowlists = {
|
|
110
|
+
linear: custom.linear ?? [...LINEAR_WEBHOOK_IPS],
|
|
111
|
+
github: custom.github ?? [...GITHUB_WEBHOOK_CIDRS_FALLBACK],
|
|
112
|
+
gitlab: custom.gitlab ?? [...GITLAB_WEBHOOK_CIDRS],
|
|
113
|
+
};
|
|
114
|
+
}
|
|
115
|
+
/**
|
|
116
|
+
* Fetch the latest GitHub webhook CIDRs from the /meta API and update the allowlist.
|
|
117
|
+
* Falls back to the static fallback list on failure.
|
|
118
|
+
*/
|
|
119
|
+
async refreshGitHubAllowlist() {
|
|
120
|
+
try {
|
|
121
|
+
const response = await fetch("https://api.github.com/meta", {
|
|
122
|
+
headers: { Accept: "application/json" },
|
|
123
|
+
signal: AbortSignal.timeout(5000),
|
|
124
|
+
});
|
|
125
|
+
if (!response.ok) {
|
|
126
|
+
this.logger.warn(`GitHub /meta API returned ${response.status}, using fallback CIDRs`);
|
|
127
|
+
return;
|
|
128
|
+
}
|
|
129
|
+
const data = (await response.json());
|
|
130
|
+
if (data.hooks && Array.isArray(data.hooks) && data.hooks.length > 0) {
|
|
131
|
+
this.allowlists.github = data.hooks;
|
|
132
|
+
this.logger.info(`Refreshed GitHub webhook allowlist: ${data.hooks.length} CIDRs`);
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
catch (error) {
|
|
136
|
+
this.logger.warn("Failed to fetch GitHub /meta API, using fallback CIDRs", error instanceof Error ? error : new Error(String(error)));
|
|
137
|
+
}
|
|
138
|
+
}
|
|
139
|
+
/**
|
|
140
|
+
* Validate an IP address against the allowlist for the given provider.
|
|
141
|
+
* Returns true if:
|
|
142
|
+
* - IP validation is disabled
|
|
143
|
+
* - The IP matches the provider's allowlist
|
|
144
|
+
*
|
|
145
|
+
* Returns false if the IP does not match.
|
|
146
|
+
*/
|
|
147
|
+
validate(ip, provider) {
|
|
148
|
+
if (!this.enabled) {
|
|
149
|
+
return true;
|
|
150
|
+
}
|
|
151
|
+
const allowlist = this.allowlists[provider];
|
|
152
|
+
if (!allowlist || allowlist.length === 0) {
|
|
153
|
+
this.logger.warn(`No allowlist configured for provider ${provider}, allowing request`);
|
|
154
|
+
return true;
|
|
155
|
+
}
|
|
156
|
+
const isAllowed = ipMatchesAllowlist(ip, allowlist);
|
|
157
|
+
if (!isAllowed) {
|
|
158
|
+
this.logger.warn(`Rejected webhook from ${normalizeIp(ip)} — not in ${provider} allowlist`);
|
|
159
|
+
}
|
|
160
|
+
return isAllowed;
|
|
161
|
+
}
|
|
162
|
+
/**
|
|
163
|
+
* Whether IP validation is currently enabled.
|
|
164
|
+
*/
|
|
165
|
+
isEnabled() {
|
|
166
|
+
return this.enabled;
|
|
167
|
+
}
|
|
168
|
+
/**
|
|
169
|
+
* Get the current allowlist for a provider (for debugging/logging).
|
|
170
|
+
*/
|
|
171
|
+
getAllowlist(provider) {
|
|
172
|
+
return this.allowlists[provider];
|
|
173
|
+
}
|
|
174
|
+
}
|
|
175
|
+
//# sourceMappingURL=WebhookIpValidator.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"WebhookIpValidator.js","sourceRoot":"","sources":["../../src/security/WebhookIpValidator.ts"],"names":[],"mappings":"AASA,OAAO,EAAE,YAAY,EAAgB,MAAM,qBAAqB,CAAC;AAEjE;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG;IACjC,gBAAgB;IAChB,gBAAgB;IAChB,eAAe;IACf,cAAc;IACd,gBAAgB;IAChB,eAAe;CACN,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG;IAC5C,iBAAiB;IACjB,kBAAkB;IAClB,iBAAiB;IACjB,gBAAgB;CACP,CAAC;AAEX;;;GAGG;AACH,MAAM,CAAC,MAAM,oBAAoB,GAAG;IACnC,gBAAgB;IAChB,gBAAgB;CACP,CAAC;AAIX;;;GAGG;AACH,MAAM,UAAU,SAAS,CAAC,IAAY;IACrC,MAAM,QAAQ,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC;IACnC,MAAM,EAAE,GAAG,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,EAAE,QAAQ,CAAC,CAAC;IAC5D,MAAM,SAAS,GACd,QAAQ,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,QAAQ,GAAG,CAAC,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AAC;IAED;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAU,EAAE,QAAyB;QAC7C,IAAI,CAAC,IAAI,CAAC,OAAO,EAAE,CAAC;YACnB,OAAO,IAAI,CAAC;QACb,CAAC;QAED,MAAM,SAAS,GAAG,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;QAC5C,IAAI,CAAC,SAAS,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;YAC1C,IAAI,CAAC,MAAM,CAAC,IAAI,CACf,wCAAwC,QAAQ,oBAAoB,CACpE,CAAC;YACF,OAAO,IAAI,CAAC;QACb,CAAC;QAED,MAAM,SAAS,GAAG,kBAAkB,CAAC,EAAE,EAAE,SAAS,CAAC,CAAC;QACpD,IAAI,CAAC,SAAS,EAAE,CAAC;YAChB,IAAI,CAAC,MAAM,CAAC,IAAI,CACf,yBAAyB,WAAW,CAAC,EAAE,CAAC,aAAa,QAAQ,YAAY,CACzE,CAAC;QACH,CAAC;QAED,OAAO,SAAS,CAAC;IAClB,CAAC;IAED;;OAEG;IACH,SAAS;QACR,OAAO,IAAI,CAAC,OAAO,CAAC;IACrB,CAAC;IAED;;OAEG;IACH,YAAY,CAAC,QAAyB;QACrC,OAAO,IAAI,CAAC,UAAU,CAAC,QAAQ,CAAC,CAAC;IAClC,CAAC;CACD"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type { WebhookIpValidatorOptions, WebhookProvider, } from "./WebhookIpValidator.js";
|
|
2
|
+
export { GITHUB_WEBHOOK_CIDRS_FALLBACK, GITLAB_WEBHOOK_CIDRS, ipMatchesAllowlist, ipMatchesCidr, ipToNumber, LINEAR_WEBHOOK_IPS, normalizeIp, parseCidr, WebhookIpValidator, } from "./WebhookIpValidator.js";
|
|
3
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/security/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACX,yBAAyB,EACzB,eAAe,GACf,MAAM,yBAAyB,CAAC;AACjC,OAAO,EACN,6BAA6B,EAC7B,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,kBAAkB,GAClB,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/security/index.ts"],"names":[],"mappings":"AAIA,OAAO,EACN,6BAA6B,EAC7B,oBAAoB,EACpB,kBAAkB,EAClB,aAAa,EACb,UAAU,EACV,kBAAkB,EAClB,WAAW,EACX,SAAS,EACT,kBAAkB,GAClB,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default allowed domains for the "trusted" network policy preset.
|
|
3
|
+
* Matches the Claude Code on the web "Trusted" access level allowlist.
|
|
4
|
+
*
|
|
5
|
+
* @see https://docs.anthropic.com/en/docs/claude-code/claude-code-on-the-web#default-allowed-domains
|
|
6
|
+
*/
|
|
7
|
+
export declare const TRUSTED_DOMAINS: readonly string[];
|
|
8
|
+
//# sourceMappingURL=trusted-domains.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trusted-domains.d.ts","sourceRoot":"","sources":["../src/trusted-domains.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,eAAO,MAAM,eAAe,EAAE,SAAS,MAAM,EA0P5C,CAAC"}
|
|
@@ -0,0 +1,242 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Default allowed domains for the "trusted" network policy preset.
|
|
3
|
+
* Matches the Claude Code on the web "Trusted" access level allowlist.
|
|
4
|
+
*
|
|
5
|
+
* @see https://docs.anthropic.com/en/docs/claude-code/claude-code-on-the-web#default-allowed-domains
|
|
6
|
+
*/
|
|
7
|
+
export const TRUSTED_DOMAINS = [
|
|
8
|
+
// ── Anthropic services ──────────────────────────────────────────────
|
|
9
|
+
"api.anthropic.com",
|
|
10
|
+
"statsig.anthropic.com",
|
|
11
|
+
"docs.claude.com",
|
|
12
|
+
"platform.claude.com",
|
|
13
|
+
"code.claude.com",
|
|
14
|
+
"claude.ai",
|
|
15
|
+
// ── Version control ─────────────────────────────────────────────────
|
|
16
|
+
"github.com",
|
|
17
|
+
"www.github.com",
|
|
18
|
+
"api.github.com",
|
|
19
|
+
"npm.pkg.github.com",
|
|
20
|
+
"raw.githubusercontent.com",
|
|
21
|
+
"pkg-npm.githubusercontent.com",
|
|
22
|
+
"objects.githubusercontent.com",
|
|
23
|
+
"release-assets.githubusercontent.com",
|
|
24
|
+
"codeload.github.com",
|
|
25
|
+
"avatars.githubusercontent.com",
|
|
26
|
+
"camo.githubusercontent.com",
|
|
27
|
+
"gist.github.com",
|
|
28
|
+
"gitlab.com",
|
|
29
|
+
"www.gitlab.com",
|
|
30
|
+
"registry.gitlab.com",
|
|
31
|
+
"bitbucket.org",
|
|
32
|
+
"www.bitbucket.org",
|
|
33
|
+
"api.bitbucket.org",
|
|
34
|
+
// ── Container registries ────────────────────────────────────────────
|
|
35
|
+
"registry-1.docker.io",
|
|
36
|
+
"auth.docker.io",
|
|
37
|
+
"index.docker.io",
|
|
38
|
+
"hub.docker.com",
|
|
39
|
+
"www.docker.com",
|
|
40
|
+
"production.cloudflare.docker.com",
|
|
41
|
+
"download.docker.com",
|
|
42
|
+
"gcr.io",
|
|
43
|
+
"*.gcr.io",
|
|
44
|
+
"ghcr.io",
|
|
45
|
+
"mcr.microsoft.com",
|
|
46
|
+
"*.data.mcr.microsoft.com",
|
|
47
|
+
"public.ecr.aws",
|
|
48
|
+
// ── Cloud platforms ─────────────────────────────────────────────────
|
|
49
|
+
"cloud.google.com",
|
|
50
|
+
"accounts.google.com",
|
|
51
|
+
"gcloud.google.com",
|
|
52
|
+
"*.googleapis.com",
|
|
53
|
+
"storage.googleapis.com",
|
|
54
|
+
"compute.googleapis.com",
|
|
55
|
+
"container.googleapis.com",
|
|
56
|
+
"azure.com",
|
|
57
|
+
"portal.azure.com",
|
|
58
|
+
"microsoft.com",
|
|
59
|
+
"www.microsoft.com",
|
|
60
|
+
"*.microsoftonline.com",
|
|
61
|
+
"packages.microsoft.com",
|
|
62
|
+
"dotnet.microsoft.com",
|
|
63
|
+
"dot.net",
|
|
64
|
+
"visualstudio.com",
|
|
65
|
+
"dev.azure.com",
|
|
66
|
+
"*.amazonaws.com",
|
|
67
|
+
"*.api.aws",
|
|
68
|
+
"oracle.com",
|
|
69
|
+
"www.oracle.com",
|
|
70
|
+
"java.com",
|
|
71
|
+
"www.java.com",
|
|
72
|
+
"java.net",
|
|
73
|
+
"www.java.net",
|
|
74
|
+
"download.oracle.com",
|
|
75
|
+
"yum.oracle.com",
|
|
76
|
+
// ── JavaScript and Node package managers ────────────────────────────
|
|
77
|
+
"registry.npmjs.org",
|
|
78
|
+
"www.npmjs.com",
|
|
79
|
+
"www.npmjs.org",
|
|
80
|
+
"npmjs.com",
|
|
81
|
+
"npmjs.org",
|
|
82
|
+
"yarnpkg.com",
|
|
83
|
+
"registry.yarnpkg.com",
|
|
84
|
+
// ── Python package managers ─────────────────────────────────────────
|
|
85
|
+
"pypi.org",
|
|
86
|
+
"www.pypi.org",
|
|
87
|
+
"files.pythonhosted.org",
|
|
88
|
+
"pythonhosted.org",
|
|
89
|
+
"test.pypi.org",
|
|
90
|
+
"pypi.python.org",
|
|
91
|
+
"pypa.io",
|
|
92
|
+
"www.pypa.io",
|
|
93
|
+
// ── Ruby package managers ───────────────────────────────────────────
|
|
94
|
+
"rubygems.org",
|
|
95
|
+
"www.rubygems.org",
|
|
96
|
+
"api.rubygems.org",
|
|
97
|
+
"index.rubygems.org",
|
|
98
|
+
"ruby-lang.org",
|
|
99
|
+
"www.ruby-lang.org",
|
|
100
|
+
"rubyforge.org",
|
|
101
|
+
"www.rubyforge.org",
|
|
102
|
+
"rubyonrails.org",
|
|
103
|
+
"www.rubyonrails.org",
|
|
104
|
+
"rvm.io",
|
|
105
|
+
"get.rvm.io",
|
|
106
|
+
// ── Rust package managers ───────────────────────────────────────────
|
|
107
|
+
"crates.io",
|
|
108
|
+
"www.crates.io",
|
|
109
|
+
"index.crates.io",
|
|
110
|
+
"static.crates.io",
|
|
111
|
+
"rustup.rs",
|
|
112
|
+
"static.rust-lang.org",
|
|
113
|
+
"www.rust-lang.org",
|
|
114
|
+
// ── Go package managers ─────────────────────────────────────────────
|
|
115
|
+
"proxy.golang.org",
|
|
116
|
+
"sum.golang.org",
|
|
117
|
+
"index.golang.org",
|
|
118
|
+
"golang.org",
|
|
119
|
+
"www.golang.org",
|
|
120
|
+
"goproxy.io",
|
|
121
|
+
"pkg.go.dev",
|
|
122
|
+
// ── JVM package managers ────────────────────────────────────────────
|
|
123
|
+
"maven.org",
|
|
124
|
+
"repo.maven.org",
|
|
125
|
+
"central.maven.org",
|
|
126
|
+
"repo1.maven.org",
|
|
127
|
+
"repo.maven.apache.org",
|
|
128
|
+
"jcenter.bintray.com",
|
|
129
|
+
"gradle.org",
|
|
130
|
+
"www.gradle.org",
|
|
131
|
+
"services.gradle.org",
|
|
132
|
+
"plugins.gradle.org",
|
|
133
|
+
"kotlinlang.org",
|
|
134
|
+
"www.kotlinlang.org",
|
|
135
|
+
"spring.io",
|
|
136
|
+
"repo.spring.io",
|
|
137
|
+
// ── Other package managers ──────────────────────────────────────────
|
|
138
|
+
// PHP Composer
|
|
139
|
+
"packagist.org",
|
|
140
|
+
"www.packagist.org",
|
|
141
|
+
"repo.packagist.org",
|
|
142
|
+
// .NET NuGet
|
|
143
|
+
"nuget.org",
|
|
144
|
+
"www.nuget.org",
|
|
145
|
+
"api.nuget.org",
|
|
146
|
+
// Dart/Flutter
|
|
147
|
+
"pub.dev",
|
|
148
|
+
"api.pub.dev",
|
|
149
|
+
// Elixir/Erlang
|
|
150
|
+
"hex.pm",
|
|
151
|
+
"www.hex.pm",
|
|
152
|
+
// Perl CPAN
|
|
153
|
+
"cpan.org",
|
|
154
|
+
"www.cpan.org",
|
|
155
|
+
"metacpan.org",
|
|
156
|
+
"www.metacpan.org",
|
|
157
|
+
"api.metacpan.org",
|
|
158
|
+
// iOS/macOS
|
|
159
|
+
"cocoapods.org",
|
|
160
|
+
"www.cocoapods.org",
|
|
161
|
+
"cdn.cocoapods.org",
|
|
162
|
+
// Haskell
|
|
163
|
+
"haskell.org",
|
|
164
|
+
"www.haskell.org",
|
|
165
|
+
"hackage.haskell.org",
|
|
166
|
+
// Swift
|
|
167
|
+
"swift.org",
|
|
168
|
+
"www.swift.org",
|
|
169
|
+
// ── Linux distributions ─────────────────────────────────────────────
|
|
170
|
+
"archive.ubuntu.com",
|
|
171
|
+
"security.ubuntu.com",
|
|
172
|
+
"ubuntu.com",
|
|
173
|
+
"www.ubuntu.com",
|
|
174
|
+
"*.ubuntu.com",
|
|
175
|
+
"ppa.launchpad.net",
|
|
176
|
+
"launchpad.net",
|
|
177
|
+
"www.launchpad.net",
|
|
178
|
+
"*.nixos.org",
|
|
179
|
+
// ── Development tools and platforms ─────────────────────────────────
|
|
180
|
+
// Kubernetes
|
|
181
|
+
"dl.k8s.io",
|
|
182
|
+
"pkgs.k8s.io",
|
|
183
|
+
"k8s.io",
|
|
184
|
+
"www.k8s.io",
|
|
185
|
+
// HashiCorp
|
|
186
|
+
"releases.hashicorp.com",
|
|
187
|
+
"apt.releases.hashicorp.com",
|
|
188
|
+
"rpm.releases.hashicorp.com",
|
|
189
|
+
"archive.releases.hashicorp.com",
|
|
190
|
+
"hashicorp.com",
|
|
191
|
+
"www.hashicorp.com",
|
|
192
|
+
// Anaconda/Conda
|
|
193
|
+
"repo.anaconda.com",
|
|
194
|
+
"conda.anaconda.org",
|
|
195
|
+
"anaconda.org",
|
|
196
|
+
"www.anaconda.com",
|
|
197
|
+
"anaconda.com",
|
|
198
|
+
"continuum.io",
|
|
199
|
+
// Apache
|
|
200
|
+
"apache.org",
|
|
201
|
+
"www.apache.org",
|
|
202
|
+
"archive.apache.org",
|
|
203
|
+
"downloads.apache.org",
|
|
204
|
+
// Eclipse
|
|
205
|
+
"eclipse.org",
|
|
206
|
+
"www.eclipse.org",
|
|
207
|
+
"download.eclipse.org",
|
|
208
|
+
// Node.js
|
|
209
|
+
"nodejs.org",
|
|
210
|
+
"www.nodejs.org",
|
|
211
|
+
// Other
|
|
212
|
+
"developer.apple.com",
|
|
213
|
+
"developer.android.com",
|
|
214
|
+
"pkg.stainless.com",
|
|
215
|
+
"binaries.prisma.sh",
|
|
216
|
+
// ── Cloud services and monitoring ───────────────────────────────────
|
|
217
|
+
"statsig.com",
|
|
218
|
+
"www.statsig.com",
|
|
219
|
+
"api.statsig.com",
|
|
220
|
+
"sentry.io",
|
|
221
|
+
"*.sentry.io",
|
|
222
|
+
"downloads.sentry-cdn.com",
|
|
223
|
+
"http-intake.logs.datadoghq.com",
|
|
224
|
+
"*.datadoghq.com",
|
|
225
|
+
"*.datadoghq.eu",
|
|
226
|
+
"api.honeycomb.io",
|
|
227
|
+
// ── Content delivery and mirrors ────────────────────────────────────
|
|
228
|
+
"sourceforge.net",
|
|
229
|
+
"*.sourceforge.net",
|
|
230
|
+
"packagecloud.io",
|
|
231
|
+
"*.packagecloud.io",
|
|
232
|
+
"fonts.googleapis.com",
|
|
233
|
+
"fonts.gstatic.com",
|
|
234
|
+
// ── Schema and configuration ────────────────────────────────────────
|
|
235
|
+
"json-schema.org",
|
|
236
|
+
"www.json-schema.org",
|
|
237
|
+
"json.schemastore.org",
|
|
238
|
+
"www.schemastore.org",
|
|
239
|
+
// ── Model Context Protocol ──────────────────────────────────────────
|
|
240
|
+
"*.modelcontextprotocol.io",
|
|
241
|
+
];
|
|
242
|
+
//# sourceMappingURL=trusted-domains.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trusted-domains.js","sourceRoot":"","sources":["../src/trusted-domains.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AACH,MAAM,CAAC,MAAM,eAAe,GA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BAAmB;IACnB,oBAAoB;IACpB,cAAc;IACd,kBAAkB;IAClB,cAAc;IACd,cAAc;IACd,SAAS;IACT,YAAY;IACZ,gBAAgB;IAChB,oBAAoB;IACpB,sBAAsB;IACtB,UAAU;IACV,aAAa;IACb,iBAAiB;IACjB,sBAAsB;IACtB,UAAU;IACV,YAAY;IACZ,gBAAgB;IAChB,QAAQ;IACR,qBAAqB;IACrB,uBAAuB;IACvB,mBAAmB;IACnB,oBAAoB;IAEpB,uEAAuE;IACvE,aAAa;IACb,iBAAiB;IACjB,iBAAiB;IACjB,WAAW;IACX,aAAa;IACb,0BAA0B;IAC1B,gCAAgC;IAChC,iBAAiB;IACjB,gBAAgB;IAChB,kBAAkB;IAElB,uEAAuE;IACvE,iBAAiB;IACjB,mBAAmB;IACnB,iBAAiB;IACjB,mBAAmB;IACnB,sBAAsB;IACtB,mBAAmB;IAEnB,uEAAuE;IACvE,iBAAiB;IACjB,qBAAqB;IACrB,sBAAsB;IACtB,qBAAqB;IAErB,uEAAuE;IACvE,2BAA2B;CAC3B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cyrus-core",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.45",
|
|
4
4
|
"description": "Core business logic for Cyrus",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
},
|
|
17
17
|
"devDependencies": {
|
|
18
18
|
"@types/node": "^20.0.0",
|
|
19
|
-
"fastify": "^5.8.
|
|
19
|
+
"fastify": "^5.8.5",
|
|
20
20
|
"tsx": "^4.20.6",
|
|
21
21
|
"typescript": "^5.3.3",
|
|
22
22
|
"vitest": "^3.1.4"
|
package/schemas/EdgeConfig.json
CHANGED
|
@@ -829,6 +829,92 @@
|
|
|
829
829
|
}
|
|
830
830
|
},
|
|
831
831
|
"additionalProperties": false
|
|
832
|
+
},
|
|
833
|
+
"sandbox": {
|
|
834
|
+
"type": "object",
|
|
835
|
+
"properties": {
|
|
836
|
+
"enabled": {
|
|
837
|
+
"type": "boolean"
|
|
838
|
+
},
|
|
839
|
+
"httpProxyPort": {
|
|
840
|
+
"default": 9080,
|
|
841
|
+
"type": "number"
|
|
842
|
+
},
|
|
843
|
+
"socksProxyPort": {
|
|
844
|
+
"default": 9081,
|
|
845
|
+
"type": "number"
|
|
846
|
+
},
|
|
847
|
+
"networkPolicy": {
|
|
848
|
+
"type": "object",
|
|
849
|
+
"properties": {
|
|
850
|
+
"preset": {
|
|
851
|
+
"type": "string",
|
|
852
|
+
"enum": ["trusted"]
|
|
853
|
+
},
|
|
854
|
+
"allow": {
|
|
855
|
+
"type": "object",
|
|
856
|
+
"propertyNames": {
|
|
857
|
+
"type": "string"
|
|
858
|
+
},
|
|
859
|
+
"additionalProperties": {
|
|
860
|
+
"type": "array",
|
|
861
|
+
"items": {
|
|
862
|
+
"type": "object",
|
|
863
|
+
"properties": {
|
|
864
|
+
"transform": {
|
|
865
|
+
"type": "array",
|
|
866
|
+
"items": {
|
|
867
|
+
"type": "object",
|
|
868
|
+
"properties": {
|
|
869
|
+
"headers": {
|
|
870
|
+
"type": "object",
|
|
871
|
+
"propertyNames": {
|
|
872
|
+
"type": "string"
|
|
873
|
+
},
|
|
874
|
+
"additionalProperties": {
|
|
875
|
+
"type": "string"
|
|
876
|
+
}
|
|
877
|
+
}
|
|
878
|
+
},
|
|
879
|
+
"required": ["headers"],
|
|
880
|
+
"additionalProperties": false
|
|
881
|
+
}
|
|
882
|
+
}
|
|
883
|
+
},
|
|
884
|
+
"additionalProperties": false
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
},
|
|
888
|
+
"subnets": {
|
|
889
|
+
"type": "object",
|
|
890
|
+
"properties": {
|
|
891
|
+
"allow": {
|
|
892
|
+
"type": "array",
|
|
893
|
+
"items": {
|
|
894
|
+
"type": "string"
|
|
895
|
+
}
|
|
896
|
+
},
|
|
897
|
+
"deny": {
|
|
898
|
+
"type": "array",
|
|
899
|
+
"items": {
|
|
900
|
+
"type": "string"
|
|
901
|
+
}
|
|
902
|
+
}
|
|
903
|
+
},
|
|
904
|
+
"additionalProperties": false
|
|
905
|
+
}
|
|
906
|
+
},
|
|
907
|
+
"additionalProperties": false
|
|
908
|
+
},
|
|
909
|
+
"systemWideCert": {
|
|
910
|
+
"type": "boolean"
|
|
911
|
+
},
|
|
912
|
+
"logRequests": {
|
|
913
|
+
"type": "boolean"
|
|
914
|
+
}
|
|
915
|
+
},
|
|
916
|
+
"required": ["httpProxyPort", "socksProxyPort"],
|
|
917
|
+
"additionalProperties": false
|
|
832
918
|
}
|
|
833
919
|
},
|
|
834
920
|
"required": ["repositories"],
|
|
@@ -823,6 +823,92 @@
|
|
|
823
823
|
}
|
|
824
824
|
},
|
|
825
825
|
"additionalProperties": false
|
|
826
|
+
},
|
|
827
|
+
"sandbox": {
|
|
828
|
+
"type": "object",
|
|
829
|
+
"properties": {
|
|
830
|
+
"enabled": {
|
|
831
|
+
"type": "boolean"
|
|
832
|
+
},
|
|
833
|
+
"httpProxyPort": {
|
|
834
|
+
"default": 9080,
|
|
835
|
+
"type": "number"
|
|
836
|
+
},
|
|
837
|
+
"socksProxyPort": {
|
|
838
|
+
"default": 9081,
|
|
839
|
+
"type": "number"
|
|
840
|
+
},
|
|
841
|
+
"networkPolicy": {
|
|
842
|
+
"type": "object",
|
|
843
|
+
"properties": {
|
|
844
|
+
"preset": {
|
|
845
|
+
"type": "string",
|
|
846
|
+
"enum": ["trusted"]
|
|
847
|
+
},
|
|
848
|
+
"allow": {
|
|
849
|
+
"type": "object",
|
|
850
|
+
"propertyNames": {
|
|
851
|
+
"type": "string"
|
|
852
|
+
},
|
|
853
|
+
"additionalProperties": {
|
|
854
|
+
"type": "array",
|
|
855
|
+
"items": {
|
|
856
|
+
"type": "object",
|
|
857
|
+
"properties": {
|
|
858
|
+
"transform": {
|
|
859
|
+
"type": "array",
|
|
860
|
+
"items": {
|
|
861
|
+
"type": "object",
|
|
862
|
+
"properties": {
|
|
863
|
+
"headers": {
|
|
864
|
+
"type": "object",
|
|
865
|
+
"propertyNames": {
|
|
866
|
+
"type": "string"
|
|
867
|
+
},
|
|
868
|
+
"additionalProperties": {
|
|
869
|
+
"type": "string"
|
|
870
|
+
}
|
|
871
|
+
}
|
|
872
|
+
},
|
|
873
|
+
"required": ["headers"],
|
|
874
|
+
"additionalProperties": false
|
|
875
|
+
}
|
|
876
|
+
}
|
|
877
|
+
},
|
|
878
|
+
"additionalProperties": false
|
|
879
|
+
}
|
|
880
|
+
}
|
|
881
|
+
},
|
|
882
|
+
"subnets": {
|
|
883
|
+
"type": "object",
|
|
884
|
+
"properties": {
|
|
885
|
+
"allow": {
|
|
886
|
+
"type": "array",
|
|
887
|
+
"items": {
|
|
888
|
+
"type": "string"
|
|
889
|
+
}
|
|
890
|
+
},
|
|
891
|
+
"deny": {
|
|
892
|
+
"type": "array",
|
|
893
|
+
"items": {
|
|
894
|
+
"type": "string"
|
|
895
|
+
}
|
|
896
|
+
}
|
|
897
|
+
},
|
|
898
|
+
"additionalProperties": false
|
|
899
|
+
}
|
|
900
|
+
},
|
|
901
|
+
"additionalProperties": false
|
|
902
|
+
},
|
|
903
|
+
"systemWideCert": {
|
|
904
|
+
"type": "boolean"
|
|
905
|
+
},
|
|
906
|
+
"logRequests": {
|
|
907
|
+
"type": "boolean"
|
|
908
|
+
}
|
|
909
|
+
},
|
|
910
|
+
"required": ["httpProxyPort", "socksProxyPort"],
|
|
911
|
+
"additionalProperties": false
|
|
826
912
|
}
|
|
827
913
|
},
|
|
828
914
|
"required": ["repositories"],
|