fix(plugins): validate stable egress options

Keep egress comparisons independent of mutable runtime methods and pass the same normalized options to validation and the socket. Restrict process signaling from plugin workers and disable signal-initiated debugging on standard server starts.
This commit is contained in:
Maurice
2026-12-01 11:56:22 +01:00
parent 28eea68559
commit 3c2dc51439
5 changed files with 198 additions and 65 deletions
+2 -2
View File
@@ -28,7 +28,7 @@ cd /app/server
# is nothing to chown and no privilege to drop, and setpriv would only fail to switch
# users. Run Node as whoever we are; the volumes are that user's to provide.
if [ "$(id -u)" != "0" ]; then
exec node --require tsconfig-paths/register dist/index.js
exec node --disable-sigusr1 --require tsconfig-paths/register dist/index.js
fi
# Hand the mounted data dirs to node. A blanket `chown -R` on every start
@@ -72,4 +72,4 @@ done
# Node had printed a line (#3135). setpriv is single-threaded C and makes the same
# id changes without any signal. It leaves HOME alone, which gosu set from passwd.
export HOME=/home/node
exec setpriv --reuid=node --regid=node --init-groups -- node --require tsconfig-paths/register dist/index.js
exec setpriv --reuid=node --regid=node --init-groups -- node --disable-sigusr1 --require tsconfig-paths/register dist/index.js