Skip to content

Conversation

@blotus
Copy link
Contributor

@blotus blotus commented Jun 5, 2025

This is a follow-up on #1143.

I somehow managed to not commit the latest version of the auto-generated internal/variables/variablesmap.gen.go file, which broke some rules (for example, SecRule FILES:foo ... is currently refused but should work).

This PR:

  • Updates the file
  • Add a new CI job that will run go generate and return an error if there's any changes
  • Add tests in the seclang parser for each collection (I auto-generated those as it's quite tedious, but they should be properly testing each collection)

@blotus blotus requested a review from a team as a code owner June 5, 2025 08:46
@codecov
Copy link

codecov bot commented Jun 5, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.36%. Comparing base (e19151c) to head (e667f84).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1371      +/-   ##
==========================================
+ Coverage   83.84%   84.36%   +0.51%     
==========================================
  Files         170      170              
  Lines        9909     9925      +16     
==========================================
+ Hits         8308     8373      +65     
+ Misses       1357     1308      -49     
  Partials      244      244              
Flag Coverage Δ
coraza.rule.case_sensitive_args_keys 84.32% <100.00%> (+0.51%) ⬆️
coraza.rule.multiphase_evaluation 84.02% <100.00%> (+0.52%) ⬆️
coraza.rule.no_regex_multiline 84.30% <100.00%> (+0.51%) ⬆️
default 84.36% <100.00%> (+0.51%) ⬆️
examples+ 16.29% <0.00%> (-0.03%) ⬇️
examples+coraza.rule.case_sensitive_args_keys 84.32% <100.00%> (+0.51%) ⬆️
examples+coraza.rule.multiphase_evaluation 83.86% <100.00%> (+0.52%) ⬆️
examples+coraza.rule.no_regex_multiline 84.22% <100.00%> (+0.51%) ⬆️
examples+memoize_builders 84.33% <100.00%> (+0.52%) ⬆️
examples+no_fs_access 81.70% <100.00%> (+0.60%) ⬆️
ftw 84.36% <100.00%> (+0.51%) ⬆️
memoize_builders 84.46% <100.00%> (+0.52%) ⬆️
no_fs_access 83.86% <100.00%> (+0.52%) ⬆️
tinygo 84.33% <100.00%> (+0.52%) ⬆️

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.

@jcchavezs jcchavezs force-pushed the regenerate-variables-map branch 4 times, most recently from f260e1e to 9b2f10f Compare June 8, 2025 09:35
@jcchavezs jcchavezs requested a review from M4tteoP June 8, 2025 09:35
@jcchavezs jcchavezs enabled auto-merge (squash) June 8, 2025 11:17
@jcchavezs jcchavezs disabled auto-merge June 8, 2025 11:17
@M4tteoP M4tteoP force-pushed the regenerate-variables-map branch from 481c118 to e667f84 Compare June 8, 2025 11:25
Copy link
Member

@M4tteoP M4tteoP left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I had to rebase to fix a conflict

@jcchavezs jcchavezs merged commit ed942cd into corazawaf:main Jun 8, 2025
72 checks passed
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.

3 participants