• wizzim@infosec.pub
    link
    fedilink
    English
    arrow-up
    2
    ·
    1 day ago

    Unfortunately I have to use node for home project (Jellyfin tizen)

    I was wondering: would it be possible to run node in a sandbox to lower the scope of the attack? (i.e. not compromise my home computer) Or is maybe a full VM a better solution?

      • dieTasse@feddit.org
        link
        fedilink
        English
        arrow-up
        1
        ·
        21 hours ago

        In case of NPM version pinning is a good practice. But also set it to ignore post install scripts. They are a bad practice and only about 2 % of all packages use it so it is unlikely it will bother you. They, the post install scripts, were used in recent supply chain attacks btw (the axios). You can either set it project wide in .npmrc file, add ignore-scripts=true, that is good for project where multiple people collaborate. And/Or system wide by running npm config set ignore-scripts true for your personal workspace. You can also achieve it by using --ignore-scripts flag during npm install, but that is way too impractical to always think about it. Also I would recommend checking npq, its a wrapper around npm cli that will give you some security summary before installing anything (and it is able to give you warning about post install scripts).

    • quick_snail@feddit.nl
      link
      fedilink
      English
      arrow-up
      2
      ·
      1 day ago

      Full VM and network isolation. and dont put anything important there (nor a reused password for auth)