forgejo-lts: 7.0.10 -> 7.0.11
[NixPkgs.git] / pkgs / by-name / co / confluencepot / package.nix
blob89233d2063d5a3218f94f67a6302f9aa978b7e13
1 { lib
2 , stdenv
3 , buildGoModule
4 , fetchFromGitHub
5 }:
7 buildGoModule rec {
8   pname = "confluencepot";
9   version = "1.0.0";
11   src = fetchFromGitHub {
12     owner = "SIFalcon";
13     repo = "confluencePot";
14     rev = "v${version}";
15     hash = "sha256-jIbL6prOUII8o9FghIYa80BytJ9SSuyj/TZmAxwAbJk=";
16   };
18   vendorHash = "sha256-nzPHx+c369T4h9KETqMurxZK3LsJAhwBaunkcWIW3Ps=";
20   postPatch = ''
21     substituteInPlace confluencePot.go \
22       --replace "confluence.html" "$out/share/confluence.html"
23   '';
25   postInstall = lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
26     mv $out/bin/confluencePot $out/bin/${pname}
27   '';
29   preFixup = ''
30     # Install HTML file
31     install -vD confluence.html -t $out/share
32   '';
34   meta = with lib; {
35     description = "Honeypot for the Atlassian Confluence OGNL injection vulnerability";
36     homepage = "https://github.com/SIFalcon/confluencePot";
37     longDescription = ''
38       ConfluencePot is a simple honeypot for the Atlassian Confluence unauthenticated
39       and remote OGNL injection vulnerability (CVE-2022-26134).
40     '';
41     license = with licenses; [ agpl3Plus ];
42     maintainers = with maintainers; [ fab ];
43     mainProgram = "confluencepot";
44   };