How ibm/cbomkit works
Frontend – The CBOMkit-coeus
• Located in the “frontend” directory, this component is built in Vue.js. It offers an intuitive web user interface for:
– Browsing and uploading CBOM files
– Initiating scans (by submitting Git URLs or package URLs)
– Viewing generated CBOMs and associated compliance reports
• It also provides an independent deployment option (“coeus”) for just the visualization/compliance check.
• Docker support with its dedicated Dockerfile and Nginx configurations.
API Server (Backend)
• The backend is primarily implemented as a Java application using Maven (see the pom.xml and src/main/java). Its responsibilities include:
– Exposing a RESTful API (with an OpenAPI specification available in openapi.yaml) to handle:
∗ Retrieval of stored/generated CBOMs,
∗ Acceptance of new CBOM scan requests,
∗ Compliance check queries.
– WebSocket integration for providing real-time updates on the scanning process.
– Handling the CBOM generation and interacting with external scanning tools (e.g., CBOMkit-hyperion/Sonar Cryptography Plugin) that actually examine source code to create CBOMs.
• The codebase is structured into various domains such as scanning, compliance, database interaction, and process management which can be visualized as distinct modules or service components within the API server.
Database
• Although the database itself isn’t coded in the repository, the helm chart configuration and docker-compose file imply that a persistent data store (likely PostgreSQL based on helm parameter names) is used.
• It is responsible for storing all the CBOMs and providing data to the API server through read-model repositories.
Additional Deployment & Infrastructure Elements
• Helm charts in the “chart” directory allow deployment to Kubernetes, integrating all components in production.
• Docker Compose is used for development or simplified production deployments.
• The project includes Maven wrapper scripts and Makefile commands to manage builds and deployments.
• Logging, progress tracking, error handling, and event buses are implemented in the backend (e.g., using WebSocketProgressDispatcher, DomainEventBus, etc.) to facilitate the scanning and CBOM lifecycle.
● “Frontend/CBOMkit-coeus” – a Vue.js based web interface, which can either be integrated with the full suite or deployed independently.
● “API Server” – the backend Java service that handles REST API endpoints and WebSocket connections; you may further decompose this into modules for scanning, compliance checking, and database interaction.
● “External Services” – these include source repositories (e.g., GitHub) and scanning services (the CBOMkit-hyperion integration) that the API server interacts with for CBOM generation.
● “Deployment & Infrastructure” – show supporting infrastructure like Docker containers, Kubernetes (via Helm), and configuration management (Makefile, Maven wrapper).
● From “User/Browser” to “Frontend” indicating user interactions (e.g., upload, view, scan initiation).
● From “Frontend” to “API Server” showing RESTful calls (e.g., lookup, scan requests, compliance queries) and WebSocket connections for progress updates.
● From “API Server” to “Database” for storing and retrieving CBOM data.
● From “API Server” to “External Services” to indicate real-time scanning and data fetching (for example, cloning Git repositories and invoking scanning modules).
c. Architectural Patterns and Technologies:
● Modular layered architecture on the backend, where the scanning, compliance, and database interaction are clearly separated.
● Use of event-driven mechanisms (Domain Event Bus, Process Manager) for handling long-running CBOM generation and asynchronous updates.
● Technology stacks: Vue.js for frontend, Java/Maven for backend, Docker and Kubernetes for deployment.
● Real-time communication via WebSockets for progress feedback.
● Emphasize the separation of concerns by showing the distinct boundaries between the frontend (UI/CBOMkit-coeus) and the API server.
● Clearly indicate where the scanning functionality is located within the backend, and how it communicates both with external code repositories and the compliance module.
● If space permits, indicate the deployment options (docker-compose for simple deployments, helm chart for Kubernetes) to provide additional context for operational flow.