Skip to content

fix(detection): port the feedback-wave fixes to the JVM engine - #53

Merged
rennf93 merged 7 commits into
masterfrom
fix/feedback-wave
Oct 15, 2026
Merged

rennf93 merged 7 commits into
masterfrom
fix/feedback-wave

Conversation

@rennf93

@rennf93 rennf93 commented Oct 15, 2026

Copy link
Copy Markdown
Member

I am porting the verified reference fixes from guard-core to the JVM engine.

  • Passive-mode log lines keep the reason. A passive rate-limit hit used to log as a penetration attempt with no reason. Without trigger info the line now reads [PASSIVE MODE] Suspicious activity detected from ... - Reason: ....
  • enable_dynamic_rules documentation lists exactly what a dynamic rule can change.
  • A probe test shows the request scan does not end early when a header's threats are all category-filtered (an SSRF value in an address header followed by an XSS header still flags).
  • New opt-in excluded_semantic_detection_headers (global) and detectionExclusion(semanticHeaders = ...) (route). Listed headers skip the semantic analyzer only, regex scanning is unchanged, default empty.
  • The Cookie header is scanned one name=value pair at a time, each pair through the same header path and value budget.
  • New detection_max_scan_seconds (default 10.0, range 0.1 to 60): a per-request regex scan budget measured in thread CPU time inside the scan worker (not wall time, which flags benign requests on a loaded host). Exhaustion records a weighted pattern_timeout threat named scan_time_budget_exhausted and fails closed, and the trigger text names it when it tips the score.

Each point has its own commit with its tests. The conformance corpus is untouched and fullCorpusGate stays green.

Closes #52

A passive rate-limit hit logged as a penetration attempt with no reason. Without trigger info the line now reads Suspicious activity detected with the reason, matching the reference engine. Refs #52.
excluded_semantic_detection_headers (global) and detectionExclusion(semanticHeaders) (route) name headers whose values skip the semantic analyzer only. Regex scanning is unchanged and the default is empty. Refs #52.
A whole logged-in cookie header scored as one long semantic value and was flagged. Each pair now goes through the same header path and value budget. Refs #52.
detection_max_scan_seconds (default 10.0, range 0.1 to 60) bounds the regex scan time of one request across every field and pattern. It is measured as the thread CPU time of the scan worker, since wall time on a loaded host flags benign requests. Exhaustion records a weighted pattern_timeout threat named scan_time_budget_exhausted (fail-closed), and the trigger names it when it tips the score. Refs #52.
@github-actions github-actions Bot added documentation Docs, README, CHANGELOG, license files area: engine Touches guard-core-engine/ (framework-free core, dependency-free) area: facade Touches guard-core/ (published facade module) tests Test suite changes labels Oct 15, 2026
…ivers

The 100 percent line gate keys its documented exclusions by line number, so the lines this branch added shifted them. Refs #52.
@rennf93
rennf93 merged commit 09dfddf into master Oct 15, 2026
10 checks passed
@rennf93
rennf93 deleted the fix/feedback-wave branch October 15, 2026 06:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: engine Touches guard-core-engine/ (framework-free core, dependency-free) area: facade Touches guard-core/ (published facade module) documentation Docs, README, CHANGELOG, license files tests Test suite changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Port the Python feedback-wave fixes to the JVM engine

1 participant