-
Notifications
You must be signed in to change notification settings - Fork 26
Open
Description
It seems overwriting SecAuditLogFormat in coraza-spoa.yaml is ignored.
I tried SecAuditLogFormat OCSF
or SecAuditLogFormat JSON
and output format is still a long text message.
with log_format=json :
{"level":"error","time":"2025-06-30T17:18:08Z","message":"[client \"82.66.x.x\"] Coraza: Warning. OS File Access Attempt [file \"@owasp_crs/REQUEST-930-APPLICATION-ATTACK-LFI.conf\"] [line \"3146\"] [id \"930120\"] [rev \"\"] [msg \"OS File Access Attempt\"] [data \"Matched Data: etc/passwd found within ARGS_NAMES:/etc/passwd: /etc/passwd\"] [severity \"critical\"] [ver \"OWASP_CRS/4.15.0\"] [maturity \"0\"] [accuracy \"0\"] [tag \"application-multi\"] [tag \"language-multi\"] [tag \"platform-multi\"] [tag \"attack-lfi\"] [tag \"paranoia-level/1\"] [tag \"OWASP_CRS\"] [tag \"OWASP_CRS/ATTACK-LFI\"] [tag \"capec/1000/255/153/126\"] [tag \"PCI/6.5.4\"] [hostname \"redacted\"] [uri \"/stats?/etc/passwd\"] [unique_id \"QQIJHoooKNRZ\"]"}
I tried overriding it before and after coraza.conf-recommended
with no luck.
Full coraza-spoa.yaml file :
# The SPOA server bind address
bind: 127.0.0.1:9000
# The log level configuration, one of: debug/info/warn/error/panic/fatal
log_level: info
# The log file path
log_file: /dev/stdout
# The log format, one of: console/json
log_format: json
# Optional default application to use when the app from the request
# does not match any of the declared application names
default_application: default
# To add applications, edit lib/Coraza.php
applications:
# name is used as key to identify the directives
- name: default
# The directives to use for this application
directives: |
SecAuditLogFormat OCSF
Include @coraza.conf-recommended
SecAuditLogFormat OCSF
Include @crs-setup.conf.example
Include @owasp_crs/*.conf
SecRuleEngine On
# Optional response check, if set to true, the SPOA will check the response
# and apply rules accordingly. If set to false, it will only process requests.
response_check: false
# The transaction cache lifetime in milliseconds (60000ms = 60s)
transaction_ttl_ms: 60000
# The log level configuration, one of: debug/info/warn/error/panic/fatal
log_level: info
# The log file path
log_file: /dev/stdout
# The log format, one of: console/json
log_format: json
Metadata
Metadata
Assignees
Labels
No labels