@socketsecurity/cli 1.1.155 → 1.1.157
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 +13 -0
- package/README.md +5 -5
- package/dist/cli.js +2 -2
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +4 -4
- package/dist/constants.js.map +1 -1
- package/dist/manifest-scripts/maven-extension/coana-maven-extension.jar +0 -0
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/scan/output-scan-reach.d.mts.map +1 -1
- package/dist/types/utils/coana.d.mts +6 -0
- package/dist/types/utils/coana.d.mts.map +1 -1
- package/dist/utils.js +18 -2
- package/dist/utils.js.map +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"output-scan-reach.d.mts","sourceRoot":"","sources":["../../../../src/commands/scan/output-scan-reach.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"output-scan-reach.d.mts","sourceRoot":"","sources":["../../../../src/commands/scan/output-scan-reach.mts"],"names":[],"mappings":"AAaA,OAAO,KAAK,EAAE,0BAA0B,EAAE,MAAM,qCAAqC,CAAA;AACrF,OAAO,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAE1D,wBAAsB,eAAe,CACnC,MAAM,EAAE,OAAO,CAAC,0BAA0B,CAAC,EAC3C,EACE,GAAG,EACH,UAAU,EACV,UAAU,EACX,EAAE;IAAE,GAAG,EAAE,MAAM,CAAC;IAAC,UAAU,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GAC7D,OAAO,CAAC,IAAI,CAAC,CAuCf"}
|
|
@@ -38,7 +38,13 @@ export type ReachabilityError = {
|
|
|
38
38
|
componentVersion: string;
|
|
39
39
|
ghsaId: string;
|
|
40
40
|
subprojectPath: string;
|
|
41
|
+
workspacePath: string;
|
|
41
42
|
};
|
|
42
43
|
export declare function extractReachabilityErrors(socketFactsFile: string): ReachabilityError[];
|
|
43
44
|
export declare function extractTier1ReachabilityScanId(socketFactsFile: string): string | undefined;
|
|
45
|
+
// Label a reachability location the way Coana's own `getFullWorkspacePath`
|
|
46
|
+
// does. Since @coana-tech/cli v15.10.8 `subprojectPath` names the build root
|
|
47
|
+
// and `workspacePath` the workspace within it, so a single-root repo reports
|
|
48
|
+
// `.` as its subproject and must be labelled by its workspace alone.
|
|
49
|
+
export declare function getFullWorkspacePath(subprojectPath: string, workspacePath: string): string;
|
|
44
50
|
//# sourceMappingURL=coana.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coana.d.mts","sourceRoot":"","sources":["../../../src/utils/coana.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coana.d.mts","sourceRoot":"","sources":["../../../src/utils/coana.mts"],"names":[],"mappings":"AA+BA,MAAM,MAAM,mBAAmB,GAAG;IAChC,KAAK,EAAE,MAAM,EAAE,CAAA;IACf,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAA;CAC7B,CAAA;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAsB,4BAA4B,CAChD,SAAS,EAAE,MAAM,EAAE,GAClB,OAAO,CAAC,mBAAmB,CAAC,CAgD9B;AAED,MAAM,MAAM,iBAAiB,GAAG;IAC9B,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,MAAM,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;CACtB,CAAA;AAED,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,MAAM,GACtB,iBAAiB,EAAE,CA4CrB;AAED,wBAAgB,8BAA8B,CAC5C,eAAe,EAAE,MAAM,GACtB,MAAM,GAAG,SAAS,CAQpB;AAED,2EAA2E;AAC3E,6EAA6E;AAC7E,6EAA6E;AAC7E,qEAAqE;AACrE,wBAAgB,oBAAoB,CAClC,cAAc,EAAE,MAAM,EACtB,aAAa,EAAE,MAAM,GACpB,MAAM,CAQR"}
|
package/dist/utils.js
CHANGED
|
@@ -5034,6 +5034,7 @@ function* walkNestedMap(map, keys = []) {
|
|
|
5034
5034
|
* to depscan is brotli (api-v0 decodes at the multipart boundary).
|
|
5035
5035
|
* - extractReachabilityErrors: Extract per-component reachability errors
|
|
5036
5036
|
* - extractTier1ReachabilityScanId: Extract scan ID from socket facts file
|
|
5037
|
+
* - getFullWorkspacePath: Label a build-root/workspace pair the way Coana does
|
|
5037
5038
|
*
|
|
5038
5039
|
* Integration:
|
|
5039
5040
|
* - Works with @coana-tech/cli for reachability analysis
|
|
@@ -5143,7 +5144,8 @@ function extractReachabilityErrors(socketFactsFile) {
|
|
|
5143
5144
|
componentName: String(component.name ?? ''),
|
|
5144
5145
|
componentVersion: String(component.version ?? ''),
|
|
5145
5146
|
ghsaId: String(ghsaEntry.ghsa_id ?? ''),
|
|
5146
|
-
subprojectPath: String(entry.subprojectPath ?? '')
|
|
5147
|
+
subprojectPath: String(entry.subprojectPath ?? ''),
|
|
5148
|
+
workspacePath: String(entry.workspacePath ?? '')
|
|
5147
5149
|
});
|
|
5148
5150
|
}
|
|
5149
5151
|
}
|
|
@@ -5159,6 +5161,19 @@ function extractTier1ReachabilityScanId(socketFactsFile) {
|
|
|
5159
5161
|
return tier1ReachabilityScanId.length > 0 ? tier1ReachabilityScanId : undefined;
|
|
5160
5162
|
}
|
|
5161
5163
|
|
|
5164
|
+
// Label a reachability location the way Coana's own `getFullWorkspacePath`
|
|
5165
|
+
// does. Since @coana-tech/cli v15.10.8 `subprojectPath` names the build root
|
|
5166
|
+
// and `workspacePath` the workspace within it, so a single-root repo reports
|
|
5167
|
+
// `.` as its subproject and must be labelled by its workspace alone.
|
|
5168
|
+
function getFullWorkspacePath(subprojectPath, workspacePath) {
|
|
5169
|
+
const subproject = subprojectPath && subprojectPath !== '.' ? subprojectPath : '';
|
|
5170
|
+
const workspace = workspacePath && workspacePath !== '.' ? workspacePath : '';
|
|
5171
|
+
if (subproject && workspace) {
|
|
5172
|
+
return `${subproject}/${workspace}`;
|
|
5173
|
+
}
|
|
5174
|
+
return subproject || workspace || '.';
|
|
5175
|
+
}
|
|
5176
|
+
|
|
5162
5177
|
/**
|
|
5163
5178
|
* File system utilities for Socket CLI.
|
|
5164
5179
|
* Provides file and directory search functionality.
|
|
@@ -8989,6 +9004,7 @@ exports.getErrorCause = getErrorCause;
|
|
|
8989
9004
|
exports.getErrorMessageOr = getErrorMessageOr;
|
|
8990
9005
|
exports.getFlagApiRequirementsOutput = getFlagApiRequirementsOutput;
|
|
8991
9006
|
exports.getFlagListOutput = getFlagListOutput;
|
|
9007
|
+
exports.getFullWorkspacePath = getFullWorkspacePath;
|
|
8992
9008
|
exports.getMajor = getMajor;
|
|
8993
9009
|
exports.getNpmBinPath = getNpmBinPath;
|
|
8994
9010
|
exports.getNpmRequire = getNpmRequire;
|
|
@@ -9088,5 +9104,5 @@ exports.walkNestedMap = walkNestedMap;
|
|
|
9088
9104
|
exports.webLink = webLink;
|
|
9089
9105
|
exports.withTmpDir = withTmpDir;
|
|
9090
9106
|
exports.writeSocketJson = writeSocketJson;
|
|
9091
|
-
//# debugId=
|
|
9107
|
+
//# debugId=374c6786-8711-43fe-b863-d5928c055431
|
|
9092
9108
|
//# sourceMappingURL=utils.js.map
|