about summary refs log tree commit diff
path: root/users
diff options
context:
space:
mode:
authorsterni <sternenseemann@systemli.org>2022-02-04T16·28+0100
committersterni <sternenseemann@systemli.org>2022-02-13T18·42+0000
commitde62043a7445efeae9e0159e1225480be7954cfa (patch)
tree4cb637cea496f333181aa51771c6212e068168f7 /users
parent813e0c07475bfdfbd1f05ba658ae65b8f1a4ef82 (diff)
refactor(rust-crates-advisory): move report generation into script r/3816
This script is somewhat usable by humans (it even has a help screen!)
and can be reused in //users/sterni/nixpkgs-crate-holes. We are using
bash since that allows us to exit with the actual exit code of
cargo-audit - something that's not possible in execline.

Change-Id: I3331ae8222a20e23b8e30dc920ab48af78f0247c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/5228
Tested-by: BuildkiteCI
Reviewed-by: Profpatsch <mail@profpatsch.de>
Diffstat (limited to 'users')
-rw-r--r--users/sterni/nixpkgs-crate-holes/default.nix43
1 files changed, 15 insertions, 28 deletions
diff --git a/users/sterni/nixpkgs-crate-holes/default.nix b/users/sterni/nixpkgs-crate-holes/default.nix
index 4dff82d6aa..c24200ff10 100644
--- a/users/sterni/nixpkgs-crate-holes/default.nix
+++ b/users/sterni/nixpkgs-crate-holes/default.nix
@@ -126,37 +126,24 @@ let
     then pkgs.emptyFile
     else
       depot.nix.runExecline "${strAttr}-vulnerability-report" { } [
-        "pipeline"
+        "foreground"
         [
-          bins.cargo-audit
-          "audit"
-          "--json"
-          "-n"
-          "--db"
-          rustsec-advisory-db
-          "-f"
+          "importas"
+          "out"
+          "out"
+          "redirfd"
+          "-w"
+          "1"
+          "$out"
+          depot.tools.rust-crates-advisory.lock-file-report
+          strAttr
           lock
+          "true"
+          strMaintainers
         ]
-        "importas"
-        "out"
-        "out"
-        "redirfd"
-        "-w"
-        "1"
-        "$out"
-        bins.jq
-        "-rj"
-        "-f"
-        ../../../tools/rust-crates-advisory/format-audit-result.jq
-        "--arg"
-        "attr"
-        strAttr
-        "--arg"
-        "maintainers"
-        strMaintainers
-        "--argjson"
-        "checklist"
-        "true"
+        # ignore exit status of report
+        "exit"
+        "0"
       ];
 
   # GHMF in issues splits paragraphs on newlines