@forge/csp 6.4.0 → 6.4.1-experimental-a5f8a43

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,38 @@
1
1
  # @forge/csp
2
2
 
3
+ ## 6.4.1
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
+ - 1991376: Include data URLs in font-src. Include Hello Jira domain in frame ancestors if Hello Confluence domain is already included
9
+ - 2e7a1d5: Added `rovo-desktop://com.atlassian.rovo-chat-desktop` to the `frame-ancestors` CSP directive.
10
+ - 6af1446: Allow Trello (`https://trello.com`, and `https://trellis.coffee` in dev/staging) and the Rovo Chrome extension as `frame-ancestors` in the injected CSP
11
+
12
+ ## 6.4.1-next.3
13
+
14
+ ### Patch Changes
15
+
16
+ - 2e7a1d5: Added `rovo-desktop://com.atlassian.rovo-chat-desktop` to the `frame-ancestors` CSP directive.
17
+
18
+ ## 6.4.1-next.2
19
+
20
+ ### Patch Changes
21
+
22
+ - 49bab87: Add the macro parent host to `frame-ancestors` in the injected CSP for FedRAMP staging and production
23
+
24
+ ## 6.4.1-next.1
25
+
26
+ ### Patch Changes
27
+
28
+ - 1991376: Include data URLs in font-src. Include Hello Jira domain in frame ancestors if Hello Confluence domain is already included
29
+
30
+ ## 6.4.1-next.0
31
+
32
+ ### Patch Changes
33
+
34
+ - 6af1446: Allow Trello (`https://trello.com`, and `https://trellis.coffee` in dev/staging) and the Rovo Chrome extension as `frame-ancestors` in the injected CSP
35
+
3
36
  ## 6.4.0
4
37
 
5
38
  ### Minor 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,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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;IAiGlB,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)
@@ -330,18 +332,27 @@ class CSPInjectionService {
330
332
  'http://localhost:*',
331
333
  'http://devbucket.localhost',
332
334
  'https://integration.bb-inf.net',
335
+ 'https://trellis.coffee',
336
+ 'chrome-extension://npbjhobkibekbklkghlhfhieggcggpdb',
337
+ 'rovo-desktop://com.atlassian.rovo-chat-desktop',
333
338
  '*.atl-paas.net',
334
339
  '*.stg.atlassian.com'
335
340
  ];
336
341
  if (macroParentHost && !localhostWithPortRegex.test(macroParentHost)) {
337
- frameAncestors.push(`${macroParentHost}.cdn.stg.atlassian-dev.net`);
342
+ frameAncestors.push(getMacroParentHost(macroParentHost, 'stg'));
338
343
  }
339
344
  break;
340
345
  case 'fedramp-stg':
341
346
  frameAncestors = ['*.atlassian-stg-fedm.net'];
347
+ if (macroParentHost) {
348
+ frameAncestors.push(getMacroParentHost(macroParentHost, 'stg', 'fedramp'));
349
+ }
342
350
  break;
343
351
  case 'fedramp-prod':
344
352
  frameAncestors = ['*.atlassian-us-gov-mod.net'];
353
+ if (macroParentHost) {
354
+ frameAncestors.push(getMacroParentHost(macroParentHost, 'prod', 'fedramp'));
355
+ }
345
356
  break;
346
357
  case 'ic-stg':
347
358
  case 'ic-prod':
@@ -354,6 +365,9 @@ class CSPInjectionService {
354
365
  frameAncestors = [
355
366
  '*.atlassian.net',
356
367
  'bitbucket.org',
368
+ 'https://trello.com',
369
+ 'chrome-extension://npbjhobkibekbklkghlhfhieggcggpdb',
370
+ 'rovo-desktop://com.atlassian.rovo-chat-desktop',
357
371
  '*.jira.com',
358
372
  '*.atlassian.com',
359
373
  '*.frontend.public.atl-paas.net'
@@ -363,7 +377,7 @@ class CSPInjectionService {
363
377
  frameAncestors.push(`http://${macroParentHost}`);
364
378
  }
365
379
  else {
366
- frameAncestors.push(`${macroParentHost}.cdn.prod.atlassian-dev.net`);
380
+ frameAncestors.push(getMacroParentHost(macroParentHost, 'prod'));
367
381
  }
368
382
  }
369
383
  break;
@@ -376,6 +390,9 @@ class CSPInjectionService {
376
390
  }
377
391
  if (hostname) {
378
392
  frameAncestors.push(hostname);
393
+ if (hostname === 'hello.atlassian.net') {
394
+ frameAncestors.push('hello.jira.atlassian.cloud');
395
+ }
379
396
  }
380
397
  return frameAncestors;
381
398
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/csp",
3
- "version": "6.4.0",
3
+ "version": "6.4.1-experimental-a5f8a43",
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.9.0",
15
- "@forge/manifest": "13.8.0",
14
+ "@forge/cli-shared": "10.0.0-next.16-experimental-a5f8a43",
15
+ "@forge/manifest": "13.9.1-next.1-experimental-a5f8a43",
16
16
  "@types/jest": "^30.0.0",
17
17
  "@types/node": "20.19.1",
18
18
  "cheerio": "^1.2.0",