Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(SBOMER-297): rebuild purls using Syft information #1094

Merged
merged 3 commits into from
Jan 15, 2025

Conversation

vibe13
Copy link
Contributor

@vibe13 vibe13 commented Jan 14, 2025

No description provided.

@vibe13 vibe13 requested a review from goldmann January 14, 2025 13:30
@goldmann goldmann requested a review from janinko January 14, 2025 15:42
@@ -50,7 +50,7 @@ public static String sanitizePurl(String purl) {
return parsedPurl.canonicalize();
} catch (MalformedPackageURLException e) {
// If parsing fails, proceed to manual sanitization
log.error("Malformed PURL detected, attempting to sanitize: {}", e.getMessage());
log.error("Malformed PURL detected, attempting to sanitize: {}", purl, e.getMessage());
Copy link
Contributor

Choose a reason for hiding this comment

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

You now miss {} for the exception message. Or did you mean thins toi include stacktrace?

Suggested change
log.error("Malformed PURL detected, attempting to sanitize: {}", purl, e.getMessage());
log.error("Malformed PURL detected, attempting to sanitize: " + purl, e);

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah thanks I meant to get rid of the error message and stacktrace entirely, I overlooked!

if (bom.getMetadata() != null && bom.getMetadata().getComponent() != null) {
Component mainComponent = bom.getMetadata().getComponent();
addMissingNpmDependencies(bom, mainComponent);
// Add missing NPM Depenencies for CycloneDxGenerateOperationComand manifest
if (mainComponent.getDescription() != null && mainComponent.getDescription().contains(SBOM_REPRESENTING_THE_DELIVERABLE)) {
if (mainComponent.getDescription() != null
&& mainComponent.getDescription().contains(SBOM_REPRESENTING_THE_DELIVERABLE)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Is this just formating? Shoudl I be doing something on my side to produce properly formated code?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is, but I don't recall making any particular setting.... I see we have the formatter-maven-plugin configured, but that is it...

janinko
janinko previously approved these changes Jan 15, 2025
@vibe13 vibe13 merged commit 36bd910 into project-ncl:main Jan 15, 2025
7 checks passed
@vibe13 vibe13 deleted the SBOMER-297 branch January 15, 2025 12:58
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.

2 participants