Skip to content

Commit 6698c9f

Browse files
fix: support libraries without organization prefix (#335)
* fix: support libraries without organization prefix * chore: update @nodesecure/ossf-scorecard-sdk
1 parent 61d1f9f commit 6698c9f

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@
3838
"homepage": "https://github.com/NodeSecure/report#readme",
3939
"dependencies": {
4040
"@nodesecure/flags": "^2.4.0",
41-
"@nodesecure/ossf-scorecard-sdk": "^3.2.0",
41+
"@nodesecure/ossf-scorecard-sdk": "^3.2.1",
4242
"@nodesecure/rc": "^1.5.0",
4343
"@nodesecure/scanner": "^5.2.1",
4444
"@nodesecure/utils": "^1.2.0",

src/analysis/extractScannerData.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,8 @@ export async function buildStatsFromNsecurePayloads(payloadFiles = [], options =
7575

7676
if (!(name in stats.packages)) {
7777
const isGiven = config.npm?.packages.includes(name);
78-
const fullName = isGiven ? `${config.npm.organizationPrefix}/${name}` : name;
78+
const org = config.npm?.organizationPrefix;
79+
const fullName = isGiven && org ? `${org}/${name}` : name;
7980
if (isThird) {
8081
stats.packages_count.external++;
8182
}

0 commit comments

Comments
 (0)