-
Notifications
You must be signed in to change notification settings - Fork 7
chore: update libcoraza api #3
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
base: main
Are you sure you want to change the base?
Conversation
Signed-off-by: Felipe Zipitria <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This pull request updates the nginx-coraza connector to use the latest libcoraza API. The changes introduce a two-phase WAF initialization pattern where configuration objects are created first, rules are loaded into the config, and then WAF instances are created from the configuration.
Key changes:
- Split WAF creation into config creation and WAF instantiation phases
- Updated intervention processing to use new libcoraza API (removed URL redirect handling)
- Changed from
coraza_rules_addfor files tocoraza_rules_add_fileAPI - Updated Dockerfile to manually install library files and switch from libpcre3 to libpcre2
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 6 comments.
| File | Description |
|---|---|
| src/ngx_http_coraza_common.h | Added coraza_waf_config_t typedef and updated structs to include both config and waf fields; changed function signature to pass transaction by value instead of pointer |
| src/ngx_http_coraza_module.c | Refactored intervention processing to use new API, implemented two-phase WAF initialization, updated cleanup functions, and modified merge logic to share WAF instances between parent/child configs |
| Dockerfile | Changed from make install to manual file copying and updated PCRE dependency from libpcre3 to libpcre2 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
@copilot open a new pull request to apply changes based on the comments in this thread |
…ouble-free Co-authored-by: fzipi <[email protected]>
Co-authored-by: fzipi <[email protected]>
Co-authored-by: fzipi <[email protected]>
Co-authored-by: fzipi <[email protected]>
Fix review comments: return types, null checks, and double-free vulnerability
Signed-off-by: Felipe Zipitria <[email protected]>
|
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days |
what
why