socket 1.1.77 → 1.1.79
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 +10 -0
- package/dist/cli.js +26 -2
- package/dist/cli.js.map +1 -1
- package/dist/constants.js +4 -4
- package/dist/constants.js.map +1 -1
- package/dist/tsconfig.dts.tsbuildinfo +1 -1
- package/dist/types/commands/fix/coana-fix.d.mts.map +1 -1
- package/dist/types/commands/scan/cmd-scan-create.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-create-new-scan.d.mts.map +1 -1
- package/dist/types/commands/scan/handle-scan-reach.d.mts.map +1 -1
- package/dist/types/commands/scan/output-scan-reach.d.mts.map +1 -1
- package/dist/types/utils/coana.d.mts +7 -0
- package/dist/types/utils/coana.d.mts.map +1 -1
- package/dist/types/utils/npm-paths.d.mts.map +1 -1
- package/dist/utils.js +76 -3
- package/dist/utils.js.map +1 -1
- package/package.json +5 -4
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coana-fix.d.mts","sourceRoot":"","sources":["../../../../src/commands/fix/coana-fix.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"coana-fix.d.mts","sourceRoot":"","sources":["../../../../src/commands/fix/coana-fix.mts"],"names":[],"mappings":"AAmDA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAA;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,iBAAiB,CAAA;AA4D9C,wBAAsB,QAAQ,CAC5B,SAAS,EAAE,SAAS,GACnB,OAAO,CAAC,OAAO,CAAC;IAAE,QAAQ,EAAE,OAAO,CAAC;IAAC,WAAW,EAAE,OAAO,EAAE,CAAA;CAAE,CAAC,CAAC,CA0mBjE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"cmd-scan-create.d.mts","sourceRoot":"","sources":["../../../../src/commands/scan/cmd-scan-create.mts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,uCAAuC,CAAA;AAE9C,eAAO,MAAM,QAAQ,WAAW,CAAA;AAmHhC,eAAO,MAAM,aAAa;;;;CAIzB,CAAA;AAED,iBAAe,GAAG,CAChB,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,EAClC,UAAU,EAAE,UAAU,EACtB,EAAE,UAAU,EAAE,EAAE,iBAAiB,GAChC,OAAO,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"cmd-scan-create.d.mts","sourceRoot":"","sources":["../../../../src/commands/scan/cmd-scan-create.mts"],"names":[],"mappings":"AAoCA,OAAO,KAAK,EAEV,iBAAiB,EAClB,MAAM,uCAAuC,CAAA;AAE9C,eAAO,MAAM,QAAQ,WAAW,CAAA;AAmHhC,eAAO,MAAM,aAAa;;;;CAIzB,CAAA;AAED,iBAAe,GAAG,CAChB,IAAI,EAAE,MAAM,EAAE,GAAG,SAAS,MAAM,EAAE,EAClC,UAAU,EAAE,UAAU,EACtB,EAAE,UAAU,EAAE,EAAE,iBAAiB,GAChC,OAAO,CAAC,IAAI,CAAC,CAwcf"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-create-new-scan.d.mts","sourceRoot":"","sources":["../../../../src/commands/scan/handle-create-new-scan.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handle-create-new-scan.d.mts","sourceRoot":"","sources":["../../../../src/commands/scan/handle-create-new-scan.mts"],"names":[],"mappings":"AAuBA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAC9E,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,aAAa,CAAA;AAC/C,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AACjD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,sCAAsC,CAAA;AAqCjE,MAAM,MAAM,yBAAyB,GAAG;IACtC,YAAY,EAAE,OAAO,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,EAAE,MAAM,CAAA;IAClB,aAAa,EAAE,MAAM,CAAA;IACrB,UAAU,EAAE,MAAM,CAAA;IAClB,GAAG,EAAE,MAAM,CAAA;IACX,aAAa,EAAE,OAAO,CAAA;IACtB,WAAW,EAAE,OAAO,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,WAAW,EAAE,OAAO,CAAA;IACpB,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,UAAU,CAAA;IACtB,KAAK,EAAE,KAAK,CACV,mBAAmB,GAAG;QACpB,uBAAuB,EAAE,OAAO,CAAA;KACjC,CACF,CAAA;IACD,QAAQ,EAAE,OAAO,CAAA;IACjB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,OAAO,CAAA;IACf,WAAW,EAAE,YAAY,CAAA;IACzB,OAAO,EAAE,MAAM,EAAE,CAAA;IACjB,GAAG,EAAE,OAAO,CAAA;IACZ,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAA;CAC/B,CAAA;AAED,wBAAsB,mBAAmB,CAAC,EACxC,YAAY,EACZ,UAAU,EACV,UAAU,EACV,aAAa,EACb,UAAU,EACV,GAAG,EACH,aAAa,EACb,WAAW,EACX,OAAO,EACP,UAAU,EACV,WAAW,EACX,WAAW,EACX,KAAK,EACL,QAAQ,EACR,QAAQ,EACR,MAAM,EACN,WAAW,EACX,OAAO,EACP,GAAG,EACH,SAAS,EACV,EAAE,yBAAyB,GAAG,OAAO,CAAC,IAAI,CAAC,CAkN3C"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"handle-scan-reach.d.mts","sourceRoot":"","sources":["../../../../src/commands/scan/handle-scan-reach.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"handle-scan-reach.d.mts","sourceRoot":"","sources":["../../../../src/commands/scan/handle-scan-reach.mts"],"names":[],"mappings":"AAWA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,qCAAqC,CAAA;AAC9E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEjD,MAAM,MAAM,qBAAqB,GAAG;IAClC,GAAG,EAAE,MAAM,CAAA;IACX,WAAW,EAAE,OAAO,CAAA;IACpB,OAAO,EAAE,MAAM,CAAA;IACf,UAAU,EAAE,UAAU,CAAA;IACtB,UAAU,EAAE,MAAM,CAAA;IAClB,mBAAmB,EAAE,mBAAmB,CAAA;IACxC,OAAO,EAAE,MAAM,EAAE,CAAA;CAClB,CAAA;AAED,wBAAsB,eAAe,CAAC,EACpC,GAAG,EACH,WAAW,EAAE,YAAY,EACzB,OAAO,EACP,UAAU,EACV,UAAU,EACV,mBAAmB,EACnB,OAAO,EACR,EAAE,qBAAqB,iBAiEvB"}
|
|
@@ -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":"AAQA,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,EAAE,UAAU,EAAE,UAAU,EAAE,EAAE;IAAE,UAAU,EAAE,UAAU,CAAC;IAAC,UAAU,EAAE,MAAM,CAAA;CAAE,GACzE,OAAO,CAAC,IAAI,CAAC,CAmCf"}
|
|
@@ -1,2 +1,9 @@
|
|
|
1
|
+
export type ReachabilityError = {
|
|
2
|
+
componentName: string;
|
|
3
|
+
componentVersion: string;
|
|
4
|
+
ghsaId: string;
|
|
5
|
+
subprojectPath: string;
|
|
6
|
+
};
|
|
7
|
+
export declare function extractReachabilityErrors(socketFactsFile: string): ReachabilityError[];
|
|
1
8
|
export declare function extractTier1ReachabilityScanId(socketFactsFile: string): string | undefined;
|
|
2
9
|
//# sourceMappingURL=coana.d.mts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"coana.d.mts","sourceRoot":"","sources":["../../../src/utils/coana.mts"],"names":[],"mappings":"AAeA,wBAAgB,8BAA8B,CAC5C,eAAe,EAAE,MAAM,GACtB,MAAM,GAAG,SAAS,CAQpB"}
|
|
1
|
+
{"version":3,"file":"coana.d.mts","sourceRoot":"","sources":["../../../src/utils/coana.mts"],"names":[],"mappings":"AAeA,MAAM,MAAM,iBAAiB,GAAG;IAC9B,aAAa,EAAE,MAAM,CAAA;IACrB,gBAAgB,EAAE,MAAM,CAAA;IACxB,MAAM,EAAE,MAAM,CAAA;IACd,cAAc,EAAE,MAAM,CAAA;CACvB,CAAA;AAED,wBAAgB,yBAAyB,CACvC,eAAe,EAAE,MAAM,GACtB,iBAAiB,EAAE,CA0CrB;AAED,wBAAgB,8BAA8B,CAC5C,eAAe,EAAE,MAAM,GACtB,MAAM,GAAG,SAAS,CAQpB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npm-paths.d.mts","sourceRoot":"","sources":["../../../src/utils/npm-paths.mts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"npm-paths.d.mts","sourceRoot":"","sources":["../../../src/utils/npm-paths.mts"],"names":[],"mappings":"AAwCA,wBAAgB,aAAa,IAAI,MAAM,CAQtC;AAkBD,wBAAgB,aAAa,WAyB5B;AAGD,wBAAgB,aAAa,IAAI,MAAM,CAAC,OAAO,CAY9C;AAGD,wBAAgB,aAAa,IAAI,MAAM,CAQtC;AAmBD,wBAAgB,oBAAoB,YAEnC;AAED,wBAAgB,oBAAoB,YAEnC"}
|
package/dist/utils.js
CHANGED
|
@@ -4482,6 +4482,36 @@ function* walkNestedMap(map, keys = []) {
|
|
|
4482
4482
|
* - Extracts tier 1 reachability scan identifiers
|
|
4483
4483
|
*/
|
|
4484
4484
|
|
|
4485
|
+
function extractReachabilityErrors(socketFactsFile) {
|
|
4486
|
+
const json = fs$1.readJsonSync(socketFactsFile, {
|
|
4487
|
+
throws: false
|
|
4488
|
+
});
|
|
4489
|
+
if (!json || !Array.isArray(json.components)) {
|
|
4490
|
+
return [];
|
|
4491
|
+
}
|
|
4492
|
+
const errors = [];
|
|
4493
|
+
for (const component of json.components) {
|
|
4494
|
+
if (!Array.isArray(component.reachability)) {
|
|
4495
|
+
continue;
|
|
4496
|
+
}
|
|
4497
|
+
for (const ghsaEntry of component.reachability) {
|
|
4498
|
+
if (!Array.isArray(ghsaEntry.reachability)) {
|
|
4499
|
+
continue;
|
|
4500
|
+
}
|
|
4501
|
+
for (const entry of ghsaEntry.reachability) {
|
|
4502
|
+
if (entry.type === 'error') {
|
|
4503
|
+
errors.push({
|
|
4504
|
+
componentName: String(component.name ?? ''),
|
|
4505
|
+
componentVersion: String(component.version ?? ''),
|
|
4506
|
+
ghsaId: String(ghsaEntry.ghsa_id ?? ''),
|
|
4507
|
+
subprojectPath: String(entry.subprojectPath ?? '')
|
|
4508
|
+
});
|
|
4509
|
+
}
|
|
4510
|
+
}
|
|
4511
|
+
}
|
|
4512
|
+
}
|
|
4513
|
+
return errors;
|
|
4514
|
+
}
|
|
4485
4515
|
function extractTier1ReachabilityScanId(socketFactsFile) {
|
|
4486
4516
|
const json = fs$1.readJsonSync(socketFactsFile, {
|
|
4487
4517
|
throws: false
|
|
@@ -5959,6 +5989,23 @@ function exitWithBinPathError$1(binName) {
|
|
|
5959
5989
|
// This line is never reached in production, but helps tests.
|
|
5960
5990
|
throw new Error('process.exit called');
|
|
5961
5991
|
}
|
|
5992
|
+
|
|
5993
|
+
// Find a binary next to the running node binary (process.execPath).
|
|
5994
|
+
// This avoids picking up a project-local binary from node_modules/.bin
|
|
5995
|
+
// on PATH, e.g. the standalone "npx" package which bundles npm@5.1.0
|
|
5996
|
+
// that is incompatible with Node 22+.
|
|
5997
|
+
function findBinNextToNode(binName) {
|
|
5998
|
+
const nodeDir = path.dirname(process.execPath);
|
|
5999
|
+
const binPath = path.join(nodeDir, binName);
|
|
6000
|
+
if (fs.existsSync(binPath)) {
|
|
6001
|
+
try {
|
|
6002
|
+
return bin.resolveBinPathSync(binPath);
|
|
6003
|
+
} catch {
|
|
6004
|
+
return undefined;
|
|
6005
|
+
}
|
|
6006
|
+
}
|
|
6007
|
+
return undefined;
|
|
6008
|
+
}
|
|
5962
6009
|
let _npmBinPath;
|
|
5963
6010
|
function getNpmBinPath() {
|
|
5964
6011
|
if (_npmBinPath === undefined) {
|
|
@@ -5972,7 +6019,18 @@ function getNpmBinPath() {
|
|
|
5972
6019
|
let _npmBinPathDetails;
|
|
5973
6020
|
function getNpmBinPathDetails() {
|
|
5974
6021
|
if (_npmBinPathDetails === undefined) {
|
|
5975
|
-
|
|
6022
|
+
// First try to find npm next to the node binary to avoid picking up
|
|
6023
|
+
// a project-local npm from node_modules/.bin on PATH.
|
|
6024
|
+
const npmNextToNode = findBinNextToNode(constants.NPM);
|
|
6025
|
+
if (npmNextToNode) {
|
|
6026
|
+
_npmBinPathDetails = {
|
|
6027
|
+
name: constants.NPM,
|
|
6028
|
+
path: npmNextToNode,
|
|
6029
|
+
shadowed: false
|
|
6030
|
+
};
|
|
6031
|
+
} else {
|
|
6032
|
+
_npmBinPathDetails = findBinPathDetailsSync(constants.NPM);
|
|
6033
|
+
}
|
|
5976
6034
|
}
|
|
5977
6035
|
return _npmBinPathDetails;
|
|
5978
6036
|
}
|
|
@@ -6024,7 +6082,20 @@ function getNpxBinPath() {
|
|
|
6024
6082
|
let _npxBinPathDetails;
|
|
6025
6083
|
function getNpxBinPathDetails() {
|
|
6026
6084
|
if (_npxBinPathDetails === undefined) {
|
|
6027
|
-
|
|
6085
|
+
// First try to find npx next to the node binary to avoid picking up
|
|
6086
|
+
// a project-local npx from node_modules/.bin on PATH (e.g., the
|
|
6087
|
+
// standalone npx package which bundles npm@5.1.0, incompatible
|
|
6088
|
+
// with Node 22+).
|
|
6089
|
+
const npxNextToNode = findBinNextToNode('npx');
|
|
6090
|
+
if (npxNextToNode) {
|
|
6091
|
+
_npxBinPathDetails = {
|
|
6092
|
+
name: 'npx',
|
|
6093
|
+
path: npxNextToNode,
|
|
6094
|
+
shadowed: false
|
|
6095
|
+
};
|
|
6096
|
+
} else {
|
|
6097
|
+
_npxBinPathDetails = findBinPathDetailsSync('npx');
|
|
6098
|
+
}
|
|
6028
6099
|
}
|
|
6029
6100
|
return _npxBinPathDetails;
|
|
6030
6101
|
}
|
|
@@ -7703,6 +7774,7 @@ exports.detectAndValidatePackageEnvironment = detectAndValidatePackageEnvironmen
|
|
|
7703
7774
|
exports.detectDefaultBranch = detectDefaultBranch;
|
|
7704
7775
|
exports.determineOrgSlug = determineOrgSlug;
|
|
7705
7776
|
exports.enablePrAutoMerge = enablePrAutoMerge;
|
|
7777
|
+
exports.extractReachabilityErrors = extractReachabilityErrors;
|
|
7706
7778
|
exports.extractTier1ReachabilityScanId = extractTier1ReachabilityScanId;
|
|
7707
7779
|
exports.failMsgWithBadge = failMsgWithBadge;
|
|
7708
7780
|
exports.fetchGhsaDetails = fetchGhsaDetails;
|
|
@@ -7710,6 +7782,7 @@ exports.fetchOrganization = fetchOrganization;
|
|
|
7710
7782
|
exports.fileLink = fileLink;
|
|
7711
7783
|
exports.filterFlags = filterFlags;
|
|
7712
7784
|
exports.finalizeTelemetry = finalizeTelemetry;
|
|
7785
|
+
exports.findSocketYmlSync = findSocketYmlSync;
|
|
7713
7786
|
exports.findUp = findUp;
|
|
7714
7787
|
exports.formatErrorWithDetail = formatErrorWithDetail;
|
|
7715
7788
|
exports.getAlertsMapFromPnpmLockfile = getAlertsMapFromPnpmLockfile;
|
|
@@ -7812,5 +7885,5 @@ exports.updateConfigValue = updateConfigValue;
|
|
|
7812
7885
|
exports.walkNestedMap = walkNestedMap;
|
|
7813
7886
|
exports.webLink = webLink;
|
|
7814
7887
|
exports.writeSocketJson = writeSocketJson;
|
|
7815
|
-
//# debugId=
|
|
7888
|
+
//# debugId=8ab81ec7-1b88-43f4-85b0-ff74e04851d2
|
|
7816
7889
|
//# sourceMappingURL=utils.js.map
|