feat(misconf): Show misconfig ID in output
Description
Show misconfig ID in output
Before
my-file ()
==========
Tests: 1 (SUCCESSES: 0, FAILURES: 1, EXCEPTIONS: 0)
Failures: 1 (LOW: 0, MEDIUM: 0, HIGH: 1, CRITICAL: 0)
HIGH: Oh no, a bad config.
════════════════════════════════════════
Your config file is not good.
See https://google.com/search?q=bad%20config
────────────────────────────────────────
my-file
────────────────────────────────────────
1
2 [ bad: true
3
────────────────────────────────────────
After
my-file ()
==========
Tests: 1 (SUCCESSES: 0, FAILURES: 1, EXCEPTIONS: 0)
Failures: 1 (LOW: 0, MEDIUM: 0, HIGH: 1, CRITICAL: 0)
AVD-XYZ-0123
HIGH: Oh no, a bad config.
════════════════════════════════════════
Your config file is not good.
See https://google.com/search?q=bad%20config
────────────────────────────────────────
my-file
────────────────────────────────────────
1
2 [ bad: true
3
────────────────────────────────────────
Related issues
- Close https://github.com/aquasecurity/trivy/issues/7629
Checklist
- [x] I've read the guidelines for contributing to this repository.
- [x] I've followed the conventions in the PR title.
- [x] I've added tests that prove my fix is effective or that my feature works.
- [ ] I've updated the documentation with the relevant information (if needed).
- [ ] I've added usage information (if the PR introduces new options)
- [x] I've included a "before" and "after" example to the description (if the PR is a user interface change).
I think the before and after output should be added to the description.
I think the before and after output should be added to the description.
Thanks! I forgot about that.
I prefer a single line as below, but I guess @itaysk has some idea as it's his request.
AVD-XYZ-0123 (HIGH): Oh no, a bad config.
HIGH: Oh no, a bad config (AVD-XYZ-0123).
agree with @knqyf263 of the two options I'd probably pick the first
I prefer a single line as below, but I guess @itaysk has some idea as it's his request.
AVD-XYZ-0123 (HIGH): Oh no, a bad config.HIGH: Oh no, a bad config (AVD-XYZ-0123).
Agreed. Implemented https://github.com/aquasecurity/trivy/pull/7762/commits/051313724443c3cdc7b2167ed60356931662663f
nit: There are some more options.
[AVD-XYZ-0123] HIGH: Oh no, a bad config.
AVD-XYZ-0123 [HIGH]: Oh no, a bad config.
<AVD-XYZ-0123> HIGH: Oh no, a bad config.
AVD-XYZ-0123 <HIGH>: Oh no, a bad config.