🚨 Latest Research:Tanstack npm Packages Compromised in Ongoing Mini Shai-Hulud Supply-Chain Attack.Learn More
Socket
Book a DemoSign in
Socket

@forge/csp

Package Overview
Dependencies
Maintainers
1
Versions
380
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@forge/csp - npm Package Compare versions

Comparing version
5.7.0
to
5.8.0-next.0
+6
-0
CHANGELOG.md
# @forge/csp
## 5.8.0-next.0
### Minor Changes
- e7fa544: add support for connect domain to frame ancestors
## 5.7.0

@@ -4,0 +10,0 @@

+2
-1

@@ -21,3 +21,3 @@ import type { LambdaEnvironment } from '@forge/cli-shared';

private getFrameAncestors;
getInjectableCSP: ({ existingCSPDetails, microsEnv, tunnelCSPReporterUri, hostname, isFedRAMP, icOptions, macroParentHost }: {
getInjectableCSP: ({ existingCSPDetails, microsEnv, tunnelCSPReporterUri, hostname, isFedRAMP, icOptions, macroParentHost, connectMacroParentDomain }: {
existingCSPDetails: CSPDetails;

@@ -30,2 +30,3 @@ microsEnv: LambdaEnvironment;

macroParentHost?: string | undefined;
connectMacroParentDomain?: string | undefined;
}) => string[];

@@ -32,0 +33,0 @@ }

@@ -1,1 +0,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,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAIF,aAAK,oBAAoB,GAAG;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,MAAM,CAAC;CAC3B,CAAC;AAEF,aAAK,SAAS,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AA8K1D,eAAO,MAAM,qBAAqB,cAAe,iBAAiB,cAAc,SAAS,KAAG,MAAM,EAWjG,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;IAkElB,gBAAgB;4BASD,UAAU;mBACnB,iBAAiB;;;;;;UAM1B,MAAM,EAAE,CAgGV;CACH"}
{"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,aAAK,iBAAiB,GAAG;IACvB,OAAO,EAAE,MAAM,CAAC;IAChB,WAAW,EAAE,MAAM,CAAC;CACrB,CAAC;AAIF,aAAK,oBAAoB,GAAG;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,EAAE,MAAM,MAAM,CAAC;CAC3B,CAAC;AAEF,aAAK,SAAS,GAAG,iBAAiB,GAAG,oBAAoB,CAAC;AA+K1D,eAAO,MAAM,qBAAqB,cAAe,iBAAiB,cAAc,SAAS,KAAG,MAAM,EAWjG,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;4BAUD,UAAU;mBACnB,iBAAiB;;;;;;;UAO1B,MAAM,EAAE,CAgGV;CACH"}

@@ -149,3 +149,3 @@ "use strict";

constructor() {
this.getInjectableCSP = ({ existingCSPDetails, microsEnv, tunnelCSPReporterUri, hostname, isFedRAMP, icOptions, macroParentHost }) => {
this.getInjectableCSP = ({ existingCSPDetails, microsEnv, tunnelCSPReporterUri, hostname, isFedRAMP, icOptions, macroParentHost, connectMacroParentDomain }) => {
const reportUri = tunnelCSPReporterUri || this.getCSPReportUri(microsEnv, icOptions);

@@ -156,3 +156,3 @@ const fosCDNUrls = getFOSCDNUrls(microsEnv, icOptions);

"'self'",
...this.getFrameAncestors(microsEnv, hostname, icOptions, macroParentHost),
...this.getFrameAncestors(microsEnv, hostname, icOptions, macroParentHost, connectMacroParentDomain),
...getFOSHostDownload(microsEnv, icOptions),

@@ -286,3 +286,3 @@ ...fosCDNUrls

}
getFrameAncestors(microsEnv, hostname, icOptions, macroParentHost) {
getFrameAncestors(microsEnv, hostname, icOptions, macroParentHost, connectMacroParentDomain) {
let frameAncestors = [];

@@ -336,2 +336,5 @@ const localhostWithPortRegex = /^localhost:\d+$/;

}
if (connectMacroParentDomain) {
frameAncestors.push(connectMacroParentDomain);
}
if (hostname) {

@@ -338,0 +341,0 @@ frameAncestors.push(hostname);

{
"name": "@forge/csp",
"version": "5.7.0",
"version": "5.8.0-next.0",
"description": "Contains the CSP configuration for Custom UI resources in Forge",

@@ -14,3 +14,3 @@ "main": "out/index.js",

"devDependencies": {
"@forge/cli-shared": "8.20.0",
"@forge/cli-shared": "8.21.0-next.0",
"@forge/manifest": "12.6.0",

@@ -17,0 +17,0 @@ "@types/jest": "^29.5.14",