Skip to content

Commit bb27cf1

Browse files
committed
Move docs to separate section
1 parent 69d2025 commit bb27cf1

File tree

1 file changed

+15
-13
lines changed

1 file changed

+15
-13
lines changed

README.md

Lines changed: 15 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@ If you want to support the development of `pre-commit-terraform` and [many other
7070
* [terragrunt\_providers\_lock](#terragrunt_providers_lock)
7171
* [terragrunt\_validate\_inputs](#terragrunt_validate_inputs)
7272
* [Docker Usage](#docker-usage)
73+
* [About Docker image security](#about-docker-image-security)
7374
* [File Permissions](#file-permissions)
7475
* [Download Terraform modules from private GitHub repositories](#download-terraform-modules-from-private-github-repositories)
7576
* [GitHub Actions](#github-actions)
@@ -129,20 +130,12 @@ docker pull ghcr.io/antonbabenko/pre-commit-terraform:$TAG
129130

130131
All available tags [here](https://github.com/antonbabenko/pre-commit-terraform/pkgs/container/pre-commit-terraform/versions).
131132

132-
> [!WARNING]
133-
> Pre-built Docker images contain the latest versions of tools available at the time of their build and remain unchanged afterward. Tags should be immutable whenever possible, and it is highly recommended to pin them using hash sums for security and reproducibility.
134-
>
135-
> This means that most Docker images will include known CVEs, and the longer an image exists, the more CVEs it may accumulate. This applies even to the latest `vX.Y.Z` tags.
136-
>
137-
> To address this, you can use the `nightly` tag, which rebuilds nightly with the latest versions of all dependencies and `pre-commit-terraform` hooks. However, using mutable tags introduces different security conserns.
138-
>
139-
> Note: Currently, we DO NOT test third-party tools or their dependencies for security vulnerabilities, corruption, or injection (including obfuscated content). If you have ideas for introducing image scans or other security improvements, please open an issue or submit a PR. Some ideas are already tracked in [#835](https://github.com/antonbabenko/pre-commit-terraform/issues/835).
140-
>
141-
> From a security perspective, the best approach is to manage the Docker image yourself and update its dependencies as needed. This allows you to remove unnecessary dependencies, reducing the number of potential CVEs and improving overall security.
133+
Check [About Docker image security](#about-docker-image-security) section to learn more about possible security issues and why you probably want to build and maintain your own image.
134+
142135

143136
**Build from scratch**:
144137

145-
> [!IMPORTANT]
138+
> **IMPORTANT**
146139
> To build image you need to have [`docker buildx`](https://docs.docker.com/build/install-buildx/) enabled as default builder.
147140
> Otherwise - provide `TARGETOS` and `TARGETARCH` as additional `--build-arg`'s to `docker build`.
148141
@@ -237,8 +230,8 @@ curl -L "$(curl -s https://api.github.com/repos/minamijoyo/hcledit/releases/late
237230

238231
We highly recommend using [WSL/WSL2](https://docs.microsoft.com/en-us/windows/wsl/install) with Ubuntu and following the Ubuntu installation guide. Or use Docker.
239232

240-
> [!IMPORTANT]
241-
> We won't be able to help with issues that can't be reproduced in Linux/Mac.
233+
> **IMPORTANT**
234+
> We won't be able to help with issues that can't be reproduced in Linux/Mac.
242235
> So, try to find a working solution and send PR before open an issue.
243236
244237
Otherwise, you can follow [this gist](https://gist.github.com/etiennejeanneaurevolve/1ed387dc73c5d4cb53ab313049587d09):
@@ -1193,7 +1186,16 @@ Example:
11931186

11941187
## Docker Usage
11951188

1189+
### About Docker image security
1190+
1191+
Pre-built Docker images contain the latest versions of tools available at the time of their build and remain unchanged afterward. Tags should be immutable whenever possible, and it is highly recommended to pin them using hash sums for security and reproducibility.
1192+
1193+
This means that most Docker images will include known CVEs, and the longer an image exists, the more CVEs it may accumulate. This applies even to the latest `vX.Y.Z` tags.
1194+
To address this, you can use the `nightly` tag, which rebuilds nightly with the latest versions of all dependencies and latest `pre-commit-terraform` hooks. However, using mutable tags introduces different security concerns.
1195+
1196+
Note: Currently, we DO NOT test third-party tools or their dependencies for security vulnerabilities, corruption, or injection (including obfuscated content). If you have ideas for introducing image scans or other security improvements, please open an issue or submit a PR. Some ideas are already tracked in [#835](https://github.com/antonbabenko/pre-commit-terraform/issues/835).
11961197

1198+
From a security perspective, the best approach is to manage the Docker image yourself and update its dependencies as needed. This allows you to remove unnecessary dependencies, reducing the number of potential CVEs and improving overall security.
11971199

11981200
### File Permissions
11991201

0 commit comments

Comments
 (0)