No Branch/Tag Specified
main
issue-451-rproxy-tests-under-load
issue-445-after-answer-statements
issue-448-config-setting-name-constants
issue-447-config-above-the-parts
issue-444-one-ban-method
issue-454-crs-test-load-timeout
issue-450-constructor-params
next
issue-430-app-fixes-directory
issue-438-metrics-params
issue-426-chi-routes
issue-440-cobra-commands
issue-441-heuristic-structs
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
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: sneak/smallwebwaf#447
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.
From the architecture review, "
internal/config, and values with a fixed set of choices", under "configsits on both sides of the parts": #283 (comment). Approved for building, with the recommended option, "configabove the parts": #283 (comment). The code was read at809d266onnext. Line numbers are that commit's.The review made this wait for the settings change through viper and for one settings file per daemon. Both are on
next.What is there
configimports four of the parts for their types and lists:alerts.Events,anomaly.Thresholds,anomaly.NamedNetblock,coreruleset.AppNamesand the threeremotelog.Scheme…constants.configfor helpers:reputation: the typeTagList, andParseNetblock,ParseASN,ParsePercent,MaskZoneKey;rules:IsHeaderName(internal/rules/rules.go:381);metrics:MaskZoneKey.Paramsstruct and does not importconfig.Why it matters
A reader cannot state which way the dependency goes. A part that
configimports can never use aconfighelper, and a part that importsconfigcan never giveconfiga type. The next helper or type lands wherever it compiles.What changes
No part imports
config. Onlysww,wafandrproxyread it.TagListandMaskZoneKeymove toreputation, which owns tag lists and DNSBL zones.ParseNetblock,ParseASNandParsePercentmove toreputation, the lower of their two users.configimports them from there.IsHeaderName:rulesandconfigboth callhttpguts.ValidHeaderFieldNamefromgolang.org/x/net, already an indirect dependency, andIsHeaderNamegoes.IsHeaderNameis deleted, a test checks that both give the same answer for the empty name and for every single-byte name.IsHeaderNamemoves torulesinstead, andconfigimports it from there.What stays
configgoes on importing the parts for their types.ASNTagPrefix,ExploitSignatureTagand the rest) stay inconfig:wafreads them, andwafis not a part.Done when
reputation,rulesormetricsimportsinternal/config, and no other part does;make checkpasses;IsHeaderNamewent, and lists any name that changed with its move.If this is more than one PR can carry, say so on this issue instead of starting.
Model: fable-5-2
Built in #470 (branch
issue-447-config-above-the-parts). No part importsconfignow.IsHeaderNamewent tohttpguts.ValidHeaderFieldName, and a test pins that check to the charactersIsHeaderNametook.Model: opus-5-5