Skip to content

Need helping finding some key areas of the source code (for sandboxing) #2789

Description

@wysisoft
  • Node.js Version:Latest release
  • OS:Ubuntu 20
  • Scope (install, code, runtime, meta, other?): Build
  • Module (and version) (if relevant):N/A

I would like help in finding 3 key areas of the Nodejs source code
1 - anywhere a file is written or read from the OS
2 - anywhere a network socket (or other networking item) is opened or closed
3 - anywhere a process is spawned / launched.

I can take it from there. Any help finding these .cc locations? I would like to try to remove these functionalities to better create a sandbox

Activity

  1. changed the title [-]Need helping finding some key areas of the source code[/-] [+]Need helping finding some key areas of the source code (for sandboxing)[/+] on Jun 21, 2020
  2. addaleax commented on Jun 22, 2020

    @addaleax
    Member

    @wysisoft I think the best thing you can do is look through the list of libuv functions and then grep for those in Node.js core?

  3. wysisoft commented on Jun 23, 2020

    @wysisoft
    Author

    Thank you for the excellent answer! I will try it out and see how it works. Am I the first to attempt something like this, or is there previous work I can borrow from?

  4. addaleax commented on Jun 23, 2020

    @addaleax
    Member

    @wysisoft I think the closest thing might be nodejs/node#33504 (and its predecessor nodejs/node#22112). Those operate at the C++ binding layer, instead of the libuv layer, though, so it’s a bit of a different approach with its own upsides and downsides

  5. PoojaDurgad commented on Oct 18, 2020

    @PoojaDurgad

    @wysisoft - is this issue still outstanding? did @addaleax 's suggestion help you to resolve your issue?

  6. wysisoft commented on Oct 18, 2020

    @wysisoft
    Author
  7. PoojaDurgad commented on Oct 19, 2020

    @PoojaDurgad

    closing the issue as it resolved.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions