Skip to content

feat: output JSON by default in scan sbom command; rename created files to herodevs.*#260

Merged
rlmestre merged 3 commits into
mainfrom
fix/sbom-default-to-json
Jun 17, 2025
Merged

feat: output JSON by default in scan sbom command; rename created files to herodevs.*#260
rlmestre merged 3 commits into
mainfrom
fix/sbom-default-to-json

Conversation

@rlmestre
Copy link
Copy Markdown
Contributor

@rlmestre rlmestre requested a review from a team as a code owner June 13, 2025 21:01
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR changes the default output of the scan sbom command to JSON and renames all generated files to use a herodevs prefix instead of eol.

  • Introduce filenamePrefix in config and apply it across services, commands, tests, and docs
  • Always output SBOM JSON by default and only write files when --save is used
  • Update tests, package scripts, and README to reflect the new herodevs.* naming

Reviewed Changes

Copilot reviewed 13 out of 13 changed files in this pull request and generated no comments.

Show a summary per file
File Description
test/service/sbom.background.test.ts Updated expected background log path to herodevs.sbom.json
test/service/purls.svc.test.ts Renamed test name to expect herodevs.purls.json
src/service/purls.svc.ts Updated doc comment to reference herodevs.purls.json
src/service/eol/sbom.worker.ts Imported filenamePrefix and used it for output path
src/config/constants.ts Added filenamePrefix constant
src/commands/scan/sbom.ts Always include --json, rename saved SBOM using prefix, and log JSON when not saving
src/commands/scan/eol.ts Renamed report paths and flag descriptions to use prefix
src/commands/report/purls.ts Renamed purls report output paths to use prefix
src/commands/report/committers.ts Renamed committers report output paths to use prefix
package.json Updated clean:files script to use herodevs prefix
e2e/scan/eol.test.ts Updated e2e paths to use filenamePrefix
README.md Updated flags/docs to reference herodevs.* files
Comments suppressed due to low confidence (2)

e2e/scan/eol.test.ts:11

  • The imported config is not used in this test file; consider removing it to avoid an unused import.
import { config, filenamePrefix } from '../../src/config/constants';

package.json:20

  • The clean:files script targets .text files, but generated committers reports use .txt. Update the pattern to herodevs.**.txt to clean those files correctly.
"clean:files": "shx rm -f herodevs.**.csv herodevs.**.json herodevs.**.text",

@rlmestre rlmestre force-pushed the fix/sbom-default-to-json branch from 007ace7 to 53a6f07 Compare June 16, 2025 12:37
@rlmestre rlmestre merged commit 0af875a into main Jun 17, 2025
21 of 24 checks passed
@rlmestre rlmestre deleted the fix/sbom-default-to-json branch June 17, 2025 14:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants