waf: a verdict carries the status the visitor gets
#443
Open
opened 2026-11-19 17:14:27 +01:00 by clawbot
·
1 comment
No Branch/Tag Specified
main
issue-447-config-above-the-parts
issue-441-heuristic-structs
next
issue-450-constructor-params
issue-451-rproxy-tests-under-load
issue-445-after-answer-statements
issue-448-config-setting-name-constants
issue-444-one-ban-method
issue-454-crs-test-load-timeout
issue-430-app-fixes-directory
issue-438-metrics-params
issue-426-chi-routes
issue-440-cobra-commands
issue-425-wafprotocol-package
issue-428-named-value-types
issue-439-stop-asks-at-stop
issue-429-dirwatch
issue-436-server-exports-no-parts
issue-434-core-rule-set-in-sww
issue-431-body-wrapper-fields
issue-433-report-goroutines
issue-427-typed-fixed-value-settings
issue-411-abuseipdb-blacklist
issue-414-fx-wiring
issue-420-tests-under-load
issue-381-compose-waf-settings
issue-412-anomaly-alert-only
issue-418-test-time-limits
issue-415-header-limit-test
issue-406-parallel-tests
issue-405-decide-beside-lookup
issue-404-geojs-package
issue-401-one-cookie-line
issue-400-coreruleset-timing-ref
issue-398-breaker-test-without-questions
issue-400-coreruleset-timing
issue-396-no-own-hosts
issue-394-decide-in-time
issue-392-rproxy-circuit-breaker
issue-388-any-tls-proxy
issue-386-readme-rproxy-alone
issue-387-readme-scraper-policy
issue-339-long-line-limits
issue-379-lookup-headers-by-default
issue-315-remove-crowdsec
issue-354-package-registry-searches
issue-353-api-searches
issue-234-rename-settings
issue-359-ghost-remaining-fields
issue-373-read-rest-after-connection-close
issue-374-ghost-canonical-url
issue-371-body-over-limit-test-reset
issue-358-ghost-scripts
issue-211-viper-config
issue-357-ghost
issue-346-names-in-bodies
issue-365-adopt-form-repository-names
issue-220-apps-by-hostname
issue-352-shared-searches
issue-215-golines
issue-227-settings-file-per-daemon
issue-350-forgejo-searches
issue-349-gitea-user-page-ls
issue-287-crs-test-cpu
issue-284-wordpress-recorded-both-ways
readme-rewrite-155
v1.0.0-rc2
v1.0.0-rc1
Labels
Clear labels
critical
merge-ready
needs-checks
needs-decision
needs-decision
needs-decision
needs-rebase
needs-review
needs-rework
not-one-pr
post-1.0
red-next
Extremely important: data loss, a security hole, production down, or basic use impossible
Reviewed and ready for the owner to merge
Checks must be fixed before review
Waits on an owner decision
Waiting on a decision by the owner
Conflicts with next; rebase required
Review not yet done
Review found issues to fix
No labels
needs-decision
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/smallwebwaf#443
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Start once the issue that gives heuristics typed facts on
decisionis closed: #442. The review orders this as the third of three steps inside the heuristics.From the architecture review, "The decision pipeline: the heuristics", under "A verdict does not say what the visitor gets": #283 (comment). Approved for building: #283 (comment). The code was read at
809d266onnext, wherediscriminatoris nowwaf. Line numbers are that commit's.What is there
verdict(internal/waf/heuristics.go:25) is{action string; figures map[string]any}. The action is a word for the log line.check(internal/waf/request.go:186) works out the status afterwards, by aswitchover that word:SWW_WAF_BAN_RESPONSEfor the rest.refusalLimit(internal/waf/refusallimit.go:51) repeats part of thatswitch, over what would have been done in observe mode.afterAnswerandonReportlists the action is never read:refusalLimitandbyteLimitsreturn&verdict{figures: …}.Why it matters
A new heuristic that answers with a status of its own edits the
switchincheck, outside its file. The status is decided by a string comparison far from the code that knows it.What changes
verdictcarries the status, set by the heuristic that gives it.checkthen only applies observe mode.refusalLimittakes the status from the verdict that refused the request, or in observe mode would have.After:
What stays
SWW_WAF_BAN_RESPONSEset to close asks.Done when
switchor comparison over an action word decides a status;make checkpasses;Model: fable-5-2
Not started: this issue waits until the issue that gives heuristics typed facts on
decisionis closed (#442), which is still open with no PR.Model: opus-5-5