You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+46-13Lines changed: 46 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -11,11 +11,11 @@ DevSecOps CICD pipeline demo using several technologies such as:
11
11
12
12
Vulnerability and configuration management methods included in this demo are the following:
13
13
14
-
***Static application security testing (SAST)**, which analyzes code under development for vulnerabilities and quality issues.
15
-
***Software composition analysis (SCA)**, which examines dependent packages included with applications, looking for known vulnerabilities and licensing issues.
16
-
***Interactive application security testing (IAST)** and **dynamic application security testing (DAST)** tools, which analyze running applications to find execution vulnerabilities.
17
-
***Configuration management** with analysis and management of application and infrastructure configurations in DevOps. Traditionally this was not used as a way to improve security. But properly managing configurations in a GitOps process can strengthen security by improving change controls, identifying configuration defects that can reduce the attack surface, and signing and tracking authorship for better accountability and opportunities to improve.
18
-
***Image risk** is any risk associated with a container image. This includes vulnerable dependencies, embedded secrets, bad configurations, malware, or images that are not trusted.
14
+
-**Static application security testing (SAST)**, which analyzes code under development for vulnerabilities and quality issues.
15
+
-**Software composition analysis (SCA)**, which examines dependent packages included with applications, looking for known vulnerabilities and licensing issues.
16
+
-**Interactive application security testing (IAST)** and **dynamic application security testing (DAST)** tools, which analyze running applications to find execution vulnerabilities.
17
+
-**Configuration management** with analysis and management of application and infrastructure configurations in DevOps. Traditionally this was not used as a way to improve security. But properly managing configurations in a GitOps process can strengthen security by improving change controls, identifying configuration defects that can reduce the attack surface, and signing and tracking authorship for better accountability and opportunities to improve.
18
+
-**Image risk** is any risk associated with a container image. This includes vulnerable dependencies, embedded secrets, bad configurations, malware, or images that are not trusted.
19
19
20
20
This pipeline also improve security adding the following Open Source components:
21
21
@@ -95,6 +95,38 @@ These policies notification can be enabled by each system policy enabled in our
95
95
96
96
NOTE: By now the integration is manual. WIP to automate it.
97
97
98
+
## 6. Image Signing and Pipeline Signing
99
+
100
+
The original demo can be extended to use Cosign to Sign Image artifacts and also to sign the Tekton Build Pipeline via Tekton [Chaining](https://github.com/tektoncd/chains).
101
+
102
+
To extend the pipeline run the extend.sh script
103
+
104
+
```sh
105
+
./extend.sh
106
+
```
107
+
108
+
This will install Noobaa(Object Storage), Quay, and create a pod for cosign secret generation and verification.It will also install the tekton chains operator and integrate with ACS policies to generate violations for non signed images.
109
+
110
+
After installation the pipeline will build images to quay and have a task that signs the image.
And we can verify the signature and payload information of our last successful pipelinerun using the below command.
125
+
126
+
```sh
127
+
./demo.sh sign-verify
128
+
```
129
+
98
130
## Security Policies and CI Violations
99
131
100
132
In this demo, we can control the security policies applied into our pipelines, scanning the images and analysing the different deployments templates used for deploy our applications.
@@ -114,9 +146,10 @@ This ensures that we have the total control of our pipelines, and no image is pu
114
146
To show a complete demo and show the transition from a "bad image" to an image that passes the build enforcement, we can update the Tekton task of the image build and fix the image. In this example, we will be enabling the enforcement of the "Red Hat Package Manager in Image" policy in ACS, which will fail our pipeline at the image-check as both `yum` and `rpm` package managers are present in our base image.
115
147
116
148
Update the tekton task:
149
+
117
150
1. Delete the `s2i-java-11` task
118
-
1. With the UI: From the OpenShift UI, make sure you are in the cicd project and then go to Pipelines > Tasks and delete the `s2i-java-11` task.
119
-
2. With the Tekton cli `tkn task delete s2i-java-11`
151
+
1. With the UI: From the OpenShift UI, make sure you are in the cicd project and then go to Pipelines > Tasks and delete the `s2i-java-11` task.
152
+
2. With the Tekton cli `tkn task delete s2i-java-11`
120
153
2. Apply the new update task: `kubectl apply -f fix-image/s2ijava-mgr.yaml`
121
154
3. Re-run the pipeline, your deployment now succeeds.
122
155
@@ -188,20 +221,20 @@ NOTE: This pipeline will fail if you don't [disable the "Fixable at least Import
188
221
189
222
## Quick Video with the Demo
190
223
191
-
*[Option I - Complete CICD End2End process (Success)](https://youtu.be/uA7nUYchY5Q)
224
+
-[Option I - Complete CICD End2End process (Success)](https://youtu.be/uA7nUYchY5Q)
192
225
193
-
*[Option II - Failure CICD pipeline due to the ACS violation policy](https://youtu.be/jTRImofd6wQ?t=380)
226
+
-[Option II - Failure CICD pipeline due to the ACS violation policy](https://youtu.be/jTRImofd6wQ?t=380)
194
227
195
-
*[Openshift Coffee Break - ACS for Kubernetes - DevSecOps Way](https://youtu.be/43Mr30mXq0I?t=1955)
228
+
-[Openshift Coffee Break - ACS for Kubernetes - DevSecOps Way](https://youtu.be/43Mr30mXq0I?t=1955)
0 commit comments