Skip to content

Commit e850973

Browse files
fzipiclaude
andcommitted
chore: exclude S1313 (hardcoded IP) findings in test fixture data
tests/test_operators/ and tests/test_transformations/ hold literal test data for the @ipMatch/@geoLookup operators, which is IP addresses by definition - SonarCloud flagged 5207 instances of "hardcoded IP address" there, which single-handedly failed the PR's maintainability quality gate. Scoped to just this rule and these two paths; every other rule still applies. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 6af8b9d commit e850973

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

sonar-project.properties

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
sonar.projectKey=owasp-modsecurity_ModSecurity
2+
sonar.organization=owasp-modsecurity
3+
4+
# tests/test_operators/ and tests/test_transformations/ contain literal test
5+
# data for IP-matching operators (@ipMatch, @geoLookup) - S1313 ("hardcoded
6+
# IP addresses") is a false positive there, since the whole point of the
7+
# test is to exercise those exact literals. All other rules still apply.
8+
sonar.issue.ignore.multicriteria=e1,e2
9+
sonar.issue.ignore.multicriteria.e1.ruleKey=python:S1313
10+
sonar.issue.ignore.multicriteria.e1.resourceKey=tests/test_operators/**/*.py
11+
sonar.issue.ignore.multicriteria.e2.ruleKey=python:S1313
12+
sonar.issue.ignore.multicriteria.e2.resourceKey=tests/test_transformations/**/*.py

0 commit comments

Comments
 (0)