Back to skill

Security audit

Ai Company

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly a scaffold for an autonomous AI-company concept, but it recommends persistent automation and broad service credentials without enough safety boundaries.

Install only as a learning scaffold or prototype. Do not run the cron jobs, connect real GitHub/email/social tokens, enable automated outreach, collect customer data, or deploy to production until you add least-privilege credentials, human approval gates, rate limits, platform compliance checks, secure storage, access control, logging, rollback, and a clear way to disable scheduled tasks.

Vulnerability Patterns
  • System PersistenceInstalls backdoors, hooks, services, or scheduled tasks that survive the run
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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)

T06 · System Persistence

Warning
Location
SKILL.md:229
Finding
Persistent Cron Jobs Execute Mutable Project Code Without Hardening<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 229–234 **Vulnerability Type**: Persistent scheduled execution **Risk Level**: Medium ### Vulnerable Code ```bash crontab -e # Add: */30 * * * * cd /path/to/my-ai-company && python main.py --task discover_opportunities 0 9 * * * cd /path/to/my-ai-company && python main.py --task daily_optimization */15 * * * * cd /path/to/my-ai-company && python main.py --task health_check ``` ### Technical Analysis The Skill instructs users to install three cron entries that survive completion of the current Skill session and repeatedly execute `main.py` from a potentially user-writable project directory. Scheduled execution is related to the declared 24/7 automation objective, but it is not required for project initialization or demonstration. It materially expands the execution lifetime and risk boundary of the Skill. The commands use the generic `python` executable resolved through the cron environment and do not pin the script or interpreter to integrity-controlled absolute paths. The supplied generated `main.py` does not implement the documented `--task` interface. Consequently, the cron configuration is not functional with the provided scaffold and introduces persistence before a complete, reviewed scheduler implementation exists. ### Attack Path 1. A user follows the instructions and installs the three cron entries. 2. The entries remain active across terminal sessions and system restarts where cron is enabled. 3. The project directory, `main.py`, an imported local module, or an executable selected through environment resolution is subsequently modified or compromised. 4. Cron invokes the modified code without an interactive approval step. 5. The substituted code executes repeatedly with the permissions and environment available to the account that owns the crontab. ### Impact Assessment Successful exploitation could provide repeated code execution under the affected user account. The acc ...[truncated 421 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Do not install cron entries during initialization or demonstration. Make scheduling a separate, explicit opt-in production step. 2. Implement and test the documented `--task` interface before recommending scheduled execution. 3. Use absolute paths for both the virtual-environment interpreter and the script: ```bash /opt/my-ai-company/.venv/bin/python /opt/my-ai-company/main.py --task health_check ``` 4. Run scheduled jobs through a dedicated, least-privileged service account without interactive login or unrelated file access. 5. Store executable project files in a deployment directory that is not writable by untrusted processes. 6. Provide a restricted environment file containing only the credentials required by each task. 7. Add concurrency locks, timeouts, resource limits, rate limits, structured logging, and failure notifications. 8. Require human approval for external posting, code deployment, financial operations, and other high-impact actions. 9. Document exact removal commands, such as deleting the installed crontab entries, and provide a scheduler-disable procedure. 10. Consider a hardened service manager with explicit sandboxing instead of raw crontab entries. ]]>

T08 · Insecure Dependencies

Warning
Location
SKILL.md:183
Finding
Unpinned Third-Party Dependency Installation Creates Supply-Chain Exposure<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, line 183; also repeated in `README.md`, line 47 and `examples/QUICKSTART.md`, line 12 **Vulnerability Type**: Unpinned package installation **Risk Level**: Medium ### Vulnerable Code ```bash pip install anthropic python-dotenv pyyaml requests ``` ### Technical Analysis The installation instructions retrieve mutable latest versions of four packages from the package index without exact version constraints, cryptographic hashes, a lockfile, index restrictions, or an explicitly isolated environment. Python package installation can execute package build and installation logic. Although no listed package was shown to be malicious, the documented process is not reproducible and leaves users exposed to compromised upstream releases, account takeover, dependency substitution through index configuration, or unexpected behavior introduced by future versions. The project does not provide dependency metadata or a reviewed lockfile that would allow users to verify the intended dependency set. ### Attack Path 1. A user executes the documented `pip install` command. 2. `pip` resolves the currently available package versions using the user's configured package indexes and mirrors. 3. A compromised release, malicious mirror response, or unintended future version is selected. 4. Package installation or later package import executes attacker-controlled or vulnerable code. 5. That code operates with the privileges of the user running `pip` and may access the same development environment and credentials. ### Impact Assessment A compromised dependency could execute arbitrary code under the installing user's account. Depending on the environment, this may expose source code, environment variables, API keys, GitHub tokens, social-media credentials, SMTP credentials, and files accessible to the user. The instructions do not require administrator installation, so direct system-wide privilege escalation is not e ...[truncated 148 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Supply a reviewed dependency lockfile with exact versions and cryptographic hashes. 2. Install dependencies in an isolated virtual environment: ```bash python3 -m venv .venv . .venv/bin/activate python -m pip install --require-hashes -r requirements.txt ``` 3. Record direct and transitive dependencies and regenerate the lockfile through a controlled review process. 4. Pin the package index to an approved HTTPS repository and avoid untrusted extra indexes. 5. Add automated dependency vulnerability, provenance, and license scanning. 6. Review release changes before updating pins rather than automatically consuming latest versions. 7. Avoid running package installation as root or with `sudo`. 8. Where supported, verify signed provenance and publish software bills of materials for reviewed releases. ]]>

T09 · Insecure Skill Coding Practices

Warning
Location
examples/config.yaml:228
Finding
Example Configuration Disables Encryption and Access Control for Sensitive Autonomous Operations<![CDATA[ ## Vulnerability Details **File Location**: `examples/config.yaml`, lines 228–243 **Vulnerability Type**: Insecure security defaults and contradictory key-protection settings **Risk Level**: Medium ### Vulnerable Code ```yaml security: # Enable encryption encryption_enabled: false # API key encryption encrypt_api_keys: true # Access control access_control: enabled: false allowed_ips: [] allowed_users: [] ``` ### Technical Analysis The example configuration disables global encryption and access control while the same configuration defines Anthropic, GitHub, SMTP, and social-media credentials and enables autonomous operational features. The setting `encrypt_api_keys: true` conflicts with `encryption_enabled: false`, and the reviewed implementation does not demonstrate that API-key encryption is actually enforced. The design also anticipates customer records, sales records, logs, backups, and a web dashboard. Copying these permissive defaults into a production implementation could leave sensitive data and operational controls unprotected. The current executable examples do not implement a network dashboard, credential encryption, or access-control subsystem. Therefore, this finding concerns the production template and the unsafe implementation guidance rather than a presently exposed endpoint in the supplied demonstration code. ### Attack Path 1. A user copies `examples/config.yaml` as recommended and uses it as the basis for a production implementation. 2. The user connects credentials, customer data, external posting tools, or a dashboard without changing the security defaults. 3. The implementation treats `access_control.enabled: false` and `encryption_enabled: false` as authoritative. 4. An unauthorized local user, exposed network client, compromised process, or backup reader accesses operational data or invokes available controls. 5. Exposed tokens may then be used against connected GitHub, email, AI, or social-med ...[truncated 689 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Enable encryption and access control by default and require an explicit, documented override for local demonstrations. 2. Fail closed when encryption keys, authentication configuration, or authorization rules are absent. 3. Remove contradictory settings or define their precedence clearly. API-key encryption must not report as enabled when global encryption disables it. 4. Store secrets in a dedicated secret manager or restricted environment, not in application state, logs, backups, or generated configuration files. 5. Apply restrictive filesystem permissions to `.env`, state, customer, sales, log, and backup files. 6. Bind any dashboard to localhost by default. Require authenticated, encrypted access before permitting remote binding. 7. Implement role-based authorization for operational controls and require human approval for deployments, external messages, repository writes, and financial actions. 8. Issue separate, narrowly scoped credentials for each employee and scheduled task. Do not share broad tokens across all agents. 9. Encrypt sensitive records and backups at rest and use TLS for all external integrations. 10. Add secret redaction to logs, credential rotation procedures, audit logging, retention limits, and automated tests verifying that insecure configurations are rejected in production mode. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (42)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
声明描述的是一个可自主运行的完整AI公司系统,但提供的代码块只是在本地初始化一个项目骨架。它创建文件夹、写入一些空的JSON数据文件、生成一个含 TODO 的 main.py 模板,以及示例环境变量和 README。代码没有调用任何AI模型、没有调度长期运行任务、没有实现员工代理、销售、监控、运维、客户支持或财务流程,也没有任何自动发现需求或盈利机制。因此其主要用途与声明的核心能力存在明显且实质性的偏差。

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
声明描述的是一个高度自动化、端到端的AI公司运营系统,范围涵盖持续自主运行、多职能业务执行和盈利闭环。但实际代码仅实现了一个非常基础的 `SimpleAIEmployee` 示例:可读取本地prompt文件、对输入任务输出固定计划、返回伪造的任务完成结果,并保存/加载本地状态。代码中没有任务编排、定时运行、外部系统集成、销售/开发/运维流程、真实智能推理或盈利机制。因此实际行为与声明的核心用途存在明显且重大的不一致。

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
该描述明显夸大了代码能力。代码文件名与注释都表明它是“简单的AI团队协调器”示例。其核心行为是:注册员工、启动后执行一次预定义流程、调用各员工的work方法,并在成功时发布预设事件数据。它没有展示持续调度、自动循环、真实市场发现、真实产品开发、销售执行、运维管理,或任何长期自治机制。虽然高层阶段与描述中的‘发现需求、设计、开发、销售’方向大致相关,但实现程度仅为模拟演示,且缺少‘7×24小时’、‘完全自主’、‘运维’、‘盈利系统’等关键声明能力,因此属于实质性描述与行为不符。

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding
The declared description promises a broad, end-to-end autonomous AI company operations platform covering discovery, design, development, sales, operations, and profitability. The supplied code does not implement those capabilities. It only provides a lightweight event bus with subscribe/unsubscribe/publish/history functions and a demo using business-themed event names. The business event labels do not constitute actual autonomous execution of those functions. There are no integrations, agents, schedulers, persistence beyond in-memory lists, external resource access, or operational logic for running a company. Therefore the code's actual behavior is materially narrower and different from the declared purpose.

Credential Access

High
Category
Privilege Escalation
Content
cd my-ai-company

# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,添加你的API密钥

# 启动你的AI公司
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
cd my-ai-company

# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,添加你的API密钥

# 启动你的AI公司
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
cd my-ai-company

# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,添加你的API密钥

# 启动你的AI公司
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,添加你的API密钥

# 启动你的AI公司
python main.py start
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,添加你的API密钥

# 启动你的AI公司
python main.py start
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,添加你的API密钥

# 启动你的AI公司
python main.py start
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,添加你的API密钥

# 启动你的AI公司
python main.py start
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,添加你的API密钥

# 启动你的AI公司
python main.py start
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,添加你的API密钥

# 启动你的AI公司
python main.py start
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,添加你的API密钥

# 启动你的AI公司
python main.py start
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,添加你的API密钥

# 启动你的AI公司
python main.py start
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,添加你的API密钥

# 启动你的AI公司
python main.py start
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
# 配置环境变量
cp .env.example .env
# 编辑 .env 文件,添加你的API密钥

# 启动你的AI公司
python main.py start
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Credential Access

High
Category
Privilege Escalation
Content
print(f"\n✅ 项目 {project_name} 创建成功!")
    print(f"\n📝 下一步:")
    print(f"   1. cd {project_name}")
    print(f"   2. cp .env.example .env")
    print(f"   3. 编辑 .env 文件,添加您的API密钥")
    print(f"   4. 开始实现您的AI员工!")
Confidence
60% confidence
Finding
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The README promotes fully autonomous market scanning, automated sales, and 24/7 operation across external platforms without any safety guidance about scraping limits, platform terms, privacy handling, consent, or account-abuse risk. In this context, users may deploy behavior that violates site policies or mishandles third-party data because the documentation frames such activity as routine and frictionless.

Missing User Warnings

Medium
Confidence
91% confidence
Finding
The setup instructions direct users to place API keys and a GitHub token into a .env file but do not explain what components consume those secrets, what permissions are needed, or how they should be protected. In an autonomous multi-agent skill, undocumented credential use increases the chance of over-privileged tokens, accidental disclosure, or unsafe downstream use by example code.

Lp3

Medium
Category
MCP Least Privilege
Confidence
89% confidence
Finding
The skill describes capabilities that involve reading configuration, logs, prompts, and writing project files, but it does not declare any explicit tool scope such as permissions or allowed-tools. In an agent ecosystem, missing scope boundaries can cause the runtime or reviewer to underestimate what the skill may access or modify, increasing the risk of unintended file access or broader execution than expected.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The skill encourages automated collection and handling of data from external platforms and customer records, but it omits privacy, consent, retention, and terms-of-service warnings. In this context, autonomous scraping, profiling, and customer-data processing can easily lead to privacy violations, account abuse, or noncompliant handling of personal data.

Session Persistence

Medium
Category
Rogue Agent
Content
### 5. 设置定时任务
```bash
crontab -e
# 添加:
*/30 * * * * cd /path/to/my-ai-company && python main.py --task discover_opportunities
0 9 * * * cd /path/to/my-ai-company && python main.py --task daily_optimization
Confidence
86% confidence
Finding
The skill instructs users to install persistent cron jobs that repeatedly trigger autonomous tasks, including external scanning and optimization loops. Persistence is expected for scheduled automation, but without guardrails, rate limits, kill switches, or approval boundaries, it increases the blast radius of bugs, abusive behavior, or unintended continuous actions.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The workflow states that Developer AI can implement, test, and deploy directly to production, but the skill provides no warning about production-affecting actions or safeguards like approvals, staging, rollback policy, or change controls. In an autonomous-agent context, this creates a credible path to service disruption, bad releases, or destructive changes without meaningful oversight.

Missing User Warnings

Medium
Confidence
87% confidence
Finding
This markdown API doc describes a StateManager that saves shared state to a file (`shared/state.json`) and includes `set`, `update`, and `save` operations, but it does not warn users that using these APIs modifies persistent local data. For markdown files, safety-relevant behaviors affecting user data or system state should be disclosed so readers understand the impact before adopting the skill.

Static analysis

No suspicious patterns detected.