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

doc: initial version of security-model-strategy.md #42709

Closed
wants to merge 21 commits into from

Conversation

mhdawson
Copy link
Member

Added initial strategy based on discussion in
the next-10 mini-summit -
https://github.com/nodejs/next-10/blob/main/meetings/summit-apr-2022.md

Signed-off-by: Michael Dawson [email protected]

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/tsc

@nodejs-github-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Apr 12, 2022
@mhdawson
Copy link
Member Author

@mscdex thanks for the fixes.

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@gireeshpunathil
Copy link
Member

sorry for asking it here, but I missed almost all conversations in the summit (though I joined the call, I was distracted).

Node.js has no sandbox and assumes everything as trusted code - Would this mean that Node.js security model boils down to i) vm security (ensuring integrity of vm functions are protected) ii) API security (Node.js API functions are not tampered/manipulated/bypassed), iii) overall application level security is a function of its operating space (server, desktop etc.) and how external code modules are interacting with the application and the Node.js APIs ?

  • if yes, does it make sense to state that as the prevailing Node.js security model
  • if no, bringing little more clarity on what is considered a Node.js vulnerability

IMO, this will help security triaging process (to quickly decide what is in scope and what is not)

@RaisinTen
Copy link
Contributor

i) vm security (ensuring integrity of vm functions are protected)

I don't think vm imposes any kind of security mechanism -

node/doc/api/vm.md

Lines 14 to 15 in 45162bf

<strong class="critical">The `vm` module is not a security
mechanism. Do not use it to run untrusted code.</strong>
. Could you please elaborate on what you mean by protecting the integrity of the vm functions? Something like adding primordials or something else?

@gireeshpunathil
Copy link
Member

Could you please elaborate on what you mean by protecting the integrity of the vm functions? Something like adding primordials or something else?

ok, what I mean is: any code - trusted or untrusted, should not be able to modify vm's attributes and behaviours other than through its exported interfaces.

@mhdawson
Copy link
Member Author

mhdawson commented Apr 13, 2022

ok, what I mean is: any code - trusted or untrusted, should not be able to modify vm's attributes and behaviors other than through its exported interfaces.

I don't quite follow. I think our current model is that all code is trusted there is no concept of untrusted code.

EDIT: To elaborate, if code that you run does something whether through the documented APIs or otherwise, it being able to do that is not a vulnerability in Node.js. You asked that the code be run, and we currently don't promise to protect the environment from the code that you ask to be run.

Comment on lines 8 to 10
This document provides an overview of our high-level strategy for
making progress as well as information on our current implementations
as a starting point for contributors.

This comment was marked as resolved.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done

@mhdawson
Copy link
Member Author

@gireeshpunathil, @RaisinTen I agree that documenting what is/is not considered a vulnerability is a good goal, but I think that will take more work discussion so should go into a follow on PR once we have had more conversations to agree what the security model should include (versus the high level that I tried to capture in this initial PR)

@mhdawson
Copy link
Member Author

@gireeshpunathil, @RaisinTen are you ok with this landing in it's current state or do you think we need to flesh out the security model in more detail first?

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@RaisinTen RaisinTen left a comment

Choose a reason for hiding this comment

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

I'm okay with landing this in its current state. Here are some optional nits.

doc/contributing/security-model-strategy.md Outdated Show resolved Hide resolved
doc/contributing/security-model-strategy.md Outdated Show resolved Hide resolved
doc/contributing/security-model-strategy.md Outdated Show resolved Hide resolved
doc/contributing/security-model-strategy.md Outdated Show resolved Hide resolved
doc/contributing/security-model-strategy.md Outdated Show resolved Hide resolved
doc/contributing/security-model-strategy.md Outdated Show resolved Hide resolved
@gireeshpunathil
Copy link
Member

@gireeshpunathil, @RaisinTen are you ok with this landing in it's current state or do you think we need to flesh out the security model in more detail first?

I am ok to land this in its current form. (already approved)

Copy link
Member

@RafaelGSS RafaelGSS left a comment

Choose a reason for hiding this comment

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

LGTM.

mhdawson added a commit that referenced this pull request Apr 28, 2022
Added initial strategy based on discussion in
the next-10 mini-summit -
https://github.com/nodejs/next-10/blob/main/meetings/summit-apr-2022.md

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: #42709
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Bryan English <[email protected]>
@mhdawson
Copy link
Member Author

Landed in 17826f5

@mhdawson mhdawson closed this Apr 28, 2022
targos pushed a commit that referenced this pull request May 2, 2022
Added initial strategy based on discussion in
the next-10 mini-summit -
https://github.com/nodejs/next-10/blob/main/meetings/summit-apr-2022.md

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: #42709
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Bryan English <[email protected]>
@targos targos mentioned this pull request May 2, 2022
juanarbol pushed a commit that referenced this pull request May 31, 2022
Added initial strategy based on discussion in
the next-10 mini-summit -
https://github.com/nodejs/next-10/blob/main/meetings/summit-apr-2022.md

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: #42709
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Bryan English <[email protected]>
danielleadams pushed a commit that referenced this pull request Jun 27, 2022
Added initial strategy based on discussion in
the next-10 mini-summit -
https://github.com/nodejs/next-10/blob/main/meetings/summit-apr-2022.md

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: #42709
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Bryan English <[email protected]>
targos pushed a commit that referenced this pull request Jul 12, 2022
Added initial strategy based on discussion in
the next-10 mini-summit -
https://github.com/nodejs/next-10/blob/main/meetings/summit-apr-2022.md

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: #42709
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Bryan English <[email protected]>
targos pushed a commit that referenced this pull request Jul 31, 2022
Added initial strategy based on discussion in
the next-10 mini-summit -
https://github.com/nodejs/next-10/blob/main/meetings/summit-apr-2022.md

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: #42709
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Bryan English <[email protected]>
guangwong pushed a commit to noslate-project/node that referenced this pull request Oct 10, 2022
Added initial strategy based on discussion in
the next-10 mini-summit -
https://github.com/nodejs/next-10/blob/main/meetings/summit-apr-2022.md

Signed-off-by: Michael Dawson <[email protected]>

PR-URL: nodejs/node#42709
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Gireesh Punathil <[email protected]>
Reviewed-By: Darshan Sen <[email protected]>
Reviewed-By: Akhil Marsonya <[email protected]>
Reviewed-By: Rafael Gonzaga <[email protected]>
Reviewed-By: Bryan English <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.