eddev 2.0.0-beta.143 → 2.0.0-beta.145
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/app/server/utils/content-security.d.ts.map +1 -1
- package/dist/app/server/utils/content-security.js +6 -0
- package/dist/node/cli/version.d.ts +1 -1
- package/dist/node/cli/version.js +1 -1
- package/dist/node/project/config.d.ts +7 -0
- package/dist/node/project/config.d.ts.map +1 -1
- package/dist/node/project/config.js +4 -0
- package/package.json +1 -1
- package/dist/app/server/define-server-config.d.ts +0 -1
- package/dist/app/server/define-server-config.d.ts.map +0 -1
- package/dist/app/server/define-server-config.js +0 -1
- package/dist/app/server/server-config.d.ts +0 -1
- package/dist/app/server/server-config.d.ts.map +0 -1
- package/dist/app/server/server-config.js +0 -1
- package/dist/app/server/utils/content-security-policy.d.ts +0 -17
- package/dist/app/server/utils/content-security-policy.d.ts.map +0 -1
- package/dist/app/server/utils/content-security-policy.js +0 -41
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"content-security.d.ts","sourceRoot":"","sources":["../../../../src/app/server/utils/content-security.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,8BAA8B,CAAA;AAC5D,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAG7D,QAAA,MAAM,QAAQ,kXAyBJ,CAAA;AAEV,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9C,MAAM,MAAM,SAAS,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;AAEnD,MAAM,MAAM,mCAAmC,GAAG;IAChD,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,YAAY,EAAE,CAAA;CACrB,CAAA;AAED,qBAAa,mBAAmB;IAC9B,SAAS,CAAC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AAW,CAAC,IAAI,EAAE,YAAY,EAAE;IAkBhC,UAAU,IAAI,OAAO;IAWrB,iBAAiB,IAAI,MAAM,GAAG,SAAS;CAgBxC"}
|
|
@@ -53,6 +53,12 @@ export class SecureHeaderBuilder {
|
|
|
53
53
|
if (this.useNonce) {
|
|
54
54
|
defaults.push(`'nonce-${this.nonce}'`);
|
|
55
55
|
}
|
|
56
|
+
if (config.serverless.csp.values) {
|
|
57
|
+
const value = config.serverless.csp.values[key];
|
|
58
|
+
if (value) {
|
|
59
|
+
defaults.push(...value);
|
|
60
|
+
}
|
|
61
|
+
}
|
|
56
62
|
}
|
|
57
63
|
this.csp[key] = new Set(defaults);
|
|
58
64
|
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const VERSION = "2.0.0-beta.
|
|
1
|
+
export declare const VERSION = "2.0.0-beta.144";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/node/cli/version.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const VERSION = "2.0.0-beta.
|
|
1
|
+
export const VERSION = "2.0.0-beta.144";
|
|
@@ -50,13 +50,16 @@ export declare const EDConfigSchema: z.ZodObject<{
|
|
|
50
50
|
autoDetect: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
51
51
|
nonce: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>;
|
|
52
52
|
commonOrigins: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
53
|
+
values: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodArray<z.ZodString, "many">>>;
|
|
53
54
|
}, "strip", z.ZodTypeAny, {
|
|
54
55
|
enabled: boolean;
|
|
55
56
|
autoDetect: boolean;
|
|
56
57
|
nonce: boolean;
|
|
58
|
+
values?: Record<string, string[]> | undefined;
|
|
57
59
|
commonOrigins?: string[] | undefined;
|
|
58
60
|
}, {
|
|
59
61
|
enabled: boolean;
|
|
62
|
+
values?: Record<string, string[]> | undefined;
|
|
60
63
|
autoDetect?: boolean | undefined;
|
|
61
64
|
nonce?: boolean | undefined;
|
|
62
65
|
commonOrigins?: string[] | undefined;
|
|
@@ -75,6 +78,7 @@ export declare const EDConfigSchema: z.ZodObject<{
|
|
|
75
78
|
enabled: boolean;
|
|
76
79
|
autoDetect: boolean;
|
|
77
80
|
nonce: boolean;
|
|
81
|
+
values?: Record<string, string[]> | undefined;
|
|
78
82
|
commonOrigins?: string[] | undefined;
|
|
79
83
|
};
|
|
80
84
|
cors?: {
|
|
@@ -95,6 +99,7 @@ export declare const EDConfigSchema: z.ZodObject<{
|
|
|
95
99
|
} | undefined;
|
|
96
100
|
csp?: {
|
|
97
101
|
enabled: boolean;
|
|
102
|
+
values?: Record<string, string[]> | undefined;
|
|
98
103
|
autoDetect?: boolean | undefined;
|
|
99
104
|
nonce?: boolean | undefined;
|
|
100
105
|
commonOrigins?: string[] | undefined;
|
|
@@ -173,6 +178,7 @@ export declare const EDConfigSchema: z.ZodObject<{
|
|
|
173
178
|
enabled: boolean;
|
|
174
179
|
autoDetect: boolean;
|
|
175
180
|
nonce: boolean;
|
|
181
|
+
values?: Record<string, string[]> | undefined;
|
|
176
182
|
commonOrigins?: string[] | undefined;
|
|
177
183
|
};
|
|
178
184
|
cors?: {
|
|
@@ -219,6 +225,7 @@ export declare const EDConfigSchema: z.ZodObject<{
|
|
|
219
225
|
} | undefined;
|
|
220
226
|
csp?: {
|
|
221
227
|
enabled: boolean;
|
|
228
|
+
values?: Record<string, string[]> | undefined;
|
|
222
229
|
autoDetect?: boolean | undefined;
|
|
223
230
|
nonce?: boolean | undefined;
|
|
224
231
|
commonOrigins?: string[] | undefined;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/node/project/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,OAAO,EAAE,OAAO,EAAyB,MAAM,cAAc,CAAA;AAE7D,eAAO,MAAM,cAAc
|
|
1
|
+
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/node/project/config.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAKvB,OAAO,EAAE,OAAO,EAAyB,MAAM,cAAc,CAAA;AAE7D,eAAO,MAAM,cAAc;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAiJzB,CAAA;AAEF,MAAM,MAAM,QAAQ,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,cAAc,CAAC,CAAA;AAErD,qBAAa,YAAY;IAGI,OAAO,EAAE,OAAO;IAF3C,MAAM,CAAC,EAAE,QAAQ,CAAA;IAEjB,OAAO;WAEM,MAAM,CAAC,OAAO,EAAE,OAAO;IAM9B,IAAI;YAQI,kBAAkB;YAYlB,UAAU;IAiCxB,OAAO,CAAC,WAAW;IAOnB,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,OAAO;CAUzD"}
|
|
@@ -84,6 +84,10 @@ export const EDConfigSchema = z.object({
|
|
|
84
84
|
.array()
|
|
85
85
|
.describe("A list of common origins, to be shared amoungst all directives. Items should be things like 'hubspot.com' or '*.hubspot.com'")
|
|
86
86
|
.optional(),
|
|
87
|
+
values: z
|
|
88
|
+
.record(z.string().array())
|
|
89
|
+
.optional()
|
|
90
|
+
.describe("A map of CSP directives to their values. Keys should be camelCase."),
|
|
87
91
|
})
|
|
88
92
|
.default({ enabled: true })
|
|
89
93
|
.describe("Content Security Policy settings"),
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=define-server-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"define-server-config.d.ts","sourceRoot":"","sources":["../../../src/app/server/define-server-config.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
//# sourceMappingURL=server-config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"server-config.d.ts","sourceRoot":"","sources":["../../../src/app/server/server-config.ts"],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { RouteMetaTag, TrackerTags } from "../../lib/routing";
|
|
2
|
-
declare const CSP_KEYS: string[];
|
|
3
|
-
export type CSPKey = (typeof CSP_KEYS)[number];
|
|
4
|
-
export type CSPHeaderBuilderParams = Record<CSPKey, Set<string>>;
|
|
5
|
-
export type ContentSecurityPolicyRequestContext = {
|
|
6
|
-
url: string;
|
|
7
|
-
type: "page";
|
|
8
|
-
tags: RouteMetaTag[];
|
|
9
|
-
};
|
|
10
|
-
export declare class SecureHeaderBuilder {
|
|
11
|
-
protected values: CSPHeaderBuilderParams;
|
|
12
|
-
addNonce(): void;
|
|
13
|
-
addTrackingTags(tags: TrackerTags): void;
|
|
14
|
-
addMetaTags(tags: RouteMetaTag[]): void;
|
|
15
|
-
}
|
|
16
|
-
export {};
|
|
17
|
-
//# sourceMappingURL=content-security-policy.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"content-security-policy.d.ts","sourceRoot":"","sources":["../../../../src/app/server/utils/content-security-policy.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAA;AAE7D,QAAA,MAAM,QAAQ,UAyBb,CAAA;AAED,MAAM,MAAM,MAAM,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,CAAC,CAAA;AAE9C,MAAM,MAAM,sBAAsB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,MAAM,CAAC,CAAC,CAAA;AAEhE,MAAM,MAAM,mCAAmC,GAAG;IAChD,GAAG,EAAE,MAAM,CAAA;IACX,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,YAAY,EAAE,CAAA;CACrB,CAAA;AAED,qBAAa,mBAAmB;IAC9B,SAAS,CAAC,MAAM,EAAE,sBAAsB,CAAK;IAE7C,QAAQ;IAER,eAAe,CAAC,IAAI,EAAE,WAAW;IAEjC,WAAW,CAAC,IAAI,EAAE,YAAY,EAAE;CACjC"}
|
|
@@ -1,41 +0,0 @@
|
|
|
1
|
-
const CSP_KEYS = [
|
|
2
|
-
"childSrc",
|
|
3
|
-
"connectSrc",
|
|
4
|
-
"defaultSrc",
|
|
5
|
-
"fencedFrameSrc",
|
|
6
|
-
"fontSrc",
|
|
7
|
-
"frameSrc",
|
|
8
|
-
"imgSrc",
|
|
9
|
-
"manifestSrc",
|
|
10
|
-
"mediaSrc",
|
|
11
|
-
"objectSrc",
|
|
12
|
-
"scriptSrc",
|
|
13
|
-
"scriptSrcElem",
|
|
14
|
-
"scriptSrcAttr",
|
|
15
|
-
"styleSrc",
|
|
16
|
-
"styleSrcElem",
|
|
17
|
-
"styleSrcAttr",
|
|
18
|
-
"workerSrc",
|
|
19
|
-
"baseUri",
|
|
20
|
-
"formAction",
|
|
21
|
-
"frameAncestors",
|
|
22
|
-
"reportTo",
|
|
23
|
-
"requireTrustedTypesFor",
|
|
24
|
-
"trustedTypes",
|
|
25
|
-
"upgradeInsecureRequests",
|
|
26
|
-
];
|
|
27
|
-
export class SecureHeaderBuilder {
|
|
28
|
-
values = {};
|
|
29
|
-
addNonce() { }
|
|
30
|
-
addTrackingTags(tags) { }
|
|
31
|
-
addMetaTags(tags) { }
|
|
32
|
-
}
|
|
33
|
-
// default-src 'self' vercel.com *.vercel.com *.vercel.sh vercel.live *.stripe.com twitter.com *.twitter.com *.github.com *.codesandbox.io https://risk.clearbit.com wss://*.vercel.com localhost:* chrome-extension://*
|
|
34
|
-
// script-src 'self' 'unsafe-eval' 'unsafe-inline' www.google.com www.google-analytics.com www.googleadservices.com www.gstatic.com *.youtube.com *.youtube-nocookie.com *.ytimg.com *.twimg.com cdn.ampproject.org www.googletagmanager.com *.googleapis.com *.heapanalytics.com heapanalytics.com *.fides-cdn.ethyca.com *.ethyca.com cdn.ethyca.com cdn.vercel-insights.com va.vercel-scripts.com vercel.com *.vercel.com *.vercel.sh vercel.live *.stripe.com twitter.com *.twitter.com *.github.com *.codesandbox.io https://risk.clearbit.com wss://*.vercel.com localhost:* chrome-extension://*
|
|
35
|
-
// child-src *.youtube.com *.youtube-nocookie.com *.stripe.com www.google.com td.doubleclick.net github.com calendly.com *.vusercontent.net vercel.com *.vercel.com *.vercel.sh vercel.live *.stripe.com twitter.com *.twitter.com *.github.com *.codesandbox.io https://risk.clearbit.com wss://*.vercel.com localhost:* chrome-extension://*
|
|
36
|
-
// style-src 'self' 'unsafe-inline' *.googleapis.com heapanalytics.com vercel.com *.vercel.com *.vercel.sh vercel.live *.stripe.com twitter.com *.twitter.com *.github.com *.codesandbox.io https://risk.clearbit.com wss://*.vercel.com localhost:* chrome-extension://*
|
|
37
|
-
// img-src * blob: data:
|
|
38
|
-
// media-src 'self' videos.ctfassets.net user-images.githubusercontent.com replicate.delivery blob: data: vercel.com *.vercel.com *.vercel.sh vercel.live *.stripe.com twitter.com *.twitter.com *.github.com *.codesandbox.io https://risk.clearbit.com wss://*.vercel.com localhost:* chrome-extension://*
|
|
39
|
-
// connect-src wss://ws-us3.pusher.com data: *
|
|
40
|
-
// font-src 'self' *.vercel.com *.gstatic.com vercel.live
|
|
41
|
-
// worker-src 'self' *.vercel.com blob:
|