summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Affolter <mail@fabian-affolter.ch>2021-12-14 17:22:32 +0100
committerFabian Affolter <mail@fabian-affolter.ch>2021-12-15 08:05:46 +0100
commitc7e48917ad4b319406d6d1c2d463bef3ec3bef85 (patch)
tree88233aa556ca4dcd2eb78e8d97026535ba6dc740
parentMerge pull request #150745 from fabaff/log4jcheck (diff)
downloadnixpkgs-c7e48917ad4b319406d6d1c2d463bef3ec3bef85.tar.gz
log4shell-detector: init at unstable-2021-12-14
-rw-r--r--pkgs/tools/security/log4shell-detector/default.nix35
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 37 insertions, 0 deletions
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 { };