adobe / adobe/aio-cli-plugin-app-dev

isolate action code

Offen
#32 3 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
enhancement
Vorherrschende Sprache
JavaScript
Sterne
2
Forks
5
PR-Merge-Kennzahlen
Keine gemergten PRs in 30 T.

Beschreibung

Right now all action code that is run, has access to the host's node environment -- which is the developer's machine.
This includes the filesystem, running processes, etc. This will not be representative of a true serverless system which we are simulating.

Explore code isolation via the node `vm` module: https://nodejs.org/docs/latest-v18.x/api/vm.html
Take note that if the code to run uses `require` we will need to pass in the `require` loader, which may or may not be secure. In general this should not be a problem since we webpack the code.

Related:
1. https://github.com/node-inspector/node-inspector/issues/284
2. https://www.rocket.chat/blog/node-js-vm
3. https://github.com/laverdet/isolated-vm
4. https://github.com/Richienb/node-polyfill-webpack-plugin (note fs is not in there, since browsers do have this now, but we can easily add the fs fallback in)
5. https://blog.logrocket.com/how-to-protect-your-node-js-applications-from-malicious-dependencies-5f2e60ea08f9/
6. https://github.com/tschaub/mock-fs

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Beginne damit, den Einstiegspunkt für die Ausführung von Aktionen in diesem Repository zu finden; das Issue nennt weder eine Datei noch einen Test. Lies die Dokumentation zu Node's vm und die verlinkten Referenzen zur Isolation und definiere anschließend einen Isolationsansatz, der require und den Dateisystemzugriff berücksichtigt; das Issue legt keine konkreten Abschlusskriterien fest.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
javascript, node.js, webpack
Bereich
cli, security
Issue-Typ
Feature
Schwierigkeit
5/5
Geschätzter Aufwand
Über eine Woche
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
25/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.