@forge/csp 2.1.2 → 2.1.3-next.0

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,11 @@
1
1
  # @forge/csp
2
2
 
3
+ ## 2.1.3-next.0
4
+
5
+ ### Patch Changes
6
+
7
+ - 6d9b010: Replace unpkg.com in the Content Security Policy for stylesheets in Forge custom UI with the Forge global URL.
8
+
3
9
  ## 2.1.2
4
10
 
5
11
  ### 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;AAUvD,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,iBAAiB;IAiBlB,gBAAgB,uBACD,UAAU,aACnB,iBAAiB,yBACL,MAAM,KAC5B,MAAM,EAAE,CAqDT;CACH"}
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;AAUvD,qBAAa,mBAAmB;IAC9B,OAAO,CAAC,eAAe;IAOvB,OAAO,CAAC,iBAAiB;IAIzB,OAAO,CAAC,qBAAqB;IAI7B,OAAO,CAAC,aAAa;IAerB,OAAO,CAAC,iBAAiB;IAiBlB,gBAAgB,uBACD,UAAU,aACnB,iBAAiB,yBACL,MAAM,KAC5B,MAAM,EAAE,CAoDT;CACH"}
@@ -40,7 +40,11 @@ class CSPInjectionService {
40
40
  this.getForgeGlobalCSP(microsEnv),
41
41
  ...this.getExistingCSPDetails(types_1.ExternalCspType.SCRIPT_SRC, existingCSPDetails)
42
42
  ].join(' ');
43
- const styleSrc = ["'self'", ...this.getExistingCSPDetails(types_1.ExternalCspType.STYLE_SRC, existingCSPDetails)].join(' ');
43
+ const styleSrc = [
44
+ "'self'",
45
+ this.getForgeGlobalCSP(microsEnv),
46
+ ...this.getExistingCSPDetails(types_1.ExternalCspType.STYLE_SRC, existingCSPDetails)
47
+ ].join(' ');
44
48
  const navigateTo = ["'self'"];
45
49
  return [
46
50
  `default-src ${defaultSrc}`,
@@ -52,7 +56,7 @@ class CSPInjectionService {
52
56
  `connect-src ${connectSrc}`,
53
57
  `script-src ${scriptSrc}`,
54
58
  `navigate-to ${navigateTo}`,
55
- `style-src ${styleSrc} https://unpkg.com/@atlaskit/tokens@0.10.30/css/atlassian-light.css https://unpkg.com/@atlaskit/tokens@0.10.30/css/atlassian-dark.css`,
59
+ `style-src ${styleSrc}`,
56
60
  `form-action 'self'`,
57
61
  `sandbox allow-downloads allow-forms allow-modals allow-pointer-lock allow-same-origin allow-scripts`,
58
62
  `report-uri ${reportUri}`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@forge/csp",
3
- "version": "2.1.2",
3
+ "version": "2.1.3-next.0",
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": "3.11.0",
15
- "@forge/manifest": "4.10.0",
14
+ "@forge/cli-shared": "3.11.1-next.0",
15
+ "@forge/manifest": "4.11.0-next.0",
16
16
  "@types/jest": "^29.1.2"
17
17
  },
18
18
  "dependencies": {