-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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 info about config file #6547
Conversation
@@ -81,6 +81,15 @@ severity: | |||
- MEDIUM | |||
- HIGH | |||
- CRITICAL | |||
|
|||
scan: |
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.
We use scan
:
trivy/pkg/flag/report_flags.go
Line 101 in fae710d
ConfigName: "scan.compliance", |
But looks like it should be
report
.@knqyf263 wdyt?
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.
Yes, agree. Also, --show-suppressed
should be under report
.
trivy/pkg/flag/report_flags.go
Line 106 in fae710d
ConfigName: "scan.show-suppressed", |
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.
hm... there is 1 problem:
We already have report
:
trivy/pkg/flag/report_flags.go
Line 35 in fae710d
ConfigName: "report", |
We can add report
prefix for all report flags (I mean report.format
etc).
But in this case we will have report.report
.
@knqyf263 do you have another thought?
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.
Flags frequently used can be global without the report
prefix.
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.
We already have report:
Ah, I missed it. Hmm... it's a problem...
all: | ||
namespaces: false | ||
|
||
# Same as '--k8s-version' | ||
# Default is empty | ||
k8s: | ||
version: 1.21.0 | ||
|
||
# Same as '--node-collector-imageref' | ||
# Default is 'ghcr.io/aquasecurity/node-collector:0.0.9' | ||
node: | ||
collector: | ||
imageref: ghcr.io/aquasecurity/node-collector:0.0.9 | ||
|
||
# Same as '--node-collector-namespace' | ||
# Default is 'trivy-temp' | ||
node: | ||
collector: | ||
namespace: ~/.kube/config2 |
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.
@chen-keinan can you take a look? Looks like we don't need nested structs for these flags. Perhaps we can use -
instead of .
.
e.g. for --node-collector-imageref
:
trivy/pkg/flag/kubernetes_flags.go
Lines 77 to 82 in fae710d
NodeCollectorImageRef = Flag[string]{ | |
Name: "node-collector-imageref", | |
ConfigName: "kubernetes.node.collector.imageref", | |
Default: "ghcr.io/aquasecurity/node-collector:0.0.9", | |
Usage: "indicate the image reference for the node-collector scan job", | |
} |
we can use kubernetes.node-collector-imageref
and get :
kubernetes
node-collector-imageref: ghcr.io/aquasecurity/node-collector:0.0.9
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.
@DmitriyLewen sound good. you can update this flag as well.
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.
@chen-keinan take a looks, please - 15e6fca
Co-authored-by: simar7 <1254783+simar7@users.noreply.github.com>
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.
There are some considerations, but let's merge this PR now and keep improving our configuration.
Co-authored-by: simar7 <1254783+simar7@users.noreply.github.com>
Description
config file page missed some flags and contains mistakes.
Update this page.
Related discussions
Checklist