Skip to content

Security main page#44366

Merged
wbamberg merged 16 commits into
mdn:mainfrom
wbamberg:security-main-page
Jun 19, 2026
Merged

Security main page#44366
wbamberg merged 16 commits into
mdn:mainfrom
wbamberg:security-main-page

Conversation

@wbamberg

@wbamberg wbamberg commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

This rewrites the top-level security page. I've made it much more like an index of the pages in this section. I felt a bit bad removing a lot of the guide-type content here, but really it's very incomplete and outdated, so I don't think it is very useful.

@wbamberg wbamberg requested a review from a team as a code owner June 5, 2026 23:21
@wbamberg wbamberg requested review from chrisdavidmills and removed request for a team June 5, 2026 23:21
@github-actions github-actions Bot added Content:Security Security docs size/m [PR only] 51-500 LoC changed labels Jun 5, 2026
@github-actions

github-actions Bot commented Jun 5, 2026

Copy link
Copy Markdown
Contributor

Preview URLs (2 pages)

Flaws (2)

Note! 1 document with no flaws that don't need to be listed. 🎉

Found an unexpected or unresolvable flaw? Please report it here.

URL: /en-US/docs/Web/Security
Title: Security
Flaw count: 2

  • broken_links:
    • Link /en-US/docs/Web/Security/Defenses/Input_validation doesn't resolve
    • Link /en-US/docs/Web/Security/Defenses/Input_validation doesn't resolve
External URLs (1)

URL: /en-US/docs/Web/Security
Title: Security

(comment last updated: 2026-06-16 21:36:40)

wbamberg and others added 3 commits June 5, 2026 16:40
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…y-main-page

* origin/security-main-page:
  Update files/en-us/web/security/index.md
@github-actions github-actions Bot added the Content:WebAPI Web API docs label Jun 6, 2026
@wbamberg wbamberg requested review from hamishwillee and removed request for chrisdavidmills June 7, 2026 19:13
Comment thread files/en-us/web/security/index.md Outdated
Comment thread files/en-us/web/security/index.md Outdated

@hamishwillee hamishwillee left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

@wbamberg Added a few nit comments, but this is good. Approving so you can merge when you want.

I felt a bit bad removing a lot of the guide-type content here, but really it's very incomplete and outdated, so I don't think it is very useful.

FWIW absolutely right decision.
What was here was an overview of defences and defensive approaches. That's a potentially useful document to as the first document, if named as such.
What you have here is a much better entry point for presenting the whole Security topic in a structured way.

wbamberg and others added 2 commits June 7, 2026 17:29
@wbamberg

wbamberg commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator Author

@wbamberg Added a few nit comments, but this is good. Approving so you can merge when you want.

I felt a bit bad removing a lot of the guide-type content here, but really it's very incomplete and outdated, so I don't think it is very useful.

FWIW absolutely right decision. What was here was an overview of defences and defensive approaches. That's a potentially useful document to as the first document, if named as such. What you have here is a much better entry point for presenting the whole Security topic in a structured way.

Yeah, I do wonder if it's worth somewhere having a list of "things everyone should probably be doing":

  • use HTTPS
  • have a CSP, preferably strict, but minimally disallowing inline JavaScript
  • control cross-origin requests using Fetch metadata
  • use strong authentication (in particular, not just passwords)
  • use secure cookie attributes (Secure, and SameSite=Strict or =Lax if you must)
  • follow good operational security practices
  • take care of your dependencies
  • handle input securely
  • restrict framing
  • use SRI for external JS

I wasn't sure where it could go but maybe it would work as a top level section in https://developer.mozilla.org/en-US/docs/Web/Security/Defenses ?

@hamishwillee

Copy link
Copy Markdown
Collaborator

I wasn't sure where it could go but maybe it would work as a top level section in https://developer.mozilla.org/en-US/docs/Web/Security/Defenses ?

That is technically the right place for such a doc to go.

But I would still probably try put it as an overview/defensive overview above attacks, as the first thing people see after the index in this page - prefixed with a note that if you do nothing else, this is the essential set of defences.

Obviously pros and cons to both approaches. My leaning is because I tend to think most people stop reading way too early, so getting this in is important. It won't block anyone who really cares from getting the detail.

@hamishwillee

Copy link
Copy Markdown
Collaborator

PS But if it is useful, it doesn't matter where it goes - you can try both places with no significant difference in effort.

@wbamberg

wbamberg commented Jun 8, 2026

Copy link
Copy Markdown
Collaborator Author

I wasn't sure where it could go but maybe it would work as a top level section in https://developer.mozilla.org/en-US/docs/Web/Security/Defenses ?

That is technically the right place for such a doc to go.

But I would still probably try put it as an overview/defensive overview above attacks, as the first thing people see after the index in this page - prefixed with a note that if you do nothing else, this is the essential set of defences.

Obviously pros and cons to both approaches. My leaning is because I tend to think most people stop reading way too early, so getting this in is important. It won't block anyone who really cares from getting the detail.

Yeah I take your point. Do you think this is good -> 0e75c1d (plus also 5ab917d, apparently)?

@chrisdavidmills chrisdavidmills left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

As the author of the previous rewrite of this page, I heartily approve of your work here. This is absolutely the right approach now that you have written the deep-dive docs to drill down to.

Comment thread files/en-us/web/security/index.md
Comment thread files/en-us/web/security/index.md Outdated
Co-authored-by: Hamish Willee <hamishwillee@gmail.com>
Comment thread files/en-us/web/security/index.md Outdated
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@hamishwillee

Copy link
Copy Markdown
Collaborator

I'm (very) happy with this. Merge at will.

@wbamberg wbamberg merged commit 9b3f226 into mdn:main Jun 19, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Content:Security Security docs Content:WebAPI Web API docs size/m [PR only] 51-500 LoC changed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants