SkillTotal

Is ZhuLinsen/daily_stock_analysis safe?

Some risk - review before installing
Notable — review in context (capabilities are not malware):
  • Python shell/command execution
  • Node.js shell/command execution
  • Defense-evasion command idiom

What to do: Read the findings below before installing: each one opens the exact line of code it was found on.

ZhuLinsen/daily_stock_analysis is a PyPI package analyzed by SkillTotal's deterministic static scanner. The scan found no malicious indicators, though 2 risky constructs are reported for review. It can: delegated authentication, filesystem read, filesystem write, mcp tools detected, network egress and shell execution — capabilities are what the code can do, not a verdict on intent. Risk score 30/100 (medium).

repo

python_package · https://github.com/ZhuLinsen/daily_stock_analysis
MEDIUM
30
/ 100 risk score
Snapshot · scanned Oct 8, 2026 · repo@ce364e4 · engine 0.56.4 / ruleset 62

Automated static-analysis result. It can contain false positives and false negatives, and is not a claim about the intent of ZhuLinsen/daily_stock_analysis's authors. Report a false positive.

Capabilities — what this component can do (not a risk score):
delegated authenticationfilesystem readfilesystem writemcp tools detectednetwork egressshell execution

Behavioral traits

How this component maps to the CSA agentic threat model. Descriptive — it never affects the risk score.

Tool surface
Tool Usage
Execution authority
Tool Access Control / Direct Tool Access
Filesystem reach
Tool Execution Context
Network egress
Interaction & Communication / Direct Communication
Network exposure
Interaction & Communication
Delegated authentication
Tool Execution Context / User Delegated Credentials

Findings (12)

HIGHDefense-evasion command idiomST-SHELL-EVASION

A command uses a known defense-evasion idiom: PowerShell execution-policy bypass / encoded command / hidden window, macOS code-signing bypass, or launching a payload from a world-writable temp directory. These are hallmarks of droppers and rarely appear in legitimate code. (2 occurrence(s) shown as evidence).

$probeProcess = Start-Process -FilePath $packagedEntry -Wait -PassThru -WindowStyle Hidden

Fix: Verify why the component bypasses execution policy / code signing or runs from a temp directory; these patterns are characteristic of malware staging.

HIGHNode.js shell/command executionST-SHELL-NODE

The component can run operating-system commands or spawn processes.

const { spawn } = require('child_process');
backendProcess = spawn(backendPath, args, {
backendProcess = spawn(pythonPath, pythonArgs, {
spawn('taskkill', ['/PID', String(processToStop.pid), '/T', '/F'], { windowsHide: true }).on('error', () => {
const { execFileSync } = require('node:child_process')
import { execFileSync } from 'node:child_process'

Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.

Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; prefer execFile with an argument array.

HIGHPython shell/command executionST-SHELL-PY

The component can run operating-system commands or spawn processes.

result = subprocess.run(args, capture_output=True, text=True)
return subprocess.check_output(["git", *args], cwd=ROOT, text=True, encoding="utf-8").strip()
result = subprocess.run(
        ["git", "ls-files", "--", ".claude"],
        cwd=ROOT,
        capture_output=True,
        text=True,
        check=True,
    )
return subprocess.call(
        [sys.executable, "-m", "pytest", *selected, *pytest_args],
        cwd=REPO_ROOT,
    )
version = subprocess.run(
            [command[0], "--version"],
            check=True,
            capture_output=True,
            text=True,
            timeout=10,
            env=_controlled_environment(),
        ).stdout.strip()
subprocess.run(command, cwd=REPO_ROOT, check=True, env=env)
result = subprocess.run(
                ["taskkill", "/T", "/F", "/PID", str(proc.pid)],
                timeout=30,
            )
proc = subprocess.Popen(
            child_args,
            cwd=str(REPO_ROOT),
            **_spawn_kwargs("nt"),
        )
proc = subprocess.Popen(
            child_args,
            cwd=str(REPO_ROOT),
            **_spawn_kwargs("posix"),
        )
self.process = subprocess.Popen(
                self.command,
                cwd=str(safe_path),
                env=self.environment,
                stdin=subprocess.PIPE,
                stdout=subprocess.PIPE,
                stderr=s …
process = subprocess.Popen(
                            [executable, *command_argv],
                            stdin=stdin_handle,
                            stdout=stdout_handle,
                            stderr=stderr_handle, …
result = subprocess.run(
            [
                playwright_command,
                "screenshot",
                "--browser",
                "chromium",
                "--viewport-size",
                "1080,720", …
result = subprocess.run(
            [m2f_command, md_path, "png", f"outputDirectory={temp_dir}"],
            capture_output=True,
            timeout=60,
            check=False,
        )
process = subprocess.Popen(
        command,
        stdout=subprocess.PIPE if capture_output else subprocess.DEVNULL,
        stderr=subprocess.PIPE if capture_output else subprocess.DEVNULL,
        text=capture_output,
        env=contro …
completed = subprocess.run(
            ["ps", "-axo", "pid=,ppid="],
            check=False,
            capture_output=True,
            text=True,
            timeout=5,
        )
subprocess.run(
                ["taskkill", "/PID", str(process_id), "/T", "/F"],
                check=False,
                stdout=subprocess.DEVNULL,
                stderr=subprocess.DEVNULL,
                timeout=10,
            )
subprocess.run(command, cwd=frontend_dir, check=True)

Why it matters: Powerful and often legitimate — confirm the commands aren't built from untrusted input.

Fix: Confirm the command and its arguments are fully controlled and not derived from untrusted input; avoid shell=True.

MEDIUMServer bound to all network interfacesST-EXPOSE-BIND

A server is bound to all network interfaces (0.0.0.0), not just your own machine.

const PUBLIC_BIND_HOSTS = Object.freeze(new Set(['0.0.0.0', '::', '[::]', '*']));
host: '0.0.0.0',  // 允许公网访问
_PUBLIC_BIND_HOSTS = frozenset({"0.0.0.0", "::", "[::]", "*"})
uvicorn server:app --reload --host 0.0.0.0 --port 8000
host="0.0.0.0",
if parsed.hostname in {"127.0.0.1", "localhost", "0.0.0.0"}:
return parsed.hostname in {"127.0.0.1", "localhost", "0.0.0.0"}

Why it matters: Without authentication, other hosts on the network can reach it.

Fix: Bind to 127.0.0.1 for local-only use, or require authentication and restrict access if remote exposure is intended.

MEDIUMNode.js filesystem readST-FS-NODE-READ

The component reads files from disk.

const manifestText = fs.readFileSync(manifestPath, 'utf-8');
content = fs.readFileSync(envFile, 'utf-8');

Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.

Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.

MEDIUMNode.js filesystem write/deleteST-FS-NODE-WRITE

The component writes or deletes files on disk.

fs.writeFileSync(resolveUpdateBackupManifestPath(), JSON.stringify(manifest, null, 2), 'utf-8');
fs.rmSync(resolveUpdateBackupRoot(), { recursive: true, force: true });
fs.rmSync(target, { recursive: true, force: true });
fs.rmSync(target, { recursive: true, force: true });
fs.appendFileSync(logFilePath, line, 'utf-8');
fs.writeFileSync(envPath, '# Configure your API keys and stock list here.\n', 'utf-8');

Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.

Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.

MEDIUMPython filesystem readST-FS-PY-READ

The component reads files from disk.

with open(event_path, 'r', encoding='utf-8') as f:
text = CHANGELOG.read_text(encoding="utf-8")
html = index_html.read_text(encoding="utf-8", errors="replace")
if token_cache.read_bytes() == payload:
data = json.loads(Path(path).read_text(encoding="utf-8"))
content = COPILOT.read_text(encoding="utf-8")
content = path.read_text(encoding="utf-8")
gitignore = (ROOT / ".gitignore").read_text(encoding="utf-8")
html = index_html_path.read_text(encoding="utf-8", errors="replace")
payload = json.loads(path.read_text(encoding="utf-8"))
with open(csv_path, 'r', encoding='utf-8-sig') as f:
with open(csv_file, 'r', encoding='utf-8-sig') as f:
with open(csv_file, 'r', encoding='utf-8-sig') as f:
with open(path, "r", encoding="utf-8-sig") as f:
with open(output_path, "r", encoding="utf-8") as f:
with open(output_path, 'r', encoding='utf-8') as f:
workflow = yaml.safe_load(workflow_path.read_text(encoding="utf-8"))
markdown = DOCS_PATH.read_text(encoding="utf-8")
markdown = DOCS_PATH.read_text(encoding="utf-8")
with open(output_path, 'r', encoding='utf-8') as f:
for line in env_path.read_text(encoding="utf-8", errors="ignore").splitlines():
with open(filepath, "r", encoding="utf-8") as f:
raw_text = filepath.read_text(encoding="utf-8")
_session_secret = secret_path.read_bytes()

Why it matters: Usually legitimate, but worth confirming it can't be steered into reading sensitive files.

Fix: Confirm which files are read and that paths cannot be influenced by untrusted input to reach sensitive locations.

MEDIUMPython filesystem write/deleteST-FS-PY-WRITE

The component writes or deletes files on disk.

with open(summary_file, 'a', encoding='utf-8') as f:
with open(summary_file, 'a', encoding='utf-8') as f:
with open('ai_review_result.txt', 'w', encoding='utf-8') as f:
with open(summary_file, 'a', encoding='utf-8') as f:
output.write_text(body, encoding="utf-8")
token_cache.write_bytes(payload)
Path(path).write_text(json.dumps(payload, ensure_ascii=False, indent=2) + "\n", encoding="utf-8")
sentinel_file.write_text(sentinel_token, encoding="utf-8")
workspace_file.write_text(workspace_token, encoding="utf-8")
shutil.rmtree(sentinel_dir, ignore_errors=True)
with open(doc_path, 'w', encoding='utf-8') as f:
with open(temp_path, "w", encoding="utf-8") as f:
DOCS_PATH.write_text(replace_managed_block(markdown, table), encoding="utf-8")
with open(output_path, 'w', encoding='utf-8') as f:
shutil.copyfile(WEB_INDEX_PATH, STATIC_INDEX_PATH)
shutil.rmtree(safe_path, ignore_errors=True)
shutil.rmtree(self.safe_cwd, ignore_errors=True)
tmp_path.write_bytes(new_secret)
with open(secret_path, "xb") as f:
tmp_path.write_text(content)
tmp_path.write_text(content)
tmp_path.write_text(content)
handle = open(lock_path, "a+", encoding="utf-8")
filepath.write_text(content, encoding='utf-8')
prompt_path.write_text(prompt_text, encoding="utf-8")

Why it matters: Usually legitimate, but worth confirming the paths can't be controlled by untrusted input.

Fix: Confirm which files are written/deleted and that paths cannot be influenced by untrusted input.

MEDIUMNode.js network egressST-NET-NODE

The component makes outbound network requests.

activeRequest = http.get(url, (res) => {
const response = await fetch(url, {
import axios from 'axios';
return axios.isAxiosError(error);
import axios from 'axios';
const apiClient = axios.create({

Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.

Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.

MEDIUMPython network egressST-NET-PY

The component makes outbound network requests.

request = urllib.request.Request(f'{api_url}{path}', headers=headers)
with urllib.request.urlopen(request, timeout=30) as response:
request = urllib.request.Request(
        f"https://api.github.com/repos/{repo}/pulls/{pr_number}",
        headers={
            "Accept": "application/vnd.github+json",
            "Authorization": f"Bearer {token}",
            "User-Age …
with urllib.request.urlopen(request, timeout=15) as response:
resp = requests.post(
                session_webhook,
                json=payload,
                timeout=10
            )
resp = requests.patch(
                        f"{base_url}/messages/@original",
                        json={"content": chunk},
                        timeout=10,
                    )
resp = requests.post(
                        base_url,
                        json={"content": chunk},
                        timeout=10,
                    )
response = requests.get(url, headers=headers, timeout=10)
response = requests.get(url, headers=headers, timeout=10)
resp = requests.get(_AV_BASE_URL, params=params, timeout=30)
resp = requests.get(_AV_BASE_URL, params={
                'function': 'GLOBAL_QUOTE',
                'symbol': symbol,
                'apikey': self._api_key,
            }, timeout=15)
resp = requests.get(_AV_BASE_URL, params={
                'function': 'SYMBOL_SEARCH',
                'keywords': symbol,
                'apikey': self._api_key,
            }, timeout=10)
import requests  # 引入 requests 以捕获异常
response = requests.get(
                "https://push2.eastmoney.com/api/qt/stock/get",
                params={
                    "secid": secid,
                    "fltt": "2",
                    "fields": "f43,f44,f45,f46,f47,f48,f5 …
resp = requests.get(url, params=params, timeout=15)
resp = requests.get(
                f"{_FINNHUB_BASE_URL}/quote",
                params={'symbol': symbol, 'token': self._api_key},
                timeout=15,
            )
resp = requests.get(
                f"{_FINNHUB_BASE_URL}/search",
                params={'q': symbol, 'token': self._api_key},
                timeout=10,
            )

Why it matters: Usually legitimate, but confirm the destinations are expected and no sensitive data leaves.

Fix: Confirm the destination hosts are expected and that no sensitive data is sent off-host.

LOWDelegated authentication (OAuth 2.0 / OIDC)ST-AUTH-DELEGATED

An OAuth 2.0 / OpenID Connect delegated-authentication flow was detected (authorization-code / refresh-token / token-exchange grant, an OIDC authorize/discovery endpoint or id_token, or a delegation library). Tools authenticate with the end user's delegated, scoped credentials rather than a long-lived embedded service credential.

Fix: Delegated auth is a lower-blast-radius execution context than an embedded static credential. Confirm the requested scopes are minimal and that tokens are never logged or forwarded off-host.

LOWMCP tool surface detectedST-MCP-DETECTED

An MCP tool surface (manifest or tool definitions) was found.

Provides ToolRegistry, @tool decorator, and wrapped tools
- @tool decorator for easy tool registration
@tool(name="get_realtime_quote", category="data",
# but omitted the explicit ``@tool(timeout_seconds=...)`` argument, fold

Why it matters: Just context — review which tools it offers and their permissions.

Fix: Review the declared MCP tools and their permissions.

How attackers abuse these capabilities

Interactive labs on the attack class behind the rules above. They show the technique, not anything found in ZhuLinsen/daily_stock_analysis.

Check your own component

Run the same evidence-backed scan on any MCP server, agent skill, or package.

Scan your own component

How we determine this: deterministic static analysis (regex + AST), evidence-anchored, no code execution. Methodology →