[WAF] pass rule is considered as reason for alert
メンテナーはふだん 2 日以内に返信
まだ誰も着手していません。
評価
調査の方向性
Start by locating where WAF-matched SecRules are collected into alert reasons and read the related tests. Reproduce the case with the provided pass and deny rules; done means the alert includes only the rule with a disruptive action. The issue does not name files or tests, so first identify the relevant entry point in the repository.
索引モデルが issue の本文から書いたものです。
説明
What happened?
If you have one request matching multiple SecRules, even pass rules will be included in the alert which could be misleading.
What did you expect to happen?
Only include matched SecRules with a disruptive action.
How can we reproduce it (as minimally and precisely as possible)?
Create two rules that will match a specific request, one should be pass and the other deny.
cscli alerts inspect 1015286
################################################################################################
- ID : 1015286
- Date : 2026-06-02T12:22:06+02:00
- Machine : <redacted>
- Simulation : false
- Remediation : false
- Kind : waf
- Reason : request_uri: wordpress redirect
- Events Count : 2
- Scope:Value : Ip:<redacted>
- Country : SE
- Begin : 2026-06-02T12:22:05+02:00
- End : 2026-06-02T12:22:05+02:00
- UUID : 15c866d7-69ba-4c98-815a-80b38dca473d
- Context :
╭───────────────┬──────────────────────────────────────────────────────────────╮
│ Key │ Value │
├───────────────┼──────────────────────────────────────────────────────────────┤
│ host │ www.bashult.sk │
│ id │ 400402 │
│ id │ 410045 │
│ matched_zones │ REQUEST_URI │
│ matched_zones │ QUERY_STRING │
│ method │ GET │
│ msg │ request_uri: wordpress redirect │
│ msg │ query_string: shell command bash │
│ name │ native_rule:400402 │
│ name │ native_rule:410045 │
│ uri │ /wp-login.php?redirect_to=https%3A%2F%2Fwww.bashult.sk% │
│ │ 2Fwp-admin%2F&reauth=1 │
╰───────────────┴──────────────────────────────────────────────────────────────╯
Rules matched:
SecRule REQUEST_URI "@rx wp-login\.php\?redirect_to=" "id:400402,phase:2,t:none,t:lowercase,t:urldecode,pass,skipAfter:IGNORE_HTTP_STRING,nolog,msg:'request_uri: wordpress redirect'"
SecRule QUERY_STRING "@rx bash " "id:410045,phase:2,t:none,t:urldecode,deny,log,msg:'query_string: shell command bash'"
Anything else we need to know?
No response
Crowdsec version
$ cscli version
version: v1.7.8-debian-pragmatic-amd64-63227459
Codename: alphaga
BuildDate: 2026-05-11_12:36:14
GoVersion: 1.26.2
Platform: linux
libre2: C++
User-Agent: crowdsec/v1.7.8-debian-pragmatic-amd64-63227459-linux
Constraint_parser: >= 1.0, <= 3.0
Constraint_scenario: >= 1.0, <= 3.0
Constraint_api: v1
Constraint_acquis: >= 1.0, < 2.0
Built-in optional components: cscli_setup, datasource_appsec, datasource_cloudwatch, datasource_docker, datasource_file, datasource_http, datasource_journalctl, datasource_k8s-audit, datasource_kafka, datasource_kinesis, datasource_loki, datasource_s3, datasource_syslog, datasource_victorialogs, datasource_wineventlog, db_mysql, db_postgres, db_sqlite
OS version
# On Linux:
$ cat /etc/os-release
PRETTY_NAME="Ubuntu 22.04.5 LTS"
NAME="Ubuntu"
VERSION_ID="22.04"
VERSION="22.04.5 LTS (Jammy Jellyfish)"
VERSION_CODENAME=jammy
ID=ubuntu
ID_LIKE=debian
HOME_URL="https://www.ubuntu.com/"
SUPPORT_URL="https://help.ubuntu.com/"
BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/"
PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy"
UBUNTU_CODENAME=jammy
$ uname -a
Linux <hostname> 5.15.0-143-generic #153-Ubuntu SMP Fri Jun 13 19:10:45 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
</details>
### Enabled collections and parsers
<details>
```console
$ cscli hub list -o raw
Loaded: 163 parsers, 12 postoverflows, 781 scenarios, 10 contexts, 6 appsec-configs, 218 appsec-rules, 163 collections
Unmanaged items: 4 local, 0 tainted
name,status,version,description,type
crowdsecurity/whitelists,enabled,0.3,Whitelist events from private ipv4 addresses,parsers
appsec-waf.yaml,"enabled,local",,,contexts
appsec-waf,"enabled,local",,,appsec-configs
coraza/base-config,"enabled,local",,,appsec-rules
custom/secrules,"enabled,local",,,appsec-rules
Acquisition config
# On Linux:
$ cat /etc/crowdsec/acquis.yaml /etc/crowdsec/acquis.d/*
listen_addr: 127.0.0.1:7422
appsec_config: appsec-waf
name: appsec-waf
source: appsec
log_level: info
routines: 64
labels:
type: appsec-waf
- 主要言語
- Go
- スター
- 15.1k
- フォーク
- 726
- 平均マージ
- 2日 51分
- マージ済み PR(30日)
- 18
環境構築
このプロジェクトには開発コンテナ、Dockerfile、コントリビューションガイドがありません。まず README を読み、一般的な手順ははじめてのコントリビューションガイドを参照してください。
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
crowdsecurity/crowdsec のほかの issue
-
[docker] Align build and debian release対応中かも @albundy83 が 1 日前に担当しました。 オープンkind/enhancement needs/triage
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
crowdsecurity/crowdsec#4803 · コメント 3 件 ·
メンテナーはふだん 2 日以内に返信
-
Bucket queues preallocate all their slots when the bucket is created対応中かも @AdzerKI が 3 日前に担当しました。 オープンkind/bug needs/triage os/linux
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
crowdsecurity/crowdsec#4799 · コメント 3 件 ·
メンテナーはふだん 2 日以内に返信
-
kind/bug needs/triage os/linux
難易度 3/5 1〜2日 初心者へのやさしさ 25/100
crowdsecurity/crowdsec#4797 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
-
needs/kind needs/triage
難易度 5/5 1週間以上 初心者へのやさしさ 38/100
crowdsecurity/crowdsec#4795 · コメント 2 件 ·
メンテナーはふだん 2 日以内に返信
-
kind/bug needs/triage os/linux
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
crowdsecurity/crowdsec#4790 · コメント 1 件 ·
メンテナーはふだん 2 日以内に返信
crowdsecurity/crowdsec の issue をすべて見る
似ている issue
-
component/mesheryctl kind/bug language/go
難易度 1/5 1時間未満 初心者へのやさしさ 88/100
meshery/meshery#22993 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 64/100
-
frontend size:S
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
shukiv/jabali-panel#2423 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100