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

feat(iast): report telemetry log error #10740

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

avara1986
Copy link
Member

@avara1986 avara1986 commented Sep 20, 2024

Always report a telemetry log error when an IAST propagation error raises, regardless of whether the _DD_IAST_DEBUG environment variable is enabled or not.

  • Fix some side effects of aspect functions in join_aspect, ljust_aspect
  • Fix format_aspect "if not..." side-effect
  • Fix format_map_aspect not BuiltinFunctionType
  • Fix _aspect_split error task APPSEC-54782
  • Early fail in decode/encode_aspect

Jira Task: APPSEC-54993

Checklist

  • PR author has checked that all the criteria below are met
  • The PR description includes an overview of the change
  • The PR description articulates the motivation for the change
  • The change includes tests OR the PR description describes a testing strategy
  • The PR description notes risks associated with the change, if any
  • Newly-added code is easy to change
  • The change follows the library release note guidelines
  • The change includes or references documentation updates if necessary
  • Backport labels are set (if applicable)

Reviewer Checklist

  • Reviewer has checked that all the criteria below are met
  • Title is accurate
  • All changes are related to the pull request's stated goal
  • Avoids breaking API changes
  • Testing strategy adequately addresses listed risks
  • Newly-added code is easy to change
  • Release note makes sense to a user of the library
  • If necessary, author has acknowledged and discussed the performance implications of this PR as reported in the benchmarks PR comment
  • Backport labels are set in a manner that is consistent with the release branch maintenance policy

Copy link
Contributor

github-actions bot commented Sep 20, 2024

CODEOWNERS have been resolved as:

releasenotes/notes/iast-feat-iast-telemetry-error-f6ba4a6aadf96ec9.yaml  @DataDog/apm-python
ddtrace/appsec/_iast/_metrics.py                                        @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/Aspects/AspectIndex.cpp            @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/Aspects/AspectJoin.cpp             @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/Aspects/Helpers.h                  @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/Utils/GenericUtils.cpp             @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/__init__.py                        @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/aspects.py                         @DataDog/asm-python
ddtrace/appsec/_iast/_utils.py                                          @DataDog/asm-python
tests/appsec/iast/aspects/test_encode_decode_aspect.py                  @DataDog/asm-python
tests/appsec/iast/aspects/test_index_aspect_fixtures.py                 @DataDog/asm-python
tests/appsec/iast/aspects/test_join_aspect_fixtures.py                  @DataDog/asm-python
tests/appsec/iast/aspects/test_str_aspect.py                            @DataDog/asm-python
tests/appsec/iast/test_telemetry.py                                     @DataDog/asm-python

@pr-commenter
Copy link

pr-commenter bot commented Sep 20, 2024

Benchmarks

Benchmark execution time: 2024-09-23 19:54:51

Comparing candidate commit c33988c in PR branch avara1986/iast_error_metrics_refactor with baseline commit 5546c23 in branch main.

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

scenario:iast_aspects-aspect_iast_do_add_and_uppercase

  • 🟩 max_rss_usage [-2.630MB; -2.146MB] or [-8.865%; -7.236%]

scenario:iast_aspects-aspect_iast_do_center

  • 🟩 max_rss_usage [-3.249MB; -2.993MB] or [-10.890%; -10.034%]

scenario:iast_aspects-aspect_iast_do_index

  • 🟩 max_rss_usage [-3.416MB; -2.796MB] or [-11.464%; -9.383%]

scenario:iast_aspects-aspect_iast_do_ljust

  • 🟩 max_rss_usage [-3.155MB; -2.721MB] or [-10.618%; -9.157%]

@avara1986 avara1986 marked this pull request as ready for review September 20, 2024 16:30
@avara1986 avara1986 requested review from a team as code owners September 20, 2024 16:30
@avara1986 avara1986 enabled auto-merge (squash) September 23, 2024 07:17
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.

2 participants