{"id":26326570,"url":"https://github.com/sharafdin/depscanner","last_synced_at":"2025-03-15T19:49:39.489Z","repository":{"id":269640930,"uuid":"905140200","full_name":"sharafdin/depScanner","owner":"sharafdin","description":"depScanner: A fast and lightweight CLI tool built with Rust to scan npm, Yarn, pnpm, and Bun lock files for vulnerabilities. Simple, secure, and efficient. 🚀","archived":false,"fork":false,"pushed_at":"2024-12-18T09:44:45.000Z","size":16,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T06:53:23.118Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sharafdin.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-12-18T08:40:32.000Z","updated_at":"2024-12-18T15:27:16.000Z","dependencies_parsed_at":"2024-12-25T04:54:04.107Z","dependency_job_id":"434344b5-cfb8-48a1-8eac-b6ca1cbef9ee","html_url":"https://github.com/sharafdin/depScanner","commit_stats":null,"previous_names":["sharafdin/depscanner"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharafdin%2FdepScanner","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharafdin%2FdepScanner/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharafdin%2FdepScanner/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sharafdin%2FdepScanner/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sharafdin","download_url":"https://codeload.github.com/sharafdin/depScanner/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243784091,"owners_count":20347409,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-03-15T19:49:38.493Z","updated_at":"2025-03-15T19:49:39.466Z","avatar_url":"https://github.com/sharafdin.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# **depScanner**\n\n**depScanner** is a lightweight and efficient dependency scanner tool that analyzes lock files (e.g., `package-lock.json`, `yarn.lock`, `pnpm-lock.yaml`, `bun.lockb`) and `package.json` for vulnerabilities. Built with Rust, it helps developers ensure their dependencies are secure and up-to-date.\n\n---\n\n## **Features**\n\n- Scans lock files for exact dependency versions.\n- Supports multiple formats:\n  - `package-lock.json`\n  - `yarn.lock`\n  - `pnpm-lock.yaml`\n  - `bun.lockb`\n  - Fallback to `package.json`.\n- Identifies known vulnerabilities using public advisory APIs.\n- Provides a clean, CLI-friendly vulnerability report.\n- Fast and memory-efficient, powered by Rust.\n\n---\n\n## **Getting Started**\n\nTo use **depScanner**, choose one of the following methods:\n\n### **Using Rust Locally**\nIf you want to run depScanner natively on your machine, follow these steps:\n\n1. Ensure you have [Rust](https://www.rust-lang.org/) installed.\n\n2. Clone the repository:\n\n   ```bash\n   git clone https://github.com/your-username/depScanner.git\n   cd depScanner\n   ```\n\n3. Build the project:\n\n   ```bash\n   cargo build --release\n   ```\n\n4. Run the binary:\n\n   ```bash\n   ./target/release/depScanner \u003cpath-to-lockfile-or-package.json\u003e\n   ```\n\n### **Using Docker (Recommended)**\nFor a hassle-free setup, use the Docker image to run depScanner:\n\n1. Build the Docker image:\n\n   ```bash\n   docker build -t dep-scanner .\n   ```\n\n2. Run the Docker container:\n\n   ```bash\n   docker run --rm -v $(pwd):/app dep-scanner ./depScanner /app/\u003clock-file-or-package.json\u003e\n   ```\n\n   Replace `\u003clock-file-or-package.json\u003e` with the path to your dependency file.\n\n---\n\n## **Usage**\n\n### **Basic Command**\n\nScan a lock file or `package.json`:\n\n```bash\n./depScanner \u003cpath-to-lockfile-or-package.json\u003e\n```\n\n### **Examples**\n\n1. Scan a `package-lock.json` file:\n\n   ```bash\n   ./depScanner ./package-lock.json\n   ```\n\n2. Scan a `yarn.lock` file:\n\n   ```bash\n   ./depScanner ./yarn.lock\n   ```\n\n3. Scan a `pnpm-lock.yaml` file:\n\n   ```bash\n   ./depScanner ./pnpm-lock.yaml\n   ```\n\n4. Fallback to `package.json` if lock files are unavailable:\n\n   ```bash\n   ./depScanner ./package.json\n   ```\n\n5. Using Docker to scan a file:\n\n   ```bash\n   docker run --rm -v $(pwd):/app dep-scanner ./depScanner /app/package-lock.json\n   ```\n\n---\n\n## **Output**\n\nThe CLI displays a vulnerability report like this:\n\n```plaintext\nDependency Vulnerability Report\nPackage                        Version         Issues\n--------------------------------------------------------------------------------\nlodash                         4.17.20        Prototype Pollution\nexpress                        4.17.1         XSS Vulnerability\nchalk                          2.4.2          No issues found\n```\n\n- **Red**: Vulnerable dependencies.\n- **Green**: No vulnerabilities found.\n\n---\n\n## **Supported Formats**\n\n- `package-lock.json` (npm)\n- `yarn.lock` (Yarn)\n- `pnpm-lock.yaml` (pnpm)\n- `bun.lockb` (Bun)\n- `package.json` (Fallback for declared dependencies)\n\n---\n\n## **License**\n\nThis project is licensed under the [MIT License](./LICENSE).\n\n---\n\n## **Acknowledgments**\n\n- Built with ❤️ using Rust.\n- Inspired by the need for secure dependency management.\n\n---","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharafdin%2Fdepscanner","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharafdin%2Fdepscanner","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharafdin%2Fdepscanner/lists"}