Skip to content

fix(hooks): simplify check-new-deps to malware-only#595

Merged
John-David Dalton (jdalton) merged 1 commit intomainfrom
fix-check-new-deps-hook
Apr 17, 2026
Merged

fix(hooks): simplify check-new-deps to malware-only#595
John-David Dalton (jdalton) merged 1 commit intomainfrom
fix-check-new-deps-hook

Conversation

@jdalton
Copy link
Copy Markdown
Contributor

Summary

  • Drop low-score warning path from the check-new-deps hook; keep only the malware/critical-severity block.
  • Simplify checkDepsBatch return shape (now just CheckResult[] of blocks) and remove the unused LOW_SCORE_THRESHOLD, warned, and score fields.
  • Update README to match: no parallel-firewall/batch distinction, no low-score warning step.

Test plan

  • Edit a manifest file with a known-clean dep → hook exits 0.
  • Edit a manifest file with a malware/critical dep → hook exits 2 with block message.
  • Edit a non-manifest file → hook exits 0 without API call.

Remove low-score warnings and fix inaccurate comments.

The malware API only checks for malware, not quality scores. Remove
dead warned/score logic and the wrong SDK batch heuristic comment.
@socket-security-staging
Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​node@​24.9.21001008196100
Added@​socketregistry/​packageurl-js@​1.4.2100100100100100
Added@​socketsecurity/​lib@​5.18.2100100100100100
Added@​socketsecurity/​sdk@​4.0.1100100100100100

View full report

@socket-security-staging
Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @socketsecurity/lib is 98.0% likely obfuscated

Confidence: 0.98

Location: Package overview

From: .claude/hooks/check-new-deps/package-lock.jsonnpm/@socketsecurity/lib@5.18.2

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity-Staging ignore npm/@socketsecurity/lib@5.18.2. You can also ignore all packages with @SocketSecurity-Staging ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@jdalton John-David Dalton (jdalton) merged commit ebb9c49 into main Apr 17, 2026
11 checks passed
@jdalton John-David Dalton (jdalton) deleted the fix-check-new-deps-hook branch April 17, 2026 23:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants