This is an automated email from the ASF dual-hosted git repository.

epugh pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/solr-mcp.git


The following commit(s) were added to refs/heads/main by this push:
     new 82bd57a  feat(build): generate CycloneDX SBOM for every release 
artifact (#142)
82bd57a is described below

commit 82bd57ad4dbf07eb1d9a18071a1561c83714521e
Author: Aditya Parikh <[email protected]>
AuthorDate: Sat Jun 13 13:20:59 2026 -0400

    feat(build): generate CycloneDX SBOM for every release artifact (#142)
    
    Add the top-level Apache License 2.0 text and NOTICE file required by ASF 
release policy, and bundle them into the META-INF directory of every JAR 
produced by the build (main, bootJar, sources, javadoc).
    
    See https://www.apache.org/legal/release-policy.html#licensing-documentation
    Apply org.cyclonedx.bom Gradle plugin. Spring Boot 3.5's
    CycloneDxPluginAction auto-wires bootJar to embed the generated SBOM at
    META-INF/sbom/application.cdx.json, so every distribution (JAR, Jib JVM
    image, both Paketo native images) ships the embedded SBOM via bootJar
    packaging — no per-image wiring.
    
    ---------
    
    Signed-off-by: Aditya Parikh <[email protected]>
    Signed-off-by: adityamparikh <[email protected]>
    Co-authored-by: Claude <[email protected]>
---
 .github/workflows/build-and-publish.yml            |  13 +
 .github/workflows/release-publish.yml              |  38 +-
 AGENTS.md                                          |  16 +
 LICENSE                                            | 201 ++++++
 NOTICE                                             |   5 +
 README.md                                          |  38 ++
 build.gradle.kts                                   |  12 +
 .../plans/2026-06-05-sbom-generation.md            | 673 +++++++++++++++++++++
 .../specs/2026-06-05-sbom-generation-design.md     | 160 +++++
 gradle/libs.versions.toml                          |   2 +
 src/main/resources/application-http.properties     |   1 +
 11 files changed, 1156 insertions(+), 3 deletions(-)

diff --git a/.github/workflows/build-and-publish.yml 
b/.github/workflows/build-and-publish.yml
index 18d5d1c..d195b76 100644
--- a/.github/workflows/build-and-publish.yml
+++ b/.github/workflows/build-and-publish.yml
@@ -149,6 +149,19 @@ jobs:
                     path: build/libs/solr-mcp-*.jar
                     retention-days: 7
 
+            # Upload the CycloneDX SBOM produced during the build
+            # build/reports/application.cdx.json is generated by the cyclonedx
+            # Gradle plugin and is also embedded in the bootable JAR. Retained
+            # for 30 days (longer than the standard 7) because supply-chain
+            # investigations often happen well after a build.
+            -   name: Upload SBOM artifact
+                if: always()
+                uses: actions/upload-artifact@v4
+                with:
+                    name: solr-mcp-sbom
+                    path: build/reports/application.cdx.json
+                    retention-days: 30
+
             # Upload JUnit test results
             # if: always() ensures this runs even if the build fails
             # This allows viewing test results for failed builds
diff --git a/.github/workflows/release-publish.yml 
b/.github/workflows/release-publish.yml
index a89f0ba..f4eb779 100644
--- a/.github/workflows/release-publish.yml
+++ b/.github/workflows/release-publish.yml
@@ -244,10 +244,42 @@ jobs:
             -Djib.to.tags=${{ inputs.release_version }},latest
 
       - name: Generate SBOM (Software Bill of Materials)
+        # The CycloneDX plugin is wired in build.gradle.kts; bootJar already
+        # depends on cyclonedxBom transitively. Running it explicitly here
+        # ensures build/reports/application.cdx.json exists for the upload
+        # steps below even if the `Build project` step above used a cached
+        # bootJar output.
+        run: ./gradlew cyclonedxBom
+
+      - name: Upload SBOM as workflow artifact
+        if: always()
+        uses: actions/upload-artifact@v4
+        with:
+          # The release_version input is constrained by validate-release; safe 
to
+          # interpolate into the artifact name.
+          name: solr-mcp-sbom-${{ inputs.release_version }}
+          path: build/reports/application.cdx.json
+          retention-days: 90
+
+      - name: Attach SBOM to GitHub Release
+        env:
+          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          # Pass the release_version through env so the shell sees a quoted
+          # variable instead of an inline ${{ }} expansion (defence-in-depth
+          # against actions-injection, even though release_version is already
+          # validated by validate-release).
+          RELEASE_VERSION: ${{ inputs.release_version }}
         run: |
-          # Generate SBOM for the release
-          # This helps with supply chain security
-          ./gradlew cyclonedxBom || echo "SBOM generation not configured"
+          # Rename to include the version so the asset is unambiguous on the 
release page.
+          cp build/reports/application.cdx.json 
"solr-mcp-${RELEASE_VERSION}.cdx.json"
+          # --clobber lets re-runs of this workflow replace a previously 
uploaded SBOM.
+          # If the v<version> GitHub Release does not exist yet, log and 
continue —
+          # the workflow artifact above is still captured.
+          if gh release view "v${RELEASE_VERSION}" >/dev/null 2>&1; then
+            gh release upload "v${RELEASE_VERSION}" 
"solr-mcp-${RELEASE_VERSION}.cdx.json" --clobber
+          else
+            echo "GitHub Release v${RELEASE_VERSION} does not exist yet; SBOM 
available as workflow artifact only."
+          fi
 
       - name: Create release announcement
         run: |
diff --git a/AGENTS.md b/AGENTS.md
index 4d9e30d..072774e 100644
--- a/AGENTS.md
+++ b/AGENTS.md
@@ -24,6 +24,9 @@ Solr MCP Server is a Spring AI Model Context Protocol (MCP) 
server that enables
 ./gradlew test --tests "*IntegrationTest"    # Run integration tests
 ./gradlew test jacocoTestReport              # Tests with coverage report
 
+# SBOM (Software Bill of Materials)
+./gradlew cyclonedxBom                       # Generate 
build/reports/application.cdx.json
+
 # Code formatting (REQUIRED before commit)
 ./gradlew spotlessApply            # Apply formatting
 ./gradlew spotlessCheck            # Check formatting
@@ -115,6 +118,19 @@ Four service classes expose MCP tools via `@McpTool` 
annotations:
 
 Configuration files: `application-stdio.properties`, 
`application-http.properties`
 
+### SBOM Architecture
+
+CycloneDX SBOM generation is wired by applying the `org.cyclonedx.bom` plugin
+(version 2.4.1, matching what Spring Initializr ships for Spring Boot 3.5.14).
+Spring Boot's `CycloneDxPluginAction` auto-configures `cyclonedxBom` and makes
+the bootJar embed the result at `META-INF/sbom/application.cdx.json`; the
+actuator serves it at `/actuator/sbom/application` in the `http` profile
+(enabled via `application-http.properties`). Both the Jib JVM image and the
+Paketo native images package the bootJar contents, so every distribution
+artifact ships the SBOM without per-image wiring.
+
+Spec: 
[docs/superpowers/specs/2026-06-05-sbom-generation-design.md](docs/superpowers/specs/2026-06-05-sbom-generation-design.md)
+
 ### Logging Architecture
 
 The STDIO transport uses stdout for JSON-RPC messages, so any stray stdout 
output
diff --git a/LICENSE b/LICENSE
new file mode 100644
index 0000000..261eeb9
--- /dev/null
+++ b/LICENSE
@@ -0,0 +1,201 @@
+                                 Apache License
+                           Version 2.0, January 2004
+                        http://www.apache.org/licenses/
+
+   TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
+
+   1. Definitions.
+
+      "License" shall mean the terms and conditions for use, reproduction,
+      and distribution as defined by Sections 1 through 9 of this document.
+
+      "Licensor" shall mean the copyright owner or entity authorized by
+      the copyright owner that is granting the License.
+
+      "Legal Entity" shall mean the union of the acting entity and all
+      other entities that control, are controlled by, or are under common
+      control with that entity. For the purposes of this definition,
+      "control" means (i) the power, direct or indirect, to cause the
+      direction or management of such entity, whether by contract or
+      otherwise, or (ii) ownership of fifty percent (50%) or more of the
+      outstanding shares, or (iii) beneficial ownership of such entity.
+
+      "You" (or "Your") shall mean an individual or Legal Entity
+      exercising permissions granted by this License.
+
+      "Source" form shall mean the preferred form for making modifications,
+      including but not limited to software source code, documentation
+      source, and configuration files.
+
+      "Object" form shall mean any form resulting from mechanical
+      transformation or translation of a Source form, including but
+      not limited to compiled object code, generated documentation,
+      and conversions to other media types.
+
+      "Work" shall mean the work of authorship, whether in Source or
+      Object form, made available under the License, as indicated by a
+      copyright notice that is included in or attached to the work
+      (an example is provided in the Appendix below).
+
+      "Derivative Works" shall mean any work, whether in Source or Object
+      form, that is based on (or derived from) the Work and for which the
+      editorial revisions, annotations, elaborations, or other modifications
+      represent, as a whole, an original work of authorship. For the purposes
+      of this License, Derivative Works shall not include works that remain
+      separable from, or merely link (or bind by name) to the interfaces of,
+      the Work and Derivative Works thereof.
+
+      "Contribution" shall mean any work of authorship, including
+      the original version of the Work and any modifications or additions
+      to that Work or Derivative Works thereof, that is intentionally
+      submitted to Licensor for inclusion in the Work by the copyright owner
+      or by an individual or Legal Entity authorized to submit on behalf of
+      the copyright owner. For the purposes of this definition, "submitted"
+      means any form of electronic, verbal, or written communication sent
+      to the Licensor or its representatives, including but not limited to
+      communication on electronic mailing lists, source code control systems,
+      and issue tracking systems that are managed by, or on behalf of, the
+      Licensor for the purpose of discussing and improving the Work, but
+      excluding communication that is conspicuously marked or otherwise
+      designated in writing by the copyright owner as "Not a Contribution."
+
+      "Contributor" shall mean Licensor and any individual or Legal Entity
+      on behalf of whom a Contribution has been received by Licensor and
+      subsequently incorporated within the Work.
+
+   2. Grant of Copyright License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      copyright license to reproduce, prepare Derivative Works of,
+      publicly display, publicly perform, sublicense, and distribute the
+      Work and such Derivative Works in Source or Object form.
+
+   3. Grant of Patent License. Subject to the terms and conditions of
+      this License, each Contributor hereby grants to You a perpetual,
+      worldwide, non-exclusive, no-charge, royalty-free, irrevocable
+      (except as stated in this section) patent license to make, have made,
+      use, offer to sell, sell, import, and otherwise transfer the Work,
+      where such license applies only to those patent claims licensable
+      by such Contributor that are necessarily infringed by their
+      Contribution(s) alone or by combination of their Contribution(s)
+      with the Work to which such Contribution(s) was submitted. If You
+      institute patent litigation against any entity (including a
+      cross-claim or counterclaim in a lawsuit) alleging that the Work
+      or a Contribution incorporated within the Work constitutes direct
+      or contributory patent infringement, then any patent licenses
+      granted to You under this License for that Work shall terminate
+      as of the date such litigation is filed.
+
+   4. Redistribution. You may reproduce and distribute copies of the
+      Work or Derivative Works thereof in any medium, with or without
+      modifications, and in Source or Object form, provided that You
+      meet the following conditions:
+
+      (a) You must give any other recipients of the Work or
+          Derivative Works a copy of this License; and
+
+      (b) You must cause any modified files to carry prominent notices
+          stating that You changed the files; and
+
+      (c) You must retain, in the Source form of any Derivative Works
+          that You distribute, all copyright, patent, trademark, and
+          attribution notices from the Source form of the Work,
+          excluding those notices that do not pertain to any part of
+          the Derivative Works; and
+
+      (d) If the Work includes a "NOTICE" text file as part of its
+          distribution, then any Derivative Works that You distribute must
+          include a readable copy of the attribution notices contained
+          within such NOTICE file, excluding those notices that do not
+          pertain to any part of the Derivative Works, in at least one
+          of the following places: within a NOTICE text file distributed
+          as part of the Derivative Works; within the Source form or
+          documentation, if provided along with the Derivative Works; or,
+          within a display generated by the Derivative Works, if and
+          wherever such third-party notices normally appear. The contents
+          of the NOTICE file are for informational purposes only and
+          do not modify the License. You may add Your own attribution
+          notices within Derivative Works that You distribute, alongside
+          or as an addendum to the NOTICE text from the Work, provided
+          that such additional attribution notices cannot be construed
+          as modifying the License.
+
+      You may add Your own copyright statement to Your modifications and
+      may provide additional or different license terms and conditions
+      for use, reproduction, or distribution of Your modifications, or
+      for any such Derivative Works as a whole, provided Your use,
+      reproduction, and distribution of the Work otherwise complies with
+      the conditions stated in this License.
+
+   5. Submission of Contributions. Unless You explicitly state otherwise,
+      any Contribution intentionally submitted for inclusion in the Work
+      by You to the Licensor shall be under the terms and conditions of
+      this License, without any additional terms or conditions.
+      Notwithstanding the above, nothing herein shall supersede or modify
+      the terms of any separate license agreement you may have executed
+      with Licensor regarding such Contributions.
+
+   6. Trademarks. This License does not grant permission to use the trade
+      names, trademarks, service marks, or product names of the Licensor,
+      except as required for reasonable and customary use in describing the
+      origin of the Work and reproducing the content of the NOTICE file.
+
+   7. Disclaimer of Warranty. Unless required by applicable law or
+      agreed to in writing, Licensor provides the Work (and each
+      Contributor provides its Contributions) on an "AS IS" BASIS,
+      WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+      implied, including, without limitation, any warranties or conditions
+      of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
+      PARTICULAR PURPOSE. You are solely responsible for determining the
+      appropriateness of using or redistributing the Work and assume any
+      risks associated with Your exercise of permissions under this License.
+
+   8. Limitation of Liability. In no event and under no legal theory,
+      whether in tort (including negligence), contract, or otherwise,
+      unless required by applicable law (such as deliberate and grossly
+      negligent acts) or agreed to in writing, shall any Contributor be
+      liable to You for damages, including any direct, indirect, special,
+      incidental, or consequential damages of any character arising as a
+      result of this License or out of the use or inability to use the
+      Work (including but not limited to damages for loss of goodwill,
+      work stoppage, computer failure or malfunction, or any and all
+      other commercial damages or losses), even if such Contributor
+      has been advised of the possibility of such damages.
+
+   9. Accepting Warranty or Additional Liability. While redistributing
+      the Work or Derivative Works thereof, You may choose to offer,
+      and charge a fee for, acceptance of support, warranty, indemnity,
+      or other liability obligations and/or rights consistent with this
+      License. However, in accepting such obligations, You may act only
+      on Your own behalf and on Your sole responsibility, not on behalf
+      of any other Contributor, and only if You agree to indemnify,
+      defend, and hold each Contributor harmless for any liability
+      incurred by, or claims asserted against, such Contributor by reason
+      of your accepting any such warranty or additional liability.
+
+   END OF TERMS AND CONDITIONS
+
+   APPENDIX: How to apply the Apache License to your work.
+
+      To apply the Apache License to your work, attach the following
+      boilerplate notice, with the fields enclosed by brackets "[]"
+      replaced with your own identifying information. (Don't include
+      the brackets!)  The text should be enclosed in the appropriate
+      comment syntax for the file format. We also recommend that a
+      file or class name and description of purpose be included on the
+      same "printed page" as the copyright notice for easier
+      identification within third-party archives.
+
+   Copyright [yyyy] [name of copyright owner]
+
+   Licensed under the Apache License, Version 2.0 (the "License");
+   you may not use this file except in compliance with the License.
+   You may obtain a copy of the License at
+
+       http://www.apache.org/licenses/LICENSE-2.0
+
+   Unless required by applicable law or agreed to in writing, software
+   distributed under the License is distributed on an "AS IS" BASIS,
+   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+   See the License for the specific language governing permissions and
+   limitations under the License.
diff --git a/NOTICE b/NOTICE
new file mode 100644
index 0000000..08e6d42
--- /dev/null
+++ b/NOTICE
@@ -0,0 +1,5 @@
+Apache Solr MCP Server
+Copyright 2026 The Apache Software Foundation
+
+This product includes software developed at
+The Apache Software Foundation (https://www.apache.org/).
diff --git a/README.md b/README.md
index 2091564..60b6356 100644
--- a/README.md
+++ b/README.md
@@ -453,6 +453,44 @@ docker run -p 8080:8080 --rm \
 
 See [docs/specs/graalvm-native-image.md](docs/specs/graalvm-native-image.md) 
for the native image design and known risks.
 
+## Supply chain & SBOM
+
+Every released JAR and Docker image ships a 
[CycloneDX](https://cyclonedx.org/) 1.6 Software Bill of Materials so 
downstream consumers can audit and scan the dependency graph.
+
+### Where the SBOM lives
+
+- **Inside every JAR and image:** `META-INF/sbom/application.cdx.json` — 
embedded by the Spring Boot Gradle plugin at build time. The Jib JVM image 
(`solr-mcp:<v>`) and both Paketo native images (`solr-mcp:<v>-native-stdio`, 
`solr-mcp:<v>-native-http`) all package the bootJar contents, so the SBOM ships 
with every distribution channel.
+- **HTTP endpoint** (`http` profile only): `GET /actuator/sbom/application` 
returns the same SBOM as `application/vnd.cyclonedx+json`.
+- **GitHub Releases:** the release workflow attaches 
`solr-mcp-<version>.cdx.json` to every official ASF release.
+- **CI artifacts:** every `Build and Publish` run uploads `solr-mcp-sbom` 
(CycloneDX JSON) to the workflow run page; downloadable for 30 days.
+
+### Fetch the SBOM
+
+From a running HTTP-mode server:
+
+```bash
+curl -s http://localhost:8080/actuator/sbom/application > application.cdx.json
+```
+
+From the local build (no server required):
+
+```bash
+./gradlew cyclonedxBom
+cat build/reports/application.cdx.json
+```
+
+### Scan the SBOM
+
+```bash
+# Trivy
+trivy sbom application.cdx.json
+
+# Grype
+grype sbom:application.cdx.json
+```
+
+Both tools natively consume CycloneDX 1.6 and report CVEs against the listed 
components.
+
 ## Documentation
 
 - [Auth0 Setup (OAuth2 configuration)](security-docs/AUTH0_SETUP.md)
diff --git a/build.gradle.kts b/build.gradle.kts
index 6811ac6..075fafa 100644
--- a/build.gradle.kts
+++ b/build.gradle.kts
@@ -27,6 +27,7 @@ plugins {
     alias(libs.plugins.spotless)
     alias(libs.plugins.jib)
     alias(libs.plugins.graalvm.native) apply false
+    alias(libs.plugins.cyclonedx)
 }
 
 // GraalVM Native Image (Opt-In)
@@ -75,6 +76,17 @@ java {
     withJavadocJar()
 }
 
+// ASF release policy requires every distributed artifact to carry the 
project's
+// LICENSE and NOTICE files. Bundle them into META-INF of every JAR produced by
+// this build (main jar, bootJar, sources, javadoc).
+// See https://www.apache.org/legal/release-policy.html#licensing-documentation
+tasks.withType<Jar>().configureEach {
+    metaInf {
+        from(rootProject.file("LICENSE"))
+        from(rootProject.file("NOTICE"))
+    }
+}
+
 // Maven Publishing Configuration
 // ==============================
 // This configuration enables publishing the project artifacts to Maven 
repositories.
diff --git a/docs/superpowers/plans/2026-06-05-sbom-generation.md 
b/docs/superpowers/plans/2026-06-05-sbom-generation.md
new file mode 100644
index 0000000..fd6eba6
--- /dev/null
+++ b/docs/superpowers/plans/2026-06-05-sbom-generation.md
@@ -0,0 +1,673 @@
+# SBOM generation — implementation plan
+
+> **For agentic workers:** REQUIRED SUB-SKILL: Use 
superpowers:subagent-driven-development (recommended) or 
superpowers:executing-plans to implement this plan task-by-task. Steps use 
checkbox (`- [ ]`) syntax for tracking.
+
+**Goal:** Wire up CycloneDX SBOM generation so every JAR, Docker image, and 
GitHub release artifact ships a machine-readable Software Bill of Materials, 
and `/actuator/sbom` serves it at runtime.
+
+**Architecture:** Apply the `org.cyclonedx.bom` Gradle plugin (1.10.0). Spring 
Boot 3.5's bootJar task auto-detects and embeds 
`META-INF/sbom/application.cdx.json`; the actuator auto-discovers that resource 
and serves it at `/actuator/sbom`. Both the Jib JVM image and Paketo native 
images package the bootJar contents, so SBOM coverage is automatic for every 
artifact — no per-image wiring. CI workflows upload the SBOM as a workflow 
artifact and attach it to GitHub Releases.
+
+**Tech Stack:** Gradle Kotlin DSL with `libs.versions.toml`, Spring Boot 
3.5.14, CycloneDX Gradle Plugin 1.10.0, GitHub Actions.
+
+**Spec:** `docs/superpowers/specs/2026-06-05-sbom-generation-design.md`
+
+---
+
+## Pre-flight context for the implementer
+
+Read these files before starting — they show what's already half-wired:
+
+- `gradle/libs.versions.toml` — version catalog; you'll add a new 
`cyclonedx-plugin` version key and plugin alias here.
+- `build.gradle.kts` — main build script; you'll add 
`alias(libs.plugins.cyclonedx)` in the `plugins { }` block and add a 
`cyclonedxBom { … }` configuration block.
+- `src/main/resources/application-http.properties` — `sbom` is already listed 
in `management.endpoints.web.exposure.include` (line near bottom). You'll add 
one explicit-enablement line.
+- `.github/workflows/build-and-publish.yml` — has existing `Upload JAR 
artifact` step pattern (around line 145); you'll add a parallel SBOM upload 
step.
+- `.github/workflows/release-publish.yml` — already contains a `Generate SBOM 
(Software Bill of Materials)` step (`./gradlew cyclonedxBom || echo "SBOM 
generation not configured"`). Today it's a no-op because the plugin isn't 
applied. You'll remove the `|| echo …` fallback (it would now mask a real 
failure) and add upload/attach steps after it.
+- `src/test/java/org/apache/solr/mcp/server/McpClientIntegrationTest.java` — 
boots HTTP profile with random port; you'll add a focused test method (or 
sibling test class) that does an HTTP GET on `/actuator/sbom`.
+- `README.md` — sections are `## What's inside`, `## Get started`, `## 
Security`, `## Available MCP tools`, etc. (see `grep ^## README.md`). Add a new 
section before `## Documentation` (the last section).
+- `CLAUDE.md` (project, at repo root) — has a "Common Commands" section and an 
architecture section. Add a one-line note in Common Commands and a brief 
paragraph in the architecture section about SBOM.
+
+---
+
+## File structure
+
+**Modify:**
+- `gradle/libs.versions.toml` — add CycloneDX plugin version + alias
+- `build.gradle.kts` — apply plugin, add `cyclonedxBom { }` configuration
+- `src/main/resources/application-http.properties` — add explicit endpoint 
enablement line
+- `.github/workflows/build-and-publish.yml` — add SBOM upload step in `build` 
job
+- `.github/workflows/release-publish.yml` — fix the existing SBOM step, add 
upload + GitHub Release attach
+- `README.md` — new "## Supply chain & SBOM" section
+- `CLAUDE.md` — short note in Common Commands + brief architecture paragraph
+
+**Create:**
+- 
`src/test/java/org/apache/solr/mcp/server/observability/SbomEndpointIntegrationTest.java`
 — focused HTTP integration test for `/actuator/sbom`
+
+---
+
+## Task 1: Add CycloneDX plugin to the version catalog
+
+**Files:**
+- Modify: `gradle/libs.versions.toml`
+
+- [ ] **Step 1: Add plugin version**
+
+In the `[versions]` block, after the `graalvm-native = "0.10.6"` line, add:
+
+```toml
+cyclonedx-plugin = "1.10.0"
+```
+
+- [ ] **Step 2: Add plugin alias**
+
+In the `[plugins]` block, at the bottom (after the `graalvm-native = ...` 
line), add:
+
+```toml
+cyclonedx = { id = "org.cyclonedx.bom", version.ref = "cyclonedx-plugin" }
+```
+
+- [ ] **Step 3: Verify catalog parses**
+
+Run: `./gradlew help -q`
+Expected: succeeds with no output. If it prints `Invalid catalog definition`, 
fix the syntax.
+
+- [ ] **Step 4: Commit**
+
+```bash
+git add gradle/libs.versions.toml
+git commit -s -m "$(cat <<'EOF'
+chore(deps): add CycloneDX Gradle plugin 1.10.0 to version catalog
+
+Plugin will be applied in the next commit. Adding the catalog entry
+first keeps build.gradle.kts changes reviewable in isolation.
+
+Signed-off-by: Aditya Parikh <[email protected]>
+EOF
+)"
+```
+
+---
+
+## Task 2: Apply and configure the plugin in build.gradle.kts
+
+**Files:**
+- Modify: `build.gradle.kts` (`plugins { }` block, and a new top-level config 
block near the existing `springBoot { buildInfo() }` block)
+
+- [ ] **Step 1: Apply the plugin**
+
+In `build.gradle.kts`, locate the `plugins { … }` block (top of file, around 
line 19-30). Add a new alias line after the `alias(libs.plugins.graalvm.native) 
apply false` line:
+
+```kotlin
+    alias(libs.plugins.cyclonedx)
+```
+
+The final block looks like:
+
+```kotlin
+plugins {
+    java
+    `maven-publish`
+    alias(libs.plugins.spring.boot)
+    alias(libs.plugins.spring.dependency.management)
+    jacoco
+    alias(libs.plugins.errorprone)
+    alias(libs.plugins.spotless)
+    alias(libs.plugins.jib)
+    alias(libs.plugins.graalvm.native) apply false
+    alias(libs.plugins.cyclonedx)
+}
+```
+
+- [ ] **Step 2: Add `cyclonedxBom` configuration block**
+
+Find the `springBoot { buildInfo() }` block (around line 195-197). Immediately 
AFTER it, insert:
+
+```kotlin
+// CycloneDX SBOM (Software Bill of Materials)
+// ==========================================
+// Spring Boot 3.3+ automatically embeds the generated SBOM into the bootable
+// JAR at META-INF/sbom/application.cdx.json when the file name matches
+// `application.cdx`. The actuator then serves it at /actuator/sbom (HTTP
+// profile only — see application-http.properties).
+//
+// One SBOM, three distribution channels:
+//   1. Embedded in the bootable JAR (META-INF/sbom/application.cdx.json)
+//   2. Embedded in every Docker image (Jib + Paketo both package bootJar 
contents)
+//   3. Surfaced at /actuator/sbom for live introspection (HTTP profile)
+//
+// The `bootJar` task automatically depends on `cyclonedxBom` once the plugin
+// is applied — no manual `dependsOn` wiring needed.
+tasks.cyclonedxBom {
+    outputName.set("application.cdx")
+    outputFormat.set("json")
+    schemaVersion.set("1.5")
+    projectType.set("application")
+    includeConfigs.set(listOf("runtimeClasspath"))
+    skipConfigs.set(listOf("testRuntimeClasspath", "errorprone", 
"annotationProcessor"))
+}
+```
+
+- [ ] **Step 3: Run formatter and build the SBOM**
+
+Run:
+```bash
+./gradlew spotlessApply
+./gradlew cyclonedxBom -q
+```
+Expected: both succeed. After the second command, 
`build/reports/application.cdx.json` exists.
+
+- [ ] **Step 4: Verify SBOM shape**
+
+Run:
+```bash
+test -f build/reports/application.cdx.json && \
+  grep -q '"bomFormat" : "CycloneDX"' build/reports/application.cdx.json && \
+  grep -q '"specVersion" : "1.5"' build/reports/application.cdx.json && \
+  echo "SBOM OK"
+```
+Expected: prints `SBOM OK`. If grep fails because the JSON is minified, swap 
`grep -q '"bomFormat":"CycloneDX"'` (no spaces).
+
+- [ ] **Step 5: Verify the SBOM is embedded in the bootJar**
+
+Run:
+```bash
+./gradlew bootJar -q
+unzip -l build/libs/solr-mcp-*.jar | grep -F 
'META-INF/sbom/application.cdx.json'
+```
+Expected: one line of output showing the path exists in the JAR.
+
+If the file is NOT present: the bootJar task didn't pick it up. Check that 
`outputName` is exactly `application.cdx` (not `application.cdx.json`) — Spring 
Boot appends the format extension itself.
+
+- [ ] **Step 6: Commit**
+
+```bash
+git add build.gradle.kts
+git commit -s -m "$(cat <<'EOF'
+feat(build): wire CycloneDX plugin to generate and embed SBOM
+
+Spring Boot 3.5's bootJar auto-embeds META-INF/sbom/application.cdx.json
+when the file name matches `application.cdx`. The Jib JVM image and both
+Paketo native images package the bootJar contents, so every distribution
+artifact now carries an embedded CycloneDX 1.5 SBOM.
+
+Plugin config:
+- outputFormat=json (actuator only consumes JSON)
+- includeConfigs=runtimeClasspath only — test/errorprone deps excluded
+- schemaVersion=1.5
+
+Signed-off-by: Aditya Parikh <[email protected]>
+EOF
+)"
+```
+
+---
+
+## Task 3: Enable the /actuator/sbom endpoint explicitly
+
+**Files:**
+- Modify: `src/main/resources/application-http.properties`
+
+`sbom` is already in `management.endpoints.web.exposure.include`. We're adding 
an explicit `enabled=true` line so the project's convention (be explicit about 
endpoint state) is satisfied and so any future scan reading just the properties 
file sees the intent.
+
+- [ ] **Step 1: Add the property**
+
+Find the line that begins with `# observability` (or 
`management.endpoints.web.exposure.include=...`). On a new line immediately 
after the `management.endpoints.web.exposure.include=...` line, add:
+
+```properties
+management.endpoint.sbom.enabled=true
+```
+
+- [ ] **Step 2: Commit**
+
+```bash
+git add src/main/resources/application-http.properties
+git commit -s -m "$(cat <<'EOF'
+feat(actuator): enable /actuator/sbom endpoint explicitly
+
+`sbom` was already in management.endpoints.web.exposure.include; this
+makes the endpoint enablement explicit so the file conveys intent
+without relying on Spring Boot defaults.
+
+Signed-off-by: Aditya Parikh <[email protected]>
+EOF
+)"
+```
+
+---
+
+## Task 4: Add a focused HTTP integration test for /actuator/sbom
+
+**Files:**
+- Create: 
`src/test/java/org/apache/solr/mcp/server/observability/SbomEndpointIntegrationTest.java`
+
+The test boots the HTTP profile (which mirrors `McpClientIntegrationTest`'s 
setup), hits `/actuator/sbom` over HTTP, and asserts the response is valid 
CycloneDX JSON.
+
+- [ ] **Step 1: Write the failing test**
+
+Create 
`src/test/java/org/apache/solr/mcp/server/observability/SbomEndpointIntegrationTest.java`
 with:
+
+```java
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.solr.mcp.server.observability;
+
+import static org.assertj.core.api.Assertions.assertThat;
+
+import java.net.URI;
+import java.net.http.HttpClient;
+import java.net.http.HttpRequest;
+import java.net.http.HttpResponse;
+import org.apache.solr.mcp.server.TestcontainersConfiguration;
+import org.junit.jupiter.api.Tag;
+import org.junit.jupiter.api.Test;
+import org.springframework.boot.test.context.SpringBootTest;
+import org.springframework.boot.test.web.server.LocalServerPort;
+import org.springframework.context.annotation.Import;
+import org.springframework.test.context.ActiveProfiles;
+import org.testcontainers.junit.jupiter.Testcontainers;
+
+/**
+ * Verifies the CycloneDX SBOM is served at /actuator/sbom in HTTP mode. The
+ * SBOM is generated at build time by the cyclonedx Gradle plugin and embedded
+ * in the bootJar at META-INF/sbom/application.cdx.json; the actuator
+ * auto-discovers and serves it from there.
+ */
+@SpringBootTest(
+               webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT,
+               properties = {"http.security.enabled=false", 
"spring.docker.compose.enabled=false"})
+@ActiveProfiles("http")
+@Import(TestcontainersConfiguration.class)
+@Tag("integration")
+@Testcontainers(disabledWithoutDocker = true)
+class SbomEndpointIntegrationTest {
+
+       @LocalServerPort
+       private int port;
+
+       @Test
+       void sbomEndpointReturnsCycloneDxJson() throws Exception {
+               HttpClient client = HttpClient.newHttpClient();
+               HttpRequest request = HttpRequest.newBuilder()
+                               .uri(URI.create("http://localhost:"; + port + 
"/actuator/sbom/application"))
+                               .GET()
+                               .build();
+
+               HttpResponse<String> response = client.send(request, 
HttpResponse.BodyHandlers.ofString());
+
+               assertThat(response.statusCode()).isEqualTo(200);
+               assertThat(response.headers().firstValue("Content-Type"))
+                               .hasValueSatisfying(ct -> 
assertThat(ct).contains("application/vnd.cyclonedx+json"));
+               
assertThat(response.body()).contains("\"bomFormat\"").contains("CycloneDX");
+       }
+}
+```
+
+**Note on the URL:** Spring Boot's SBOM actuator exposes each embedded SBOM 
under `/actuator/sbom/{id}`. The default id for the application SBOM is 
`application` (derived from the file basename `application.cdx`). If the test 
fails with 404 because the id differs, hit `/actuator/sbom` first (an index) to 
discover the right id, then update the URL.
+
+- [ ] **Step 2: Run the test to verify it passes**
+
+Run:
+```bash
+./gradlew test --tests 
org.apache.solr.mcp.server.observability.SbomEndpointIntegrationTest -i
+```
+Expected: PASS. If FAIL with status 404, see the note above and adjust the 
URL. If FAIL because of compilation, check that `assertj` is on the test 
classpath (it is — pulled in by `spring-boot-starter-test`).
+
+- [ ] **Step 3: Commit**
+
+```bash
+git add 
src/test/java/org/apache/solr/mcp/server/observability/SbomEndpointIntegrationTest.java
+git commit -s -m "$(cat <<'EOF'
+test(observability): verify /actuator/sbom serves CycloneDX JSON
+
+Focused HTTP integration test that boots the http profile with the
+existing TestcontainersConfiguration and asserts the SBOM endpoint
+returns 200 with CycloneDX content.
+
+Signed-off-by: Aditya Parikh <[email protected]>
+EOF
+)"
+```
+
+---
+
+## Task 5: Upload SBOM as workflow artifact in build-and-publish.yml
+
+**Files:**
+- Modify: `.github/workflows/build-and-publish.yml`
+
+- [ ] **Step 1: Add an upload step after the existing JAR upload**
+
+Find the step labeled `Upload JAR artifact` (around line 145-150). Immediately 
after it, add a new step:
+
+```yaml
+            # Upload the CycloneDX SBOM produced during the build
+            # build/reports/application.cdx.json is generated by the cyclonedx
+            # Gradle plugin and is also embedded in the bootable JAR
+            -   name: Upload SBOM artifact
+                if: always()
+                uses: actions/upload-artifact@v4
+                with:
+                    name: solr-mcp-sbom
+                    path: build/reports/application.cdx.json
+                    retention-days: 30
+```
+
+The `if: always()` mirrors the test-results pattern and ensures the SBOM is 
captured even if a downstream test fails (useful for debugging 
dependency-related test failures). Retention is 30 days (longer than the 7-day 
artifact retention) because SBOMs are useful for after-the-fact supply-chain 
investigation.
+
+- [ ] **Step 2: Commit**
+
+```bash
+git add .github/workflows/build-and-publish.yml
+git commit -s -m "$(cat <<'EOF'
+ci: upload CycloneDX SBOM as workflow artifact
+
+Mirrors the existing JAR/test-results/coverage upload pattern. Retains
+the SBOM for 30 days (vs the standard 7) since supply-chain
+investigations often happen well after a build.
+
+Signed-off-by: Aditya Parikh <[email protected]>
+EOF
+)"
+```
+
+---
+
+## Task 6: Fix and extend the release-publish.yml SBOM step
+
+**Files:**
+- Modify: `.github/workflows/release-publish.yml`
+
+The workflow already has a `Generate SBOM (Software Bill of Materials)` step 
that runs `./gradlew cyclonedxBom || echo "SBOM generation not configured"`. 
With the plugin applied, that `|| echo` fallback would mask real failures. 
Replace it with a strict invocation and add an upload + GitHub Release 
attachment.
+
+- [ ] **Step 1: Locate the existing step**
+
+In `release-publish.yml`, search for `Generate SBOM`. You'll find:
+
+```yaml
+      - name: Generate SBOM (Software Bill of Materials)
+        run: |
+          # Generate SBOM for the release
+          # This helps with supply chain security
+          ./gradlew cyclonedxBom || echo "SBOM generation not configured"
+```
+
+- [ ] **Step 2: Replace it with the strict invocation + upload + attach**
+
+Replace the step above with:
+
+```yaml
+      - name: Generate SBOM (Software Bill of Materials)
+        run: ./gradlew cyclonedxBom
+
+      - name: Upload SBOM as workflow artifact
+        if: always()
+        uses: actions/upload-artifact@v4
+        with:
+          name: solr-mcp-sbom-${{ inputs.release_version }}
+          path: build/reports/application.cdx.json
+          retention-days: 90
+
+      - name: Attach SBOM to GitHub Release
+        env:
+          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+          RELEASE_VERSION: ${{ inputs.release_version }}
+        run: |
+          # Rename to include the version so the asset is unambiguous on the 
release page
+          cp build/reports/application.cdx.json 
"solr-mcp-${RELEASE_VERSION}.cdx.json"
+          # --clobber lets re-runs of this workflow replace a previously 
uploaded SBOM
+          # If the v<version> GitHub Release does not exist yet, log and 
continue —
+          # the workflow artifact above is still captured.
+          if gh release view "v${RELEASE_VERSION}" >/dev/null 2>&1; then
+            gh release upload "v${RELEASE_VERSION}" 
"solr-mcp-${RELEASE_VERSION}.cdx.json" --clobber
+          else
+            echo "GitHub Release v${RELEASE_VERSION} does not exist yet; SBOM 
available as workflow artifact only."
+          fi
+```
+
+The 90-day retention is longer than build-and-publish (30 days) because 
release SBOMs have an asynchronous secondary consumer: PMC members downloading 
them weeks after a vote.
+
+- [ ] **Step 3: Commit**
+
+```bash
+git add .github/workflows/release-publish.yml
+git commit -s -m "$(cat <<'EOF'
+ci(release): strict SBOM generation + upload + release attachment
+
+The existing Generate SBOM step swallowed errors with `|| echo "..."`,
+masking failures now that the plugin is wired. Removes the fallback,
+uploads the SBOM as a 90-day workflow artifact, and attaches it to the
+v<version> GitHub Release when one exists (graceful fallback otherwise
+since the source release of record lives at dist.apache.org, not GitHub).
+
+Signed-off-by: Aditya Parikh <[email protected]>
+EOF
+)"
+```
+
+---
+
+## Task 7: Document SBOM in README.md
+
+**Files:**
+- Modify: `README.md`
+
+- [ ] **Step 1: Add a new section before `## Documentation`**
+
+Find the `## Documentation` section (last `##` heading in the file, around 
line 456). Immediately BEFORE it, insert:
+
+```markdown
+## Supply chain & SBOM
+
+Every released JAR and Docker image ships a [CycloneDX](https://cyclonedx.org/)
+1.5 Software Bill of Materials so downstream consumers can audit and scan the
+dependency graph.
+
+### Where the SBOM lives
+
+- **Inside every JAR and image:** `META-INF/sbom/application.cdx.json` —
+  embedded by the Spring Boot Gradle plugin at build time. The Jib JVM image
+  (`solr-mcp:<v>`) and both Paketo native images (`solr-mcp:<v>-native-stdio`,
+  `solr-mcp:<v>-native-http`) all package the bootJar contents, so the SBOM
+  ships with every distribution channel.
+- **HTTP endpoint** (`http` profile only): `GET /actuator/sbom/application`
+  returns the same SBOM as `application/vnd.cyclonedx+json`.
+- **GitHub Releases:** the release workflow attaches
+  `solr-mcp-<version>.cdx.json` to every official ASF release.
+- **CI artifacts:** every `Build and Publish` run uploads `solr-mcp-sbom`
+  (CycloneDX JSON) to the workflow run page; downloadable for 30 days.
+
+### Fetch the SBOM
+
+From a running HTTP-mode server:
+
+```bash
+curl -s http://localhost:8080/actuator/sbom/application > application.cdx.json
+```
+
+From the local build (no server required):
+
+```bash
+./gradlew cyclonedxBom
+cat build/reports/application.cdx.json
+```
+
+### Scan the SBOM
+
+```bash
+# Trivy
+trivy sbom application.cdx.json
+
+# Grype
+grype sbom:application.cdx.json
+```
+
+Both tools natively consume CycloneDX 1.5 and report CVEs against the
+listed components.
+```
+
+- [ ] **Step 2: Commit**
+
+```bash
+git add README.md
+git commit -s -m "$(cat <<'EOF'
+docs(readme): document SBOM location, retrieval, and scanning
+
+New 'Supply chain & SBOM' section covers all four distribution
+channels (embedded in JAR/image, /actuator/sbom endpoint, GitHub
+Release asset, CI workflow artifact) and shows trivy/grype usage.
+
+Signed-off-by: Aditya Parikh <[email protected]>
+EOF
+)"
+```
+
+---
+
+## Task 8: Note SBOM in CLAUDE.md
+
+**Files:**
+- Modify: `CLAUDE.md`
+
+CLAUDE.md is project-level guidance for AI assistants. Two small additions: a 
build command and an architecture note.
+
+- [ ] **Step 1: Add a command line under "Common Commands"**
+
+Find the `## Common Commands` section. Within the fenced bash block, locate 
the `# Code formatting (REQUIRED before commit)` group. Immediately BEFORE that 
group, insert:
+
+```bash
+# SBOM (Software Bill of Materials)
+./gradlew cyclonedxBom                       # Generate 
build/reports/application.cdx.json
+
+```
+
+(Keep the trailing blank line so the existing groups stay visually separated.)
+
+- [ ] **Step 2: Add an architecture note**
+
+Find the `### Logging Architecture` section. Immediately BEFORE it, insert a 
new section:
+
+```markdown
+### SBOM Architecture
+
+CycloneDX SBOM generation is wired via `org.cyclonedx.bom` 
(`tasks.cyclonedxBom` in
+`build.gradle.kts`). The Spring Boot Gradle plugin embeds the generated file
+into the bootJar at `META-INF/sbom/application.cdx.json`; the actuator
+auto-discovers it and serves it at `/actuator/sbom/application` in the `http`
+profile (enabled in `application-http.properties`). Both the Jib JVM image and
+the Paketo native images package the bootJar contents, so every distribution
+artifact ships the SBOM without per-image wiring.
+
+Spec: 
[docs/superpowers/specs/2026-06-05-sbom-generation-design.md](docs/superpowers/specs/2026-06-05-sbom-generation-design.md)
+```
+
+- [ ] **Step 3: Commit**
+
+```bash
+git add CLAUDE.md
+git commit -s -m "$(cat <<'EOF'
+docs(claude): note SBOM generation in commands + architecture
+
+Records the cyclonedxBom command and how the SBOM flows through
+bootJar → actuator → Docker images, so future agents have the
+mental model when working on related code.
+
+Signed-off-by: Aditya Parikh <[email protected]>
+EOF
+)"
+```
+
+---
+
+## Task 9: Final verification
+
+**Files:** none (verification only)
+
+- [ ] **Step 1: Run the full build**
+
+Run:
+```bash
+./gradlew spotlessApply build
+```
+Expected: BUILD SUCCESSFUL. All tests pass.
+
+- [ ] **Step 2: Confirm SBOM artifacts present**
+
+Run:
+```bash
+ls -lh build/reports/application.cdx.json && \
+  unzip -l build/libs/solr-mcp-*.jar | grep -F 
'META-INF/sbom/application.cdx.json'
+```
+Expected: file exists; one line in JAR listing for the embedded SBOM.
+
+- [ ] **Step 3: Inspect SBOM head**
+
+Run:
+```bash
+head -20 build/reports/application.cdx.json
+```
+Expected: includes `"bomFormat" : "CycloneDX"` and `"specVersion" : "1.5"`.
+
+- [ ] **Step 4: Push the branch and open the PR**
+
+```bash
+git push -u origin worktree-add-sbom-generation
+gh pr create --title "feat(build): generate CycloneDX SBOM for every release 
artifact" --body "$(cat <<'EOF'
+## Summary
+
+- Wires CycloneDX 1.5 SBOM generation into every build, embeds it in the
+  bootJar at `META-INF/sbom/application.cdx.json`, and exposes it at
+  `/actuator/sbom/application` in HTTP mode.
+- Jib JVM image and both Paketo native images ship the SBOM for free via
+  bootJar packaging — no per-image wiring.
+- `build-and-publish.yml` uploads the SBOM as a 30-day workflow artifact;
+  `release-publish.yml` uploads as a 90-day artifact and attaches it to the
+  matching GitHub Release.
+- README documents location, retrieval, and scanning with trivy/grype.
+
+Spec: `docs/superpowers/specs/2026-06-05-sbom-generation-design.md`
+
+## Test plan
+
+- [x] `./gradlew build` is green
+- [x] `build/reports/application.cdx.json` produced (`bomFormat: CycloneDX`, 
`specVersion: 1.5`)
+- [x] SBOM is embedded in `build/libs/solr-mcp-*.jar` at 
`META-INF/sbom/application.cdx.json`
+- [x] `SbomEndpointIntegrationTest` passes (`/actuator/sbom/application` 
returns 200 + CycloneDX JSON)
+- [ ] CI green on this PR
+- [ ] Manual sanity-check after merge: pull the resulting Jib image, `docker 
run` it with `PROFILES=http`, `curl /actuator/sbom/application`
+EOF
+)"
+```
+
+---
+
+## Self-review
+
+**Spec coverage check:**
+
+- ✅ CycloneDX Gradle plugin applied — Task 1, 2
+- ✅ `outputName=application.cdx`, `outputFormat=json`, `schemaVersion=1.5` — 
Task 2
+- ✅ `includeConfigs=runtimeClasspath`, exclude test/errorprone — Task 2
+- ✅ Embedded in bootJar at `META-INF/sbom/application.cdx.json` — verified in 
Task 2 step 5
+- ✅ `/actuator/sbom` exposed by default in HTTP profile — Task 3 (and 
pre-existing exposure list)
+- ✅ Workflow artifact in build-and-publish.yml — Task 5
+- ✅ Workflow artifact + GitHub Release asset in release-publish.yml — Task 6
+- ✅ README documents location, retrieval, scanning — Task 7
+- ✅ CLAUDE.md notes the plugin + endpoint — Task 8
+- ✅ One focused HTTP integration test asserting CycloneDX response — Task 4
+- ✅ Build green at end — Task 9
+
+**Placeholder scan:** No TBD / TODO / "implement later" found. Every 
code/config block is complete and copyable.
+
+**Type/name consistency:** `application.cdx` used consistently as 
`outputName`; the embedded path is consistently 
`META-INF/sbom/application.cdx.json`; endpoint URL `/actuator/sbom/application` 
consistent between Task 4 (test), Task 7 (README), Task 8 (CLAUDE.md). The 
plugin task name `cyclonedxBom` is consistent across Tasks 2, 6, and 9.
diff --git a/docs/superpowers/specs/2026-06-05-sbom-generation-design.md 
b/docs/superpowers/specs/2026-06-05-sbom-generation-design.md
new file mode 100644
index 0000000..68fb7e1
--- /dev/null
+++ b/docs/superpowers/specs/2026-06-05-sbom-generation-design.md
@@ -0,0 +1,160 @@
+# SBOM generation — design
+
+**Status:** draft, pending user approval
+**Branch:** `worktree-add-sbom-generation`
+
+## Problem
+
+The Solr MCP server ships as a JAR, a Jib JVM Docker image, and two Paketo 
native
+images, but produces no Software Bill of Materials. Downstream consumers — 
Apache
+release reviewers, supply-chain scanners (Trivy, Grype, Dependency-Track),
+container-registry attestation tooling — have no machine-readable inventory of
+what dependencies ship inside the binary. SBOM coverage is increasingly an
+Apache release-policy expectation and a precondition for SLSA / CycloneDX VEX
+workflows downstream.
+
+Curiously, `application-http.properties` already lists `sbom` in
+`management.endpoints.web.exposure.include`. The endpoint config is half-wired
+already; today the actuator returns 404 because no SBOM is generated.
+
+## Scope
+
+In scope:
+
+- Generate a CycloneDX 1.6 SBOM (`application.cdx.json`) on every `./gradlew 
build`.
+- Embed the SBOM in the bootable JAR at `META-INF/sbom/application.cdx.json` so
+  it ships with every distribution (JAR, Jib JVM image, both Paketo native
+  images).
+- Expose `GET /actuator/sbom` in the HTTP profile (config already partially in
+  place; finish the wiring).
+- Attach the SBOM as a release artifact in `build-and-publish.yml` and
+  `release-publish.yml` (workflow artifact + GitHub Release asset).
+- Document the SBOM in `README.md` (location, endpoint, scanning) and in
+  `CLAUDE.md` (build-system and native-image notes).
+- One small HTTP integration-test assertion that `/actuator/sbom` returns
+  200 + a CycloneDX-shaped body.
+
+Out of scope (intentional, can be follow-ups):
+
+- SPDX format alongside CycloneDX — the plugin supports
+  `outputFormat = "all"`; can layer on without redesign.
+- Cosign / SLSA provenance signing — separate concern; would add another moving
+  part to maintain.
+- Dependency-Track upload from CI — requires an externally-hosted server.
+- SBOM for transitive native-image runtime libraries that GraalVM links in —
+  the CycloneDX plugin reports Gradle dependencies, which already covers what
+  ends up in the binary.
+
+## Tool choice: CycloneDX Gradle plugin
+
+The project is on Spring Boot 3.5.14, which has first-class CycloneDX
+integration since 3.3.0:
+
+- Applying `org.cyclonedx.bom` makes the Spring Boot Gradle plugin 
automatically
+  embed the generated `application.cdx.json` into the bootable JAR at
+  `META-INF/sbom/application.cdx.json`.
+- Spring Boot's actuator auto-discovers that resource and serves it at
+  `/actuator/sbom` (CycloneDX-format) when the endpoint is exposed.
+- The Jib JVM image and both Paketo native images package the bootJar contents,
+  so the SBOM ships with every artifact for free — no per-image wiring.
+
+CycloneDX (vs SPDX) is the de-facto Apache ecosystem standard, what Spring Boot
+natively integrates with, and what Trivy/Grype/Dependency-Track ingest 
natively.
+
+**Plugin version: 2.4.1** — the version Spring Initializr ships for Spring
+Boot 3.5.14 when you select the `sbom-cyclone-dx` dependency.
+
+## Architecture
+
+### Build wiring
+
+```
+gradle/libs.versions.toml             ← new version key + plugin alias
+build.gradle.kts                      ← apply alias(libs.plugins.cyclonedx)
+                                      ← cyclonedxBom { … } configuration block
+```
+
+No custom `cyclonedxBom { ... }` block is needed. Spring Boot's
+`CycloneDxPluginAction` auto-configures `outputName = "application.cdx"`,
+`outputFormat = "json"`, and `projectType = "application"` via Property
+conventions, and `bootJar` automatically depends on `cyclonedxBom`. The plugin
+default schema version (CycloneDX 1.6) is used as-is. This matches what
+Spring Initializr generates for the same dependency set.
+
+### Runtime wiring
+
+`application-http.properties` already exposes `sbom` via
+`management.endpoints.web.exposure.include`. The remaining work:
+
+- Add `management.endpoint.sbom.enabled=true` (explicit, even though it
+  defaults true, because the project's convention is to be explicit about
+  endpoint enablement for the LGTM stack to discover).
+- No change to `application-stdio.properties` — actuator HTTP endpoints don't
+  apply in stdio mode.
+
+### CI wiring
+
+`build-and-publish.yml`: after `./gradlew build`, add an 
`actions/upload-artifact`
+step that uploads `build/reports/application.cdx.json`. Retained 30 days
+(default), accessible from the run page.
+
+`release-publish.yml`: same upload step, plus `gh release upload <tag>
+build/reports/application.cdx.json`. The SBOM appears alongside source tarballs
+on the GitHub Release page.
+
+`native.yml`: no change. The native-image build inherits the SBOM via the 
bootJar
+input.
+
+### Documentation
+
+`README.md`: new "## Supply chain & SBOM" section near the bottom, covering:
+
+- Where the SBOM lives (`META-INF/sbom/application.cdx.json` inside every JAR
+  and image).
+- How to fetch it from a running server: `curl 
http://localhost:8080/actuator/sbom`.
+- How to extract it from a Docker image:
+  `docker run --rm --entrypoint cat solr-mcp:latest 
/workspace/META-INF/sbom/application.cdx.json`
+  (Jib path) or via the release asset.
+- How to scan: `trivy sbom application.cdx.json` and
+  `grype sbom:application.cdx.json` examples.
+
+`CLAUDE.md`: brief note in the build-system section that CycloneDX is wired and
+the SBOM ships embedded; reference the spec.
+
+## Testing
+
+- `./gradlew build` produces `build/reports/application.cdx.json`. Verify
+  manually post-merge.
+- No new integration test. `/actuator/sbom` is stock Spring Boot
+  functionality; the only project-specific configuration is two lines in
+  `application-http.properties`. A Spring Boot integration test that boots a
+  full context + Testcontainers Solr just to assert an actuator returns 200
+  tests Spring Boot, not us. The plugin wiring is already implicitly verified:
+  Spring Boot's bootJar task auto-depends on `cyclonedxBom`, so if the plugin
+  ever breaks, `./gradlew build` fails. The remaining question — "is the SBOM
+  actually inside the JAR?" — is handled by the build itself succeeding and is
+  re-verifiable any time via `unzip -l build/libs/*.jar | grep sbom`.
+- Existing Docker integration tests already verify image startup. The SBOM
+  being present in the image is implicit via the bootJar packaging — no new
+  Docker test added.
+
+## Risks and mitigations
+
+| Risk | Mitigation |
+|------|-----------|
+| Plugin adds significant build time | CycloneDX plugin runs once at 
JAR-assembly, typically <2s on this dependency graph. Measure before/after; 
report in PR. |
+| Native-image build fails because of SBOM resource | Spring Boot already 
registers `META-INF/sbom/*` as a runtime resource hint; the existing native 
build should work unchanged. Verify with `./gradlew nativeCompile -Pnative` 
post-merge. |
+| Actuator endpoint leaks info in production | SBOM contents are public (every 
dependency name + version is already in the JAR's manifest). Endpoint exposure 
is opt-in by being in the explicit `include` list. Documented. |
+| Plugin version drift | Pinned in `libs.versions.toml`; Renovate / Dependabot 
will surface upgrades on schedule. |
+
+## Acceptance criteria
+
+1. `./gradlew build` produces `build/reports/application.cdx.json` with
+   `bomFormat: CycloneDX`, `specVersion: 1.5`.
+2. `./gradlew bootJar` produces a JAR containing
+   `META-INF/sbom/application.cdx.json`.
+3. `GET /actuator/sbom` returns 200 + valid CycloneDX JSON in HTTP profile.
+4. `build-and-publish.yml` uploads the SBOM as a workflow artifact.
+5. `release-publish.yml` attaches the SBOM to the GitHub Release.
+6. `README.md` documents the SBOM under a clearly named section.
+7. `./gradlew spotlessCheck build` is green.
\ No newline at end of file
diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml
index 616c2de..6fc2187 100644
--- a/gradle/libs.versions.toml
+++ b/gradle/libs.versions.toml
@@ -6,6 +6,7 @@ errorprone-plugin = "5.1.0"
 jib = "3.5.3"
 spotless = "7.0.2"
 graalvm-native = "0.10.6"
+cyclonedx-plugin = "2.4.1"
 
 # Main dependencies
 spring-ai = "1.1.7"
@@ -112,3 +113,4 @@ errorprone = { id = "net.ltgt.errorprone", version.ref = 
"errorprone-plugin" }
 jib = { id = "com.google.cloud.tools.jib", version.ref = "jib" }
 spotless = { id = "com.diffplug.spotless", version.ref = "spotless" }
 graalvm-native = { id = "org.graalvm.buildtools.native", version.ref = 
"graalvm-native" }
+cyclonedx = { id = "org.cyclonedx.bom", version.ref = "cyclonedx-plugin" }
diff --git a/src/main/resources/application-http.properties 
b/src/main/resources/application-http.properties
index 24c6131..c1b9759 100644
--- a/src/main/resources/application-http.properties
+++ b/src/main/resources/application-http.properties
@@ -39,6 +39,7 @@ http.security.enabled=${HTTP_SECURITY_ENABLED:true}
 
mcp.cors.allowed-origins=${MCP_CORS_ALLOWED_ORIGINS:http://localhost:6274,http://127.0.0.1:6274}
 # observability
 
management.endpoints.web.exposure.include=health,sbom,metrics,info,loggers,prometheus
+management.endpoint.sbom.enabled=true
 # Enable @Observed annotation support for custom spans
 management.observations.annotations.enabled=true
 # Tracing Configuration

Reply via email to