Skip to content

contrib/envoyproxy: add JSON Encoder#3550

Merged
eliottness merged 10 commits into
mainfrom
flavien/json-encoder
Jun 16, 2025
Merged

contrib/envoyproxy: add JSON Encoder#3550
eliottness merged 10 commits into
mainfrom
flavien/json-encoder

Conversation

@e-n-0

@e-n-0 e-n-0 commented May 26, 2025

Copy link
Copy Markdown
Member

What does this PR do?

This PR implement a JSON to WAF Objects encoder following this RFC. This encoder will be used as part of another PR to parse the requests and responses bodies.

This PR uses the jsoniter go library to implement a custom JSON parser (iterating through the JSON and encode directly the values into WAF Objects).

Motivation

Add security coverage to envoy proxy/GCP SE to requests/responses JSON bodies.

Reviewer's Checklist

  • Changed code has unit tests for its functionality at or near 100% coverage.
  • System-Tests covering this feature have been added and enabled with the va.b.c-dev version tag.
  • There is a benchmark for any new code, or changes to existing code.
  • If this interacts with the agent in a new way, a system test has been added.
  • New code is free of linting errors. You can check this by running golangci-lint run locally.
  • Add an appropriate team label so this PR gets put in the right place for the release notes.
  • Non-trivial go.mod changes, e.g. adding new modules, are reviewed by @DataDog/dd-trace-go-guild.

Unsure? Have a question? Request a review!

@e-n-0
e-n-0 requested review from a team as code owners May 26, 2025 16:23
@github-actions github-actions Bot added the apm:ecosystem contrib/* related feature requests or bugs label May 26, 2025
@pr-commenter

pr-commenter Bot commented May 26, 2025

Copy link
Copy Markdown

Benchmarks

Benchmark execution time: 2025-06-16 12:04:42

Comparing candidate commit ccbc811 in PR branch flavien/json-encoder with baseline commit cfbfaf4 in branch main.

Found 0 performance improvements and 0 performance regressions! Performance is the same for 24 metrics, 0 unstable metrics.

@e-n-0
e-n-0 force-pushed the flavien/json-encoder branch from 8e2f867 to 4d87252 Compare May 27, 2025 10:34
@e-n-0
e-n-0 force-pushed the flavien/json-encoder branch 2 times, most recently from b410454 to af61f23 Compare June 11, 2025 12:42
eliottness added a commit to DataDog/go-libddwaf that referenced this pull request Jun 11, 2025
@eliottness eliottness mentioned this pull request Jun 13, 2025
7 tasks
@eliottness
eliottness enabled auto-merge (squash) June 13, 2025 14:54
@e-n-0
e-n-0 force-pushed the flavien/json-encoder branch 2 times, most recently from 1a68ff2 to 891fa78 Compare June 13, 2025 16:23
@e-n-0
e-n-0 force-pushed the flavien/json-encoder branch from 891fa78 to 39fec29 Compare June 13, 2025 16:29
@eliottness
eliottness merged commit 1ec2ff7 into main Jun 16, 2025
239 checks passed
@eliottness
eliottness deleted the flavien/json-encoder branch June 16, 2025 12:07
mtoffl01 pushed a commit that referenced this pull request Jun 23, 2025
@e-n-0 e-n-0 mentioned this pull request Jun 25, 2025
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

apm:ecosystem contrib/* related feature requests or bugs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants