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

fix(elbv2_desync_mitigation_mode): improve logic #2986

Merged
merged 1 commit into from
Oct 31, 2023

Conversation

MrCloudSec
Copy link
Member

@MrCloudSec MrCloudSec commented Oct 31, 2023

Description

According to AWS Documentation, in order to ensure that your application load balancer receives only requests that comply with RFC 7230, it must have the strictest desync mitigation mode.

License

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.

@MrCloudSec MrCloudSec requested a review from a team October 31, 2023 09:44
@codecov
Copy link

codecov bot commented Oct 31, 2023

Codecov Report

Merging #2986 (83d0025) into master (1827230) will not change coverage.
Report is 2 commits behind head on master.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##           master    #2986   +/-   ##
=======================================
  Coverage   86.30%   86.30%           
=======================================
  Files         559      559           
  Lines       18095    18095           
=======================================
  Hits        15616    15616           
  Misses       2479     2479           
Files Coverage Δ
...nc_mitigation_mode/elbv2_desync_mitigation_mode.py 100.00% <100.00%> (ø)

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

@@ -119,7 +119,7 @@ def test_elbv2_without_desync_mitigation_mode_and_not_dropping_headers(self):
assert len(result) == 1
assert result[0].status == "FAIL"
assert search(
"does not have desync mitigation mode set as defensive or strictest and is not dropping invalid header fields",
"does not have desync mitigation mode set as strictest and is not dropping invalid header fields",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove the search here. Don't you need to change the tests for them to pass?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The search was already in there, and the result should be FAIL that's why they have passed.

@MrCloudSec MrCloudSec requested a review from jfagoagas October 31, 2023 10:41
@jfagoagas jfagoagas merged commit 3fd2ae9 into master Oct 31, 2023
@jfagoagas jfagoagas deleted the elbv2_desync_mitigation_mode-improve branch October 31, 2023 11:42
@jfagoagas jfagoagas added the provider/aws Issues/PRs related with the AWS provider label Oct 31, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
provider/aws Issues/PRs related with the AWS provider
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants