Skip to content

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

JS Package Scanner

A lightweight JavaScript-based dependency scanner that helps prevent vulnerable or blacklisted packages from being pushed to a GitHub repository.

This tool integrates directly with **Git hooks and prep push ** to block unsafe code before it reaches remote repositories.

What It Does

This script scans your projectโ€™s installed dependencies and checks them against a hardcoded list of vulnerable packages.

If a match is found:

  • โŒ The Git push is blocked
  • โš ๏ธ A warning is displayed in the terminal
  • ๐Ÿ”’ The process exits with a failure code

๐Ÿš€ How It Works

  1. Reads package-lock.json
  2. Iterates through all installed dependencies
  3. Compares them against a predefined blacklist
  4. If a vulnerable package/version is found:
    • Logs the issue
    • Stops the Git push process

๐Ÿ”— GitHub Workflow Integration

This tool is designed to run inside a Git pre-push hook:

Current MVP

At the moment, the scanner is intentionally simple and uses a hardcoded list of vulnerable packages This project is designed to evolve into a full dependency intelligence system. with developments such as Semantic version range checking (^4.0.0, >=1.2.0) , Pattern-based vulnerability detection , Confidence scoring for risk levels , Multi-Lockfile Support , amongst others

About

npm repository vulnerable dependency analyser

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages