-
Notifications
You must be signed in to change notification settings - Fork 53
Bloodhound: Add warning for 3.4.1.1 check fail in K8s #557
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -43,7 +43,13 @@ impl ReportWriter for TextReportWriter { | |
| writeln!(output, "{:17}{}", "Skipped:", report.skipped)?; | ||
| writeln!(output, "{:17}{}", "Total checks:", report.total)?; | ||
| writeln!(output)?; | ||
| writeln!(output, "Compliance check result: {}", report.status) | ||
| if report.contain_known_fail_check("3.4.1.1".to_string()) { | ||
| writeln!( | ||
| output, | ||
| "\x1b[93m WARNING: For Kubernetes Variants, DROP will be unconditionally overwritten. If this applies to you, work with your auditor for an exception. See https://github.com/bottlerocket-os/bottlerocket-core-kit/issues/540 for more details.\x1b[0m" | ||
| )?; | ||
| } | ||
|
Comment on lines
+46
to
+51
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd prefer a more generic mechanism where we can drop in explanations like this on a per-variant basis, and have them appended to the output. This is really an For example, we could add an optional JSON metadata file alongside the files here: Or, since the JSON files aren't executable, they could live in And then within the JSON file, we could have different explanation strings for "failed", "skipped", or even "passed". |
||
| writeln!(output, "Compliance check result: {} ", report.status) | ||
| } | ||
| } | ||
|
|
||
|
|
||
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.
I'd also prefer not to link to a GitHub issue in code like this, it feels like the wrong way around for the relationship. If we need to document it somewhere outside of the report, it should go on the website. But I'd just add another sentence or two with the actual explanation.