Skip to content

Feature/schema improvements #1384

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 48 commits into
base: main
Choose a base branch
from
Open

Conversation

jcchavezs
Copy link
Member

@jcchavezs jcchavezs commented Jul 7, 2025

I added some rework on top of the great work done in #1343. One thing I believe we should discuss is if we need https://github.com/owasp-modsecurity/ModSecurity/wiki/Reference-Manual-(v3.x)#user-content-SecXmlExternalEntity to make explicit the collection of those json variables we record additionally now (I would like to hear from @M4tteoP and @airween). Otherwise @cognitivegears do you mind trying this branch?

cognitivegears and others added 30 commits January 3, 2025 22:53
… validation

- Added full JSON Schema validation using kaptinlin/jsonschema
- Added XML Schema validation using terminalstatic/go-xsd-validate
- Implemented lazy initialization to improve performance
- Added test cases
…o v4.10.0 in testing/coreruleset/go.mod (#1341)

Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Copy link

codecov bot commented Jul 7, 2025

Codecov Report

Attention: Patch coverage is 92.37288% with 9 lines in your changes missing coverage. Please review.

Project coverage is 84.47%. Comparing base (13718df) to head (d5f5c89).

Files with missing lines Patch % Lines
internal/bodyprocessors/json.go 78.57% 4 Missing and 2 partials ⚠️
internal/operators/validate_schema.go 96.51% 2 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1384      +/-   ##
==========================================
+ Coverage   84.34%   84.47%   +0.13%     
==========================================
  Files         170      172       +2     
  Lines        9933    10042     +109     
==========================================
+ Hits         8378     8483     +105     
- Misses       1310     1312       +2     
- Partials      245      247       +2     
Flag Coverage Δ
coraza.rule.case_sensitive_args_keys 84.43% <92.37%> (+0.13%) ⬆️
coraza.rule.multiphase_evaluation 84.13% <92.37%> (+0.13%) ⬆️
coraza.rule.no_regex_multiline 84.41% <92.37%> (+0.13%) ⬆️
default 84.47% <92.37%> (+0.13%) ⬆️
examples+ 16.16% <1.75%> (-0.17%) ⬇️
examples+coraza.rule.case_sensitive_args_keys 84.43% <92.37%> (+0.13%) ⬆️
examples+coraza.rule.multiphase_evaluation 83.98% <92.37%> (+0.13%) ⬆️
examples+coraza.rule.no_regex_multiline 84.33% <92.37%> (+0.13%) ⬆️
examples+memoize_builders 84.44% <92.10%> (+0.12%) ⬆️
examples+no_fs_access 81.84% <92.37%> (+0.15%) ⬆️
ftw 84.47% <92.37%> (+0.13%) ⬆️
memoize_builders 84.57% <92.10%> (+0.12%) ⬆️
no_fs_access 83.98% <92.37%> (+0.13%) ⬆️
tinygo 84.44% <92.37%> (+0.13%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants