@forge/csp 5.9.0-next.2 → 6.0.0-experimental-9423de1
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/CHANGELOG.md +22 -0
- package/out/csp/csp-injection-service.d.ts +9 -9
- package/out/csp/csp-injection-service.d.ts.map +1 -1
- package/out/csp/csp-processing-service.d.ts +1 -1
- package/out/csp/csp-processing-service.d.ts.map +1 -1
- package/out/types.d.ts +4 -6
- package/out/types.d.ts.map +1 -1
- package/out/types.js +1 -1
- package/package.json +10 -5
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,27 @@
|
|
|
1
1
|
# @forge/csp
|
|
2
2
|
|
|
3
|
+
## 6.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- 78fcb7f: Adds support for TypeScript 5
|
|
8
|
+
|
|
9
|
+
### Minor Changes
|
|
10
|
+
|
|
11
|
+
- 297d598: Added FOS CDN Urls to getAtlassianImageHost for IC
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- 661b109: Trigger re-publish of @forge/csp to include getFOSCDNUrls in getAtlassianImageHost
|
|
16
|
+
- 55c1371: bump cheerio to ^1.2.0 to pull in a patched undici (>=7.19.0, resolving to a fixed release) and remediate CVE-2026-1525
|
|
17
|
+
NodeJS requirement bumped from 20.0.0 to >=20.18.1
|
|
18
|
+
|
|
19
|
+
## 6.0.0-next.3
|
|
20
|
+
|
|
21
|
+
### Major Changes
|
|
22
|
+
|
|
23
|
+
- 78fcb7f: Adds support for TypeScript 5
|
|
24
|
+
|
|
3
25
|
## 5.9.0-next.2
|
|
4
26
|
|
|
5
27
|
### Patch Changes
|
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
import type { LambdaEnvironment } from '@forge/cli-shared';
|
|
2
2
|
import { CSPDetails } from '../types';
|
|
3
|
-
|
|
3
|
+
type StandardIcOptions = {
|
|
4
4
|
icLabel: string;
|
|
5
5
|
serviceName: string;
|
|
6
6
|
};
|
|
7
|
-
|
|
7
|
+
type GetICDomainIcOptions = {
|
|
8
8
|
serviceName?: string;
|
|
9
9
|
getICDomain: () => string;
|
|
10
10
|
};
|
|
11
|
-
|
|
11
|
+
type IcOptions = StandardIcOptions | GetICDomainIcOptions;
|
|
12
12
|
export declare const getAtlassianImageHost: (microsEnv: LambdaEnvironment, icOptions?: IcOptions) => string[];
|
|
13
13
|
export declare const EXTERNAL_ALLOW_LISTED_IMAGES_HOSTS: string[];
|
|
14
14
|
export declare class CSPInjectionService {
|
|
@@ -21,12 +21,12 @@ export declare class CSPInjectionService {
|
|
|
21
21
|
getInjectableCSP: ({ existingCSPDetails, microsEnv, tunnelCSPReporterUri, hostname, isFedRAMP, icOptions, macroParentHost, connectMacroParentDomain }: {
|
|
22
22
|
existingCSPDetails: CSPDetails;
|
|
23
23
|
microsEnv: LambdaEnvironment;
|
|
24
|
-
tunnelCSPReporterUri?: string
|
|
25
|
-
hostname?: string
|
|
26
|
-
isFedRAMP?: boolean
|
|
27
|
-
icOptions?: IcOptions
|
|
28
|
-
macroParentHost?: string
|
|
29
|
-
connectMacroParentDomain?: string
|
|
24
|
+
tunnelCSPReporterUri?: string;
|
|
25
|
+
hostname?: string;
|
|
26
|
+
isFedRAMP?: boolean;
|
|
27
|
+
icOptions?: IcOptions;
|
|
28
|
+
macroParentHost?: string;
|
|
29
|
+
connectMacroParentDomain?: string;
|
|
30
30
|
}) => string[];
|
|
31
31
|
}
|
|
32
32
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csp-injection-service.d.ts","sourceRoot":"","sources":["../../src/csp/csp-injection-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAmB,MAAM,UAAU,CAAC;AAEvD,
|
|
1
|
+
{"version":3,"file":"csp-injection-service.d.ts","sourceRoot":"","sources":["../../src/csp/csp-injection-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,mBAAmB,CAAC;AAE3D,OAAO,EAAE,UAAU,EAAmB,MAAM,UAAU,CAAC;AAEvD,KAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAIF,KAAK,oBAAoB,GAAG;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,MAAM,CAAC;CAC3B,CAAC;AAEF,KAAK,SAAS,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AA+K1D,eAAO,MAAM,qBAAqB,GAAI,WAAW,iBAAiB,EAAE,YAAY,SAAS,KAAG,MAAM,EAYjG,CAAC;AAMF,eAAO,MAAM,kCAAkC,UAAiE,CAAC;AAEjH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,aAAa;IAmCrB,OAAO,CAAC,iBAAiB;IAuElB,gBAAgB,GAAI,oIASxB;QACD,kBAAkB,EAAE,UAAU,CAAC;QAC/B,SAAS,EAAE,iBAAiB,CAAC;QAC7B,oBAAoB,CAAC,EAAE,MAAM,CAAC;QAC9B,QAAQ,CAAC,EAAE,MAAM,CAAC;QAClB,SAAS,CAAC,EAAE,OAAO,CAAC;QACpB,SAAS,CAAC,EAAE,SAAS,CAAC;QACtB,eAAe,CAAC,EAAE,MAAM,CAAC;QACzB,wBAAwB,CAAC,EAAE,MAAM,CAAC;KACnC,KAAG,MAAM,EAAE,CA+FV;CACH"}
|
|
@@ -2,7 +2,7 @@ import type { Logger } from '@forge/cli-shared';
|
|
|
2
2
|
import type { Permissions } from '@forge/manifest';
|
|
3
3
|
import type { CheerioAPI, CheerioOptions } from 'cheerio/slim';
|
|
4
4
|
import { ContentPermissions, CSPDetails, DocumentBody } from '../types';
|
|
5
|
-
|
|
5
|
+
type CheerioLoader = (document: DocumentBody, options?: CheerioOptions) => CheerioAPI;
|
|
6
6
|
export declare class InvalidConnectSrc extends Error {
|
|
7
7
|
constructor();
|
|
8
8
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"csp-processing-service.d.ts","sourceRoot":"","sources":["../../src/csp/csp-processing-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAS,MAAM,iBAAiB,CAAC;
|
|
1
|
+
{"version":3,"file":"csp-processing-service.d.ts","sourceRoot":"","sources":["../../src/csp/csp-processing-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,EAAE,WAAW,EAAS,MAAM,iBAAiB,CAAC;AAE1D,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AAI/D,OAAO,EAAE,kBAAkB,EAAE,UAAU,EAAE,YAAY,EAAuB,MAAM,UAAU,CAAC;AAE7F,KAAK,aAAa,GAAG,CAAC,QAAQ,EAAE,YAAY,EAAE,OAAO,CAAC,EAAE,cAAc,KAAK,UAAU,CAAC;AAEtF,qBAAa,iBAAkB,SAAQ,KAAK;;CAI3C;AAMD,qBAAa,oBAAoB;IAc7B,OAAO,CAAC,QAAQ,CAAC,MAAM;IACvB,OAAO,CAAC,QAAQ,CAAC,aAAa;IAbhC,OAAO,CAAC,mBAAmB,CAAuB;IAElD,OAAO,CAAC,2BAA2B,CAAqD;IACxF,OAAO,CAAC,6BAA6B,CAAa;IAClD,OAAO,CAAC,oBAAoB,CAAgF;IAE5G,OAAO,CAAC,qBAAqB,CAI3B;gBAEiB,MAAM,EAAE,IAAI,CAAC,MAAM,EAAE,MAAM,CAAC,EAC5B,aAAa,EAAE,aAAa;IAGxC,aAAa,CAAC,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,WAAW,GAAG,UAAU;IAoBvE,wBAAwB,CAAC,kBAAkB,EAAE,kBAAkB,GAAG,MAAM,EAAE;IASjF,OAAO,CAAC,sBAAsB;IAW9B,OAAO,CAAC,mBAAmB;IAI3B,OAAO,CAAC,2BAA2B;IAgBnC,OAAO,CAAC,WAAW;IASnB,OAAO,CAAC,YAAY;IAQpB,OAAO,CAAC,mBAAmB;IAoB3B,OAAO,CAAC,qBAAqB;IAS7B,OAAO,CAAC,UAAU;IAIlB,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,oBAAoB;IAM5B,OAAO,CAAC,mBAAmB;IAW3B,OAAO,CAAC,SAAS;IAIjB,OAAO,CAAC,WAAW;IAKnB,OAAO,CAAC,oBAAoB;CAa7B"}
|
package/out/types.d.ts
CHANGED
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
/// <reference types="node" />
|
|
3
1
|
import type { Permissions } from '@forge/manifest';
|
|
4
|
-
export
|
|
5
|
-
export
|
|
6
|
-
export
|
|
2
|
+
export type DocumentBody = string | Buffer;
|
|
3
|
+
export type ContentPermissions = NonNullable<Permissions['content']>;
|
|
4
|
+
export type ExternalPermissions = NonNullable<Permissions['external']>;
|
|
7
5
|
export declare enum ExternalCspType {
|
|
8
6
|
IMG_SRC = "img-src",
|
|
9
7
|
MEDIA_SRC = "media-src",
|
|
@@ -13,5 +11,5 @@ export declare enum ExternalCspType {
|
|
|
13
11
|
FONT_SRC = "font-src",
|
|
14
12
|
FRAME_SRC = "frame-src"
|
|
15
13
|
}
|
|
16
|
-
export
|
|
14
|
+
export type CSPDetails = Record<ExternalCspType, string[]>;
|
|
17
15
|
//# sourceMappingURL=types.d.ts.map
|
package/out/types.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAEnD,MAAM,MAAM,YAAY,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3C,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,WAAW,CAAC,SAAS,CAAC,CAAC,CAAC;AACrE,MAAM,MAAM,mBAAmB,GAAG,WAAW,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC,CAAC;AACvE,oBAAY,eAAe;IACzB,OAAO,YAAY;IACnB,SAAS,cAAc;IACvB,UAAU,eAAe;IACzB,SAAS,cAAc;IACvB,WAAW,gBAAgB;IAC3B,QAAQ,aAAa;IACrB,SAAS,cAAc;CACxB;AACD,MAAM,MAAM,UAAU,GAAG,MAAM,CAAC,eAAe,EAAE,MAAM,EAAE,CAAC,CAAC"}
|
package/out/types.js
CHANGED
|
@@ -10,4 +10,4 @@ var ExternalCspType;
|
|
|
10
10
|
ExternalCspType["CONNECT_SRC"] = "connect-src";
|
|
11
11
|
ExternalCspType["FONT_SRC"] = "font-src";
|
|
12
12
|
ExternalCspType["FRAME_SRC"] = "frame-src";
|
|
13
|
-
})(ExternalCspType
|
|
13
|
+
})(ExternalCspType || (exports.ExternalCspType = ExternalCspType = {}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/csp",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0-experimental-9423de1",
|
|
4
4
|
"description": "Contains the CSP configuration for Custom UI resources in Forge",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"author": "Atlassian",
|
|
@@ -11,21 +11,26 @@
|
|
|
11
11
|
"clean": "rm -rf ./out && rm -f tsconfig.tsbuildinfo"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@forge/cli-shared": "
|
|
15
|
-
"@forge/manifest": "
|
|
14
|
+
"@forge/cli-shared": "9.0.1-next.2-experimental-9423de1",
|
|
15
|
+
"@forge/manifest": "13.1.0-next.2-experimental-9423de1",
|
|
16
16
|
"@types/jest": "^29.5.14",
|
|
17
17
|
"@types/node": "20.19.1",
|
|
18
|
-
"cheerio": "^1.2.0"
|
|
18
|
+
"cheerio": "^1.2.0",
|
|
19
|
+
"typescript": "5.9.2"
|
|
19
20
|
},
|
|
20
21
|
"dependencies": {
|
|
21
22
|
"content-security-policy-parser": "^0.6.0"
|
|
22
23
|
},
|
|
23
24
|
"peerDependencies": {
|
|
24
|
-
"cheerio": "^1.2.0"
|
|
25
|
+
"cheerio": "^1.2.0",
|
|
26
|
+
"typescript": ">=5.0.0"
|
|
25
27
|
},
|
|
26
28
|
"peerDependenciesMeta": {
|
|
27
29
|
"cheerio": {
|
|
28
30
|
"optional": true
|
|
31
|
+
},
|
|
32
|
+
"typescript": {
|
|
33
|
+
"optional": true
|
|
29
34
|
}
|
|
30
35
|
},
|
|
31
36
|
"publishConfig": {
|