@salesforce/plugin-trust 3.8.15 → 3.8.16
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/README.md +4 -4
- package/lib/hooks/diagnostics.js +57 -3
- package/lib/hooks/diagnostics.js.map +1 -1
- package/lib/shared/npmCommand.d.ts +11 -6
- package/lib/shared/npmCommand.js +31 -17
- package/lib/shared/npmCommand.js.map +1 -1
- package/oclif.manifest.json +1 -1
- package/package.json +10 -5
package/README.md
CHANGED
|
@@ -131,7 +131,7 @@ EXAMPLES
|
|
|
131
131
|
$ @salesforce/plugin-trust plugins trust allowlist add --name @scope/my-plugin --name another-plugin
|
|
132
132
|
```
|
|
133
133
|
|
|
134
|
-
_See code: [src/commands/plugins/trust/allowlist/add.ts](https://github.com/salesforcecli/plugin-trust/blob/3.8.
|
|
134
|
+
_See code: [src/commands/plugins/trust/allowlist/add.ts](https://github.com/salesforcecli/plugin-trust/blob/3.8.16/src/commands/plugins/trust/allowlist/add.ts)_
|
|
135
135
|
|
|
136
136
|
## `@salesforce/plugin-trust plugins trust allowlist list`
|
|
137
137
|
|
|
@@ -159,7 +159,7 @@ EXAMPLES
|
|
|
159
159
|
$ @salesforce/plugin-trust plugins trust allowlist list
|
|
160
160
|
```
|
|
161
161
|
|
|
162
|
-
_See code: [src/commands/plugins/trust/allowlist/list.ts](https://github.com/salesforcecli/plugin-trust/blob/3.8.
|
|
162
|
+
_See code: [src/commands/plugins/trust/allowlist/list.ts](https://github.com/salesforcecli/plugin-trust/blob/3.8.16/src/commands/plugins/trust/allowlist/list.ts)_
|
|
163
163
|
|
|
164
164
|
## `@salesforce/plugin-trust plugins trust allowlist remove`
|
|
165
165
|
|
|
@@ -196,7 +196,7 @@ EXAMPLES
|
|
|
196
196
|
$ @salesforce/plugin-trust plugins trust allowlist remove --name @scope/my-plugin --name another-plugin
|
|
197
197
|
```
|
|
198
198
|
|
|
199
|
-
_See code: [src/commands/plugins/trust/allowlist/remove.ts](https://github.com/salesforcecli/plugin-trust/blob/3.8.
|
|
199
|
+
_See code: [src/commands/plugins/trust/allowlist/remove.ts](https://github.com/salesforcecli/plugin-trust/blob/3.8.16/src/commands/plugins/trust/allowlist/remove.ts)_
|
|
200
200
|
|
|
201
201
|
## `@salesforce/plugin-trust plugins trust verify`
|
|
202
202
|
|
|
@@ -225,6 +225,6 @@ EXAMPLES
|
|
|
225
225
|
$ @salesforce/plugin-trust plugins trust verify --npm @scope/npmName
|
|
226
226
|
```
|
|
227
227
|
|
|
228
|
-
_See code: [src/commands/plugins/trust/verify.ts](https://github.com/salesforcecli/plugin-trust/blob/3.8.
|
|
228
|
+
_See code: [src/commands/plugins/trust/verify.ts](https://github.com/salesforcecli/plugin-trust/blob/3.8.16/src/commands/plugins/trust/verify.ts)_
|
|
229
229
|
|
|
230
230
|
<!-- commandsstop -->
|
package/lib/hooks/diagnostics.js
CHANGED
|
@@ -1,24 +1,78 @@
|
|
|
1
1
|
import { Lifecycle } from '@salesforce/core';
|
|
2
2
|
import { NpmModule } from '../shared/npmCommand.js';
|
|
3
3
|
export const hook = (options) => Promise.all([registryCheck(options)]);
|
|
4
|
+
/**
|
|
5
|
+
* Validates that a string is a well-formed HTTP/HTTPS URL
|
|
6
|
+
*
|
|
7
|
+
* @param urlString - The URL string to validate
|
|
8
|
+
* @returns true if valid, false otherwise
|
|
9
|
+
*/
|
|
10
|
+
const isValidRegistryUrl = (urlString) => {
|
|
11
|
+
try {
|
|
12
|
+
const url = new URL(urlString);
|
|
13
|
+
// Only allow http/https protocols to prevent protocol-based attacks
|
|
14
|
+
return url.protocol === 'http:' || url.protocol === 'https:';
|
|
15
|
+
}
|
|
16
|
+
catch {
|
|
17
|
+
return false;
|
|
18
|
+
}
|
|
19
|
+
};
|
|
20
|
+
/**
|
|
21
|
+
* Sanitizes a registry URL to prevent command injection
|
|
22
|
+
* Validates URL format and ensures no shell metacharacters
|
|
23
|
+
*
|
|
24
|
+
* @param registryUrl - The registry URL to sanitize
|
|
25
|
+
* @returns The sanitized URL or undefined if invalid
|
|
26
|
+
*/
|
|
27
|
+
const sanitizeRegistryUrl = (registryUrl) => {
|
|
28
|
+
if (!registryUrl || typeof registryUrl !== 'string') {
|
|
29
|
+
return undefined;
|
|
30
|
+
}
|
|
31
|
+
// Trim whitespace
|
|
32
|
+
const trimmed = registryUrl.trim();
|
|
33
|
+
// Check for shell metacharacters that could enable command injection
|
|
34
|
+
const dangerousChars = /[;&|`$(){}[\]<>\\'"]/;
|
|
35
|
+
if (dangerousChars.test(trimmed)) {
|
|
36
|
+
return undefined;
|
|
37
|
+
}
|
|
38
|
+
// Validate as proper URL
|
|
39
|
+
if (!isValidRegistryUrl(trimmed)) {
|
|
40
|
+
return undefined;
|
|
41
|
+
}
|
|
42
|
+
return trimmed;
|
|
43
|
+
};
|
|
4
44
|
const registryCheck = async (options) => {
|
|
5
45
|
const pluginName = '@salesforce/plugin-trust';
|
|
6
46
|
// find npm install
|
|
7
47
|
const npm = new NpmModule('');
|
|
8
48
|
const env = process.env.npm_config_registry ?? process.env.NPM_CONFIG_REGISTRY;
|
|
49
|
+
let sanitizedEnv;
|
|
9
50
|
if (env) {
|
|
10
|
-
|
|
51
|
+
sanitizedEnv = sanitizeRegistryUrl(env);
|
|
52
|
+
if (sanitizedEnv) {
|
|
53
|
+
options.doctor.addSuggestion(`using npm registry ${sanitizedEnv} from environment variable`);
|
|
54
|
+
}
|
|
55
|
+
else {
|
|
56
|
+
options.doctor.addSuggestion(`WARNING: npm registry environment variable contains invalid or potentially unsafe URL: ${env}`);
|
|
57
|
+
}
|
|
11
58
|
}
|
|
12
59
|
const config = npm.run('config get registry').stdout.trim();
|
|
60
|
+
let sanitizedConfig;
|
|
13
61
|
if (config) {
|
|
14
|
-
|
|
62
|
+
sanitizedConfig = sanitizeRegistryUrl(config);
|
|
63
|
+
if (sanitizedConfig) {
|
|
64
|
+
options.doctor.addSuggestion(`using npm registry ${sanitizedConfig} from npm config`);
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
options.doctor.addSuggestion(`WARNING: npm config registry contains invalid or potentially unsafe URL: ${config}`);
|
|
68
|
+
}
|
|
15
69
|
}
|
|
16
70
|
await Promise.all([
|
|
17
71
|
...new Set([
|
|
18
72
|
// npm and yarn registries
|
|
19
73
|
'https://registry.npmjs.org',
|
|
20
74
|
'https://registry.yarnpkg.com',
|
|
21
|
-
|
|
75
|
+
sanitizedEnv ?? sanitizedConfig ?? '',
|
|
22
76
|
]),
|
|
23
77
|
]
|
|
24
78
|
// incase customRegistry is undefined, prevent printing an extra line
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/hooks/diagnostics.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"diagnostics.js","sourceRoot":"","sources":["../../src/hooks/diagnostics.ts"],"names":[],"mappings":"AAgBA,OAAO,EAAE,SAAS,EAAE,MAAM,kBAAkB,CAAC;AAC7C,OAAO,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AAGpD,MAAM,CAAC,MAAM,IAAI,GAAiB,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,aAAa,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC;AAErF;;;;;GAKG;AACH,MAAM,kBAAkB,GAAG,CAAC,SAAiB,EAAW,EAAE;IACxD,IAAI,CAAC;QACH,MAAM,GAAG,GAAG,IAAI,GAAG,CAAC,SAAS,CAAC,CAAC;QAC/B,oEAAoE;QACpE,OAAO,GAAG,CAAC,QAAQ,KAAK,OAAO,IAAI,GAAG,CAAC,QAAQ,KAAK,QAAQ,CAAC;IAC/D,CAAC;IAAC,MAAM,CAAC;QACP,OAAO,KAAK,CAAC;IACf,CAAC;AACH,CAAC,CAAC;AAE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AC,MAAM,CAAC,aAAa,CAC1B,eAAe,GAAG,+HAA+H,GAAG,GAAG,CACxJ,CAAC;QACJ,CAAC;IACH,CAAC,CAAC,CACL,CAAC;AACJ,CAAC,CAAC"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import shelljs, { ShellString } from 'shelljs';
|
|
2
1
|
export type NpmMeta = {
|
|
3
2
|
tarballUrl?: string;
|
|
4
3
|
signatureUrl?: string;
|
|
@@ -22,12 +21,17 @@ export type NpmShowResults = {
|
|
|
22
21
|
[name: string]: string;
|
|
23
22
|
};
|
|
24
23
|
};
|
|
25
|
-
type NpmCommandOptions =
|
|
24
|
+
type NpmCommandOptions = {
|
|
26
25
|
json?: boolean;
|
|
27
26
|
registry?: string;
|
|
28
27
|
cliRoot?: string;
|
|
28
|
+
cwd?: string;
|
|
29
|
+
};
|
|
30
|
+
type NpmCommandResult = {
|
|
31
|
+
code: number;
|
|
32
|
+
stdout: string;
|
|
33
|
+
stderr: string;
|
|
29
34
|
};
|
|
30
|
-
type NpmCommandResult = shelljs.ShellString;
|
|
31
35
|
export declare class NpmCommand {
|
|
32
36
|
static runNpmCmd(cmd: string, options?: NpmCommandOptions): NpmCommandResult;
|
|
33
37
|
static npxCli(): string;
|
|
@@ -41,6 +45,7 @@ export declare class NpmCommand {
|
|
|
41
45
|
* @private
|
|
42
46
|
*/
|
|
43
47
|
static findNode(root?: string): string;
|
|
48
|
+
private static findFilesRecursively;
|
|
44
49
|
/**
|
|
45
50
|
* Returns the path to the npm-cli.js file in this package's node_modules
|
|
46
51
|
*
|
|
@@ -66,10 +71,10 @@ export declare class NpmModule {
|
|
|
66
71
|
time: number;
|
|
67
72
|
details: Record<string, unknown>;
|
|
68
73
|
};
|
|
69
|
-
run(command: string):
|
|
74
|
+
run(command: string): NpmCommandResult;
|
|
70
75
|
show(registry: string): NpmShowResults;
|
|
71
|
-
pack(registry: string, options?:
|
|
72
|
-
fetchTarball(registry: string, options?:
|
|
76
|
+
pack(registry: string, options?: NpmCommandOptions): void;
|
|
77
|
+
fetchTarball(registry: string, options?: NpmCommandOptions): Promise<void>;
|
|
73
78
|
pollForAvailability(checkFn: () => void): Promise<void>;
|
|
74
79
|
}
|
|
75
80
|
export {};
|
package/lib/shared/npmCommand.js
CHANGED
|
@@ -18,7 +18,8 @@ import path from 'node:path';
|
|
|
18
18
|
import { createRequire } from 'node:module';
|
|
19
19
|
import fs from 'node:fs';
|
|
20
20
|
import npmRunPath from 'npm-run-path';
|
|
21
|
-
import
|
|
21
|
+
import crossSpawn from 'cross-spawn';
|
|
22
|
+
import which from 'which';
|
|
22
23
|
import { SfError } from '@salesforce/core';
|
|
23
24
|
import { sleep, parseJson } from '@salesforce/kit';
|
|
24
25
|
import { Ux } from '@salesforce/sf-plugins-core';
|
|
@@ -27,17 +28,18 @@ export class NpmCommand {
|
|
|
27
28
|
static runNpmCmd(cmd, options = {}) {
|
|
28
29
|
const nodeExecutable = NpmCommand.findNode(options.cliRoot);
|
|
29
30
|
const npmCli = NpmCommand.npmCli();
|
|
30
|
-
const
|
|
31
|
-
const
|
|
32
|
-
|
|
33
|
-
silent: true,
|
|
34
|
-
async: false,
|
|
31
|
+
const args = [npmCli, ...cmd.split(/\s+/), ...(options.registry ? [`--registry=${options.registry}`] : [])];
|
|
32
|
+
const result = crossSpawn.sync(nodeExecutable, args, {
|
|
33
|
+
cwd: options.cwd,
|
|
35
34
|
env: npmRunPath.env({ env: process.env }),
|
|
36
35
|
});
|
|
37
|
-
|
|
38
|
-
|
|
36
|
+
const stdout = result.stdout?.toString() ?? '';
|
|
37
|
+
const stderr = result.stderr?.toString() ?? '';
|
|
38
|
+
const code = result.status ?? 1;
|
|
39
|
+
if (code !== 0) {
|
|
40
|
+
throw new SfError(stderr, 'ShellExecError');
|
|
39
41
|
}
|
|
40
|
-
return
|
|
42
|
+
return { code, stdout, stderr };
|
|
41
43
|
}
|
|
42
44
|
static npxCli() {
|
|
43
45
|
const require = createRequire(import.meta.url);
|
|
@@ -62,7 +64,6 @@ export class NpmCommand {
|
|
|
62
64
|
return filepath.endsWith('node.exe');
|
|
63
65
|
try {
|
|
64
66
|
if (filepath.endsWith('node')) {
|
|
65
|
-
// This checks if the filepath is executable on Mac or Linux, if it is not it errors.
|
|
66
67
|
fs.accessSync(filepath, fs.constants.X_OK);
|
|
67
68
|
return true;
|
|
68
69
|
}
|
|
@@ -75,19 +76,31 @@ export class NpmCommand {
|
|
|
75
76
|
if (root) {
|
|
76
77
|
const sfdxBinDirs = NpmCommand.findSfdxBinDirs(root);
|
|
77
78
|
if (sfdxBinDirs.length > 0) {
|
|
78
|
-
|
|
79
|
-
const node =
|
|
79
|
+
const allFiles = sfdxBinDirs.flatMap((dir) => NpmCommand.findFilesRecursively(dir));
|
|
80
|
+
const node = allFiles.find((file) => isExecutable(file));
|
|
80
81
|
if (node) {
|
|
81
82
|
return fs.realpathSync(node);
|
|
82
83
|
}
|
|
83
84
|
}
|
|
84
85
|
}
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
return nodeShellString.stdout;
|
|
86
|
+
const nodePath = which.sync('node', { nothrow: true });
|
|
87
|
+
if (nodePath)
|
|
88
|
+
return nodePath;
|
|
89
89
|
throw setErrorName(new SfError('Cannot locate node executable.', 'CannotFindNodeExecutable'), 'CannotFindNodeExecutable');
|
|
90
90
|
}
|
|
91
|
+
static findFilesRecursively(dir) {
|
|
92
|
+
const results = [];
|
|
93
|
+
for (const entry of fs.readdirSync(dir, { withFileTypes: true })) {
|
|
94
|
+
const fullPath = path.join(dir, entry.name);
|
|
95
|
+
if (entry.isDirectory()) {
|
|
96
|
+
results.push(...NpmCommand.findFilesRecursively(fullPath));
|
|
97
|
+
}
|
|
98
|
+
else {
|
|
99
|
+
results.push(fullPath);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
return results;
|
|
103
|
+
}
|
|
91
104
|
/**
|
|
92
105
|
* Returns the path to the npm-cli.js file in this package's node_modules
|
|
93
106
|
*
|
|
@@ -127,7 +140,8 @@ export class NpmModule {
|
|
|
127
140
|
};
|
|
128
141
|
}
|
|
129
142
|
ping(registry) {
|
|
130
|
-
|
|
143
|
+
const result = NpmCommand.runNpmCmd(`ping ${registry ?? ''} --json`, { json: true, cliRoot: this.cliRoot });
|
|
144
|
+
return JSON.parse(result.stdout);
|
|
131
145
|
}
|
|
132
146
|
run(command) {
|
|
133
147
|
return NpmCommand.runNpmCmd(command, { cliRoot: this.cliRoot, json: command.includes('--json') });
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"npmCommand.js","sourceRoot":"","sources":["../../src/shared/npmCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,
|
|
1
|
+
{"version":3,"file":"npmCommand.js","sourceRoot":"","sources":["../../src/shared/npmCommand.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAEH,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,IAAI,MAAM,WAAW,CAAC;AAC7B,OAAO,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AAE5C,OAAO,EAAE,MAAM,SAAS,CAAC;AACzB,OAAO,UAAU,MAAM,cAAc,CAAC;AACtC,OAAO,UAAU,MAAM,aAAa,CAAC;AACrC,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAC3C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,iBAAiB,CAAC;AACnD,OAAO,EAAE,EAAE,EAAE,MAAM,6BAA6B,CAAC;AACjD,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;A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AAC,CAAC;IACpD,CAAC;CACF"}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@salesforce/plugin-trust",
|
|
3
3
|
"description": "validate a digital signature for a npm package",
|
|
4
|
-
"version": "3.8.
|
|
4
|
+
"version": "3.8.16",
|
|
5
5
|
"author": "Salesforce",
|
|
6
6
|
"bin": {
|
|
7
7
|
"sf-trust": "bin/dev"
|
|
@@ -15,24 +15,29 @@
|
|
|
15
15
|
"@salesforce/kit": "^3.2.6",
|
|
16
16
|
"@salesforce/plugin-info": "^3.4.131",
|
|
17
17
|
"@salesforce/sf-plugins-core": "^12",
|
|
18
|
+
"cross-spawn": "^7.0.6",
|
|
18
19
|
"got": "^13.0.0",
|
|
19
20
|
"npm": "^11.16.0",
|
|
20
21
|
"npm-run-path": "^4.0.1",
|
|
21
22
|
"proxy-agent": "^6.5.0",
|
|
22
23
|
"semver": "^7.8.2",
|
|
23
|
-
"shelljs": "0.10.0"
|
|
24
|
+
"shelljs": "0.10.0",
|
|
25
|
+
"which": "^5"
|
|
24
26
|
},
|
|
25
27
|
"devDependencies": {
|
|
26
28
|
"@oclif/plugin-command-snapshot": "^5.3.22",
|
|
27
29
|
"@salesforce/cli-plugins-testkit": "^5.3.58",
|
|
28
30
|
"@salesforce/dev-scripts": "^11.0.4",
|
|
29
|
-
"@salesforce/plugin-command-reference": "^3.1.
|
|
31
|
+
"@salesforce/plugin-command-reference": "^3.1.109",
|
|
30
32
|
"@salesforce/plugin-telemetry": "^3.8.23",
|
|
31
33
|
"@salesforce/ts-sinon": "^1.4.34",
|
|
34
|
+
"@types/cross-spawn": "^6.0.6",
|
|
32
35
|
"@types/shelljs": "^0.10.0",
|
|
33
36
|
"@types/sinon-chai": "^3.2.12",
|
|
37
|
+
"@types/which": "^3.0.4",
|
|
34
38
|
"eslint-plugin-sf-plugin": "^1.20.33",
|
|
35
39
|
"oclif": "^4.23.10",
|
|
40
|
+
"shelljs": "^0.10.0",
|
|
36
41
|
"sinon-chai": "^3.7.0",
|
|
37
42
|
"ts-node": "^10.9.2",
|
|
38
43
|
"typescript": "^5.9.3"
|
|
@@ -244,7 +249,7 @@
|
|
|
244
249
|
},
|
|
245
250
|
"type": "module",
|
|
246
251
|
"sfdx": {
|
|
247
|
-
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-trust/3.8.
|
|
248
|
-
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-trust/3.8.
|
|
252
|
+
"publicKeyUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-trust/3.8.16.crt",
|
|
253
|
+
"signatureUrl": "https://developer.salesforce.com/media/salesforce-cli/security/@salesforce/plugin-trust/3.8.16.sig"
|
|
249
254
|
}
|
|
250
255
|
}
|