Skip to content

crowdsec starts with invalid appsec-config. Error in DisableBodyInspection does not throw error. #1117

Description

@bobsdacool

Hello.

I set up this crowdsec config as webdav uploads were causing appsec to get bogged down and crash. I couldn't figure out why it wasn't working until I went to the discord community for help.

They rightly pointed out that my config was missing () at the DisableBody Inspection. This did not throw any errors or issues in the appsec component. Including the brackets fixed the issue I was having.

I would expect config errors to throw an error and prevent crowdsec from starting, but this did not happen. Thanks for taking the time to review, and thank you for all the work that has been done on this project.

'''
name: custom/nextcloud
on_match:

  • filter: req.Host == "nextcloud_domain" && req.URL.Path startsWith "/remote.php/dav/files"
    apply:
    • CancelEvent()
    • CancelAlert()
    • SetRemediation("allow")

pre_eval:

  • filter: req.Host == "nextcloud_domain" && req.URL.Path startsWith "/remote.php/dav/files"
    apply:
    • DisableBodyInspection
      on_load:
  • apply:
    • SetMaxBodySize(104857600)
      '''

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions