Back to skill

Security audit

FastapiAdmin WSL 自动部署

Security checks for vulnerabilities and agentic risk

Overview

This deployment skill is coherent in purpose but asks users to run broad privileged setup steps that can overwrite system web-server configuration and use weak deployment practices.

Review every command before running it. Use a disposable WSL2 instance or take a backup first, generate unique database credentials, pin repository commits and dependency versions, avoid replacing the global Nginx config for one app, and do not delete existing enabled sites unless you know they are unused.

Vulnerability Patterns
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
Findings (3)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:47
Finding

Predictable Hardcoded Database Credential

Content
View full analysis
Remediation
View remediation

T03 · Remote Payload Retrieval and Execution

Error
Location
SKILL.md:29
Finding

Execution of Unpinned and Mutable Third-Party Code

Content
View full analysis
Remediation
View remediation

T05 · Unauthorized Access and Privilege Escalation

Error
Location
SKILL.md:142
Finding

Privileged Replacement of Global Nginx Configuration with Unpinned Repository Content

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (32)

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

The command unconditionally deletes /etc/nginx/sites-enabled/default, which is a destructive system modification that can disable existing web content or service routing. In a skill intended for broad deployment help, removing a live config without backup or environment checks can cause outage or erase local customizations.

Content

Scanner excerpt · SKILL.md (reported line 162)May include surrounding context.

bash
sudo cp ~/workdir/FastapiAdmin/devops/nginx/nginx.conf /etc/nginx/nginx.conf
sudo rm -f /etc/nginx/sites-enabled/default
sudo nginx -t && sudo nginx

Chaining Abuse

High
Category
Tool Misuse
Confidence
88% confidence
Finding

sudo nginx -t && sudo nginx chains validation and service start in one line, encouraging immediate execution after a single check and making rollback or operator review less likely. In deployment docs that already overwrite global nginx config, this pattern increases the chance of rapidly applying a bad or unsafe configuration to a live system.

Content

Scanner excerpt · SKILL.md (reported line 163)May include surrounding context.

bash
sudo cp ~/workdir/FastapiAdmin/devops/nginx/nginx.conf /etc/nginx/nginx.conf
sudo rm -f /etc/nginx/sites-enabled/default
sudo nginx -t && sudo nginx

Step 7:启动后端服务

Chaining Abuse

High
Category
Tool Misuse
Confidence
75% confidence
Finding

Tool calls are chained to bypass individual safety checks or escalate capabilities beyond what any single tool call would allow.

Content

Scanner excerpt · SKILL.md (reported line 203)May include surrounding context.

md
hostname -I | awk '{print $1}'

# Nginx 配置测试与重载
sudo nginx -t && sudo nginx -s reload

# 查看 Nginx 错误日志
sudo tail /var/log/nginx/error.log

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 93)May include surrounding context.

修复:

bash
cat > frontend/.env.production << 'EOF'
VITE_APP_ENV=production
VITE_APP_TITLE=FastapiAdmin
VITE_API_BASE_URL=http://<WSL2_IP>

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/troubleshooting.md (reported line 39)May include surrounding context.

修复:

bash
cat > frontend/.env.production << 'EOF'
VITE_APP_ENV=production
VITE_APP_TITLE=FastapiAdmin
VITE_API_BASE_URL=http://<WSL2_IP>

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · references/troubleshooting.md (reported line 100)May include surrounding context.

修复:

bash
cat > frontend/.env.production << 'EOF'
VITE_APP_ENV=production
VITE_APP_TITLE=FastapiAdmin
VITE_API_BASE_URL=http://<WSL2_IP>

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The skill directs package installation, service startup, configuration replacement, and other system-modifying actions without an upfront warning about privileged operations and host impact. In a deployment skill, this increases the chance an operator or agent executes broad changes on the wrong machine or without understanding the security consequences.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 36)May include surrounding context.

md
npm install -g pnpm

# 安装 MySQL + Redis + Nginx
sudo apt-get update
sudo apt-get install -y mysql-server redis-server nginx

# 安装 python3-venv(venv 创建必需)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 37)May include surrounding context.

md
npm install -g pnpm

# 安装 MySQL + Redis + Nginx
sudo apt-get update
sudo apt-get install -y mysql-server redis-server nginx

# 安装 python3-venv(venv 创建必需)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 40)May include surrounding context.

md
npm install -g pnpm

# 安装 MySQL + Redis + Nginx
sudo apt-get update
sudo apt-get install -y mysql-server redis-server nginx

# 安装 python3-venv(venv 创建必需)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 203)May include surrounding context.

md
npm install -g pnpm

# 安装 MySQL + Redis + Nginx
sudo apt-get update
sudo apt-get install -y mysql-server redis-server nginx

# 安装 python3-venv(venv 创建必需)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/troubleshooting.md (reported line 140)May include surrounding context.

md
npm install -g pnpm

# 安装 MySQL + Redis + Nginx
sudo apt-get update
sudo apt-get install -y mysql-server redis-server nginx

# 安装 python3-venv(venv 创建必需)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/troubleshooting.md (reported line 141)May include surrounding context.

md
npm install -g pnpm

# 安装 MySQL + Redis + Nginx
sudo apt-get update
sudo apt-get install -y mysql-server redis-server nginx

# 安装 python3-venv(venv 创建必需)

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 43)May include surrounding context.

sudo apt-get install -y python3.12-venv

启动服务

sudo service mysql start sudo service redis-server start

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 44)May include surrounding context.

sudo apt-get install -y python3.12-venv

启动服务

sudo service mysql start sudo service redis-server start

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 50)May include surrounding context.

sudo apt-get install -y python3.12-venv

启动服务

sudo service mysql start sudo service redis-server start

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 51)May include surrounding context.

sudo apt-get install -y python3.12-venv

启动服务

sudo service mysql start sudo service redis-server start

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 52)May include surrounding context.

sudo apt-get install -y python3.12-venv

启动服务

sudo service mysql start sudo service redis-server start

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 113)May include surrounding context.

sudo apt-get install -y python3.12-venv

启动服务

sudo service mysql start sudo service redis-server start

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 117)May include surrounding context.

sudo apt-get install -y python3.12-venv

启动服务

sudo service mysql start sudo service redis-server start

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 161)May include surrounding context.

sudo apt-get install -y python3.12-venv

启动服务

sudo service mysql start sudo service redis-server start

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 162)May include surrounding context.

sudo apt-get install -y python3.12-venv

启动服务

sudo service mysql start sudo service redis-server start

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 163)May include surrounding context.

sudo apt-get install -y python3.12-venv

启动服务

sudo service mysql start sudo service redis-server start

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · SKILL.md (reported line 206)May include surrounding context.

sudo apt-get install -y python3.12-venv

启动服务

sudo service mysql start sudo service redis-server start

text

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/troubleshooting.md (reported line 104)May include surrounding context.

sudo apt-get install -y python3.12-venv

启动服务

sudo service mysql start sudo service redis-server start

text