From c46026fb1ce43c7c20f71e7b9d01fdc5eb867b57 Mon Sep 17 00:00:00 2001 From: Ajaypanchal4326 Date: Wed, 4 Feb 2026 20:23:53 +0530 Subject: [PATCH] fix: update @nodesecure/scanner to v10 --- README.md | 2 +- package.json | 2 +- src/analysis/scanner.ts | 2 +- test/api/report.spec.ts | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 03fea6a..7ec8b55 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ This project is designed to generate periodic security reports in both HTML and ## Features -- Automatically clones and scans Git repositories using **scanner.cwd**. +- Automatically clones and scans Git repositories using **scanner.workingDir**. - Provides a visual overview of **security threats** and quality issues for multiple Git or NPM packages. - Facilitates visualization of changes over time. - Generates reports in both **HTML** and **PDF** formats. diff --git a/package.json b/package.json index dd527fe..d07f76a 100644 --- a/package.json +++ b/package.json @@ -54,7 +54,7 @@ "@nodesecure/flags": "^3.0.3", "@nodesecure/ossf-scorecard-sdk": "^3.2.1", "@nodesecure/rc": "^5.0.0", - "@nodesecure/scanner": "^9.0.0", + "@nodesecure/scanner": "^10.0.0", "@nodesecure/utils": "^2.2.0", "@openally/mutex": "^2.0.0", "@topcli/spinner": "^4.0.0", diff --git a/src/analysis/scanner.ts b/src/analysis/scanner.ts index 05fc7c6..1615f87 100644 --- a/src/analysis/scanner.ts +++ b/src/analysis/scanner.ts @@ -45,7 +45,7 @@ export async function cwd( try { const name = `${path.basename(dir)}.json`; - const { dependencies } = await scanner.cwd(dir, { + const { dependencies } = await scanner.workingDir(dir, { maxDepth: 4, vulnerabilityStrategy: "none" }); diff --git a/test/api/report.spec.ts b/test/api/report.spec.ts index 68111ba..1a1684a 100644 --- a/test/api/report.spec.ts +++ b/test/api/report.spec.ts @@ -188,7 +188,7 @@ PDF or HTML for packages that don't have a scorecard`, async() => { }); }); -function isPDF(buf) { +function isPDF(buf: Buffer) { return ( Buffer.isBuffer(buf) && buf.lastIndexOf("%PDF-") === 0 && buf.lastIndexOf("%%EOF") > -1 );