Add security violations filter processor, and plug it in to the default OTLP logs pipeline when TcplogReceiver is configured#1576
Merged
dhurley merged 3 commits intonginx:mainfrom Apr 7, 2026
Conversation
9ce64b2 to
482dc34
Compare
dhurley
reviewed
Apr 1, 2026
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #1576 +/- ##
==========================================
- Coverage 85.02% 84.94% -0.08%
==========================================
Files 103 105 +2
Lines 13589 13680 +91
==========================================
+ Hits 11554 11621 +67
- Misses 1518 1546 +28
+ Partials 517 513 -4
... and 7 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
🚀 New features to boost your workflow:
|
…st message as a one-time gate — on the very first log record, it checks: - The body is a string (not int, bytes, etc.). - The body has exactly 27 pipe-separated fields matching the secops_dashboard-log profile format. If either check fails, the gate closes permanently — all subsequent messages are dropped with zero overhead (early return before any iteration) until the OTel collector is restarted. If it passes, the gate opens permanently and all future string-bodied records flow through.
…nfigured against docker0 interface IP as well (along with 127.0.0.1)
8f02abb to
a944b3e
Compare
craigell
approved these changes
Apr 2, 2026
…ne, replacing the: - logsgzipprocessor: This processor was introduced for NGINX One for a deprecated project, which is not in scope anymore. - securityviolationsprocessor: This processor was converting the sylog security violation into a JSON body log record format, and then forwarding it. This deterministed JSON log body parsing is an overhead for the agent to process for every single log record.
a944b3e to
1f88bd7
Compare
dhurley
approved these changes
Apr 7, 2026
Akshay2191
approved these changes
Apr 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Proposed changes
COMMIT 1:
Add a new security violations filter processor that validates the first message as a one-time gate — on the very first log record, it checks:
- The body is a string (not int, bytes, etc.).
- The body has exactly 28 pipe-separated fields matching the secops-dashboard-log profile format.
COMMIT 2:
Add support for NAP V5 (containerized mode) by verifying syslog IP configured against docker0 interface IP as well (along with 127.0.0.1)
COMMIT 3:
Plug security violation filter processor into the default logs pipeline, replacing the:
- logsgzipprocessor: This processor was introduced for NGINX One for a deprecated project, which is not in scope anymore.
- securityviolationsprocessor: This processor was converting the sylog security violation into a JSON body log record format, and then forwarding it. This deterministix JSON log body conversion is an overhead for the agent to process for every single log record.
Verification
app_protect_security_logdirective hassyslog:server=127.0.0.1:1514configured)In the first log the processor encounters, if valid number of CSV separated fields are sent as per the log-profile configured, the violation is forwarded to the management plane (as per the batch settings). Any subsequent violation is also forwarded.
In the first log the processor encounters, if the expected CSV separated fields are not sent as per the log-profile configured , the violation is filtered out. Any subsequent violation is also filtered out, and not forwarded by agent.
Here is the error log that can be verified in the
/var/log/nginx-agent/opentelemetry-collector-agent.logfile for that error case:Checklist
Before creating a PR, run through this checklist and mark each as complete.
CONTRIBUTINGdocumentmake install-toolsand have attached any dependency changes to this pull requestREADME.md)