Skip to content
Open

Test #16

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
155 changes: 0 additions & 155 deletions .github/workflows/codebuild-ci.yml

This file was deleted.

3 changes: 0 additions & 3 deletions .github/workflows/stale-issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,6 @@ jobs:
if: github.repository == 'aws/aws-sdk-java-v2'
name: Stale issue job
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- uses: aws-actions/stale-issue-cleanup@v4
with:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
}

private DefaultFullHttpRequest emptyHttpRequest() {
return new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "http://fake.com");
return new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "http://fake.com", false);

Check warning

Code scanning / CodeQL

Disabled Netty HTTP header validation Medium test

Request splitting vulnerability due to header value verification being disabled.

Copilot Autofix

AI 10 months ago

To fix the issue, we will modify the emptyHttpRequest method to use the constructor of DefaultFullHttpRequest that enables header validation by default. This involves removing the false argument from the constructor call. This change ensures that headers are validated for potential splitting vulnerabilities, even in test code.


Suggested changeset 1
http-clients/netty-nio-client/src/test/java/software/amazon/awssdk/http/nio/netty/internal/nrs/HandlerSubscriberTest.java

Autofix patch

Autofix patch
Run the following command in your local git repository to apply this patch
cat << 'EOF' | git apply
diff --git a/http-clients/netty-nio-client/src/test/java/software/amazon/awssdk/http/nio/netty/internal/nrs/HandlerSubscriberTest.java b/http-clients/netty-nio-client/src/test/java/software/amazon/awssdk/http/nio/netty/internal/nrs/HandlerSubscriberTest.java
--- a/http-clients/netty-nio-client/src/test/java/software/amazon/awssdk/http/nio/netty/internal/nrs/HandlerSubscriberTest.java
+++ b/http-clients/netty-nio-client/src/test/java/software/amazon/awssdk/http/nio/netty/internal/nrs/HandlerSubscriberTest.java
@@ -96,3 +96,3 @@
     private DefaultFullHttpRequest emptyHttpRequest() {
-        return new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "http://fake.com", false);
+        return new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "http://fake.com");
     }
EOF
@@ -96,3 +96,3 @@
private DefaultFullHttpRequest emptyHttpRequest() {
return new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "http://fake.com", false);
return new DefaultFullHttpRequest(HttpVersion.HTTP_1_1, HttpMethod.GET, "http://fake.com");
}
Copilot is powered by AI and may make mistakes. Always verify output.
}

private Subscription doNothingSubscription() {
Expand Down Expand Up @@ -226,4 +226,4 @@
return inEventLoop;
}
}
}
}
Loading