diff --git a/tools/rust-crates-advisory/OWNERS b/tools/rust-crates-advisory/OWNERS index a742d0d22..1895955b2 100644 --- a/tools/rust-crates-advisory/OWNERS +++ b/tools/rust-crates-advisory/OWNERS @@ -1,3 +1,4 @@ inherited: true owners: - Profpatsch + - sterni diff --git a/tools/rust-crates-advisory/default.nix b/tools/rust-crates-advisory/default.nix index b8a25ef78..ac1901736 100644 --- a/tools/rust-crates-advisory/default.nix +++ b/tools/rust-crates-advisory/default.nix @@ -176,7 +176,7 @@ let "maintainers" "" "-f" - ../../users/sterni/nixpkgs-crate-holes/format-audit-result.jq + ./format-audit-result.jq ] "if" [ depot.tools.eprintf "%s\n" "$report" ] diff --git a/users/sterni/nixpkgs-crate-holes/format-audit-result.jq b/tools/rust-crates-advisory/format-audit-result.jq similarity index 77% rename from users/sterni/nixpkgs-crate-holes/format-audit-result.jq rename to tools/rust-crates-advisory/format-audit-result.jq index e3147b801..6f230df3f 100644 --- a/users/sterni/nixpkgs-crate-holes/format-audit-result.jq +++ b/tools/rust-crates-advisory/format-audit-result.jq @@ -1,3 +1,15 @@ +# This is a jq script to format the JSON output of cargo-audit into a short +# markdown report for humans. It is used by //users/sterni/nixpkgs-crate-holes +# and //tools/rust-crates-advisory:check-all-our-lock-files which will provide +# you with example invocations. +# +# It needs the following arguments passed to it: +# +# - maintainers: Either the empty string or a list of maintainers to @mention +# for the current lock file. +# - attr: An attribute name (or otherwise unique identifier) to associate the +# report for the current lock file with. + # Link to human-readable advisory info for a given vulnerability def link: [ "https://rustsec.org/advisories/", .advisory.id, ".html" ] | add; diff --git a/users/sterni/nixpkgs-crate-holes/default.nix b/users/sterni/nixpkgs-crate-holes/default.nix index b659c9c89..63eaa1607 100644 --- a/users/sterni/nixpkgs-crate-holes/default.nix +++ b/users/sterni/nixpkgs-crate-holes/default.nix @@ -147,7 +147,7 @@ let bins.jq "-rj" "-f" - ./format-audit-result.jq + ../../../tools/rust-crates-advisory/format-audit-result.jq "--arg" "attr" strAttr