Skip to content

fix(logging): keep the reason on passive suspicious logs and document dynamic rules - #165

Merged
rennf93 merged 3 commits into
masterfrom
fix/ratelimit-passive-log
Oct 15, 2026
Merged

rennf93 merged 3 commits into
masterfrom
fix/ratelimit-passive-log

Conversation

@rennf93

@rennf93 rennf93 commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Closes #164

  • Passive suspicious lines without a trigger now read [PASSIVE MODE] Suspicious activity detected from <ip>: ... - Reason: <reason> - Headers: ... instead of the penetration wording with the reason dropped. Lines with a trigger are unchanged.
  • enable_dynamic_rules (field description, docs/configuration/security-config.md and the agent skill reference) now lists what a rule changes: it bans the IPs in ip_blacklist for ip_ban_duration, unbans ip_whitelist, adds suspicious_patterns, and replaces blocked_countries, whitelist_countries, the rate limits, block_cloud_providers, blocked_user_agents, the feature toggles, the auto-ban settings and emergency mode. I checked the list against every config write in guard_core/handlers/_dynamic_rule_application.py.

Gate: 21570 passed, 100% coverage on e9a2c54; the docs-only follow-up 91c2cef ran the config and docs subset (1713 passed), CI runs the full suite. CI may hit the master timing flakes that #163 fixes.

… dynamic rules

A passive-mode rate-limit hit was logged as a penetration attempt with the reason dropped. Passive suspicious lines without a trigger now read 'Suspicious activity detected' and carry the reason. enable_dynamic_rules now lists the settings the dashboard can change.
@github-actions github-actions Bot added documentation Docs, README, CHANGELOG, governance files area: handlers Touches guard_core/handlers/ area: sync Touches guard_core/sync/ (sync mirror generated by unasync) tests Test suite changes labels Oct 15, 2026
@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Detection gate report

All detection gate shards passed.

Shard arbiter-grammar

Gate green: no category regressed against its committed baseline and no benign string is newly flagged.

Total recall: n/a. Total false-positive rate: n/a.
Documented known gaps: 0. Documented known false positives: 0. Both stay in the denominators.

Full per-case output is in the job log.

Shard benchmarks-and-rest

Gate green: no category regressed against its committed baseline and no benign string is newly flagged.

Total recall: 378/386 (97.9%). Total false-positive rate: 23/370 (6.2%).
Documented known gaps: 8. Documented known false positives: 23. Both stay in the denominators.

Category Recall False positives
cmd_injection 38/46 (82.6%) 10/370 (2.7%)
cms_probing 36/36 (100.0%) 0/370 (0.0%)
code_injection 3/3 (100.0%) 0/370 (0.0%)
deserialization 18/18 (100.0%) 0/370 (0.0%)
dir_traversal 10/10 (100.0%) 0/370 (0.0%)
file_inclusion 16/16 (100.0%) 3/370 (0.8%)
file_upload 32/32 (100.0%) 0/370 (0.0%)
http_split 4/4 (100.0%) 0/370 (0.0%)
ldap 25/25 (100.0%) 0/370 (0.0%)
nosql 10/10 (100.0%) 0/370 (0.0%)
path_traversal 13/13 (100.0%) 0/370 (0.0%)
proto_pollution 8/8 (100.0%) 0/370 (0.0%)
recon 23/23 (100.0%) 0/370 (0.0%)
sensitive_file 16/16 (100.0%) 0/370 (0.0%)
sqli 38/38 (100.0%) 6/370 (1.6%)
ssrf 32/32 (100.0%) 4/370 (1.1%)
template 13/13 (100.0%) 1/370 (0.3%)
xml 4/4 (100.0%) 0/370 (0.0%)
xss 39/39 (100.0%) 0/370 (0.0%)

Full per-case output is in the job log.

Shard builtin-safety

Gate green: no category regressed against its committed baseline and no benign string is newly flagged.

Total recall: n/a. Total false-positive rate: n/a.
Documented known gaps: 0. Documented known false positives: 0. Both stay in the denominators.

Full per-case output is in the job log.

Shard cpu-load-builtin-safety

Gate green: no category regressed against its committed baseline and no benign string is newly flagged.

Total recall: n/a. Total false-positive rate: n/a.
Documented known gaps: 0. Documented known false positives: 0. Both stay in the denominators.

Full per-case output is in the job log.

Shard hardening-canaries

Gate green: no category regressed against its committed baseline and no benign string is newly flagged.

Total recall: n/a. Total false-positive rate: n/a.
Documented known gaps: 0. Documented known false positives: 0. Both stay in the denominators.

Full per-case output is in the job log.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: handlers Touches guard_core/handlers/ area: sync Touches guard_core/sync/ (sync mirror generated by unasync) documentation Docs, README, CHANGELOG, governance files tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] Passive-mode rate-limit hits are logged as penetration attempts without a reason

1 participant