Unverified Commit 376741eb authored by Fabian Affolter's avatar Fabian Affolter Committed by GitHub
Browse files

log4{j{-{detect,scan,sniffer,vuln-scanner},check},shell-detector}: drop (#461701)

parents 821a4a22 e0c91468
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -11,6 +11,8 @@

- `spoof` has been removed, as there are many issues upstream with it working on modern OS versions, and it appears to be unmaintained.

- All Log4Shell vulnerability scanners were removed, as they were all unmaintained upstream and are no longer relevant given that the vulnerability has been fixed upstream for several years.

## Other Notable Changes {#sec-nixpkgs-release-26.05-notable-changes}

<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
+0 −39
Original line number Diff line number Diff line
{
  lib,
  fetchFromGitHub,
  python3,
}:

python3.pkgs.buildPythonApplication {
  pname = "log4j-detect";
  version = "0-unstable-2021-12-14";
  format = "other";

  src = fetchFromGitHub {
    owner = "takito1812";
    repo = "log4j-detect";
    rev = "2f5b7a598a6d0b4aee8111bb574ea72c6a1c76d6";
    sha256 = "sha256-fFKW7uPBfrnze0UoPL3Mfwd4sFOuHYuDP7kv6VtdM3o=";
  };

  propagatedBuildInputs = with python3.pkgs; [
    requests
  ];

  postPatch = ''
    sed -i "1 i #!/usr/bin/python" log4j-detect.py
  '';

  installPhase = ''
    runHook preInstall
    install -vD log4j-detect.py $out/bin/log4j-detect
    runHook postInstall
  '';

  meta = with lib; {
    description = "Tool to detect the log4j vulnerability";
    homepage = "https://github.com/takito1812/log4j-detect";
    license = licenses.unfree;
    maintainers = with maintainers; [ fab ];
  };
}
+0 −46
Original line number Diff line number Diff line
{
  lib,
  fetchFromGitHub,
  python3,
}:

python3.pkgs.buildPythonApplication {
  pname = "log4j-scan";
  version = "unstable-2021-12-18";
  format = "other";

  src = fetchFromGitHub {
    owner = "fullhunt";
    repo = "log4j-scan";
    rev = "070fbd00f0945645bd5e0daa199a554ef3884b95";
    sha256 = "sha256-ORSc4KHyAMjuA7QHReDh6SYY5yZRunBBN1+lkCayqL4=";
  };

  propagatedBuildInputs = with python3.pkgs; [
    pycryptodome
    requests
    termcolor
  ];

  postPatch = ''
    substituteInPlace log4j-scan.py \
      --replace "headers.txt" "../share/headers.txt"
  '';

  installPhase = ''
    runHook preInstall

    install -vD log4j-scan.py $out/bin/log4j-scan
    install -vD headers.txt headers-large.txt -t $out/share

    runHook postInstall
  '';

  meta = with lib; {
    description = "Scanner for finding hosts which are vulnerable for log4j";
    mainProgram = "log4j-scan";
    homepage = "https://github.com/fullhunt/log4j-scan";
    license = licenses.mit;
    maintainers = with maintainers; [ fab ];
  };
}
+0 −38
Original line number Diff line number Diff line
{
  lib,
  buildGoModule,
  fetchFromGitHub,
  gitMinimal,
}:

buildGoModule rec {
  pname = "log4j-sniffer";
  version = "1.9.0";

  src = fetchFromGitHub {
    owner = "palantir";
    repo = "log4j-sniffer";
    rev = "v${version}";
    sha256 = "sha256-pO6difzNvQvKQtRLyksXmExtQHlnnwyF3iNEmSBgUmU=";
  };

  vendorHash = null;

  nativeCheckInputs = [
    gitMinimal
  ];

  preCheck = ''
    export HOME=$(mktemp -d);
    cd $HOME
    git init
  '';

  meta = with lib; {
    description = "Tool that scans archives to check for vulnerable log4j versions";
    mainProgram = "log4j-sniffer";
    homepage = "https://github.com/palantir/log4j-sniffer";
    license = with licenses; [ asl20 ];
    maintainers = with maintainers; [ fab ];
  };
}
+0 −31
Original line number Diff line number Diff line
{
  lib,
  buildGoModule,
  fetchFromGitHub,
}:

buildGoModule rec {
  pname = "log4j-vuln-scanner";
  version = "0.13";

  src = fetchFromGitHub {
    owner = "hillu";
    repo = "local-log4j-vuln-scanner";
    rev = "v${version}";
    sha256 = "sha256-YMD2233EdrrF1SLjwiRcNr53b7Rf5Tu8CZC43QhSY7c=";
  };

  vendorHash = null;

  postInstall = ''
    mv $out/bin/scanner $out/bin/$pname
    mv $out/bin/patcher $out/bin/log4j-vuln-patcher
  '';

  meta = with lib; {
    description = "Local log4j vulnerability scanner";
    homepage = "https://github.com/hillu/local-log4j-vuln-scanner";
    license = with licenses; [ gpl3Only ];
    maintainers = with maintainers; [ fab ];
  };
}
Loading