Skip to content

Conversation

@davidahall
Copy link
Contributor

@davidahall davidahall commented Jan 3, 2023

The alerts raised by the Content Security Policy Missing scan rule do not reflect the current guidance in the linked documents. The current guidance is that the X-Content-Security-Policy and X-WebKit-CSP headers are obsolete, and should not be used. However, at Low threshold, absence of these headers results in an alert being raised. I've updated the logic to more accurately reflect the OWASP guidance.

Fix zaproxy/zaproxy#7653.

@thc202 thc202 changed the title Update CSPMissing for current guidance (Issue 7653) pscanrules: Update CSPMissing for current guidance (Issue 7653) Jan 3, 2023
Copy link
Member

@kingthorin kingthorin left a comment

Choose a reason for hiding this comment

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

I still need to look at the tests but here’s a quick first pass.

@kingthorin
Copy link
Member

@davidahall davidahall force-pushed the main branch 2 times, most recently from d5dfffa to 9f66f4a Compare January 3, 2023 19:41
@thc202
Copy link
Member

thc202 commented Jan 4, 2023

The branch needs to be updated and the changelog moved to the Unreleased version.

@davidahall
Copy link
Contributor Author

Couple of process questions, because I'm new on this project.

  • Should one or more of the workflows need to be run?
  • Am I missing a task to be completed?

@kingthorin
Copy link
Member

All the workflows completed successfully. The only remaining step is for a second approving review :) So for now it's kinda on us.

Copy link
Member

@kingthorin kingthorin left a comment

Choose a reason for hiding this comment

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

Thanks

@psiinon
Copy link
Member

psiinon commented Feb 2, 2023

The scan rule doesnt return any examples.
That was an existing restriction.
However now that it returns 2 different alerts I think its more significant.
I'd like it to support the examples :)
Hopefully this wont be much work - we have lots of examples.
And that will then improve this page: https://www.zaproxy.org/docs/alerts/10038/

Edit: Reference 👉 zaproxy/zaproxy#6119

@thc202
Copy link
Member

thc202 commented Feb 8, 2023

Needs to be rebased to properly update the changelog.

@kingthorin
Copy link
Member

You seem to have merged, not rebased.

@davidahall
Copy link
Contributor Author

You seem to have merged, not rebased.

apparently so; I'll figure out how to get this reset and resubmit.

@thc202
Copy link
Member

thc202 commented Feb 13, 2023

We are happy to help.

@davidahall davidahall force-pushed the main branch 2 times, most recently from 305c619 to 0530c81 Compare February 14, 2023 23:42
David Hall added 6 commits February 14, 2023 18:46
Implementations that followed current guidance with respect to which
headers to use would see alerts raised at Low threshold.  Now, the
alerts reflect the current guidance (ie, don't use the obsolete CSP
headers).

Signed-off-by: David Hall <[email protected]>
- Obsolete CSP header usage is always flagged, not just at LOW
- General refactoring suggested by reviewers

Signed-off-by: David Hall <[email protected]>
@davidahall
Copy link
Contributor Author

in my day job, we don't really use forks, so that is new to me. I've found that the best way to learn more about git is to git yourself outta trouble. Hopefully, I didn't hammer it up too badly -- I do see your recent commits in the history on my fork, so there is some reassurance.

@thc202 thc202 merged commit 9ac7acc into zaproxy:main Feb 23, 2023
@thc202
Copy link
Member

thc202 commented Feb 23, 2023

Thank you!

@davidahall
Copy link
Contributor Author

Thank you both; this was an interesting experience

@thc202
Copy link
Member

thc202 commented Mar 10, 2023

@davidahall how would you like to be credited (e.g. name, handle)?
https://www.zaproxy.org/docs/desktop/credits/#zap-extended-team

@davidahall
Copy link
Contributor Author

davidahall commented Mar 12, 2023 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Possible false positive in CSP Header test

4 participants