Skip to content

Commit

Permalink
Introduce expand-configuration script and add tainted nextcloud-logs.…
Browse files Browse the repository at this point in the history
…yaml parser
  • Loading branch information
stephdl committed Sep 19, 2024
1 parent f52e59e commit 7a2d034
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 5 additions & 1 deletion imageroot/bin/expand-configuration
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@
#

import os
import json
import agent
import agent.tasks
import re
import shutil

from jinja2 import Environment, FileSystemLoader, select_autoescape

Expand Down Expand Up @@ -160,3 +160,7 @@ if whitelists:
output = template.render(properties)
with open("crowdsec_config/postoverflows/s01-whitelist/nethserver-postoverflows-whitelists.yaml","w") as f:
f.write(output)

## expand the tainted configuration files
os.makedirs("crowdsec_config/hub/parsers/s01-parse/crowdsecurity", exist_ok=True)
shutil.copyfile("../tainted/nextcloud-logs.yaml", "crowdsec_config/hub/parsers/s01-parse/crowdsecurity/nextcloud-logs.yaml")
1 change: 0 additions & 1 deletion imageroot/crowdsec.service
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ ExecStart=/usr/bin/podman run \
--volume ./crowdsec_config:/etc/crowdsec:Z \
--volume %N-data:/var/lib/crowdsec/data:Z \
--volume ${CROWDSEC_JOURNAL}:/run/log/journal \
--volume ../tainted/nextcloud-logs.yaml:/etc/crowdsec/hub/parsers/s01-parse/crowdsecurity/nextcloud-logs.yaml:Z \
${CROWDSEC_IMAGE}
ExecStop=/usr/bin/podman stop --ignore --cidfile %t/%N.cid -t 10
ExecStopPost=/usr/bin/podman rm --ignore -f --cidfile %t/%N.cid
Expand Down

0 comments on commit 7a2d034

Please sign in to comment.