← back to browse
goat command grade C

cmd

No description

0
views
0
likes
0
installs
analysis — static scan, nothing executed
0 grade C
Risky — serious capabilities found, review before installing
Security 34
Privacy 82
Quality 100
Maintenance 82
Community 0
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");
L629execSync(`npm install ${packageName} --save`, { stdio: "pipe" });
medium Deletes files 3×

Calls fs.rm / unlink / rmdir. Check what path it deletes and whether a user can influence it.

L198fs.unlinkSync(filePath);
L496fs.unlinkSync(filePath);
L557fs.unlinkSync(filePath);
medium Fetches from a paste site or link shortener 2×

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

L289url = url.replace(regex, "https://pastebin.com/raw/$1");
L406processedUrl = processedUrl.replace(regex, "https://pastebin.com/raw/$1");
medium Installs packages at runtime

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

L629execSync(`npm install ${packageName} --save`, { stdio: "pipe" });
low Dynamic require 4×

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

L586const regExpCheckPackage = /require(\s+|)\((\s+|)[`'"]([^`'"]+)[`'"](\s+|)\)/g;
L643const oldCommand = require(pathCommand);
L665const command = require(pathCommand);
L796const command = require(pathCommand);
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