1{ lib
2, fetchFromGitHub
3, python3
4}:
5
6python3.pkgs.buildPythonApplication rec {
7 pname = "log4jcheck";
8 version = "unstable-2021-12-14";
9 format = "other";
10
11 src = fetchFromGitHub {
12 owner = "NorthwaveSecurity";
13 repo = pname;
14 rev = "736f1f4044e8a9b7bf5db515e2d1b819253f0f6d";
15 sha256 = "sha256-1al7EMYbE/hFXKV4mYZlkEWTUIKYxgXYU3qBLlczYvs=";
16 };
17
18 propagatedBuildInputs = with python3.pkgs; [
19 requests
20 ];
21
22 installPhase = ''
23 runHook preInstall
24 install -vD nw_log4jcheck.py $out/bin/${pname}
25 runHook postInstall
26 '';
27
28 meta = with lib; {
29 description = "Tool to check for vulnerable Log4j (CVE-2021-44228) systems";
30 homepage = "https://github.com/NorthwaveSecurity/log4jcheck";
31 license = licenses.mit;
32 maintainers = with maintainers; [ fab ];
33 };
34}