Skip to content

Commit

Permalink
fix: support libraries without organization prefix (#335)
Browse files Browse the repository at this point in the history
* fix: support libraries without organization prefix

* chore: update @nodesecure/ossf-scorecard-sdk
  • Loading branch information
PierreDemailly authored Mar 11, 2024
1 parent 61d1f9f commit 6698c9f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
"homepage": "https://github.com/NodeSecure/report#readme",
"dependencies": {
"@nodesecure/flags": "^2.4.0",
"@nodesecure/ossf-scorecard-sdk": "^3.2.0",
"@nodesecure/ossf-scorecard-sdk": "^3.2.1",
"@nodesecure/rc": "^1.5.0",
"@nodesecure/scanner": "^5.2.1",
"@nodesecure/utils": "^1.2.0",
Expand Down
3 changes: 2 additions & 1 deletion src/analysis/extractScannerData.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,8 @@ export async function buildStatsFromNsecurePayloads(payloadFiles = [], options =

if (!(name in stats.packages)) {
const isGiven = config.npm?.packages.includes(name);
const fullName = isGiven ? `${config.npm.organizationPrefix}/${name}` : name;
const org = config.npm?.organizationPrefix;
const fullName = isGiven && org ? `${org}/${name}` : name;
if (isThird) {
stats.packages_count.external++;
}
Expand Down

0 comments on commit 6698c9f

Please sign in to comment.