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(asm): fix segmentation fault parsing JSON in Python2 #4082

Merged
merged 4 commits into from Aug 16, 2022

Conversation

avara1986
Copy link
Member

Description

Fix Python 2 error reading WAF rules

Checklist

  • Title must conform to conventional commit.
  • Add additional sections for feat and fix pull requests.
  • Ensure tests are passing for affected code.

Reviewer Checklist

  • Title is accurate.
  • Description motivates each change.
  • No unnecessary changes were introduced in this PR.
  • PR cannot be broken up into smaller PRs.
  • Avoid breaking API changes unless absolutely necessary.
  • Tests provided or description of manual testing performed is included in the code or PR.
  • Release note has been added for fixes and features, or else changelog/no-changelog label added.
  • All relevant GitHub issues are correctly linked.
  • Backports are identified and tagged with Mergifyio.
  • Add to milestone.

@avara1986 avara1986 added the ASM Application Security Monitoring label Aug 12, 2022
@codecov-commenter
Copy link

codecov-commenter commented Aug 15, 2022

Codecov Report

Merging #4082 (9ddcb9d) into 1.x (055110a) will increase coverage by 0.02%.
The diff coverage is 80.86%.

@@            Coverage Diff             @@
##              1.x    #4082      +/-   ##
==========================================
+ Coverage   78.90%   78.93%   +0.02%     
==========================================
  Files         720      720              
  Lines       57046    57239     +193     
==========================================
+ Hits        45013    45181     +168     
- Misses      12033    12058      +25     
Impacted Files Coverage Δ
ddtrace/contrib/flask/patch.py 0.00% <0.00%> (ø)
tests/contrib/flask/test_flask_appsec.py 0.00% <0.00%> (ø)
tests/contrib/flask/test_flask_snapshot.py 0.00% <0.00%> (ø)
tests/integration/test_integration_snapshots.py 0.00% <0.00%> (ø)
tests/telemetry/test_telemetry.py 0.00% <0.00%> (ø)
tests/telemetry/test_writer.py 0.00% <ø> (ø)
ddtrace/internal/module.py 78.87% <66.66%> (-0.06%) ⬇️
ddtrace/contrib/django/utils.py 90.52% <88.23%> (+0.25%) ⬆️
ddtrace/internal/sampling.py 92.81% <88.67%> (+1.26%) ⬆️
ddtrace/constants.py 100.00% <100.00%> (ø)
... and 11 more

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@avara1986 avara1986 marked this pull request as ready for review August 16, 2022 07:25
@avara1986 avara1986 requested a review from a team as a code owner August 16, 2022 07:25
@mergify mergify bot merged commit 399940a into 1.x Aug 16, 2022
@mergify mergify bot deleted the avara1986/py2-ddwaf-error branch August 16, 2022 07:26
@github-actions github-actions bot added this to the v1.5.0 milestone Aug 16, 2022
@avara1986
Copy link
Member Author

@Mergifyio backport 0.x 0.61 1.3 1.4

mergify bot pushed a commit that referenced this pull request Aug 16, 2022
## Description
Fix Python 2 error reading WAF rules

## Checklist
- [x] Title must conform to [conventional commit](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional).
- [x] Add additional sections for `feat` and `fix` pull requests.
- [x] Ensure tests are passing for affected code.

## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] PR cannot be broken up into smaller PRs.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
- [ ] Add to milestone.

(cherry picked from commit 399940a)

# Conflicts:
#	tests/appsec/test_processor.py
mergify bot pushed a commit that referenced this pull request Aug 16, 2022
## Description
Fix Python 2 error reading WAF rules

## Checklist
- [x] Title must conform to [conventional commit](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional).
- [x] Add additional sections for `feat` and `fix` pull requests.
- [x] Ensure tests are passing for affected code.

## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] PR cannot be broken up into smaller PRs.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
- [ ] Add to milestone.

(cherry picked from commit 399940a)

# Conflicts:
#	tests/appsec/test_processor.py
mergify bot pushed a commit that referenced this pull request Aug 16, 2022
## Description
Fix Python 2 error reading WAF rules

## Checklist
- [x] Title must conform to [conventional commit](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional).
- [x] Add additional sections for `feat` and `fix` pull requests.
- [x] Ensure tests are passing for affected code.

## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] PR cannot be broken up into smaller PRs.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
- [ ] Add to milestone.

(cherry picked from commit 399940a)
mergify bot pushed a commit that referenced this pull request Aug 16, 2022
## Description
Fix Python 2 error reading WAF rules

## Checklist
- [x] Title must conform to [conventional commit](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional).
- [x] Add additional sections for `feat` and `fix` pull requests.
- [x] Ensure tests are passing for affected code.

## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] PR cannot be broken up into smaller PRs.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
- [ ] Add to milestone.

(cherry picked from commit 399940a)
@mergify
Copy link
Contributor

mergify bot commented Aug 16, 2022

mergify bot added a commit that referenced this pull request Aug 16, 2022
…4082) (#4097)

This is an automatic backport of pull request #4082 done by [Mergify](https://mergify.com).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the [documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com/) you can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>
mergify bot added a commit that referenced this pull request Aug 16, 2022
…4082) (#4096)

This is an automatic backport of pull request #4082 done by [Mergify](https://mergify.com).


---


<details>
<summary>Mergify commands and options</summary>

<br />

More conditions and actions can be found in the [documentation](https://docs.mergify.com/).

You can also trigger Mergify actions by commenting on this pull request:

- `@Mergifyio refresh` will re-evaluate the rules
- `@Mergifyio rebase` will rebase this PR on its base branch
- `@Mergifyio update` will merge the base branch into this PR
- `@Mergifyio backport <destination>` will backport this PR on `<destination>` branch

Additionally, on Mergify [dashboard](https://dashboard.mergify.com/) you can:

- look at your merge queues
- generate the Mergify configuration with the config editor.

Finally, you can contact us on https://mergify.com
</details>
mergify bot added a commit that referenced this pull request Aug 16, 2022
…4082) (#4094)

* feat(asm): fix segmentation fault parsing JSON in Python2 (#4082)

## Description
Fix Python 2 error reading WAF rules

## Checklist
- [x] Title must conform to [conventional commit](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional).
- [x] Add additional sections for `feat` and `fix` pull requests.
- [x] Ensure tests are passing for affected code.

## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] PR cannot be broken up into smaller PRs.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
- [ ] Add to milestone.

(cherry picked from commit 399940a)

# Conflicts:
#	tests/appsec/test_processor.py

* feat: resolve cherrypick conflicts

* feat: resolve cherrypick conflicts

Co-authored-by: Alberto Vara <alberto.vara@datadoghq.com>
(cherry picked from commit a75815d)
mergify bot added a commit that referenced this pull request Aug 16, 2022
…4082) (#4094) (#4101)

* feat(asm): fix segmentation fault parsing JSON in Python2 (#4082)

## Description
Fix Python 2 error reading WAF rules

## Checklist
- [x] Title must conform to [conventional commit](https://github.com/conventional-changelog/commitlint/tree/master/%40commitlint/config-conventional).
- [x] Add additional sections for `feat` and `fix` pull requests.
- [x] Ensure tests are passing for affected code.

## Reviewer Checklist
- [ ] Title is accurate.
- [ ] Description motivates each change.
- [ ] No unnecessary changes were introduced in this PR.
- [ ] PR cannot be broken up into smaller PRs.
- [ ] Avoid breaking [API](https://ddtrace.readthedocs.io/en/stable/versioning.html#interfaces) changes unless absolutely necessary.
- [ ] Tests provided or description of manual testing performed is included in the code or PR.
- [ ] Release note has been added for fixes and features, or else `changelog/no-changelog` label added.
- [ ] All relevant GitHub issues are correctly linked.
- [ ] Backports are identified and tagged with Mergifyio.
- [ ] Add to milestone.

(cherry picked from commit 399940a)

# Conflicts:
#	tests/appsec/test_processor.py

* feat: resolve cherrypick conflicts

* feat: resolve cherrypick conflicts

Co-authored-by: Alberto Vara <alberto.vara@datadoghq.com>
(cherry picked from commit a75815d)

Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ASM Application Security Monitoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants