A proof of concept implementation demonstrating Open Component Model (OCM) integration with security-focused Kubernetes deployments, featuring a comprehensive "Bill of Behavior" approach to software supply chain security.
This repository implements a complete OCM-based software delivery pipeline that extends beyond traditional Software Bill of Materials (SBOM) to include runtime behavior monitoring and security policy enforcement. The project demonstrates how OCM can be used to package, deliver, and manage cloud-native applications with integrated security scanning and behavior analysis.
The solution consists of multiple OCM components orchestrated through GitOps principles:
- Root Component (
bob.poc.ocm.software/root): Main orchestration component containing Landscaper blueprints - Web Application (
bob.poc.ocm.software/webapp): Sample containerized web application - Security Components: Kubescape for security scanning and OpenEBS for secure storage
- Runtime Rules: Custom security policies and behavior monitoring
- Open Component Model (OCM): Component-based software delivery and lifecycle management
- Kubescape: Kubernetes security platform for compliance and vulnerability scanning
- OpenEBS: Container-native storage for stateful workloads
- Flux: GitOps continuous delivery for Kubernetes
- Helm: Package management for Kubernetes applications
poc-ocm-bill-of-behavior/
├── README.md # This documentation
├── Makefile # Build and OCM packaging automation
├── renovate.json # Automated dependency updates
├── .gitignore # Git ignore patterns
│
├── ocm/ # OCM component definitions
│ ├── bob-poc-root/ # Root orchestration component
│ ├── bob-poc-webapp/ # Sample web application component
│ ├── bob-poc-kubescape/ # Security scanning component
│ ├── bob-poc-kubescape-ruleset/ # Runtime security rules
│ └── bob-poc-openebs/ # Storage component
│
├── helm/ # Helm charts
│ └── chart/
│ ├── mywebapp/ # Web application chart
│ ├── kubescape-ruleset/ # Security rules chart
│ └── openebs/ # Storage configuration chart
│
└── k8s/ # Kubernetes configurations
├── flux/ # GitOps configuration
│ ├── git-repository.yaml # Flux source repository
│ └── kustomization.yaml # Flux deployment automation
└── ocm-k8s-toolkit/ # OCM Kubernetes integration
├── bootstrap.yaml # OCM component bootstrap
└── kro-instance.yaml # Kubernetes resource orchestration
This project extends the traditional Software Bill of Materials (SBOM) concept to include a "Bill of Behavior" - comprehensive monitoring and enforcement of runtime security policies and behavioral patterns.
- Software Composition Analysis: Traditional SBOM tracking all software components and dependencies
- Security Policy Enforcement: Kubescape-based compliance checking against security frameworks
- Runtime Behavior Monitoring: Continuous monitoring of application behavior against expected patterns
- Supply Chain Security: OCM-based verification of component integrity and provenance
- OCM CLI (latest version)
- kubectl for Kubernetes management
- Helm for package management
- Flux CLI for GitOps operations
- Kubernetes cluster (v1.24+)
- Container registry access (configured in
OCM_REGISTRY) - GitOps repository access
- Storage provisioner (if running
kindcluster!)
Package & Transport all OCM components for deployment:
# Package all component constructors
make ocm-package
# Transfer all packaged components
make ocm-transferInstall Flux
flux installApply Flux GitOps configuration:
# Deploy Flux source repository
kubectl apply -f k8s/flux/git-repository.yaml
# Deploy Flux kustomization
kubectl apply -f k8s/flux/kustomization.yamlDeploy OCM Kubernetes toolkit:
# Apply OCM bootstrap configuration
kubectl apply -f k8s/ocm-k8s-toolkit/bootstrap.yaml
# Apply resource orchestration
kubectl apply -f k8s/ocm-k8s-toolkit/kro-instance.yamlThe root component serves as the main orchestrator, containing:
- Landscaper blueprints for deployment automation
- Component references to all sub-components
- Cross-component dependency management
Sample web application demonstrating:
- OCM-packaged container images
- Helm chart integration
- Security policy compliance
- Runtime behavior monitoring
Resources:
- Helm Chart: Application deployment configuration
- Container Image:
ghcr.io/k8sstormcenter/webapp@sha256:e323014ec9befb76bc551f8cc3bf158120150e2e277bae11844c2da6c56c0a2b
Comprehensive Kubernetes security scanning including:
- Operator:
quay.io/kubescape/operator:v0.2.97 - Storage:
quay.io/kubescape/storage:v0.0.206 - Vulnerability Scanner:
quay.io/kubescape/kubevuln:v0.3.82 - Core Scanner:
quay.io/kubescape/kubescape:v3.0.37
Custom security policies and runtime rules for:
- Container behavior monitoring
- Network policy enforcement
- Resource usage compliance
- Security baseline validation
Container-native storage solution providing:
- Local persistent volumes
- Dynamic provisioning
- High availability storage
- Performance optimization
Key Images:
- Node Disk Operator:
docker.io/openebs/node-disk-operator:2.1.0 - LocalPV Provisioner:
docker.io/openebs/provisioner-localpv:3.5.0 - Disk Exporter:
docker.io/openebs/node-disk-exporter:2.1.0
Set your OCM registry in the Makefile:
REGISTRY ?= your-registry.example.com/ocmUpdate the Git repository source in k8s/flux/git-repository.yaml:
spec:
url: https://github.com/your-org/your-repo.git
secretRef:
name: github-pull-secret # Configure as neededComponent versions are automatically derived from Git tags using the pattern:
- Raw version:
git describe --tags --always --dirty --match 'ocm-*' - Processed version: Removes
ocm-prefix for OCM compatibility
- Create component directory in
ocm/ - Define
component-constructor.yamlwith resources and references - Create corresponding Helm charts if needed
- Update root component references
- Package using
make ocm-package - Transfer using
make ocm-transfer
- Modify rules in
helm/chart/kubescape-ruleset/ - Update component version in
ocm/bob-poc-kubescape-ruleset/ - Redeploy through GitOps pipeline
# Test Helm charts
helm lint helm/chart/*/
# Verify deployment
kubectl get all -n default- All components signed and verified through OCM
- Container image integrity checked via SHA256 digests
- Dependency tracking and vulnerability scanning
- Kubescape continuous compliance monitoring
- Network policy enforcement
- Resource usage monitoring and alerting
- Behavioral analysis and anomaly detection
- RBAC policies for component deployment
- Service account isolation
- Secret management through external systems
- OCM component status monitoring
- Deployment success/failure tracking
- Resource utilization metrics
- Compliance score tracking
- Vulnerability detection and remediation
- Policy violation alerts
- Behavioral anomaly detection
Deployment Issues:
# Check Flux status
flux get sources git
flux get kustomizations
# Verify OCM components status
kubectl get components
kubectl get resources- Fork the repository
- Install required tools (OCM CLI, kubectl, Helm)
- Make changes following existing patterns
- Test
- Submit pull request
- Follow OCM component specification
- Use semantic versioning for components
- Include comprehensive documentation
- Test all changes in your environment (e.g.
kindcluster)
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.