nixos/tests/blint: init

Signed-off-by: Ethan Carter Edwards <ethan@ethancedwards.com>
This commit is contained in:
Ethan Carter Edwards 2025-08-07 10:14:45 -04:00
parent ed3d57951e
commit 3a74dd53e8
No known key found for this signature in database
GPG Key ID: D83DC5377393C7E6
3 changed files with 34 additions and 0 deletions

View File

@ -273,6 +273,7 @@ in
bitbox-bridge = runTest ./bitbox-bridge.nix; bitbox-bridge = runTest ./bitbox-bridge.nix;
bitcoind = runTest ./bitcoind.nix; bitcoind = runTest ./bitcoind.nix;
bittorrent = runTest ./bittorrent.nix; bittorrent = runTest ./bittorrent.nix;
blint = runTest ./blint.nix;
blockbook-frontend = runTest ./blockbook-frontend.nix; blockbook-frontend = runTest ./blockbook-frontend.nix;
blocky = runTest ./blocky.nix; blocky = runTest ./blocky.nix;
bookstack = runTest ./bookstack.nix; bookstack = runTest ./bookstack.nix;

30
nixos/tests/blint.nix Normal file
View File

@ -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')
'';
}

View File

@ -3,6 +3,7 @@
python3Packages, python3Packages,
fetchFromGitHub, fetchFromGitHub,
versionCheckHook, versionCheckHook,
nixosTests,
}: }:
python3Packages.buildPythonApplication rec { python3Packages.buildPythonApplication rec {
@ -57,6 +58,8 @@ python3Packages.buildPythonApplication rec {
"test_demangle" "test_demangle"
]; ];
passthru.tests = { inherit (nixosTests) blint; };
meta = { meta = {
description = "Binary Linter to check the security properties, and capabilities in executables"; description = "Binary Linter to check the security properties, and capabilities in executables";
homepage = "https://github.com/owasp-dep-scan/blint"; homepage = "https://github.com/owasp-dep-scan/blint";