about summary refs log tree commit diff
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2022-02-03T13·44+0100
committerclbot <clbot@tvl.fyi>2022-02-04T11·20+0000
commit5d064256556a6af2e90a7c902c166ab67c65ea3a (patch)
treeea620f9f8e3329bdd997da20e044cad12b7727ee
parentc3684740ad6852f15de46577974f44dc98ca9703 (diff)
chore: move format-audit-result.jq out of //users/sterni r/3762
In the spirit of the readTree filter we should also not include files in
user directories from the outside.

Change-Id: I1abe36a721048900d2758b5986063b68b8d1af93
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5200
Reviewed-by: sterni <sternenseemann@systemli.org>
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: sterni <sternenseemann@systemli.org>
Tested-by: BuildkiteCI
-rw-r--r--tools/rust-crates-advisory/OWNERS1
-rw-r--r--tools/rust-crates-advisory/default.nix2
-rw-r--r--tools/rust-crates-advisory/format-audit-result.jq (renamed from users/sterni/nixpkgs-crate-holes/format-audit-result.jq)12
-rw-r--r--users/sterni/nixpkgs-crate-holes/default.nix2
4 files changed, 15 insertions, 2 deletions
diff --git a/tools/rust-crates-advisory/OWNERS b/tools/rust-crates-advisory/OWNERS
index a742d0d22bf6..1895955b2018 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 b8a25ef78333..ac190173627d 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
index e3147b8016c1..6f230df3f9b0 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 b659c9c89eb2..63eaa16070c4 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