-
Notifications
You must be signed in to change notification settings - Fork 72
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
docs: update all documentation #688
docs: update all documentation #688
Conversation
let's merge this into quick start instead of a separate page. we'll need to rearrange some parts there. we can call out scanners being optional and if users are interested in targeted updates. |
Signed-off-by: ashnamehrotra <[email protected]>
0ea88d5
to
e84b71c
Compare
@@ -12,32 +12,18 @@ This sample illustrates how to patch containers using vulnerability reports with | |||
* The `docker` daemon runs a buildkit service in-process. If you are using this for your buildkit instance, Docker must have the [containerd image store feature](https://docs.docker.com/storage/containerd/) enabled. | |||
* If you are using a buildx instance, or using buildkitd directly, there is no need to enable the containerd image store. However, only images in a remote registry can be patched using these methods. | |||
* [docker](https://docs.docker.com/desktop/linux/install/#generic-installation-steps) daemon running and CLI installed & pathed. | |||
* [trivy CLI](https://aquasecurity.github.io/trivy/latest/getting-started/installation/) installed & pathed. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should we keep this but under an optional section?
website/docs/quick-start.md
Outdated
|
||
You can also see the existing patchable vulnerabilities in table form on the shell with: | ||
Upgrading all packages may introduce compatibility issues or break existing functionality. Test the patched image to ensure stability. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Upgrading all packages may introduce compatibility issues or break existing functionality. Test the patched image to ensure stability. | |
Upgrading all packages may introduce compatibility issues or break existing functionality. Make sure to test the patched image to ensure stability. If you are interested in targeted updates for vulnerabilities only, please see [Patch with an optional scanner report](#patch-with-an-optional-scanner-report) section. |
website/docs/quick-start.md
Outdated
2. Scan the container image for patchable OS vulnerabilities, outputting the results to a JSON file: | ||
|
||
```bash | ||
trivy image --vuln-type os --ignore-unfixed -f json -o nginx.1.21.6.json docker.io/library/nginx:1.21.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trivy image --vuln-type os --ignore-unfixed -f json -o nginx.1.21.6.json docker.io/library/nginx:1.21.6 | |
export IMAGE=docker.io/library/nginx:1.21.6 | |
trivy image --vuln-type os --ignore-unfixed -f json -o $(basename $IMAGE).json $IMAGE |
website/docs/quick-start.md
Outdated
|
||
```bash | ||
copa patch -i docker.io/library/nginx:1.21.6 | ||
trivy image --vuln-type os --ignore-unfixed docker.io/library/nginx:1.21.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
trivy image --vuln-type os --ignore-unfixed docker.io/library/nginx:1.21.6 | |
trivy image --vuln-type os --ignore-unfixed $IMAGE |
website/docs/quick-start.md
Outdated
2024/01/22 23:32:54 [notice] 1#1: OS: Linux 6.2.0-1018-azure | ||
2024/01/22 23:32:54 [notice] 1#1: getrlimit(RLIMIT_NOFILE): 1048576:1048576 | ||
2024/01/22 23:32:54 [notice] 1#1: start worker processes | ||
copa patch -r nginx.1.21.6.json -i docker.io/library/nginx:1.21.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copa patch -r nginx.1.21.6.json -i docker.io/library/nginx:1.21.6 | |
copa patch -r $(basename $IMAGE).json -i $IMAGE |
website/docs/quick-start.md
Outdated
|
||
```bash | ||
copa patch -r nginx.1.21.6.json -i docker.io/library/nginx:1.21.6 | ||
copa patch -i docker.io/library/nginx:1.21.6 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copa patch -i docker.io/library/nginx:1.21.6 | |
export IMAGE=docker.io/library/nginx:1.21.6 | |
copa patch -i $IMAGE |
website/docs/quick-start.md
Outdated
```bash | ||
copa patch -r nginx.1.21.6.json -i docker.io/library/nginx:1.21.6@sha256:25dedae0aceb6b4fe5837a0acbacc6580453717f126a095aa05a3c6fcea14dd4 | ||
copa patch -i docker.io/library/nginx:1.21.6@sha256:25dedae0aceb6b4fe5837a0acbacc6580453717f126a095aa05a3c6fcea14dd4 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
copa patch -i docker.io/library/nginx:1.21.6@sha256:25dedae0aceb6b4fe5837a0acbacc6580453717f126a095aa05a3c6fcea14dd4 | |
export IMAGE="docker.io/library/nginx:1.21.6@sha256:25dedae0aceb6b4fe5837a0acbacc6580453717f126a095aa05a3c6fcea14dd4" | |
copa patch -i $IMAGE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we add this as a tip
?
website/docs/quick-start.md
Outdated
:::note | ||
The update all functionality allows you to address discrepancies that may arise between scanners and the packages they flag as vulnerable. It is important to note, however, that some upgrades can introduce dependency or compatibility conflicts. | ||
::: | ||
The following steps will update all outdated packages in an image to the latest available version: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The following steps will update all outdated packages in an image to the latest available version: | |
The following steps will update all outdated packages in an image to the latest available versions: |
website/docs/quick-start.md
Outdated
4. Scan the patched image and verify that the vulnerabilities have been patched: | ||
|
||
```bash | ||
trivy image --vuln-type os --ignore-unfixed docker.io/library/nginx:1.21.6-patched |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's add an example/expected trivy output after this
website/docs/quick-start.md
Outdated
@@ -46,16 +32,16 @@ The update all functionality allows you to address discrepancies that may arise | |||
|
|||
If an instance doesn't exist or that instance doesn't support all the features copa needs the next will be attempted. Please see [custom buildkit addresses](custom-address.md) for more information. | |||
|
|||
After setting up the buildkit instance, run the following command to patch the image: | |||
2. After setting up the buildkit instance, run the following Copa command to patch the supplied image: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep the trivy sections here. so the flow would be
- set up buildkit
- trivy scan
- copa patch
- copa patch all
- copa patch trivy report
- trivy scan
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
Signed-off-by: ashnamehrotra <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few minor comments, otherwise LGTM
@@ -12,72 +12,127 @@ This sample illustrates how to patch containers using vulnerability reports with | |||
* The `docker` daemon runs a buildkit service in-process. If you are using this for your buildkit instance, Docker must have the [containerd image store feature](https://docs.docker.com/storage/containerd/) enabled. | |||
* If you are using a buildx instance, or using buildkitd directly, there is no need to enable the containerd image store. However, only images in a remote registry can be patched using these methods. | |||
* [docker](https://docs.docker.com/desktop/linux/install/#generic-installation-steps) daemon running and CLI installed & pathed. | |||
* [trivy CLI](https://aquasecurity.github.io/trivy/latest/getting-started/installation/) installed & pathed. | |||
* Alternatively, see [scanner plugins](#scanner-plugins) for custom scanner support. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep this too
website/docs/quick-start.md
Outdated
@@ -2,7 +2,7 @@ | |||
title: Quick Start | |||
--- | |||
|
|||
This sample illustrates how to patch containers using vulnerability reports with `copa`. | |||
This sample illustrates how to patch outdated containers with `copa`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This sample illustrates how to patch outdated containers with `copa`. | |
This guide illustrates how to patch outdated containers with `copa`. |
website/docs/quick-start.md
Outdated
2024-07-03T14:11:29.864-0700 INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning | ||
2024-07-03T14:11:29.864-0700 INFO Please see also https://aquasecurity.github.io/trivy/v0.44/docs/scanner/secret/#recommendation for faster secret detection | ||
2024-07-03T14:11:32.197-0700 INFO Detected OS: debian | ||
2024-07-03T14:11:32.197-0700 INFO Detecting Debian vulnerabilities... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's delete the info lines for brevity
website/docs/quick-start.md
Outdated
2024-07-03T14:30:26.167-0700 INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning | ||
2024-07-03T14:30:26.167-0700 INFO Please see also https://aquasecurity.github.io/trivy/v0.44/docs/scanner/secret/#recommendation for faster secret detection | ||
2024-07-03T14:30:27.980-0700 INFO Detected OS: debian | ||
2024-07-03T14:30:27.980-0700 INFO Detecting Debian vulnerabilities... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's delete the info lines for brevity
website/docs/quick-start.md
Outdated
3. Patch the supplied image with Copa: | ||
|
||
###### 3.1 Update all outdated packages |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
3. Patch the supplied image with Copa: | |
###### 3.1 Update all outdated packages | |
3. Patch the supplied image with Copa: | |
1. Update all outdated packages |
nit: would this work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few minor comments, otherwise LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
a few minor comments, otherwise LGTM
Signed-off-by: ashnamehrotra <[email protected]>
Describe the changes in this pull request using active verbs such as Add, Remove, Replace ...
Closes #687
Part of #522