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: docs/runbooks/scripts/pipeline/cloud-gov-waf-version.sh.MD
+7-1Lines changed: 7 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,5 +1,11 @@
1
1
### Runbook for `cloud-gov-waf-version.sh`
2
2
3
+
#### DEPRECATED!
4
+
5
+
The script described here has been replaced. We no longer try to determine the `new_nginx_version` dynamically. In the absence of a stable API for buildpack details, this turned out to be too unreliable for the deployment pipeline.
6
+
7
+
However, something like this might make sense as part of a build-and-commit pipeline to generate a modsecurity bundle for later deployment.
8
+
3
9
#### Overview
4
10
5
11
The script `cloud-gov-waf-version.sh` is a bash script designed to check for new versions of an nginx buildpack and update the environment variables accordingly. It also initializes the necessary libraries and checks if there are new versions available. The script runs a series of commands to determine the current and new versions of the nginx buildpack, extracts the relevant nginx version from the GitHub releases page, and makes decisions based on whether an update is necessary.
Copy file name to clipboardExpand all lines: terraform/applications/nginx-waf/.docker/RUNBOOK.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,12 +18,12 @@ The `Dockerfile` initializes a Docker image that is based on the Ubuntu `jammy`
18
18
ARG ubuntu_version="jammy"
19
19
```
20
20
These environment variables are important because they allow the builder to specify the exact versions of the components that will be built.
21
-
21
+
22
22
-`modsecurity_nginx_version` is determined by the version of the [OWASP ModSecurity NGINX repo](https://github.com/owasp-modsecurity/ModSecurity-nginx).
23
23
-`nginx_version` is deterimined by the version shipped in version of NGINX buildpack that is in use. This can be determined by using the `cf buildpacks` command to see what version Cloud.gov is using. That buildpack version can then be referenced at the [NGINX Buildpack GitHub repository](https://github.com/cloudfoundry/nginx-buildpack/releases) to see what version of NGINX is shipped in that version of the buildpack.
24
24
-`ubuntu_version` is determined by what version of `cflinuxfs` is in use. As of this documents creation, it is `cflinuxfs4`, based on Ubuntu Jammy.
25
-
26
-
The ModSecurity plugin needs to be build for the specific version of NGINX running.
25
+
26
+
The ModSecurity plugin needs to be built for the specific version of NGINX running.
27
27
28
28
2.**Apt Source List Modification**
29
29
```
@@ -65,7 +65,7 @@ In addition to the `Dockerfile`, a `Makefile` provides a build pipeline to compi
The Makefile references the arguments for the builds and constructs the Docker image.
71
71
@@ -92,4 +92,4 @@ In addition to the `Dockerfile`, a `Makefile` provides a build pipeline to compi
92
92
93
93
-**Incorrect Version Compilation**: You might receive warnings about mismatching versions if the environment variables passed to the Docker build (`modsecurity_nginx_version`, `nginx_version`, and `ubuntu_version`) do not match the expected versions inside the Dockerfile statements.
94
94
95
-
-**Module Compilation Failure**: If there are issues with the dynamic module compilation step (`make` command), review the configuration and build paths to ensure that there are no typos or missing paths declared within the `Dockerfile`.
95
+
-**Module Compilation Failure**: If there are issues with the dynamic module compilation step (`make` command), review the configuration and build paths to ensure that there are no typos or missing paths declared within the `Dockerfile`.
0 commit comments