T09 · Insecure Skill Coding Practices
- Location
SKILL.md:40- Finding
Unauthenticated Development Server Exposed on All Network Interfaces
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This stock-data skill is mostly coherent, but it can automatically start an unauthenticated FastAPI service exposed on all network interfaces and documents optional persistent systemd deployment.
Install only if you are comfortable running a local market-data web service. Prefer binding it to 127.0.0.1, avoid --reload for normal use, do not expose port 8000 publicly without authentication and rate limits, and treat the systemd instructions as optional deployment guidance requiring separate hardening.
SKILL.md:40Unauthenticated Development Server Exposed on All Network Interfaces
main.py:22Wildcard Cross-Origin Resource Sharing Policy
README.md:194Privileged Installation of a Persistent Public-Facing Service
main.py:128Raw Internal Exceptions Returned to Unauthenticated Clients
requirements.txt:1Non-Reproducible Dependency Resolution Using Unbounded Minimum Versions
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
Verify it is up:
curl http://localhost:8000/
Package name closely resembles a popular package, suggesting possible typosquatting. Attackers publish malicious packages with similar names to trick developers into installing them.
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/yfinance.service
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/yfinance.service
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/yfinance.service
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
sudo nano /etc/systemd/system/yfinance.service
Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.
```bash
sudo systemctl enable yfinance
sudo systemctl start yfinance
sudo systemctl status yfinance
The skill instructs the agent to start a long-running FastAPI/uvicorn server in the background to fulfill a simple data-fetching task. That expands the execution scope from one-shot retrieval into persistent local service management, increasing attack surface and enabling unintended exposure or abuse of a localhost HTTP service.
The rule states that if a request is in Bahasa Indonesia, the skill must respond in Bahasa. This is a locale/language behavior expressed as a hard requirement, and the file does not indicate that the user may choose another response language or opt in to this constraint.
The module docstring says the connector is 'optimised for Indonesia stocks' and later code auto-appends the .JK suffix by default, which biases behavior toward a specific market/locale. For a general finance connector, this is a locale-specific constraint that is not presented as an explicit user choice in the top-level description.
This manifest file states that all tickers without a suffix are automatically treated as IDX stocks by appending .JK, which is a broad default behavior without clear exclusion cases. Because many stock symbols exist across markets, the description does not clearly define when auto-conversion should or should not occur, increasing the chance of unintended interpretation.
The dependency is specified with a lower bound only, which allows future installs to resolve to different FastAPI versions over time. This weakens build reproducibility and can unintentionally introduce vulnerable or breaking releases into the skill's runtime environment.
fastapi>=0.110.0
uvicorn[standard]>=0.29.0
yfinance>=0.2.40
pandas>=2.0.0
FastAPI has known advisories, and because the manifest does not pin a specific version, it is impossible to verify whether the deployed version is affected. In practice this creates avoidable exposure because installers may resolve to a vulnerable release depending on timing and environment.
Uvicorn has multiple historical advisories, but the open-ended requirement prevents determining whether the installed version contains fixes. This uncertainty is a supply-chain security weakness because server-facing packages can become exposed through vulnerable transitive or resolved versions.
Using yfinance>=0.2.40 without an upper bound or exact pin means deployments may consume newer releases that have not been tested or reviewed. This creates supply-chain and stability risk because behavior and security posture can change between installs.
fastapi>=0.110.0
uvicorn[standard]>=0.29.0
yfinance>=0.2.40
pandas>=2.0.0
An unpinned pandas requirement permits non-deterministic installs and may pull in versions with newly introduced flaws or incompatible behavior. For a data-processing skill, this can affect both reliability and the security reviewability of the deployed environment.
fastapi>=0.110.0
uvicorn[standard]>=0.29.0
yfinance>=0.2.40
pandas>=2.0.0
Because pandas is not pinned, the project cannot demonstrate that it avoids versions associated with known advisories. Even if the current minimum is above some affected releases, the absence of exact version control leaves room for inconsistent and unverified installations.