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

Enhancement: Access Contents of Specific Headers #108

Open
wmcsl opened this issue Sep 11, 2023 · 4 comments
Open

Enhancement: Access Contents of Specific Headers #108

wmcsl opened this issue Sep 11, 2023 · 4 comments
Labels
enhancement New feature or request

Comments

@wmcsl
Copy link

wmcsl commented Sep 11, 2023

I believe a useful feature would be to check the value of a certain header, rather than only checking if the header exists and if the usual values are in the response.

For example, being able to check what the value of the X-Powered-By header says would allow authors to provide more relevant guidance for specific text stacks.

Another example of where this would be useful would be to move away from the current paradigm of

and "application/json" in {check.response.headers} then

where it's only checking to see if application/json is in any of the headers, not if it's in the Content-Type header.

Example of what I'd like to see:

``
detail: The server announces its underlying technology. {latest.response.headers.X-Powered-By}


to list all instances of the X-Powered-By header.

or

and "application/json" in {check.response.headers.Content-Type} then


Since multiple can be in the response, having a way to interact individual ones or all at once would be useful as well.
@Hannah-PortSwigger
Copy link
Contributor

Thanks for the feedback! Retrieving the values of headers requested fairly frequently - we've added your +1 to this functionality.

We're gathering any bits of feedback about BChecks we can get, so if there's any other functionality you would like to have or you think is missing, then please let us know!

@Hannah-PortSwigger Hannah-PortSwigger added the enhancement New feature or request label Sep 12, 2023
@Hannah-PortSwigger
Copy link
Contributor

Reopening for better tracking of feature request.

@er4z0r
Copy link

er4z0r commented Dec 8, 2023

Seconded. I thought I'd write a quick BCheck of people using static nonces in the content security policy. But without a means to access that header's value it doesn't seem possible with BChecks. So 👍 for accessing header content :)

@Hannah-PortSwigger
Copy link
Contributor

Thanks for the +1!

It is possible to identify specific content using regex matching. However, you will need to be fairly specific with your regular expression to avoid false positives.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

3 participants