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

Update native-appsec module to 8.0.1 #4347

Merged
merged 15 commits into from
May 28, 2024

Conversation

CarlesDD
Copy link
Contributor

@CarlesDD CarlesDD commented May 24, 2024

What does this PR do?

Updates native-appsec module to v8.0.1:

  • Action state keeping moved to waf
  • Handling new result action semantics (block_request and redirect_request)

Motivation

Implement new libddwaf to add RASP support

Additional Notes

System test PR to enable XPASSing test: DataDog/system-tests#2495

APPSEC-52723

Copy link

github-actions bot commented May 24, 2024

Overall package size

Self size: 6.53 MB
Deduped: 61.79 MB
No deduping: 62.07 MB

Dependency sizes

name version self size total size
@datadog/native-appsec 8.0.1 15.59 MB 15.6 MB
@datadog/native-iast-taint-tracking 2.1.0 14.91 MB 14.92 MB
@datadog/pprof 5.3.0 9.85 MB 10.22 MB
protobufjs 7.2.5 2.77 MB 6.56 MB
@datadog/native-iast-rewriter 2.3.1 2.15 MB 2.24 MB
@opentelemetry/core 1.14.0 872.87 kB 1.47 MB
@datadog/native-metrics 2.0.0 898.77 kB 1.3 MB
@opentelemetry/api 1.8.0 1.21 MB 1.21 MB
import-in-the-middle 1.7.4 70.19 kB 739.86 kB
msgpack-lite 0.1.26 201.16 kB 281.59 kB
opentracing 0.14.7 194.81 kB 194.81 kB
semver 7.5.4 93.4 kB 123.8 kB
pprof-format 2.1.0 111.69 kB 111.69 kB
@datadog/sketches-js 2.1.0 109.9 kB 109.9 kB
lodash.sortby 4.7.0 75.76 kB 75.76 kB
lru-cache 7.14.0 74.95 kB 74.95 kB
ignore 5.2.4 51.22 kB 51.22 kB
int64-buffer 0.1.10 49.18 kB 49.18 kB
shell-quote 1.8.1 44.96 kB 44.96 kB
istanbul-lib-coverage 3.2.0 29.34 kB 29.34 kB
tlhunter-sorted-set 0.1.0 24.94 kB 24.94 kB
limiter 1.1.5 23.17 kB 23.17 kB
dc-polyfill 0.1.4 23.1 kB 23.1 kB
retry 0.13.1 18.85 kB 18.85 kB
jest-docblock 29.7.0 8.99 kB 12.76 kB
crypto-randomuuid 1.0.0 11.18 kB 11.18 kB
path-to-regexp 0.1.7 6.78 kB 6.78 kB
koalas 1.0.2 6.47 kB 6.47 kB
module-details-from-path 1.0.3 4.47 kB 4.47 kB

🤖 This report was automatically generated by heaviest-objects-in-the-universe

@CarlesDD CarlesDD force-pushed the ccapell/upgrade-native-appsec-waf-1.18 branch from 64e52d1 to 2d9ff23 Compare May 24, 2024 06:19
@pr-commenter
Copy link

pr-commenter bot commented May 24, 2024

Benchmarks

Benchmark execution time: 2024-05-28 10:19:44

Comparing candidate commit 0768977 in PR branch ccapell/upgrade-native-appsec-waf-1.18 with baseline commit 3544dc0 in branch master.

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

@CarlesDD CarlesDD force-pushed the ccapell/upgrade-native-appsec-waf-1.18 branch from 4d93151 to 45055a9 Compare May 24, 2024 07:12
@CarlesDD CarlesDD marked this pull request as ready for review May 27, 2024 07:41
@CarlesDD CarlesDD requested review from a team as code owners May 27, 2024 07:41
@uurien
Copy link
Collaborator

uurien commented May 27, 2024

Keep in mind, various new XPASS in system test with this changes, we should draft a PR to merge once this is merged:

  - generated xml file: /home/runner/work/dd-trace-js/dd-trace-js/logs_appsec_blocking/reportJunit.xml -
  =========================== short test summary info ============================
  XPASS tests/appsec/waf/test_blocking.py::Test_CustomBlockingResponse::test_custom_status_code missing_feature
  XPASS tests/appsec/waf/test_blocking.py::Test_CustomBlockingResponse::test_custom_redirect missing_feature
  XPASS tests/appsec/waf/test_blocking.py::Test_CustomBlockingResponse::test_custom_redirect_wrong_status_code missing_feature
  XPASS tests/appsec/waf/test_blocking.py::Test_CustomBlockingResponse::test_custom_redirect_missing_location missing_feature
  ========= 39 passed, 1073 deselected, 17 xfailed, 4 xpassed in 22.09s ==========

@simon-id
Copy link
Member

we should draft a PR to merge once this is merged:

correction: we should draft a PR before this is merged!

@CarlesDD
Copy link
Contributor Author

Link to draft system test PR added in this PR description.

@uurien
Copy link
Collaborator

uurien commented May 27, 2024

LGTM, I'll appreciate @simon-id approval, who knows RC better than me.

yarn.lock Outdated Show resolved Hide resolved
packages/dd-trace/src/appsec/blocking.js Outdated Show resolved Hide resolved
packages/dd-trace/src/appsec/rule_manager.js Show resolved Hide resolved
Qard
Qard previously approved these changes May 27, 2024
@CarlesDD CarlesDD merged commit d727c20 into master May 28, 2024
115 checks passed
@CarlesDD CarlesDD deleted the ccapell/upgrade-native-appsec-waf-1.18 branch May 28, 2024 15:25
juan-fernandez pushed a commit that referenced this pull request Jun 4, 2024
* Bump @datadog/native-appsec to v8.0.1

* Move action state keeping to waf. Handle new result actions

* Removed unused type argument in block function

* Lint

* Handle waf result in graphql

* Check blocking action

* Refactor handle waf result

* Refactor isBlockingAction

* Remove batchConfiguration thing.

* Optional chaining in conditionals

* Remove unrelated change in yarn.lock

* Fix return from waf run stub when no actions in result

* Rephrase test

* Fix waf actions test

* Get blocking action test with empty object instead undefined
juan-fernandez pushed a commit that referenced this pull request Jun 4, 2024
* Bump @datadog/native-appsec to v8.0.1

* Move action state keeping to waf. Handle new result actions

* Removed unused type argument in block function

* Lint

* Handle waf result in graphql

* Check blocking action

* Refactor handle waf result

* Refactor isBlockingAction

* Remove batchConfiguration thing.

* Optional chaining in conditionals

* Remove unrelated change in yarn.lock

* Fix return from waf run stub when no actions in result

* Rephrase test

* Fix waf actions test

* Get blocking action test with empty object instead undefined
This was referenced Jun 5, 2024
juan-fernandez pushed a commit that referenced this pull request Jun 5, 2024
* Bump @datadog/native-appsec to v8.0.1

* Move action state keeping to waf. Handle new result actions

* Removed unused type argument in block function

* Lint

* Handle waf result in graphql

* Check blocking action

* Refactor handle waf result

* Refactor isBlockingAction

* Remove batchConfiguration thing.

* Optional chaining in conditionals

* Remove unrelated change in yarn.lock

* Fix return from waf run stub when no actions in result

* Rephrase test

* Fix waf actions test

* Get blocking action test with empty object instead undefined
juan-fernandez pushed a commit that referenced this pull request Jun 5, 2024
* Bump @datadog/native-appsec to v8.0.1

* Move action state keeping to waf. Handle new result actions

* Removed unused type argument in block function

* Lint

* Handle waf result in graphql

* Check blocking action

* Refactor handle waf result

* Refactor isBlockingAction

* Remove batchConfiguration thing.

* Optional chaining in conditionals

* Remove unrelated change in yarn.lock

* Fix return from waf run stub when no actions in result

* Rephrase test

* Fix waf actions test

* Get blocking action test with empty object instead undefined
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants