Back to skill

Security audit

stock-hot-aisa

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its market-scanner purpose, but it needs review because an undocumented endpoint override can redirect its API key to another server.

Install only if you trust the publisher and control the runtime environment. Do not set AISA_BASE_URL unless you intentionally use a trusted AISA-compatible endpoint, and prefer a version that pins dependencies and documents all supported environment variables.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/hot_scanner.py:111
Finding

API Credential Exposure Through an Unrestricted Endpoint Override

Content
View full analysis
OpenAI: api_key = os.environ.get("AISA_API_KEY") if not api_key: print("❌ Error: AISA_API_KEY environment variable is not set.", file=sys.stderr) print(" Set it with: export AISA_API_KEY=your_key_here", file=sys.stderr) sys.exit(1) base_url = os.environ.get("AISA_BASE_URL", "https://api.aisa.one/v1") return OpenAI(api_key=api_key, base_url=base_url) ``` ### Technical Analysis The Skill legitimately requires `AISA_API_KEY` to authenticate with the default AISA API. However, it also accepts the undocumented `AISA_BASE_URL` environment variable and passes its value directly to the OpenAI client without validating the URL scheme or destination host. The client subsequently authenticates requests to the selected endpoint using `AISA_API_KEY`. Consequently, a process, launcher, configuration file, or user capable of controlling the Skill's environment can redirect authenticated traffic to an attacker-controlled server. This behavior exceeds the minimum privileges needed for the declared functionality because the documented market scanner only needs to communicate with `https://api.aisa.one/v1`; unrestricted communication with arbitrary endpoints is unnecessary. ### Attack Path 1. An attacker gains the ability to influence the environment used to launch the Skill. 2. The attacker sets `AISA_BASE_URL` to an endpoint under their control. 3. A user invokes `scripts/hot_scanner.py` with a valid `AISA_API_KEY`. 4. `get_client()` constructs the client using the attacker-controlled base URL. 5. The scanner submits its authenticated chat-completion request to that server. 6. The attacker-controlled server records the authentication credential and request content. This path requires prior influence over the ...[truncated 668 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
scripts/hot_scanner.py:2
Finding

Unbounded Third-Party Dependency Version Creates Supply-Chain Risk

Content
View full analysis
=3.10" # dependencies = [ # "openai>=1.0.0", # ] # /// ``` ### Technical Analysis The inline dependency declaration permits any future `openai` package release with a version equal to or greater than `1.0.0`. No upper version boundary, exact version, lockfile, or package hash is present in the reviewed project. When the script is run through the documented `uv run` workflow in a fresh or refreshed environment, dependency resolution may retrieve a version that was not reviewed with this Skill. A compromised, malicious, or backward-incompatible future release could execute within the scanner process. The package name is legitimate and no malicious dependency is currently demonstrated. This finding concerns non-reproducible dependency resolution and the resulting prospective supply-chain exposure. ### Attack Path 1. A future matching release is compromised, malicious, or introduces exploitable behavior. 2. The user runs the script through `uv run` in an environment where the dependency is not already securely locked. 3. The resolver selects and downloads that future release because it satisfies `openai>=1.0.0`. 4. Python imports the downloaded package through `from openai import OpenAI`. 5. Package initialization or invoked client functionality executes in the Skill's process. Exploitation depends on a compromised or unsafe dependency release or package source; the audited repository does not itself contain such a payload. ### Impact Assessment A malicious dependency would execute with the same operating-system privileges as the user running the Skill. It could potentially access process-readable data, including `AISA_API_KEY`, communicate over the network, and read or modify files accessible to that user. The precise impact depen ...[truncated 162 chars]
Remediation
View remediation
", # ] ``` 2. Generate and commit a dependency lockfile when supported by the deployment workflow. 3. Require cryptographic hash verification for downloaded artifacts where the package manager supports it. 4. Use a trusted package index and prevent fallback to untrusted or user-controlled repositories. 5. Establish a controlled update process that reviews changelogs, package provenance, and security advisories before changing the pinned version. 6. Run the Skill with minimal filesystem and network permissions to reduce the impact of any dependency compromise. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (6)

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

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

Content

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

md
## When NOT to Use

- Do not use this skill for browser-cookie extraction, passwords, Keychain access, or other local sensitive credential access.
- Prefer a different skill when the user request is outside this skill's domain.

## Capabilities

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
81% confidence
Finding

The skill declares access to a sensitive environment variable (AISA_API_KEY) but does not define any explicit tool scope such as permissions or allowed-tools. That weakens containment and reviewability because the runtime capability exists without an explicit least-privilege declaration, making unintended or broader-than-expected access easier if the skill implementation changes or is invoked in unexpected contexts.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The invocation text uses broad phrases like 'what is hot,' 'what is moving,' and 'market momentum,' which can overlap with many ordinary finance conversations. This can cause the skill to auto-trigger too often, increasing the chance of unnecessary code execution or data access when a simpler non-tool response would have been sufficient.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The markdown usage guidance repeats similarly broad activation language without adding clear boundaries, reinforcing ambiguous invocation behavior. Repetition of vague triggers increases the likelihood the skill is selected in borderline contexts, which expands attack surface and may expose environment-backed functionality unnecessarily.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/hot_scanner.py (reported line 125)May include surrounding context.

python
print("❌ Error: AISA_API_KEY environment variable is not set.", file=sys.stderr)
        print("   Set it with: export AISA_API_KEY=your_key_here", file=sys.stderr)
        sys.exit(1)
    base_url = os.environ.get("AISA_BASE_URL", "https://api.aisa.one/v1")
    return OpenAI(api_key=api_key, base_url=base_url)

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

The manifest sets the language to "en", which is a natural-language locale constraint. Under the policy, locale restrictions should either offer user opt-in/choice or be clearly documented as justified for a region-specific skill, neither of which is evident in this file.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.