← back to browse
goat command grade C

cmd

No description

20
views
0
likes
20
installs
analysis — static scan, nothing executed
0 grade C
Risky — serious capabilities found, review before installing
Security 50
Privacy 79
Quality 100
Maintenance 82
Community 34
high Shell access 2×

Spawns operating-system processes through child_process. A command running shell code can read or change anything the bot's account can.

L2const { execSync } = require("child_process");
L327execSync(`npm install ${packageName} --save`, { stdio: "pipe" });
medium Installs packages at runtime

Runs npm/yarn/pip install while the bot is running. Whatever gets installed is not reviewed here.

L327execSync(`npm install ${packageName} --save`, { stdio: "pipe" });
medium Fetches from a paste site or link shortener

Content behind a paste/shortener link can be swapped out by its owner at any time.

L189url = url.replace(regex, "https://pastebin.com/raw/$1");
low Dynamic require 4×

require() is called with a value computed at runtime, so the loaded module cannot be known from reading the file.

L276const regExpCheckPackage = /require(\s+|)\((\s+|)[`'"]([^`'"]+)[`'"](\s+|)\)/g;
L341const oldCommand = require(pathCommand);
L363const command = require(pathCommand);
L492const command = require(pathCommand);
low Environment variable access 2×

Reads process.env. Fine on its own; worth a look if the values are sent anywhere.

L126(process.env.NODE_ENV == "development" ? true : !file.match(/(dev)\.js$/g)) &&
L292if (process.env.NODE_ENV == "development") {
low Filesystem access

Reads or writes files on the machine running the bot.

L3const fs = require("fs-extra");
low Network access

Makes HTTP/WebSocket requests. Check where the data goes.

L1const axios = require("axios");
capabilities — what this file can do, regardless of intent
Network Filesystem Shell Env vars Dynamic code Session data Installs packages Process control
dependencies

axios, cheerio, fs-extra

checks
Exports a command/module
Handles errors (try/catch or .catch)
Readable, not minified
Has explanatory comments
No deprecated dependencies
Reasonable size (< 200 KB)
raw source — loaded on demand
Loading source…

View raw file · View analysis as JSON