Skip to content
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

add coverage to XML parsing in NAP Monitoring #288

Merged
merged 2 commits into from
May 3, 2023

Conversation

mohamed-gougam
Copy link
Contributor

Proposed changes

This adds coverage to NAP Monitoring extension in Agent for parsing additional cases of the XML Violations to gather the Context information and stream it to NGINX Management Suite.

Checklist

Before creating a PR, run through this checklist and mark each as complete.

  • I have read the CONTRIBUTING document
  • I have run make install-tools and have attached any dependency changes to this pull request
  • If applicable, I have added tests that prove my fix is effective or that my feature works
  • If applicable, I have checked that any relevant tests pass after adding my changes
  • If applicable, I have updated any relevant documentation (README.md)
  • If applicable, I have tested my cross-platform changes on Ubuntu 22, Redhat 8, SUSE 15 and FreeBSD 13

@netlify
Copy link

netlify bot commented Apr 12, 2023

Deploy Preview for agent-public-docs canceled.

Name Link
🔨 Latest commit 61c54dd
🔍 Latest deploy log https://app.netlify.com/sites/agent-public-docs/deploys/64467a418933350008c87d41

@olli-holmala
Copy link
Contributor

I cross-referenced our list of scoped violations against the violations found in the ./test/component/nginx-app-protect/monitoring/testData/events-out directory and found that we are missing test cases for the following violations:

  • VIOL_PARAMETER_REPEATED
  • VIOL_PARAMETER_MULTIPART_NULL_VALUE
  • VIOL_PARAMETER_EMPTY_VALUE
  • VIOL_URL
  • VIOL_PARAMETER_VALUE_REGEXP
  • VIOL_PARAMETER_NUMERIC_VALUE
  • VIOL_PARAMETER_DATA_TYPE
  • VIOL_PARAMETER_VALUE_LENGTH
  • VIOL_PARAMETER_DYNAMIC_VALUE
  • VIOL_PARAMETER_STATIC_VALUE
  • VIOL_COOKIE_EXPIRED
  • VIOL_PARAMETER_ARRAY_VALUE
  • VIOL_PARAMETER_LOCATION

Let's please add all the XML examples from our table there as test cases so we can demonstrate that we parse them correctly.

@mohamed-gougam mohamed-gougam force-pushed the completion-violation-context-support-nap-monitoring branch from 6b15dc5 to cee75bd Compare April 17, 2023 17:33
@mohamed-gougam mohamed-gougam force-pushed the completion-violation-context-support-nap-monitoring branch from cee75bd to 61c54dd Compare April 24, 2023 12:46
Copy link
Contributor

@sanathkumarbs sanathkumarbs left a comment

Choose a reason for hiding this comment

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

Overall everything is LGTM. Thanks for extending the XML support!

@dhurley dhurley merged commit 7643d73 into main May 3, 2023
@dhurley dhurley deleted the completion-violation-context-support-nap-monitoring branch May 3, 2023 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Pull requests for routine tasks dependencies
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants