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

Add no redirect to HTTPS to resolve #2416 #2432

Merged
merged 2 commits into from
Dec 5, 2024
Merged

Add no redirect to HTTPS to resolve #2416 #2432

merged 2 commits into from
Dec 5, 2024

Conversation

tghosth
Copy link
Collaborator

@tghosth tghosth commented Dec 5, 2024

This Pull Request relates to issue #2416

@tghosth tghosth enabled auto-merge (squash) December 5, 2024 11:35
@elarlang
Copy link
Collaborator

elarlang commented Dec 5, 2024

I think the wording still needs some improvements, an attempt:

Verify that HTTPS-based endpoints do not respond to non-encrypted HTTP requests or respond with an error. It must not respond with a redirect to the HTTPS endpoint to avoid clients accidentally sending data over non-encrypted HTTP, but this is not being discovered due to an automatic redirect.

Probably it is level 2 requirement (not level 1)

@tghosth
Copy link
Collaborator Author

tghosth commented Dec 5, 2024

Your wording leads to a negative requirement. I agree with the level comment and I also clarified the second part of the req.

I would propose:

# Description L1 L2 L3 CWE
13.1.8 [ADDED] Verify that HTTPS-based endpoints will only respond to non-encrypted HTTP requests with an error or will not respond at all. Responding with an automatic redirect to the HTTPS endpoint may lead to clients accidentally sending data over non-encrypted HTTP, but this is not being discovered.

@elarlang
Copy link
Collaborator

elarlang commented Dec 5, 2024

But I would still say level 2. It's easy to implement.

@tghosth
Copy link
Collaborator Author

tghosth commented Dec 5, 2024

Fair comment @elarlang, I updated the PR so are you comfortable to approve now?

@tghosth tghosth merged commit 66da30f into master Dec 5, 2024
6 checks passed
@tghosth tghosth deleted the resolve-2416 branch December 5, 2024 19:15
@jmanico
Copy link
Member

jmanico commented Dec 6, 2024

I know this is merged but this text is a little awkward.

non-encrypted HTTP

This is redundant.

requests with an error

This alone can be problematic. The better call it to not respond at all:

So I suggest we just keep this simple, with text like.

Verify that HTTPS-based endpoints do not respond to HTTP requests.

This drops the negative requirement of not redirecting, drops the "error message" part, and simplifies the language.

@elarlang
Copy link
Collaborator

elarlang commented Dec 6, 2024

You can re-open related issue (#2416) with recommendations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants