Skip to content

Feat/018 application build info - #37

Open
hendrikebbers wants to merge 7 commits into
mainfrom
feat/018-application-build-info
Open

Feat/018 application build info#37
hendrikebbers wants to merge 7 commits into
mainfrom
feat/018-application-build-info

Conversation

@hendrikebbers

Copy link
Copy Markdown
Contributor

This pull request implements the Application Build & SBOM Info feature in spring-services-core, providing a new backend-only service to answer "which build is running, and what is it made of?" via artifact coordinates, Git commit information, and a parsed CycloneDX SBOM. The implementation includes an immutable record model, a Jackson-based SBOM parser, configuration properties, a service with auto-configuration, and comprehensive tests and documentation. No new dependencies are added, and the feature is designed to work without JPA and to be easily overridden by applications.

New Application Build & SBOM Info feature:

  • Added ApplicationInfoService and supporting immutable record model (ApplicationInfo, GitInfo, SbomSummary, SbomComponent, etc.) for exposing build, Git, and SBOM summary information. The service is backend-only, does not expose a REST endpoint, and is safe by default.
  • Implemented CycloneDxReader for robust, non-throwing parsing of CycloneDX SBOM files, summarizing licenses and components with support for various SBOM and license scenarios.
  • Introduced ApplicationInfoProperties (openelements.info.sbom.enabled and openelements.info.sbom.location) for feature configuration, with sensible defaults and override support.
  • Provided ApplicationInfoAutoConfiguration for auto-registering the service unless overridden, ensuring availability even without JPA.

Documentation and Specification:

  • Added detailed implementation steps, behavior coverage, and security notes to the documentation/specs, and marked the feature as complete in the project index. [1] [2] [3]

This feature is now complete and ready for use.

hendrikebbers and others added 7 commits August 28, 2026 10:03
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…018)

Add a read-only com.openelements.spring.base.info package to
spring-services-core answering "which build is running, and what is it
made of?":

- ApplicationInfo/GitInfo/SbomSummary/SbomComponent/SbomDocument
  immutable record model (JSpecify @NullMarked, normalised collections)
- CycloneDxReader: package-private Jackson tree parser, degrades to
  empty + WARN, ignores unknown fields, no new dependency
- ApplicationInfoService: coordinates + two-source Git resolution
  (git.properties wins over build.commit), SBOM autodetect matching
  Spring Boot's SbomEndpoint order, eager parse cached in final fields
- ApplicationInfoProperties (openelements.info.sbom.*)
- ApplicationInfoAutoConfiguration: JPA-independent, @AutoConfigureAfter
  ProjectInfoAutoConfiguration, @ConditionalOnMissingBean; registered as
  a second AutoConfiguration.imports entry
- No build timestamp, no REST endpoint (SBOM is an attack-surface map)

Tests: 40 unit/context tests (reader, service precedence, licenses,
no-JPA context, own-bean substitution, malformed-SBOM startup) plus a
real cyclonedx-maven-plugin SBOM fixture. README Features updated.

Refs spec docs/specs/018-application-build-info

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… (spec 018 review)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…uality review)

Add a defensive-edge-cases CycloneDX fixture (absent bomFormat, null/non-scalar
fields, non-object array entries, non-array licenses, expression fallback),
build.commit.time parse success/failure cases, a blank commit.id.abbrev
fallback, and record null-collection normalisation tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.

1 participant