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

chore(iast): re.match getitem aspect #10593

Merged
merged 69 commits into from
Sep 20, 2024
Merged

Conversation

gnufede
Copy link
Member

@gnufede gnufede commented Sep 10, 2024

Code security: Aspect for re.Match indexed access ([]) of matches.

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 10, 2024

CODEOWNERS have been resolved as:

benchmarks/appsec_iast_aspects/config.yaml                              @DataDog/asm-python
benchmarks/bm/iast_fixtures/str_methods.py                              @DataDog/asm-python
benchmarks/bm/iast_utils/aspects_benchmarks_generate.py                 @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/Aspects/AspectIndex.cpp            @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/TaintTracking/TaintRange.cpp       @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/Utils/GenericUtils.h               @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/Utils/StringUtils.cpp              @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/Utils/StringUtils.h                @DataDog/asm-python
ddtrace/appsec/_iast/_taint_tracking/aspects.py                         @DataDog/asm-python
scripts/iast/mod_leak_functions.py                                      @DataDog/asm-python
scripts/iast/test_leak_functions.py                                     @DataDog/asm-python
tests/appsec/iast/aspects/test_index_aspect_fixtures.py                 @DataDog/asm-python
tests/appsec/iast/aspects/test_re_aspects.py                            @DataDog/asm-python
tests/appsec/iast/fixtures/propagation_path.py                          @DataDog/asm-python
tests/appsec/iast_memcheck/test_iast_mem_check.py                       @DataDog/asm-python

@pr-commenter
Copy link

pr-commenter bot commented Sep 10, 2024

Benchmarks

Benchmark execution time: 2024-09-20 10:35:29

Comparing candidate commit 96421c4 in PR branch gnufede/iast-aspect-re-match-getitem with baseline commit 872f947 in branch main.

Some scenarios are present only in baseline or only in candidate runs. If you didn't create or remove some scenarios in your branch, this maybe a sign of crashed benchmarks 💥💥💥
Check Gitlab CI job log to find if any benchmark has crashed.

Scenarios present only in candidate:

  • iast_aspects-aspect_iast_do_index_on_dict
  • iast_aspects-aspect_no_iast_do_index_on_dict

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

@gnufede gnufede changed the title chore(iast): re.match getitem unit test chore(iast): re.match getitem aspect Sep 11, 2024
@gnufede gnufede added changelog/no-changelog A changelog entry is not required for this PR. ASM Application Security Monitoring labels Sep 11, 2024
@datadog-dd-trace-py-rkomorn
Copy link

datadog-dd-trace-py-rkomorn bot commented Sep 11, 2024

Datadog Report

Branch report: gnufede/iast-aspect-re-match-getitem
Commit report: f9fd2c1
Test service: dd-trace-py

✅ 0 Failed, 1863 Passed, 218 Skipped, 868.62ms Total duration (18.46s time saved)

juanjux and others added 19 commits September 18, 2024 13:42
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
Signed-off-by: Juanjo Alvarez <[email protected]>
…aDog/dd-trace-py into gnufede/iast-aspect-re-match-getitem
## Checklist
- [x] 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](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## 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](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

---------

Co-authored-by: Federico Mon <[email protected]>
…aDog/dd-trace-py into gnufede/iast-aspect-re-match-getitem
…e-match-getitem

# Conflicts:
#	ddtrace/appsec/_iast/_taint_tracking/Aspects/AspectIndex.cpp
#	ddtrace/appsec/_iast/_taint_tracking/Utils/GenericUtils.cpp
#	ddtrace/appsec/_iast/_taint_tracking/Utils/StringUtils.cpp
Signed-off-by: Juanjo Alvarez <[email protected]>
@juanjux juanjux merged commit 0d44103 into main Sep 20, 2024
559 checks passed
@juanjux juanjux deleted the gnufede/iast-aspect-re-match-getitem branch September 20, 2024 11:19
mabdinur pushed a commit that referenced this pull request Sep 25, 2024
Code security: Aspect for `re.Match` indexed access (`[]`) of matches.

## Checklist
- [x] 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](https://ddtrace.readthedocs.io/en/stable/releasenotes.html)
- The change includes or references documentation updates if necessary
- Backport labels are set (if
[applicable](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting))

## Reviewer Checklist
- [x] 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](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces)
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](https://ddtrace.readthedocs.io/en/latest/contributing.html#backporting)

---------

Signed-off-by: Juanjo Alvarez <[email protected]>
Co-authored-by: Juanjo Alvarez Martinez <[email protected]>
Co-authored-by: Alberto Vara <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASM Application Security Monitoring changelog/no-changelog A changelog entry is not required for this PR.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants