@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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@nodesecure/scanner",
3
- "version": "3.2.0",
3
+ "version": "3.2.1",
4
4
  "description": "A package API to run a static analysis of your module's dependencies.",
5
5
  "exports": "./index.js",
6
6
  "engines": {
@@ -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(["Marak Squires"]);
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 author = dependency.metadata.author?.name ?? null;
28
- if (kAuthors.has(author)) {
29
- warnings.push(`'${author}' package '${packageName}' has been detected in the dependency tree`);
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