@nodesecure/scanner 3.2.0 → 3.2.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/package.json +1 -1
- package/src/utils/warnings.js +5 -4
package/package.json
CHANGED
package/src/utils/warnings.js
CHANGED
|
@@ -8,7 +8,7 @@ const kWarningsMessages = Object.freeze({
|
|
|
8
8
|
iohook: getToken("warnings.keylogging")
|
|
9
9
|
});
|
|
10
10
|
const kPackages = new Set(Object.keys(kWarningsMessages));
|
|
11
|
-
const kAuthors = new Set(["
|
|
11
|
+
const kAuthors = new Set(["marak", "marak.squires@gmail.com"]);
|
|
12
12
|
|
|
13
13
|
function getWarning(depName) {
|
|
14
14
|
return `${kDetectedDep(depName)} ${kWarningsMessages[depName]}`;
|
|
@@ -24,9 +24,10 @@ export function getDependenciesWarnings(dependencies) {
|
|
|
24
24
|
|
|
25
25
|
// TODO: optimize with @nodesecure/author later
|
|
26
26
|
for (const [packageName, dependency] of dependencies) {
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
for (const { name, email } of dependency.metadata.maintainers) {
|
|
28
|
+
if (kAuthors.has(name) || kAuthors.has(email)) {
|
|
29
|
+
warnings.push(`'Marak Squires' package '${packageName}' has been detected in the dependency tree`);
|
|
30
|
+
}
|
|
30
31
|
}
|
|
31
32
|
}
|
|
32
33
|
|