Compare commits
5 commits
f927dc50ae
...
16c36c410a
Author | SHA1 | Date | |
---|---|---|---|
16c36c410a | |||
31b2527e40 | |||
3c7e1f106b | |||
e9a9a5bc26 | |||
f5b1acda4f |
2 changed files with 2 additions and 41 deletions
configuration/services
|
@ -16,7 +16,7 @@ let
|
||||||
|
|
||||||
registration = matrixLib.writeRegistrationScript {
|
registration = matrixLib.writeRegistrationScript {
|
||||||
id = "matrix-hookshot";
|
id = "matrix-hookshot";
|
||||||
url = "http://${address}:${toString port}";
|
url = "${address}:${toString port}";
|
||||||
sender_localpart = "hookshot";
|
sender_localpart = "hookshot";
|
||||||
|
|
||||||
namespaces = {
|
namespaces = {
|
||||||
|
@ -91,8 +91,6 @@ in
|
||||||
bindAddress = "127.0.0.1";
|
bindAddress = "127.0.0.1";
|
||||||
};
|
};
|
||||||
|
|
||||||
bot.displayname = "Hookshot";
|
|
||||||
|
|
||||||
generic = {
|
generic = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
outbound = false;
|
outbound = false;
|
||||||
|
|
|
@ -1,9 +1,4 @@
|
||||||
{
|
{ config, lib, ... }:
|
||||||
pkgs,
|
|
||||||
config,
|
|
||||||
lib,
|
|
||||||
...
|
|
||||||
}:
|
|
||||||
{
|
{
|
||||||
security.crowdsec = {
|
security.crowdsec = {
|
||||||
enable = true;
|
enable = true;
|
||||||
|
@ -55,36 +50,4 @@
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
# Add whitelists for matrix
|
|
||||||
systemd.tmpfiles.settings."10-matrix" =
|
|
||||||
let
|
|
||||||
stateDir = config.security.crowdsec.stateDirectory;
|
|
||||||
in
|
|
||||||
{
|
|
||||||
"${stateDir}/config/postoverflows".d = {
|
|
||||||
user = "crowdsec";
|
|
||||||
group = "crowdsec";
|
|
||||||
mode = "0700";
|
|
||||||
};
|
|
||||||
|
|
||||||
"${stateDir}/config/postoverflows/s01-whitelist".d = {
|
|
||||||
user = "crowdsec";
|
|
||||||
group = "crowdsec";
|
|
||||||
mode = "0700";
|
|
||||||
};
|
|
||||||
|
|
||||||
"${stateDir}/config/postoverflows/s01-whitelist/matrix-whitelist.yaml"."L+".argument =
|
|
||||||
((pkgs.formats.yaml { }).generate "crowdsec-matrix-whitelist.yaml" {
|
|
||||||
name = "tetsumaki/matrix";
|
|
||||||
description = "custom matrix whitelist";
|
|
||||||
whitelist = {
|
|
||||||
reason = "whitelist false positive for matrix";
|
|
||||||
expression = [
|
|
||||||
"evt.Overflow.Alert.Events[0].GetMeta('target_fqdn') == '${config.services.matrix-conduit.settings.global.server_name}'"
|
|
||||||
"evt.Overflow.Alert.GetScenario() in ['crowdsecurity/http-probing', 'crowdsecurity/http-crawl-non_statics']"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}).outPath;
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue