Core Rule Set tests: name repeated attack strings (closes #263)
check / check (push) Successful in 3m55s

The Drupal and MediaWiki tests repeated the SQL and script attack strings,
which goconst reports. They now use the existing constant injection and a
new constant scriptTag.

Model: opus-5-5
This commit is contained in:
sneak committed 2026-11-10 00:04:34 +00:00
1 parent 9aa5b303cf
commit 65d29acc59
3 files changed
+9 -6

No files matched your search

+3
View File
@@ -1357,6 +1357,9 @@ const (
// injection is an SQL injection, which rule 942100 matches.
const injection = "1' OR '1'='1"
// scriptTag is a script injection, not escaped.
const scriptTag = "<script>alert(1)</script>"
// readingBodies returns the Core Rule Set as sww runs it by
// default, but reading bodies up to bodyLimit.
func readingBodies(t *testing.T) *coreruleset.CoreRuleSet {