Back to skill

Security audit

Sharesight Skill for OpenClaw

Security checks for vulnerabilities and agentic risk

Overview

This appears to be a legitimate Sharesight integration, but it can change and delete financial records once write mode is enabled, so it belongs in Review rather than automatic approval.

Install only if you trust this package with your Sharesight account. Keep SHARESIGHT_ALLOW_WRITES unset unless you are intentionally creating, updating, or deleting financial records, and review any delete or trade-changing command before allowing an agent to run it. Protect the configured credentials and local token cache, and prefer a locked or reviewed dependency installation if possible.

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
sharesight/auth.py:36
Finding

OAuth access token is written before restrictive permissions are applied

Content
View full analysis
None: """Save configuration to disk.""" CONFIG_DIR.mkdir(parents=True, exist_ok=True) with open(CONFIG_FILE, "w") as f: json.dump(config, f, indent=2) # Set restrictive permissions CONFIG_FILE.chmod(0o600) ``` ### Technical Analysis The configuration file contains the cached Sharesight OAuth bearer token. The code creates or truncates the file using `open(CONFIG_FILE, "w")` and only applies mode `0600` after the token has been written and the file has been closed. For a newly created file, its initial permissions are determined by the process umask. With a permissive umask, the file may temporarily be readable by other local users. This creates a time-of-check/time-of-use window between file creation and the subsequent `chmod`. The write is also not atomic. Process termination, filesystem errors, or concurrent invocations can leave a partially written JSON file. In addition, normal path-based `open` follows symbolic links. If an attacker can manipulate the configuration path under the victim's account or through an inadequately protected parent directory, the write could be redirected to another file accessible to that user. ### Attack Path 1. The victim runs `sharesight auth login` or another command that refreshes the OAuth token. 2. The application obtains an access token from Sharesight. 3. `save_config` creates or truncates `~/.config/sharesight-cli/config.json` using permissions derived from the current umask. 4. Before `chmod(0o600)` executes, a local attacker monitoring the path reads the bearer token from the temporarily accessible file. 5. The attacker submits the token to the Sharesight API before it expires. 6. The attacker gains the Sharesight API permissions ass ...[truncated 790 chars]
Remediation
View remediation
None: CONFIG_DIR.mkdir(parents=True, exist_ok=True, mode=0o700) CONFIG_DIR.chmod(0o700) fd, temp_path = tempfile.mkstemp(dir=CONFIG_DIR, prefix=".config-", text=True) try: os.fchmod(fd, 0o600) with os.fdopen(fd, "w") as f: json.dump(config, f, indent=2) f.flush() os.fsync(f.fileno()) os.replace(temp_path, CONFIG_FILE) except Exception: try: os.unlink(temp_path) except FileNotFoundError: pass raise ``` ]]>

T08 · Insecure Dependencies

Note
Location
pyproject.toml:6
Finding

Runtime and build dependencies are not reproducibly pinned

Content
View full analysis
=0.27.0", ] ``` ```toml [build-system] requires = ["hatchling"] build-backend = "hatchling.build" ``` ### Technical Analysis The runtime dependency permits any version of `httpx` at or above `0.27.0`, while the build backend has no version constraint. No reviewed lock file is present in the audited project. Consequently, two installations of the same project can resolve different dependency versions. A future compromised, malicious, or unexpectedly incompatible release could therefore enter the installation without a corresponding change to this repository. This is not evidence that `httpx` or `hatchling` is currently malicious. The weakness is the absence of reproducible dependency controls, which increases exposure to upstream package compromise and makes reviewed builds difficult to reproduce. ### Attack Path 1. An upstream dependency account, release process, or package-distribution channel is compromised. 2. A new dependency or build-backend release is published under the legitimate package name. 3. A user follows the documented `uv sync` installation process. 4. The resolver selects the newly published version because it satisfies `httpx>=0.27.0` or the unconstrained `hatchling` requirement. 5. Malicious build or runtime code executes in the context of the installing user. 6. That code could access the same environment variables and local files available to the installation or runtime process, including Sharesight credentials if they are present. ### Impact Assessment A compromised build dependency could execute code during package build or installation. A compromised runtime dependency could execute when the CLI imports or invokes it. The resulting privileges would be those of the user running the install ...[truncated 263 chars]
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Rogue AgentSelf-Modification, Session Persistence
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
Findings (18)

Tainted flow: 'client_id' from os.environ.get (line 18, credential/environment) → httpx.post (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · sharesight/auth.py (reported line 67)May include surrounding context.

python
# Request new token using client credentials
    client_id, client_secret = get_credentials()

    response = httpx.post(
        TOKEN_URL,
        data={
            "grant_type": "client_credentials",

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 · README.md (reported line 136)May include surrounding context.

md
## Token Storage

Access tokens are cached in `~/.config/sharesight-cli/config.json` and automatically refreshed when expired (tokens are valid for 30 minutes).

## Development

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 · sharesight/auth.py (reported line 47)May include surrounding context.

python
return self._client

    def _get_headers(self) -> dict[str, str]:
        """Get request headers with current access token."""
        token = get_token()
        return {
            "Authorization": f"Bearer {token}",

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 · sharesight/auth.py (reported line 53)May include surrounding context.

python
return self._client

    def _get_headers(self) -> dict[str, str]:
        """Get request headers with current access token."""
        token = get_token()
        return {
            "Authorization": f"Bearer {token}",

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 · sharesight/auth.py (reported line 78)May include surrounding context.

python
return self._client

    def _get_headers(self) -> dict[str, str]:
        """Get request headers with current access token."""
        token = get_token()
        return {
            "Authorization": f"Bearer {token}",

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 · sharesight/client.py (reported line 29)May include surrounding context.

python
return self._client

    def _get_headers(self) -> dict[str, str]:
        """Get request headers with current access token."""
        token = get_token()
        return {
            "Authorization": f"Bearer {token}",

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

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.

Content

Scanner excerpt · README.md (reported line 11)May include surrounding context.

md
- **Holdings** - View, update DRP settings, delete holdings
- **Trades** - Create, view, update, and delete trades
- **Custom Investments** - Full CRUD for custom investments, prices, and coupon rates
- **Write Protection** - Safe by default, write operations require explicit opt-in

## Installation

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding

The skill documents capabilities that imply environment variable access, shell execution, network access, and likely file writes, but it does not declare any explicit tool scope such as permissions or allowed-tools. That increases the chance an agent can invoke broader-than-expected capabilities when handling sensitive financial data and API credentials, weakening least-privilege controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The skill documents deletion of holdings without a prominent warning that the action is destructive and may irreversibly alter portfolio records. In a finance context, users or agents may execute the command assuming routine reversibility, leading to loss of investment tracking data or accidental account changes.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Deleting custom investments is presented as a normal command without clear notice of permanent data loss or downstream reporting impact. Because this skill manages financial records, accidental deletion could corrupt tracking history, valuations, or user confidence in portfolio integrity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

Price deletion changes historical financial record data, yet the command is documented without a warning about irreversible modification of valuations or performance calculations. In a portfolio-management context, that can materially affect analytics and reporting if invoked accidentally or by an over-permissioned agent.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

Coupon rate deletion is documented without clearly warning that it can alter fixed-income investment calculations and historical income assumptions. In a financial skill, silent destructive operations are more dangerous because they can produce misleading performance or income reporting after the fact.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The CLI is described as a tool for accessing portfolio data, but it also exposes many destructive and state-changing operations such as create, update, and delete for holdings, trades, investments, prices, and coupon rates. In an agent-skill context, misleading capability descriptions can cause an orchestrator or user to invoke the skill with read-only expectations, increasing the risk of unintended financial data modification or deletion; the environment-variable write gate helps, but it does not eliminate the discrepancy or prevent misuse when writes are enabled.

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 · sharesight/auth.py (reported line 11)May include surrounding context.

python
from .auth import get_token, clear_token

BASE_URL = "https://api.sharesight.com/api/v3"
BASE_URL_V2 = "https://api.sharesight.com/api/v2"

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 · sharesight/client.py (reported line 9)May include surrounding context.

python
from .auth import get_token, clear_token

BASE_URL = "https://api.sharesight.com/api/v3"
BASE_URL_V2 = "https://api.sharesight.com/api/v2"

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 · sharesight/client.py (reported line 10)May include surrounding context.

python
from .auth import get_token, clear_token

BASE_URL = "https://api.sharesight.com/api/v3"
BASE_URL_V2 = "https://api.sharesight.com/api/v2"

Unverifiable Dependency: httpx has 2 known advisory(ies) (CVE-2021-41945 (Improper Input Validation in httpx); CVE-2021-41945 (Encode OSS httpx <=1.0.0.beta0 is affected by improper input validation in `http)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Unverifiable Dependency: pytest has 2 known advisory(ies) (CVE-2025-71176 (pytest has vulnerable tmpdir handling); CVE-2025-71176 (pytest has vulnerable tmpdir handling)), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.