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 use case for safely transitioning websites to not use any DOM XSS injection sinks #408

Conversation

mbrodesser-Igalia
Copy link
Collaborator

spec/index.bs Outdated
@@ -95,6 +95,11 @@ monitor and review.
* Encourage a design in which security decisions are
encapsulated within a small part of the application.

* Enable transitioning existing websites to call alternative save methods to
Copy link
Member

Choose a reason for hiding this comment

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

That seems already captured by the existing goals, no? What is mentioned here is just one of technical means to "minimize the likelihood of client-side vulnerabilities", and "reduce security review surface".

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes. The technical means and its more explicit, since it mentions transitioning existing websites.
TBH this might be obvious to someone very familiar with the API and the topic, for others not.

Feel free to disagree though and reject this change.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

"Enable iteratively transitioning" would be even clearer from my point of view.

The only other sections where that information seems correctly placed is the introduction or the use cases section.

Identifying that real-world use case took, at least me, some time.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

WDYT about changing: "Allow the detection of vulnerabilities" to "Allow the usability-preserving detection of". And adding a use case like

'A website uses DOM XSS injection sinks. The website-developer adds trusted types to it and monitors violations by using the Content-Security-Policy-Report-Only header field. Violations are iteratively fixed by refactoring the code to use only save methods. Afterwards, no DOM XSS injection sinks are called anymore. Hence, no trusted types are required anymore. The developer switches the report-only mode off and disables trusted type policies with the require-trusted-types-for directive. The website's functionality was never impaired during the refactorings.'

Copy link
Member

Choose a reason for hiding this comment

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

I like that. The only change I'd suggest would be "save" -> "safe".

Copy link
Collaborator Author

@mbrodesser-Igalia mbrodesser-Igalia Jan 18, 2024

Choose a reason for hiding this comment

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

Added a patch for it with that fixed and disabling trusted types policies slightly more explained.

@mbrodesser-Igalia mbrodesser-Igalia changed the title Add goal for transitioning websites to save states Add goal for transitioning websites to safe states Jan 18, 2024
…es and add a use case for a website using TT to completely and safely transition away from DOM XSS injection sinks
@mbrodesser-Igalia mbrodesser-Igalia changed the title Add goal for transitioning websites to safe states Add use case for safely transitioning websites to not use any DOM XSS injection sinks Jan 18, 2024
@mbrodesser-Igalia mbrodesser-Igalia merged commit 18f4278 into w3c:main Jan 22, 2024
2 checks passed
github-actions bot added a commit that referenced this pull request Jan 22, 2024
… injection sinks (#408)

SHA: 18f4278
Reason: push, by mbrodesser-Igalia

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

2 participants