@forge/csp 6.4.1-next.0 → 6.4.1-next.2
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
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @forge/csp
|
|
2
2
|
|
|
3
|
+
## 6.4.1-next.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 49bab87: Add the macro parent host to `frame-ancestors` in the injected CSP for FedRAMP staging and production
|
|
8
|
+
|
|
9
|
+
## 6.4.1-next.1
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 1991376: Include data URLs in font-src. Include Hello Jira domain in frame ancestors if Hello Confluence domain is already included
|
|
14
|
+
|
|
3
15
|
## 6.4.1-next.0
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
|
@@ -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,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;
|
|
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+O1D,eAAO,MAAM,qBAAqB,GAAI,WAAW,iBAAiB,EAAE,YAAY,SAAS,KAAG,MAAM,EAcjG,CAAC;AAMF,eAAO,MAAM,kCAAkC,UAAiE,CAAC;AAEjH,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,eAAe;IAQvB,OAAO,CAAC,iBAAiB;IAYzB,OAAO,CAAC,iBAAiB;IASzB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,aAAa;IAoCrB,OAAO,CAAC,iBAAiB;IA6FlB,gBAAgB,GAAI,2JAUxB;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;QAClC,qBAAqB,CAAC,EAAE,MAAM,CAAC;KAChC,KAAG,MAAM,EAAE,CAuGV;CACH"}
|
|
@@ -137,6 +137,7 @@ const FOS_CDN_STANDARD_HOST = {
|
|
|
137
137
|
const GCP_FORGE_CDN_HOST = {
|
|
138
138
|
'stg-gcentral': 'https://forge.cdn.stg.atlassian-dev.net'
|
|
139
139
|
};
|
|
140
|
+
const getMacroParentHost = (macroParentHost, env, perimeter = 'commercial') => `${macroParentHost}.cdn.${env}.${perimeter === 'fedramp' ? 'atlassian-dev-us-gov-mod.net' : 'atlassian-dev.net'}`;
|
|
140
141
|
const FOS_CDN_IC_HOST = makeICHosts((env, icOptions) => `https://object-store.${getICDomain(env, icOptions)}`);
|
|
141
142
|
const FOS_CDN_PATH = '/os/ecosystem/installation/';
|
|
142
143
|
const getFOSCDNHost = (microsEnv, icOptions) => {
|
|
@@ -202,6 +203,7 @@ class CSPInjectionService {
|
|
|
202
203
|
.join(' ');
|
|
203
204
|
const fontSrc = [
|
|
204
205
|
"'self'",
|
|
206
|
+
'data:',
|
|
205
207
|
...getFOSHostDownload(microsEnv, icOptions),
|
|
206
208
|
...fosCDNUrls,
|
|
207
209
|
...this.getExistingCSPDetails(types_1.ExternalCspType.FONT_SRC, existingCSPDetails)
|
|
@@ -336,14 +338,20 @@ class CSPInjectionService {
|
|
|
336
338
|
'*.stg.atlassian.com'
|
|
337
339
|
];
|
|
338
340
|
if (macroParentHost && !localhostWithPortRegex.test(macroParentHost)) {
|
|
339
|
-
frameAncestors.push(
|
|
341
|
+
frameAncestors.push(getMacroParentHost(macroParentHost, 'stg'));
|
|
340
342
|
}
|
|
341
343
|
break;
|
|
342
344
|
case 'fedramp-stg':
|
|
343
345
|
frameAncestors = ['*.atlassian-stg-fedm.net'];
|
|
346
|
+
if (macroParentHost) {
|
|
347
|
+
frameAncestors.push(getMacroParentHost(macroParentHost, 'stg', 'fedramp'));
|
|
348
|
+
}
|
|
344
349
|
break;
|
|
345
350
|
case 'fedramp-prod':
|
|
346
351
|
frameAncestors = ['*.atlassian-us-gov-mod.net'];
|
|
352
|
+
if (macroParentHost) {
|
|
353
|
+
frameAncestors.push(getMacroParentHost(macroParentHost, 'prod', 'fedramp'));
|
|
354
|
+
}
|
|
347
355
|
break;
|
|
348
356
|
case 'ic-stg':
|
|
349
357
|
case 'ic-prod':
|
|
@@ -367,7 +375,7 @@ class CSPInjectionService {
|
|
|
367
375
|
frameAncestors.push(`http://${macroParentHost}`);
|
|
368
376
|
}
|
|
369
377
|
else {
|
|
370
|
-
frameAncestors.push(
|
|
378
|
+
frameAncestors.push(getMacroParentHost(macroParentHost, 'prod'));
|
|
371
379
|
}
|
|
372
380
|
}
|
|
373
381
|
break;
|
|
@@ -380,6 +388,9 @@ class CSPInjectionService {
|
|
|
380
388
|
}
|
|
381
389
|
if (hostname) {
|
|
382
390
|
frameAncestors.push(hostname);
|
|
391
|
+
if (hostname === 'hello.atlassian.net') {
|
|
392
|
+
frameAncestors.push('hello.jira.atlassian.cloud');
|
|
393
|
+
}
|
|
383
394
|
}
|
|
384
395
|
return frameAncestors;
|
|
385
396
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@forge/csp",
|
|
3
|
-
"version": "6.4.1-next.
|
|
3
|
+
"version": "6.4.1-next.2",
|
|
4
4
|
"description": "Contains the CSP configuration for Custom UI resources in Forge",
|
|
5
5
|
"main": "out/index.js",
|
|
6
6
|
"author": "Atlassian",
|
|
@@ -11,8 +11,8 @@
|
|
|
11
11
|
"clean": "rm -rf ./out && rm -f tsconfig.tsbuildinfo"
|
|
12
12
|
},
|
|
13
13
|
"devDependencies": {
|
|
14
|
-
"@forge/cli-shared": "9.10.0-next.
|
|
15
|
-
"@forge/manifest": "13.
|
|
14
|
+
"@forge/cli-shared": "9.10.0-next.7",
|
|
15
|
+
"@forge/manifest": "13.9.0-next.5",
|
|
16
16
|
"@types/jest": "^30.0.0",
|
|
17
17
|
"@types/node": "20.19.1",
|
|
18
18
|
"cheerio": "^1.2.0",
|