nginx-mod-modsecurity-crs.spec 1.46 KB
Newer Older
53c70r's avatar
53c70r committed
1
2
3
4
%global debug_package %{nil}

Name:           nginx-mod-modsecurity-crs
Epoch:          1
53c70r's avatar
53c70r committed
5
Version:        3.3.0
53c70r's avatar
53c70r committed
6
7
Release:        1%{?dist}
Summary:        OWASP-CRS for Nginx
53c70r's avatar
53c70r committed
8
License:        ASL 2.0
53c70r's avatar
53c70r committed
9
10
URL:            https://owasp.org/www-project-modsecurity-core-rule-set/
Group:          System Environment/Daemons
53c70r's avatar
53c70r committed
11
Source0:        https://github.com/coreruleset/coreruleset/archive/v%{version}.tar.gz
53c70r's avatar
53c70r committed
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Source1:        load_file.conf
Source2:        modsecurity.conf

Requires:       nginx

%description
The OWASP ModSecurity Core Rule Set (CRS) is a set of generic attack detection rules for use with ModSecurity or compatible web application firewalls. The CRS aims to protect web applications from a wide range of attacks, including the OWASP Top Ten, with a minimum of false alerts.

%prep
%setup -c -q

%build

%install
26
27
28
29
%{__install} -d %{buildroot}%{_sysconfdir}/nginx/modsecurity.d/coreruleset/rules/
%{__install} -p -D -m 644 ./coreruleset-%{version}/rules/* %{buildroot}%{_sysconfdir}/nginx/modsecurity.d/coreruleset/rules/
%{__install} -p -D -m 644 ./coreruleset-%{version}/crs-setup.conf.example %{buildroot}%{_sysconfdir}/nginx/modsecurity.d/coreruleset/crs-setup.conf
%{__install} -p -D -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/nginx/modsecurity.d/coreruleset/load_file.conf
53c70r's avatar
53c70r committed
30
31
32
33
34
35
36
%{__install} -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/nginx/conf.d/modsecurity.conf

%files
%defattr (-,root,root)
%{_sysconfdir}/nginx/modsecurity.d
%{_sysconfdir}/nginx/conf.d/modsecurity.conf