Skip to content

feat: add Generate SBOM action to IntelliJ plugin#258

Merged
a-oren merged 2 commits into
redhat-developer:mainfrom
a-oren:TC-3994
Apr 30, 2026
Merged

feat: add Generate SBOM action to IntelliJ plugin#258
a-oren merged 2 commits into
redhat-developer:mainfrom
a-oren:TC-3994

Conversation

@a-oren

@a-oren a-oren commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Add "Generate SBOM" context menu action that generates a CycloneDX SBOM from supported manifest files and saves to a user-chosen location via native Save File dialog
  • Add ApiService.generateSbom() method with telemetry tracking (sbom-generation event)
  • Bump trustify-da-java-client to 0.0.17 and trustify-da-api-spec to 2.0.7

Test plan

  • Right-click a supported manifest file (pom.xml, package.json, etc.) — "Generate SBOM" appears in context menu
  • Clicking the action opens a Save File dialog with default filename bom.json
  • SBOM is saved in CycloneDX JSON format to the chosen location
  • Success notification is shown after saving
  • Error dialog is shown on failure
  • Action does not appear for unsupported files
  • Unit tests pass (./gradlew test)

Resolves: TC-3994
Depends on: TC-3991

🤖 Generated with Claude Code

@a-oren

a-oren commented Apr 28, 2026

Copy link
Copy Markdown
Collaborator Author

/review

@ruromero
ruromero self-requested a review April 29, 2026 07:06
@ruromero

Copy link
Copy Markdown
Collaborator

/review

@qodo-code-review

Copy link
Copy Markdown
ⓘ You've reached your Qodo monthly free-tier limit. Reviews pause until next month — upgrade your plan to continue now, or link your paid account if you already have one.

@ruromero ruromero left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks Adva, some minor changes

Comment thread src/main/java/org/jboss/tools/intellij/exhort/ApiService.java Outdated
Comment thread src/main/java/org/jboss/tools/intellij/stackanalysis/GenerateSbomAction.java Outdated
Comment thread src/main/java/org/jboss/tools/intellij/stackanalysis/GenerateSbomAction.java Outdated
Comment thread src/main/java/org/jboss/tools/intellij/exhort/ApiService.java Outdated
a-oren and others added 2 commits April 30, 2026 12:10
Add a "Generate SBOM" context menu action that generates a CycloneDX SBOM
from supported manifest files and saves it to a user-chosen location via
the native Save File dialog. Includes telemetry tracking and README docs.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Use packageManager instead of manifestName for ECOSYSTEM telemetry
- Add project.isDisposed() checks in invokeLater blocks
- Extract shared supportedManifestFiles list to SaUtils.SUPPORTED_MANIFEST_FILES

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@sonarqubecloud

Copy link
Copy Markdown

@a-oren
a-oren requested a review from ruromero April 30, 2026 09:15
@a-oren

a-oren commented Apr 30, 2026

Copy link
Copy Markdown
Collaborator Author

Verification Report for TC-3994 (commit d05bf2a)

Check Result Details
Review Feedback PASS 5 code change requests from ruromero — all addressed in commit d05bf2a
Root-Cause Investigation N/A No unresolved sub-tasks to investigate
Scope Containment WARN Out-of-scope files: SaAction.java, SaUtils.java (review feedback refactoring), PyprojectCAAnnotatorTest.java, ApiServiceTest.java (tests)
Diff Size PASS 231 additions, 28 deletions, 8 files — proportionate to task scope
Commit Traceability WARN 1 of 2 commits references TC-3994; second commit "fix: address PR review feedback for Generate SBOM action" is missing the issue ID
Sensitive Patterns PASS No sensitive patterns detected
CI Status PASS All 7 checks pass (SonarCloud, build-linux, build-macos, build-windows, main, verify, SonarCloud Code Analysis)
Acceptance Criteria PASS 8 of 8 criteria met
Test Quality WARN PyprojectCAAnnotatorTest: ~11 methods are parameterization candidates; ApiServiceTest: test methods missing doc comments
Verification Commands N/A No verification commands specified in task

Overall: WARN

Items requiring attention:

  1. Commit Traceability — The fix commit d05bf2a does not reference TC-3994 in the message headline or body. Consider amending or noting in future commits.
  2. Scope Containment — 4 files not listed in the task's Files to Modify/Create sections were changed. SaAction.java and SaUtils.java changes are justified (review feedback to extract shared manifest list). ApiServiceTest.java is justified (Test Requirements). PyprojectCAAnnotatorTest.java appears unrelated to this task.
  3. Test Quality (advisory)PyprojectCAAnnotatorTest has multiple test methods with identical structure that could be parameterized. ApiServiceTest test methods lack JavaDoc comments.

Acceptance Criteria Detail

# Criterion Result
1 "Generate SBOM" action in Find Action dialog PASS — registered in plugin.xml with id generateSbom
2 Action in editor and explorer context menus PASS — added to EditorPopupMenu, NavBarToolBar, ProjectViewPopupMenu
3 Save File dialog with default filename bom.json PASS — FileSaverDescriptor with "json" extension, default "bom.json"
4 SBOM in CycloneDX JSON format saved to chosen location PASS — delegates to Api.generateSbom(), writes via Files.writeString()
5 Success notification shown after saving PASS — NotificationGroupManager info notification
6 Error handled with user-visible message PASS — Messages.showErrorDialog() in catch block
7 Telemetry event sbom-generation with ecosystem property PASS — TelemetryService.instance().action("sbom-generation") with ECOSYSTEM property, sent on success and error
8 README.md documents the new action PASS — Generate SBOM feature documented

This comment was AI-generated by sdlc-workflow/verify-pr v0.5.11.

@a-oren
a-oren merged commit 87ab401 into redhat-developer:main Apr 30, 2026
7 checks passed
@a-oren
a-oren deleted the TC-3994 branch April 30, 2026 12:37
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