feat: output JSON by default in scan sbom command; rename created files to herodevs.*#260
Merged
Conversation
There was a problem hiding this comment.
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
filenamePrefixin config and apply it across services, commands, tests, and docs - Always output SBOM JSON by default and only write files when
--saveis 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
configis 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:filesscript targets.textfiles, but generated committers reports use.txt. Update the pattern toherodevs.**.txtto clean those files correctly.
"clean:files": "shx rm -f herodevs.**.csv herodevs.**.json herodevs.**.text",
KLongmuirHD
approved these changes
Jun 16, 2025
007ace7 to
53a6f07
Compare
edezekiel
approved these changes
Jun 17, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See individual commits.
Closes https://github.com/neverendingsupport/data-and-integrations/issues/61
Closes https://github.com/neverendingsupport/data-and-integrations/issues/59