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

Name:           nginx-mod-modsecurity-crs
53c70r's avatar
53c70r committed
4
Version:        3.3.0
53c70r's avatar
53c70r committed
5
Release:        6%{?dist}
53c70r's avatar
53c70r committed
6
Summary:        OWASP-CRS for Nginx
53c70r's avatar
53c70r committed
7
License:        ASL 2.0
53c70r's avatar
53c70r committed
8
BuildArch:      noarch
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
Source1:        load_file.conf
Source2:        modsecurity.conf
53c70r's avatar
53c70r committed
14
Source3:        LICENSE
53c70r's avatar
53c70r committed
15

53c70r's avatar
53c70r committed
16
Requires:       nginx-mod-modsecurity
53c70r's avatar
53c70r committed
17
18
19
20
21

%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
53c70r's avatar
53c70r committed
22
%autosetup
53c70r's avatar
53c70r committed
23
24
25
26

%build

%install
27
%{__install} -d %{buildroot}%{_sysconfdir}/nginx/modsecurity.d/coreruleset/rules/
53c70r's avatar
53c70r committed
28
%{__install} -p -D -m 644 %{SOURCE3} %{buildroot}%{_datarootdir}/licenses/%{NAME}/LICENSE
29
30
31
%{__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
32
33
34
35
%{__install} -p -D -m 644 %{SOURCE2} %{buildroot}%{_sysconfdir}/nginx/conf.d/modsecurity.conf

%files
%defattr (-,root,root)
53c70r's avatar
53c70r committed
36
%{_datarootdir}/licenses/%{NAME}/LICENSE
53c70r's avatar
53c70r committed
37
38
%{_sysconfdir}/nginx/modsecurity.d/coreruleset
%{_sysconfdir}/nginx/conf.d/modsecurity.conf
53c70r's avatar
53c70r committed
39
%config(noreplace) %{_sysconfdir}/nginx/modsecurity.d/coreruleset/crs-setup.conf
53c70r's avatar
53c70r committed
40
%config(noreplace) %{_sysconfdir}/nginx/conf.d/modsecurity.conf