Skip to content

Update libddwaf to v1.24.1 #137

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 15 commits into
base: main
Choose a base branch
from
Open

Conversation

CarlesDD
Copy link
Contributor

What does this PR do?

  • Update libddwaf to v1.24.1
  • Implements WAF builder API

Motivation

libddwaf changed its interface in v1.23.0 with breaking changes in order to move the configuration update management from the tracer to the library.

Additional Notes

Upgrading guide

@CarlesDD CarlesDD requested a review from a team as a code owner April 23, 2025 05:24
@CarlesDD CarlesDD marked this pull request as draft April 23, 2025 05:48
@CarlesDD CarlesDD marked this pull request as ready for review April 23, 2025 06:10
it('should throw a type error when updating a WAF instance with invalid arguments', () => {
const waf = new DDWAF(rules)
assert.throws(() => waf.update('string'), new TypeError('First argument must be an object'))
describe('Remove config', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

IMO it's also good to check waf.configPaths value after each remove

waf.dispose()
assert.throws(() => waf.update(rules), new Error('Could not update a disposed WAF instance'))
})
describe('Update config', () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we have to check that the old handle still alive when an new empty config (wrong) is applied ?

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.

2 participants