@vscode/vsce 3.4.1-0 → 3.4.1
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/out/package.js +3 -0
- package/out/secretLint.js +12 -2
- package/package.json +1 -1
package/out/package.js
CHANGED
|
@@ -1568,6 +1568,9 @@ var FileExclusionType;
|
|
|
1568
1568
|
FileExclusionType["PackageFiles"] = "package.files";
|
|
1569
1569
|
})(FileExclusionType || (FileExclusionType = {}));
|
|
1570
1570
|
async function scanFilesForSecrets(files, fileExclusion, options) {
|
|
1571
|
+
if (options.allowPackageAllSecrets && options.allowPackageEnvFile) {
|
|
1572
|
+
return; // No need to scan
|
|
1573
|
+
}
|
|
1571
1574
|
const onDiskFiles = files.filter(file => !isInMemoryFile(file));
|
|
1572
1575
|
const inMemoryFiles = files.filter(file => isInMemoryFile(file));
|
|
1573
1576
|
const onDiskResult = await (0, secretLint_1.lintFiles)(onDiskFiles.map(file => file.localPath));
|
package/out/secretLint.js
CHANGED
|
@@ -12,8 +12,18 @@ const lintConfig = {
|
|
|
12
12
|
id: "@secretlint/secretlint-rule-preset-recommend",
|
|
13
13
|
rules: [
|
|
14
14
|
{
|
|
15
|
-
|
|
16
|
-
|
|
15
|
+
id: "@secretlint/secretlint-rule-basicauth",
|
|
16
|
+
allowMessageIds: ["BasicAuth"]
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
id: "@secretlint/secretlint-rule-privatekey",
|
|
20
|
+
options: {
|
|
21
|
+
allows: [
|
|
22
|
+
// Allow all keys which do not start and end with the BEGIN/END PRIVATE KEY and has at least 50 characters in between
|
|
23
|
+
// https://github.com/microsoft/vscode-vsce/issues/1147
|
|
24
|
+
"/^(?![\\s\\S]*-----BEGIN .*PRIVATE KEY-----[A-Za-z0-9+/=\\r\\n]{50,}-----END .*PRIVATE KEY-----)[\\s\\S]*$/"
|
|
25
|
+
]
|
|
26
|
+
}
|
|
17
27
|
}
|
|
18
28
|
]
|
|
19
29
|
}, {
|