CrowdSec - the open-source and participative security solution offering crowdsourced protection against malicious IPs and access to the most advanced real-world CTI.
When setting a custom patterns_dir in config.yaml and using cscli hubtest run --all the patterns dir is not used
Running test 'zoneminder-bf' failed: unable to copy 'patterns' from '/etc/crowdsec/patterns'to '/tmp/crowdsec-v1.6.2/hub/.tests/zoneminder-bf/runtime/patterns': open /etc/crowdsec/patterns: no such file or directory
This is used within the test_env.sh script to not need crowdsec to be installed.
What did you expect to happen?
The pattern_dir options to be respected
How can we reproduce it (as minimally and precisely as possible)?
Prep the test folder:
cd $(mktemp -d)
wget https://github.com/crowdsecurity/crowdsec/releases/download/v1.6.2/crowdsec-release.tgz
tar xvzf crowdsec-release.tgz
cd crowdsec-v1.6.2
./test_env.sh
alias csdev="$PWD/cmd/crowdsec-cli/cscli -c $PWD/config/dev.yaml"
git clone https://github.com/crowdsecurity/hub
Edit config/dev.yaml and add the following:
config_paths:
pattern_dir: ./config/patterns/
Anything else we need to know?
No response
Crowdsec version
```console
$ cscli version
# paste output here
```
OS version
```console
# On Linux:
$ cat /etc/os-release
# paste output here
$ uname -a
# paste output here
# On Windows:
C:\> wmic os get Caption, Version, BuildNumber, OSArchitecture
# paste output here
```
Enabled collections and parsers
```console
$ cscli hub list -o raw
# paste output here
```
Acquisition config
```console
# On Linux:
$ cat /etc/crowdsec/acquis.yaml /etc/crowdsec/acquis.d/*
# paste output here
# On Windows:
C:\> Get-Content C:\ProgramData\CrowdSec\config\acquis.yaml
# paste output here
Config show
```console
$ cscli config show
# paste output here
```
Prometheus metrics
```console
$ cscli metrics
# paste output here
```
Related custom configs versions (if applicable) : notification plugins, custom scenarios, parsers etc.
Check Releases to make sure your agent is on the latest version.
Details
I am a bot created to help the [crowdsecurity](https://github.com/crowdsecurity) developers manage community feedback and contributions. You can check out my [manifest file](https://github.com/crowdsecurity/crowdsec/blob/master/.github/governance.yml) to understand my behavior and what I can do. If you want to use this for your project, you can check out the [BirthdayResearch/oss-governance-bot](https://github.com/BirthdayResearch/oss-governance-bot) repository.
What happened?
When setting a custom
patterns_dir
in config.yaml and usingcscli hubtest run --all
the patterns dir is not usedconfig.yaml
This is used within the test_env.sh script to not need crowdsec to be installed.
What did you expect to happen?
The
pattern_dir
options to be respectedHow can we reproduce it (as minimally and precisely as possible)?
Prep the test folder:
Edit
config/dev.yaml
and add the following:Anything else we need to know?
No response
Crowdsec version
OS version
Enabled collections and parsers
Acquisition config
Config show
Prometheus metrics
Related custom configs versions (if applicable) : notification plugins, custom scenarios, parsers etc.