From 9f202cf2c0deee1ca3c812c77001e24ec50ef239 Mon Sep 17 00:00:00 2001 From: jdalton Date: Fri, 24 Jul 2026 14:30:33 -0400 Subject: [PATCH] fix(package): correct mislabeled header in deep score markdown The transitive section of `socket package score --markdown` emitted `### Capabilities` twice. The first was mislabeled: its body lists the lowest-scoring package per score category, not capabilities. Rename that header to `### Lowest Scoring Package Per Category` so the two sections are distinct and correctly labeled. Snapshots updated. Fixes #1356 --- .../cli/src/commands/package/output-purls-deep-score.mts | 2 +- .../output-purls-deep-score-nuget-maven-python.test.mts | 6 +++--- .../unit/commands/package/output-purls-deep-score.test.mts | 6 +++--- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/cli/src/commands/package/output-purls-deep-score.mts b/packages/cli/src/commands/package/output-purls-deep-score.mts index f10646c347..4a2d0058e9 100644 --- a/packages/cli/src/commands/package/output-purls-deep-score.mts +++ b/packages/cli/src/commands/package/output-purls-deep-score.mts @@ -133,7 +133,7 @@ export function createMarkdownReport(data: PurlDataResponse): string { o.push(`- Vulnerability: ${score.vulnerability}`) o.push(`- License: ${score.license}`) o.push('') - o.push('### Capabilities') + o.push('### Lowest Scoring Package Per Category') o.push('') o.push( 'These are the packages with the lowest recorded score. If there is more than one with the lowest score, just one is shown here. This may help you figure out the source of low scores.', diff --git a/packages/cli/test/unit/commands/package/output-purls-deep-score-nuget-maven-python.test.mts b/packages/cli/test/unit/commands/package/output-purls-deep-score-nuget-maven-python.test.mts index 44a381c864..4419f80244 100644 --- a/packages/cli/test/unit/commands/package/output-purls-deep-score-nuget-maven-python.test.mts +++ b/packages/cli/test/unit/commands/package/output-purls-deep-score-nuget-maven-python.test.mts @@ -71,7 +71,7 @@ describe('package score output', async () => { - Vulnerability: 84 - License: 100 - ### Capabilities + ### Lowest Scoring Package Per Category These are the packages with the lowest recorded score. If there is more than one with the lowest score, just one is shown here. This may help you figure out the source of low scores. @@ -163,7 +163,7 @@ describe('package score output', async () => { - Vulnerability: 25 - License: 50 - ### Capabilities + ### Lowest Scoring Package Per Category These are the packages with the lowest recorded score. If there is more than one with the lowest score, just one is shown here. This may help you figure out the source of low scores. @@ -268,7 +268,7 @@ describe('package score output', async () => { - Vulnerability: 100 - License: 70 - ### Capabilities + ### Lowest Scoring Package Per Category These are the packages with the lowest recorded score. If there is more than one with the lowest score, just one is shown here. This may help you figure out the source of low scores. diff --git a/packages/cli/test/unit/commands/package/output-purls-deep-score.test.mts b/packages/cli/test/unit/commands/package/output-purls-deep-score.test.mts index 17f56e766e..109cdb6fbc 100644 --- a/packages/cli/test/unit/commands/package/output-purls-deep-score.test.mts +++ b/packages/cli/test/unit/commands/package/output-purls-deep-score.test.mts @@ -106,7 +106,7 @@ describe('package score output', async () => { - Vulnerability: 25 - License: 80 - ### Capabilities + ### Lowest Scoring Package Per Category These are the packages with the lowest recorded score. If there is more than one with the lowest score, just one is shown here. This may help you figure out the source of low scores. @@ -212,7 +212,7 @@ describe('package score output', async () => { - Vulnerability: 84 - License: 70 - ### Capabilities + ### Lowest Scoring Package Per Category These are the packages with the lowest recorded score. If there is more than one with the lowest score, just one is shown here. This may help you figure out the source of low scores. @@ -311,7 +311,7 @@ describe('package score output', async () => { - Vulnerability: 72 - License: 70 - ### Capabilities + ### Lowest Scoring Package Per Category These are the packages with the lowest recorded score. If there is more than one with the lowest score, just one is shown here. This may help you figure out the source of low scores.