Core Architectural Components¶
This document details the core components of the Kubernetes CINC Secure Scanner architecture and their functions within the system.
CINC Auditor¶
CINC Auditor is the primary scanning engine used by the platform.
- Purpose: Execute security and compliance checks against container targets
- Features:
- Open-source InSpec-compatible scanner
- Supports custom security profiles
- Produces structured JSON outputs for compliance reporting
- Can be extended with custom resources and plugins
Transport Plugin (train-k8s-container)¶
The train-k8s-container transport plugin is a critical component for Kubernetes communication.
- Purpose: Provide secure access to container filesystems and commands within Kubernetes
- Features:
- Connects to Kubernetes API securely
- Uses pod exec API for container command execution
- Supports filesystem inspection
- Modified to support multiple container types including distroless
Container Adapters¶
Container adapters provide specialized access mechanisms for different container types.
- Purpose: Enable scanning of various container types including distroless containers
- Types:
- Standard Container Adapter: Uses direct exec into container
- Distroless Container Adapter: Uses debug container approach
- Sidecar Container Adapter: Uses shared process namespace
Threshold Validation¶
Threshold validation is implemented through MITRE SAF CLI integration.
- Purpose: Evaluate scan results against predefined compliance thresholds
- Features:
- Configurable threshold levels
- Support for multiple threshold configurations
- Integration with CI/CD pipelines
- Fail/pass determination for automated workflows
Component Interaction Model¶
The core components interact in a hierarchical manner:
- Scanning Initiation: Triggered by script, Helm chart, or CI/CD system
- Authentication Setup: Service accounts and RBAC are configured for least privilege
- Transport Configuration: The train-k8s-container plugin connects to the Kubernetes API
- Scanning Execution: CINC Auditor executes the specified profile against the target
- Results Processing: Scan results are processed and validated against thresholds
- Cleanup: Temporary resources are removed to maintain security
Component Dependencies¶
Component | Dependencies | Purpose |
---|---|---|
CINC Auditor | Ruby Runtime, InSpec Profiles | Security scanning engine |
Transport Plugin | Kubernetes API access, kubeconfig | Container access mechanism |
Container Adapters | Kubernetes permissions, container runtime | Type-specific access |
Threshold Validation | SAF CLI, Ruby Runtime | Compliance evaluation |
Technology Choices¶
The components were selected and designed with the following considerations:
- Open Source: All core components are open source
- Extensibility: Components can be extended or modified as needed
- Security: Security is built into each component design
- Interoperability: Components work together seamlessly
- Kubernetes Native: Designed to work within Kubernetes environments