diff --git a/tools/rust-crates-advisory/default.nix b/tools/rust-crates-advisory/default.nix index ac1901736..8382ec254 100644 --- a/tools/rust-crates-advisory/default.nix +++ b/tools/rust-crates-advisory/default.nix @@ -175,6 +175,9 @@ let "--arg" "maintainers" "" + "--argjson" + "checklist" + "false" "-f" ./format-audit-result.jq ] diff --git a/tools/rust-crates-advisory/format-audit-result.jq b/tools/rust-crates-advisory/format-audit-result.jq index 6f230df3f..7c9e3cbac 100644 --- a/tools/rust-crates-advisory/format-audit-result.jq +++ b/tools/rust-crates-advisory/format-audit-result.jq @@ -9,6 +9,8 @@ # for the current lock file. # - attr: An attribute name (or otherwise unique identifier) to associate the # report for the current lock file with. +# - checklist: If true, the markdown report will use GHFM checklists for the +# report, allowing to tick of attributes as taken care of. # Link to human-readable advisory info for a given vulnerability def link: @@ -62,7 +64,7 @@ def format_vulnerability: if .vulnerabilities.found | not then "" else - ([ "- [ ] " + ([ "-", if $checklist then " [ ] " else " " end , "`", $attr, "`: " , (.vulnerabilities.count | tostring) , " vulnerabilities in Cargo.lock" diff --git a/users/sterni/nixpkgs-crate-holes/default.nix b/users/sterni/nixpkgs-crate-holes/default.nix index 63eaa1607..f677ac8ab 100644 --- a/users/sterni/nixpkgs-crate-holes/default.nix +++ b/users/sterni/nixpkgs-crate-holes/default.nix @@ -154,6 +154,9 @@ let "--arg" "maintainers" strMaintainers + "--argjson" + "checklist" + "true" ]; # GHMF in issues splits paragraphs on newlines