npmguard-cli 0.5.3 → 0.5.4

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.
@@ -11,6 +11,8 @@ function verdictLabel(verdict, score) {
11
11
  return chalk.yellow(`WARNING (${score})`);
12
12
  case "CRITICAL":
13
13
  return chalk.red(`CRITICAL (${score})`);
14
+ case "DANGEROUS":
15
+ return chalk.red.bold(`DANGEROUS (${score})`);
14
16
  default:
15
17
  return chalk.gray("UNKNOWN");
16
18
  }
@@ -55,7 +57,11 @@ export async function checkCommand(projectPath, auditSource) {
55
57
  for (const dep of deps) {
56
58
  const versionToCheck = dep.latest ?? dep.installed;
57
59
  let audit;
58
- if (!dep.hasUpdate) {
60
+ if (dep.installed.startsWith("http")) {
61
+ // IPFS/URL installs: audit against the latest registry version
62
+ audit = await auditSource.getAudit(dep.name, versionToCheck);
63
+ }
64
+ else if (!dep.hasUpdate) {
59
65
  audit = await auditSource.getAudit(dep.name, dep.installed);
60
66
  }
61
67
  else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "npmguard-cli",
3
- "version": "0.5.3",
3
+ "version": "0.5.4",
4
4
  "type": "module",
5
5
  "description": "Check npm packages against NpmGuard security audits on ENS before installing",
6
6
  "bin": "./dist/index.js",