restrict permissions for plugin configurations (#1745)

This commit is contained in:
mmetc 2022-09-14 14:23:18 +02:00 committed by GitHub
parent 52fbda1a5e
commit 03b5184837
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 4 deletions

1
debian/rules vendored
View file

@ -49,4 +49,5 @@ override_dh_auto_install:
override_dh_fixperms: override_dh_fixperms:
dh_fixperms dh_fixperms
chmod 600 debian/crowdsec/etc/crowdsec/notifications/*
chmod 600 debian/crowdsec/etc/crowdsec/config.yaml chmod 600 debian/crowdsec/etc/crowdsec/config.yaml

View file

@ -68,10 +68,10 @@ install -m 551 plugins/notifications/http/notification-http %{buildroot}%{_libdi
install -m 551 plugins/notifications/splunk/notification-splunk %{buildroot}%{_libdir}/%{name}/plugins/ install -m 551 plugins/notifications/splunk/notification-splunk %{buildroot}%{_libdir}/%{name}/plugins/
install -m 551 plugins/notifications/email/notification-email %{buildroot}%{_libdir}/%{name}/plugins/ install -m 551 plugins/notifications/email/notification-email %{buildroot}%{_libdir}/%{name}/plugins/
install -m 644 plugins/notifications/slack/slack.yaml %{buildroot}%{_sysconfdir}/crowdsec/notifications/ install -m 600 plugins/notifications/slack/slack.yaml %{buildroot}%{_sysconfdir}/crowdsec/notifications/
install -m 644 plugins/notifications/http/http.yaml %{buildroot}%{_sysconfdir}/crowdsec/notifications/ install -m 600 plugins/notifications/http/http.yaml %{buildroot}%{_sysconfdir}/crowdsec/notifications/
install -m 644 plugins/notifications/splunk/splunk.yaml %{buildroot}%{_sysconfdir}/crowdsec/notifications/ install -m 600 plugins/notifications/splunk/splunk.yaml %{buildroot}%{_sysconfdir}/crowdsec/notifications/
install -m 644 plugins/notifications/email/email.yaml %{buildroot}%{_sysconfdir}/crowdsec/notifications/ install -m 600 plugins/notifications/email/email.yaml %{buildroot}%{_sysconfdir}/crowdsec/notifications/
%clean %clean
rm -rf %{buildroot} rm -rf %{buildroot}