Back to skill

Security audit

Stock Rumors

Security checks for vulnerabilities and agentic risk

Overview

The skill mostly matches its market-rumor scanning purpose, but it can send the AIsa API key to an arbitrary endpoint if AISA_BASE_URL is set.

Review this skill before installing. Use it only with an AIsa API key you are comfortable exposing to this tool, avoid setting AISA_BASE_URL unless you fully trust the endpoint, and prefer running it in an environment with dependency locking or an already reviewed openai package version.

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/rumor_scanner.py:139
Finding

API Credential Disclosure Through 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) ``` The resulting client makes an authenticated request here: ```python response = client.chat.completions.create( model=model, messages=[ {"role": "system", "content": SYSTEM_PROMPT}, {"role": "user", "content": prompt}, ], temperature=0.2, ) ``` ### Technical Analysis The `AISA_BASE_URL` environment variable is accepted without validation and passed directly to the OpenAI-compatible client. The same client is initialized with the production `AISA_API_KEY`. Consequently, changing `AISA_BASE_URL` can cause the authenticated API request to be sent to an arbitrary server. Depending on the OpenAI client's authentication behavior, the AIsa key is transmitted in the authorization headers of that request. Supporting a configurable API endpoint can be legitimate, but forwarding a production credential to any environment-selected destination exceeds the minimum privileges needed for the declared functionality. The Skill only needs to communicate with the documented AIsa service at `https://api.aisa.one/v1`. The transmitted message content consists of fixed market-scanning prompts rather than local files or arbitrary user secrets. The principal sensitive asset exposed by this weakness is the AIsa API credential. ### Attack Path 1. An attacker gains the ability to influen ...[truncated 1408 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
scripts/rumor_scanner.py:2
Finding

Unbounded Third-Party Dependency Version Without a Lockfile

Content
View full analysis
=3.10" # dependencies = [ # "openai>=1.0.0", # ] # /// ``` ### Technical Analysis The inline dependency specification permits any version of `openai` from version 1.0.0 onward. No upper bound, exact version, lockfile, or package hash is present in the audited project. When the script is executed through a dependency-resolving runner such as the documented `uv run` workflow, a fresh environment may install a future release that was not part of this audit. This makes execution non-reproducible and expands the supply-chain trust boundary beyond the reviewed code. There is no evidence that the declared `openai` package name is a typo, a dependency-confusion package, or currently malicious. The risk arises from accepting unreviewed future versions and from the absence of integrity pinning. ### Attack Path 1. The script is executed in an environment where the declared dependency has not already been resolved and cached. 2. The package manager queries its configured package repository. 3. It selects a newer version satisfying `openai>=1.0.0`. 4. The selected release contains a malicious compromise, an exploitable regression, or behavior incompatible with the assumptions made by this Skill. 5. The package is installed and imported by `rumor_scanner.py`. 6. Because imported Python modules execute code in the process, a compromised dependency could access the Skill's environment, including `AISA_API_KEY`, and act with the operating-system permissions of the invoking user. This path depends on a compromised or unsafe dependency release or repository. The audit found no evidence that such a compromise is currently occurring. ### Impact Assessment A malicious dependency executes within the same Python process a ...[truncated 533 chars]
Remediation
View remediation
", # ] ``` 2. Generate and commit a lockfile when the chosen runtime supports it. 3. Use package hash verification to ensure that downloaded artifacts match reviewed releases. 4. Configure dependency installation to use an approved package index over TLS, and avoid untrusted supplemental indexes. 5. Use automated dependency monitoring to identify security advisories and update pinned versions through a controlled review process. 6. Re-run security and compatibility tests before changing the pinned version, particularly tests covering authorization-header handling and custom `base_url` behavior. ]]>
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • 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
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (3)

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
90% confidence
Finding

The skill declares access to environment variables via required and optional env fields but does not define an explicit tool scope such as permissions or allowed-tools. In an agent ecosystem, this can lead to overbroad execution or secret exposure because the runtime may grant capabilities implicitly without clear least-privilege boundaries.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The activation description is broad enough to match common financial questions, not just requests for rumor or signal scanning. This can cause the skill to trigger in situations where users did not intend external rumor analysis, increasing the chance of unnecessary API use, exposure of sensitive portfolio-related prompts, or low-trust outputs influencing responses.

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/rumor_scanner.py (reported line 164)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)

Static analysis

No suspicious patterns detected.