FEATURE: Nessus + CIS CAT Converters#2574
Conversation
* feat: cis cat pro json converter * bug: exclude passing tests from results for match forward baseline status * feat: nessus converter v0 * bug: fingerprint targetid + empty plugin output * feat: cis cat unit tests * feat: nessus unit tests * bug: omit 0 severity results + cvss override * bug: cis cat set unknown status to warning * feat: set rank for critical capability * chore: update test cases * chore: codeql cleanup * chore: dotnet format errors * feat: gh property tags
| getResultSeverity(rule.Result, out level, out kind, out rank); | ||
|
|
||
| //Create only if a valid is assigned | ||
| if (rank != RankConstants.None) |
Check warning
Code scanning / CodeQL
Equality check on floating point values
|
@ejohn20 thanks for sharing the sample CisCat/Nessus SARIF files generated by the converters for review. Have couple suggestions pls review. |
If plan to be ingested by GHAS pls consider generate a location for the results. |
Providing a URI where users can find detailed information about the rule helps users to understand the result and how they can best address it. The varies SARIF viewers can render a hyperlink for users easily navigate to the Uri contains detailed information. E.g. the rule id |
Providing version information enables the log file consumer to determine whether the file was produced by an up to date version, and to avoid accidentally comparing log files produced by different tool versions. |
| run.Tool.Driver.Rules = new List<ReportingDescriptor>(); | ||
| foreach (CisCatRule rule in log.Rules) | ||
| { | ||
| run.Tool.Driver.Rules.Add(CreateReportDescriptor(rule)); |
After merging `dev` into this branch (3.5y stale), the converter test expected outputs failed against current emitter output. The semantic content is unchanged — the only differences are the `` URL (`2.1.0-rtm.6` -> `2.1.0`) and string-array formatting (compact `[a,b,c]` -> one-element-per-line) introduced by serializer changes in the intervening releases. Regenerated via the multitool `convert` verb and pretty-printed. `Test.UnitTests.Sarif.Converters` filtered to `NessusConverter` and `CisCatConverter` is 10/10 green. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
|
Picking this up to see how close it is to landing. Status now:
Still open (from @yongyan-gh's Jan-2023 review):
Each is a small, well-bounded change. @ejohn20 — are you in a position to address these and update the PR, or would you like us to take it over? |
|
@michaelcfanning Wow, it's been a minute since we opened this 😂 If you've got bandwidth, feel free to take it over. I've got a deadline a couple weeks out before I'd have time to finish this one out. Let me know if you'd rather wait and I'll get it on my radar. |
Creates a new converter + unit tests for Nessus (XML format) and CIS CAT (JSON format) covered in #2531