diff --git a/pkgs/tools/security/log4shell-detector/default.nix b/pkgs/tools/security/log4shell-detector/default.nix new file mode 100644 index 000000000000..27a0eb41ad5c --- /dev/null +++ b/pkgs/tools/security/log4shell-detector/default.nix @@ -0,0 +1,35 @@ +{ lib +, fetchFromGitHub +, python3 +}: + +python3.pkgs.buildPythonApplication rec { + pname = "log4shell-detector"; + version = "unstable-2021-12-14"; + format = "other"; + + src = fetchFromGitHub { + owner = "Neo23x0"; + repo = pname; + rev = "7bc368f376b8d95282193eac6ea3970c363577d5"; + sha256 = "sha256-MLKd2moMLwAZXqZ5I/pIYzV0PqVwSpze3gNM0IioI1E="; + }; + + checkInputs = with python3.pkgs; [ + pytestCheckHook + ]; + + installPhase = '' + runHook preInstall + install -vD ${pname}.py $out/bin/${pname} + runHook postInstall + ''; + + meta = with lib; { + description = "Detector for Log4Shell exploitation attempts"; + homepage = "https://github.com/Neo23x0/log4shell-detector"; + # https://github.com/Neo23x0/log4shell-detector/issues/24 + license = licenses.unfree; + maintainers = with maintainers; [ fab ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9cd1ec6c48f7..507a1c73daed 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -7467,6 +7467,8 @@ with pkgs; log4jcheck = callPackage ../tools/security/log4jcheck { }; + log4shell-detector = callPackage ../tools/security/log4shell-detector { }; + logcheck = callPackage ../tools/system/logcheck { }; logmein-hamachi = callPackage ../tools/networking/logmein-hamachi { };