From 3a74dd53e86e2a159b52c499953ef3b9a500843b Mon Sep 17 00:00:00 2001 From: Ethan Carter Edwards Date: Thu, 7 Aug 2025 10:14:45 -0400 Subject: [PATCH] nixos/tests/blint: init Signed-off-by: Ethan Carter Edwards --- nixos/tests/all-tests.nix | 1 + nixos/tests/blint.nix | 30 ++++++++++++++++++++++++++++++ pkgs/by-name/bl/blint/package.nix | 3 +++ 3 files changed, 34 insertions(+) create mode 100644 nixos/tests/blint.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 4ce282532ef7..71336000549c 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -273,6 +273,7 @@ in bitbox-bridge = runTest ./bitbox-bridge.nix; bitcoind = runTest ./bitcoind.nix; bittorrent = runTest ./bittorrent.nix; + blint = runTest ./blint.nix; blockbook-frontend = runTest ./blockbook-frontend.nix; blocky = runTest ./blocky.nix; bookstack = runTest ./bookstack.nix; diff --git a/nixos/tests/blint.nix b/nixos/tests/blint.nix new file mode 100644 index 000000000000..cf66da6ab93c --- /dev/null +++ b/nixos/tests/blint.nix @@ -0,0 +1,30 @@ +{ + lib, + pkgs, + ... +}: + +{ + name = "owasp blint test"; + + meta.maintainers = with lib; [ + maintainers.ethancedwards8 + teams.ngi + ]; + + nodes.machine = { + environment.systemPackages = with pkgs; [ + blint + jq + ]; + }; + + testScript = + { nodes, ... }: + '' + start_all() + + machine.succeed('blint -i ${lib.getExe pkgs.ripgrep} -o /tmp/ripgrep') + machine.succeed('jq . /tmp/ripgrep/*.json') + ''; +} diff --git a/pkgs/by-name/bl/blint/package.nix b/pkgs/by-name/bl/blint/package.nix index 822d48b522b6..53c94088cf0b 100644 --- a/pkgs/by-name/bl/blint/package.nix +++ b/pkgs/by-name/bl/blint/package.nix @@ -3,6 +3,7 @@ python3Packages, fetchFromGitHub, versionCheckHook, + nixosTests, }: python3Packages.buildPythonApplication rec { @@ -57,6 +58,8 @@ python3Packages.buildPythonApplication rec { "test_demangle" ]; + passthru.tests = { inherit (nixosTests) blint; }; + meta = { description = "Binary Linter to check the security properties, and capabilities in executables"; homepage = "https://github.com/owasp-dep-scan/blint";