From 7e707beafb35f82fc97ba4a52160bc5206bc6201 Mon Sep 17 00:00:00 2001 From: Nicolas MASSE Date: Mon, 21 Feb 2022 18:39:27 +0100 Subject: [PATCH] update doc --- README.md | 31 +++++++++++++++++++++++++------ cicd/00-namespace.yaml | 10 ---------- deployment/00-namespace.yaml | 10 ---------- 3 files changed, 25 insertions(+), 26 deletions(-) delete mode 100644 cicd/00-namespace.yaml delete mode 100644 deployment/00-namespace.yaml diff --git a/README.md b/README.md index 652ee53..f03bb0a 100644 --- a/README.md +++ b/README.md @@ -40,6 +40,13 @@ On your OpenShift cluster(s): * Red Hat ACS * OpenShift Pipelines +Create two namespaces for the demo. + +```sh +oc new-project vulnerable-cicd +oc new-project vulnerable-log4j +``` + ### 1. Jira * Create a Jira trial account at: https://www.atlassian.com/fr/try/cloud/signup?bundle=jira-software&edition=free @@ -123,11 +130,7 @@ Add an enforcement exception for the `Fixable Severity at least important` polic * In the excluded image, add `/vulnerable-cicd/vulnerable-log4j` (you will have to select the last option of the list: `Create ...`) * Save the policy -### 4. Deploy the vulnerable app - -```sh -oc kustomize deployment | oc apply -f - -``` +### 4. Prepare for deployment Give access to the `vulnerable-cicd` images from the `vulnerable-log4j` namespace. @@ -155,6 +158,12 @@ REGISTRY_TOKEN="$(oc get secrets -n vulnerable-cicd -o json | jq -r '.items[] | podman login "$REGISTRY" --username sa --password "$REGISTRY_TOKEN" ``` +Deploy the vulnerable app. + +```sh +oc kustomize deployment | oc apply -f - +``` + ## Demo scenario ### Build the inventory @@ -215,7 +224,17 @@ Restart the CI/CD pipeline. ## Reset the demo -* In central, delete the **Log4Shell** policy +In central, delete the **Log4Shell** policy + +Edit **src/pom.xml** and change `2.17.1` to `2.14.0`. + +```sh +git add src/pom.xml +git commit -m 'reset the demo' +git push +``` + +Cleanup ```sh oc delete -f deployment diff --git a/cicd/00-namespace.yaml b/cicd/00-namespace.yaml deleted file mode 100644 index 6b45e72..0000000 --- a/cicd/00-namespace.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - annotations: - openshift.io/description: "" - openshift.io/display-name: "" - name: vulnerable-cicd -spec: - finalizers: - - kubernetes diff --git a/deployment/00-namespace.yaml b/deployment/00-namespace.yaml deleted file mode 100644 index 0205823..0000000 --- a/deployment/00-namespace.yaml +++ /dev/null @@ -1,10 +0,0 @@ -apiVersion: v1 -kind: Namespace -metadata: - annotations: - openshift.io/description: "" - openshift.io/display-name: "" - name: vulnerable-log4j -spec: - finalizers: - - kubernetes