|
| 1 | +# Use Case: Enhance Security Posture through Automation |
| 2 | + |
| 3 | +Software development requires an ever-growing set of security practices to be implemented in order to produce software that can be trusted. Generating Software Bill of Materials (SBOMs), running vulnerability scans, static analysis, signing artifacts and more. |
| 4 | + |
| 5 | +Implementing all these in existing CI/CD pipelines introduces churn and extra cognitive load on DevOps engineers, which maintain the pipeline definitions and need to familiarize themselves with all this new technologies. |
| 6 | + |
| 7 | +It's not only about triggering extra CI jobs: this new checks and practices in turn produce extra data which needs to be stored, evaluated and understood. |
| 8 | + |
| 9 | +CDEvents allow implementing this new security practices as a result of events in existing CI/CD pipelines. This way the implementation of security practices does not impact the original pipelines and can be performed by individuals that are familiar with the security requirements and technologies. |
| 10 | +Storing the events from the existing CI/CD pipelines along with those from the security tools in and *evidence store* allows for auditing of CI/CD processes and obtaining lineage information about artifacts produced in the software factory. |
| 11 | + |
| 12 | +## State of the Art |
| 13 | + |
| 14 | +Vendors like GitHub provide integrated tools, like "Dependabot" and "CodeQL" which can be used to add some of the required security features with minimal configuration. Such tools are tightly integrated with GitHub's own CI/CD system and are not easily ported to other CI/CD systems. |
| 15 | + |
| 16 | +## Requirements |
| 17 | + |
| 18 | +* Minimal or no change to existing CI/CD systems and pipelines |
| 19 | +* Security checks and tools can be triggered in response to **policies** applied to a **collection** of events |
| 20 | +* Execution of security tools can be audited |
| 21 | + |
| 22 | +## Architecture |
| 23 | + |
| 24 | +1. Existing CI/CD pipelines produce events about their lifecycle and artifacts being built. All the events are sent to the message bus. A few options are available: |
| 25 | + * The CI/CD tool natively supports CDEvents |
| 26 | + * A plugin is available for the tool that produces CDEvents |
| 27 | + * The CI/CD tool can produce events or trigger webhooks. They can be converted to CDEvents via an adapter |
| 28 | + * The CI/CD tool can be observed in some way by an external watcher which can produce CDEvents |
| 29 | + |
| 30 | +2. An event ingestor process subscribes to the message bus, consumes events and stores them in an event database. |
| 31 | +3. A query API allows high-performance access to previous events stored in the event database. |
| 32 | +4. A policy engine subscribes to specific events. It evaluates policies that apply to the specific events and previous events (accessible via the query API) and triggers the execution of security tools and pipelines in response. |
| 33 | + |
| 34 | +5. Security engineers may define policies in the policy engine to add new security tooling, without touching the original pipelines. |
| 35 | +6. Security engineers and DevOps engineers may observe the execution or regular and security pipelines through a consolidated dashboard. |
| 36 | +7. Security engineers may audit all events associated with specific software artifacts. |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | +## Personas |
| 41 | + |
| 42 | +### Open Source Projects |
| 43 | + |
| 44 | +### In-House Development |
0 commit comments