modsecurity-crs: init at 3.3.2

This commit is contained in:
Izorkin 2021-12-08 13:25:28 +03:00
parent 842d0d9ed7
commit 8b37c4d5c4
No known key found for this signature in database
GPG key ID: 1436C1B3F3679F09
2 changed files with 44 additions and 0 deletions

View file

@ -0,0 +1,42 @@
{ lib, stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
version = "3.3.2";
pname = "modsecurity-crs";
src = fetchFromGitHub {
owner = "coreruleset";
repo = "coreruleset";
rev = "v${version}";
sha256 = "sha256-m/iVLhk2y5BpYu8EwC2adrrDnbaVCQ0SE25ltvMokCw=";
};
installPhase = ''
install -D -m444 -t $out/rules ${src}/rules/*.conf
install -D -m444 -t $out/rules ${src}/rules/*.data
install -D -m444 -t $out/share/doc/modsecurity-crs ${src}/*.md
install -D -m444 -t $out/share/doc/modsecurity-crs ${src}/{CHANGES,INSTALL,LICENSE}
install -D -m444 -t $out/share/modsecurity-crs ${src}/rules/*.example
install -D -m444 -t $out/share/modsecurity-crs ${src}/crs-setup.conf.example
cat > $out/share/modsecurity-crs/modsecurity-crs.load.example <<EOF
##
## This is a sample file for loading OWASP CRS's rules.
##
Include /etc/modsecurity/crs/crs-setup.conf
IncludeOptional /etc/modsecurity/crs/REQUEST-900-EXCLUSION-RULES-BEFORE-CRS.conf
Include $out/rules/*.conf
IncludeOptional /etc/modsecurity/crs/RESPONSE-999-EXCLUSION-RULES-AFTER-CRS.conf
EOF
'';
meta = with lib; {
homepage = "https://coreruleset.org";
description = ''
The OWASP ModSecurity Core Rule Set is a set of generic attack detection
rules for use with ModSecurity or compatible web application firewalls.
'';
license = licenses.asl20;
platforms = platforms.all;
maintainers = with maintainers; [ izorkin ];
};
}

View file

@ -7881,6 +7881,8 @@ with pkgs;
modsecurity_standalone = callPackage ../tools/security/modsecurity { };
modsecurity-crs = callPackage ../tools/security/modsecurity-crs { };
molly-guard = callPackage ../os-specific/linux/molly-guard { };
molotov = callPackage ../applications/video/molotov {};