Skip to content

Commit 28fa215

Browse files
cncf: self-assessment doc
This is being added here only for review. This doc will live in https://github.com/cncf/tag-security and *probably* be removed from here. Co-authored-by: Tom Sweeney <[email protected]> Signed-off-by: Lokesh Mandvekar <[email protected]>
1 parent e0e108c commit 28fa215

File tree

1 file changed

+287
-0
lines changed

1 file changed

+287
-0
lines changed

docs/cncf/self-assessment.md

Lines changed: 287 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,287 @@
1+
# Buildah Self-assessment
2+
3+
## Table of contents
4+
5+
* [Metadata](#metadata)
6+
* [Security links](#security-links)
7+
* [Overview](#overview)
8+
* [Actors](#actors)
9+
* [Actions](#actions)
10+
* [Background](#background)
11+
* [Goals](#goals)
12+
* [Non-goals](#non-goals)
13+
* [Self-assessment use](#self-assessment-use)
14+
* [Security functions and features](#security-functions-and-features)
15+
* [Project compliance](#project-compliance)
16+
* [Secure development practices](#secure-development-practices)
17+
* [Security issue resolution](#security-issue-resolution)
18+
* [Appendix](#appendix)
19+
20+
## Metadata
21+
22+
|||| | \-- | \-- | | Assessment Stage | Incomplete | | Software | [https://github.com/containers/buildah](https://github.com/containers/buildah) | | Security Provider | No | | Languages | Go | | SBOM | [https://github.com/containers/buildah/blob/main/go.mod](https://github.com/containers/buildah/blob/main/go.mod) |
23+
24+
### Security links
25+
26+
| Doc | url |
27+
| :---- | :---- |
28+
| Security file | [https://github.com/containers/buildah/blob/main/SECURITY.md](https://github.com/containers/buildah/blob/main/SECURITY.md) |
29+
30+
## Overview
31+
32+
Buildah is a tool that facilitates building Open Container Initiative (OCI) images. It provides a flexible and efficient way to create container images without requiring a running container daemon, emphasizing security through rootless builds and fine-grained control over the image creation process.
33+
34+
### Background
35+
36+
Buildah is a command-line tool designed for building OCI-compliant container images. Unlike traditional container build tools that require a daemon, Buildah operates directly as a command-line application, providing better security and flexibility.
37+
38+
Key characteristics:
39+
40+
- **Daemonless**: No background daemon process required for building images
41+
- **Rootless builds**: Supports building images without root privileges
42+
- **OCI-compliant**: Fully compliant with OCI image specifications
43+
- **Dockerfile compatibility**: Can build images from Dockerfiles/Containerfiles
44+
- **Fine-grained control**: Provides detailed control over the build process
45+
- **Integration**: Works seamlessly with Podman, Skopeo, and other container tools
46+
47+
Buildah is part of the containers ecosystem and integrates with other tools like Podman, Skopeo, and CRI-O.
48+
49+
### Actors
50+
51+
* **Buildah CLI**: The main command-line interface that users interact with for building container images.
52+
53+
* **Build context**: The filesystem context containing source code and build instructions.
54+
55+
* **OCI runtime**: Interfaces with OCI-compliant runtimes (runc, crun) to execute build commands when needed.
56+
57+
* **Image store**: Manages container images and their layers during the build process.
58+
59+
* **Registry client**: Handles interactions with container registries for pulling base images and pushing built images.
60+
61+
* **Storage backend**: Manages container storage layers and filesystems during the build process.
62+
63+
### Actions
64+
65+
* **Image building**:
66+
67+
- Parses Dockerfile/Containerfile or receives direct build commands
68+
- Pulls base images from container registries
69+
- Executes build steps in isolated environments
70+
- Creates image layers and metadata
71+
- Applies security policies during build
72+
73+
74+
* **Container creation**:
75+
76+
- Creates working containers for build operations
77+
- Sets up namespaces and cgroups for isolation
78+
- Configures security policies for build containers
79+
80+
81+
* **Layer management**:
82+
83+
- Creates and manages image layers
84+
- Optimizes layer size and composition
85+
- Handles layer caching for efficiency
86+
87+
88+
* **Image inspection**:
89+
90+
- Provides detailed information about images
91+
- Verifies image metadata and configuration
92+
- Checks security attributes
93+
94+
95+
* **Image publishing**:
96+
97+
- Pushes built images to registries
98+
- Handles authentication with registries
99+
- Supports image signing
100+
101+
### Goals
102+
103+
* **Rootless image building**: Enable users to build container images without root privileges, reducing security risks.
104+
105+
* **Daemonless operation**: Eliminate the need for a daemon process, reducing attack surface and improving security.
106+
107+
* **OCI compliance**: Maintain full compatibility with OCI specifications for container images.
108+
109+
* **Dockerfile compatibility**: Support standard Dockerfiles/Containerfiles while providing enhanced security features.
110+
111+
* **Flexible build process**: Provide fine-grained control over the image building process.
112+
113+
* **Integration**: Work seamlessly with other container tools in the ecosystem.
114+
115+
### Non-goals
116+
117+
* **Container orchestration**: Buildah does not provide cluster orchestration capabilities.
118+
119+
* **Image registry**: Buildah does not operate as a container registry, though it interacts with them.
120+
121+
* **Continuous integration platform**: While used in CI/CD, Buildah itself is not a CI/CD platform.
122+
123+
## Self-assessment use
124+
125+
This self-assessment is created by the Buildah team to perform an internal analysis of the project's security. It is not intended to provide a security audit of Buildah, or function as an independent assessment or attestation of Buildah's security health.
126+
127+
This document serves to provide Buildah users with an initial understanding of Buildah's security, where to find existing security documentation, Buildah plans for security, and general overview of Buildah security practices, both for development of Buildah as well as security of Buildah.
128+
129+
This document provides the CNCF TAG-Security with an initial understanding of Buildah to assist in a joint-assessment, necessary for projects under incubation. Taken together, this document and the joint-assessment serve as a cornerstone for if and when Buildah seeks graduation and is preparing for a security audit.
130+
131+
## Security functions and features
132+
133+
### Critical Security Components
134+
135+
* **Rootless builds**: Buildah's core security feature that allows building images without root privileges, significantly reducing the attack surface.
136+
137+
* **User namespaces**: Provides process isolation during builds by mapping container user IDs to host user IDs.
138+
139+
* **Build isolation**: Each build operation is isolated from the host system and other builds.
140+
141+
* **Daemonless architecture**: Eliminates the daemon process, reducing potential attack vectors.
142+
143+
* **Security policy enforcement**: Applies seccomp, SELinux, and capabilities restrictions during builds.
144+
145+
### Security Relevant Components
146+
147+
* **Image verification**: Support for verifying container image signatures before using them as base images.
148+
149+
* **Secure defaults**: Provides secure defaults for build operations.
150+
151+
* **Credential management**: Secure handling of registry credentials during image operations.
152+
153+
* **Layer security**: Proper handling and isolation of image layers during builds.
154+
155+
* **Mount security**: Secure mounting of volumes and filesystems during build operations.
156+
157+
## Project compliance
158+
159+
* **OCI Compliance**: Buildah is fully compliant with the Open Container Initiative (OCI) specifications for container images.
160+
161+
* **OpenSSF Best Practices**: Buildah has achieved a [passing OpenSSF Best Practices badge](https://www.bestpractices.dev/projects/10579), demonstrating adherence to security best practices.
162+
163+
* **SELinux**: Full integration with SELinux for mandatory access control during builds.
164+
165+
* **AppArmor**: Support for AppArmor profiles for additional access control.
166+
167+
## Secure development practices
168+
169+
### Development Pipeline
170+
171+
* **Code Review Process**: All code changes require review by at least one maintainer before merging. The project uses GitHub pull requests for all contributions.
172+
173+
* **Automated Testing**: Comprehensive integration test suite is run in CI on every PR and also on a nightly basis. These tests exercise the buildah binary compiled using the PR's source code and the latest HEAD commit respectively.
174+
175+
* **Security Scanning**: Automated vulnerability scanning of dependencies using tools like Dependabot and GitHub Security Advisories. All medium and higher severity exploitable vulnerabilities are fixed in a timely way after they are confirmed.
176+
177+
* **Static Analysis**: Code quality and security analysis using golangci-lint which is run on every PR, ensuring testing is done prior to merge. The tool includes rules to look for common vulnerabilities in Go code.
178+
179+
* **Dynamic Analysis**: Comprehensive integration test suite is run in CI on every PR and also on a nightly basis. If the integration tests point out any issues in the development phase itself, those get fixed before any code is merged.
180+
181+
* **Container Image Security**: Built images follow security best practices and are regularly updated for security patches.
182+
183+
* **OpenSSF Best Practices Compliance**: Buildah has achieved a [passing OpenSSF Best Practices badge](https://www.bestpractices.dev/projects/10579), demonstrating adherence to security best practices including proper licensing, contribution guidelines, and security processes.
184+
185+
### Communication Channels
186+
187+
* Podman user room: [\#podman:fedoraproject.org](https://matrix.to/#/#podman:fedoraproject.org)
188+
189+
* Podman dev room: [\#podman-dev:matrix.org](https://matrix.to/#/#podman-dev:matrix.org)
190+
191+
* **Inbound**:
192+
193+
- GitHub Issues for bug reports and feature requests
194+
- GitHub Discussions for community questions
195+
- Security issues via the security mailing list
196+
- Mailing lists for formal discussions
197+
- Clear contribution guidelines documented in [CONTRIBUTING.md](https://github.com/containers/buildah/blob/main/CONTRIBUTING.md)
198+
199+
200+
* **Outbound**:
201+
202+
- Release announcements via GitHub releases (and [buildah.io](http://buildah.io) for major and minor version bumps)
203+
- Security advisories through [https://access.redhat.com](https://access.redhat.com) and Bugzilla trackers for Fedora and RHEL on [bugzilla.redhat.com](http://bugzilla.redhat.com) .
204+
- Documentation updates and blog posts
205+
- Conference presentations and talks
206+
- Project website at [buildah.io](https://buildah.io) with comprehensive documentation
207+
208+
### Ecosystem
209+
210+
Buildah is a critical component of the cloud-native ecosystem:
211+
212+
* **OpenShift**: Buildah is integrated into Red Hat OpenShift for secure image building workflows.
213+
214+
* **Container Ecosystem**: Integrates with Podman for running containers, Skopeo for image operations, and CRI-O for Kubernetes runtime.
215+
216+
* **Development Tools**: Widely used in development environments for building container images securely.
217+
218+
* **CI/CD Pipelines**: Used in many CI/CD systems for building containerized applications with enhanced security.
219+
220+
## Security issue resolution
221+
222+
### Responsible Disclosures Process
223+
224+
* **Reporting**: Security vulnerabilities should be reported by email as documented in the [SECURITY.md](https://github.com/containers/buildah/blob/main/SECURITY.md) file.
225+
226+
* **Response Time**: The team commits to responding to vulnerability reports within 48 hours. All medium and higher severity exploitable vulnerabilities are prioritized as a matter of general practice.
227+
228+
* **Coordination**: For critical vulnerabilities, Red Hat’s Product Security team coordinates with downstream projects to file bug trackers for downstreams (Fedora / RHEL).
229+
230+
* **Credit**: Security researchers who responsibly disclose vulnerabilities are credited in security advisories and release notes.
231+
232+
* **Public Disclosure**: Vulnerabilities are disclosed by Red Hat’s Product Security team with appropriate embargo periods for critical issues, following industry best practices for responsible disclosure.
233+
234+
### Vulnerability Response Process
235+
236+
* **Triage**: Security reports are triaged by the security team and assigned severity levels (Critical, High, Medium, Low) using CVSS scoring where applicable.
237+
238+
* **Investigation**: The team investigates the vulnerability, determines impact, and develops fixes. All medium and higher severity exploitable vulnerabilities discovered through static or dynamic analysis are fixed in a timely way after they are confirmed.
239+
240+
* **Fix Development**: Security fixes are developed in private repositories to prevent premature disclosure. The project maintains a clear process for developing and testing security patches.
241+
242+
* **Disclosure**: Vulnerabilities are disclosed through GitHub Security Advisories with appropriate embargo periods for critical issues. The project follows industry best practices for coordinated vulnerability disclosure.
243+
244+
245+
### Incident Response
246+
247+
* **Detection**: Security incidents are detected through automated monitoring, user reports, security research, and the comprehensive testing suite that runs on every PR and nightly.
248+
249+
* **Assessment**: The team assesses the severity and impact of security incidents using CVSS scoring and industry-standard severity classification.
250+
251+
* **Containment**: Immediate steps are taken to contain and mitigate the impact of security incidents. If the integration tests point out any issues in the development phase, those get fixed before any code is merged.
252+
253+
* **Communication**: Affected users are notified through security advisories and release notes. The project maintains clear communication channels for security updates.
254+
255+
* **Recovery**: Patches and updates are released as quickly as possible to address security issues. All medium and high severity vulnerabilities are prioritized as a matter of general practice.
256+
257+
* **Post-Incident Review**: The team conducts post-incident reviews to identify improvements to the security process and prevent similar issues in the future.
258+
259+
## Appendix
260+
261+
### Known Issues Over Time
262+
263+
* **Security Advisories**: Podman maintains a comprehensive list of security advisories at [https://access.redhat.com](https://access.redhat.com) and Bugzilla trackers for Fedora and RHEL on [bugzilla.redhat.com](http://bugzilla.redhat.com) .
264+
265+
* **Code Review**: The project's code review process has caught numerous potential security issues before they reach production.
266+
267+
### OpenSSF Best Practices
268+
269+
* **Current Status**: Buildah has achieved a [passing OpenSSF Best Practices badge](https://www.bestpractices.dev/projects/10579) (100% compliance), demonstrating adherence to security best practices.
270+
271+
* **Key Achievements**:
272+
273+
- Comprehensive project documentation and contribution guidelines
274+
- Robust security testing and analysis processes
275+
- Clear vulnerability disclosure and response procedures
276+
- Strong development practices with code review and automated testing
277+
- Proper licensing and project governance
278+
279+
### Case Studies
280+
281+
TBD
282+
283+
### Related Projects / Vendors
284+
285+
* **Skopeo**: A command line utility to perform various operations on container images and image repositories like copying an image, inspecting a remote image, deleting an image from an image repository.
286+
287+
* **Podman:** A command line utility for managing OCI containers and pods.

0 commit comments

Comments
 (0)