mirror of
https://github.com/crowdsecurity/crowdsec.git
synced 2025-05-11 20:36:12 +02:00
Add env vars to install/remove appsec-{configs,rules} in docker image (#2664)
This commit is contained in:
parent
9b07e1f7ce
commit
bc3a179af9
2 changed files with 25 additions and 1 deletions
|
@ -333,6 +333,16 @@ if [ "$CONTEXTS" != "" ]; then
|
|||
cscli_if_clean contexts install "$(difference "$CONTEXTS" "$DISABLE_CONTEXTS")"
|
||||
fi
|
||||
|
||||
if [ "$APPSEC_CONFIGS" != "" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
cscli_if_clean appsec-configs install "$(difference "$APPSEC_CONFIGS" "$DISABLE_APPSEC_CONFIGS")"
|
||||
fi
|
||||
|
||||
if [ "$APPSEC_RULES" != "" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
cscli_if_clean appsec-rules install "$(difference "$APPSEC_RULES" "$DISABLE_APPSEC_RULES")"
|
||||
fi
|
||||
|
||||
## Remove collections, parsers, scenarios & postoverflows
|
||||
if [ "$DISABLE_COLLECTIONS" != "" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
|
@ -359,6 +369,16 @@ if [ "$DISABLE_CONTEXTS" != "" ]; then
|
|||
cscli_if_clean contexts remove "$DISABLE_CONTEXTS" --force
|
||||
fi
|
||||
|
||||
if [ "$DISABLE_APPSEC_CONFIGS" != "" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
cscli_if_clean appsec-configs remove "$DISABLE_APPSEC_CONFIGS" --force
|
||||
fi
|
||||
|
||||
if [ "$DISABLE_APPSEC_RULES" != "" ]; then
|
||||
# shellcheck disable=SC2086
|
||||
cscli_if_clean appsec-rules remove "$DISABLE_APPSEC_RULES" --force
|
||||
fi
|
||||
|
||||
## Register bouncers via env
|
||||
for BOUNCER in $(compgen -A variable | grep -i BOUNCER_KEY); do
|
||||
KEY=$(printf '%s' "${!BOUNCER}")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue