Back to skill

Security audit

Snowsand Bitbucket

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to be a legitimate Bitbucket Cloud integration, but it gives an agent direct write access to repositories and pull requests without built-in confirmation safeguards.

Install only if you are comfortable giving the agent Bitbucket credentials with repository and pull-request write authority. Use the narrowest Bitbucket token scopes and workspace access possible, and require explicit human confirmation before comments, approvals, merges, declines, branch deletion, repository creation, raw curl calls, or pipeline runs.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (15)

Tainted flow: 'req' from os.environ.get (line 66, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Content
req = Request(url, data=body, headers=headers, method=method)
    
    try:
        with urlopen(req) as resp:
            content = resp.read().decode()
            return json.loads(content) if content else {}
    except HTTPError as e:
Confidence
90% confidence
Finding
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Lp3

Medium
Category
MCP Least Privilege
Confidence
93% confidence
Finding
The skill documents use of environment credentials and outbound network access to Bitbucket, but the manifest does not declare any tool scope or allowed-tools constraints. That mismatch can lead to the agent being invoked with broader-than-expected capabilities or without clear operator review of sensitive actions involving secrets and remote API calls.

Vague Triggers

Medium
Confidence
95% confidence
Finding
The trigger language is very broad ('any Atlassian Bitbucket Cloud task'), which can cause the skill to be selected for loosely related prompts and perform sensitive repository operations in contexts where the user did not intend it. Because the skill supports write actions like merge, decline, branch deletion, and pipeline triggering, over-selection increases the chance of unintended state-changing operations.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The quick reference advertises destructive or state-changing actions such as repository creation, PR merge/decline, and branch deletion without any warning or confirmation requirements. In an agent setting, omission of confirmation guidance raises the risk of accidental irreversible changes to repositories and collaboration workflows.

External Transmission

Medium
Category
Data Exfiltration
Content
"https://api.bitbucket.org/2.0/repositories/$BITBUCKET_WORKSPACE/my-repo" | jq .

# POST request
curl -s -X POST -u "$BITBUCKET_USERNAME:$BITBUCKET_APP_PASSWORD" \
  -H "Content-Type: application/json" \
  -d '{"content": {"raw": "Comment text"}}' \
  "https://api.bitbucket.org/2.0/repositories/$BITBUCKET_WORKSPACE/my-repo/pullrequests/42/comments" | jq .
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
89% confidence
Finding
This markdown file lists create, update, merge, decline, stop, and delete endpoints such as repository deletion and branch deletion, but it does not include any warning that these actions can permanently affect user data or system state. Under the markdown-file criteria for missing user warnings, destructive or integrity-affecting behaviors should be accompanied by disclosure.

External Transmission

Medium
Category
Data Exfiltration
Content
from urllib.parse import urlencode, quote


API_BASE = "https://api.bitbucket.org/2.0"


def get_config():
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
from urllib.parse import urlencode, quote


API_BASE = "https://api.bitbucket.org/2.0"


def get_config():
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
from urllib.parse import urlencode, quote


API_BASE = "https://api.bitbucket.org/2.0"


def get_config():
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
from urllib.parse import urlencode, quote


API_BASE = "https://api.bitbucket.org/2.0"


def get_config():
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
from urllib.parse import urlencode, quote


API_BASE = "https://api.bitbucket.org/2.0"


def get_config():
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

External Transmission

Medium
Category
Data Exfiltration
Content
from urllib.parse import urlencode, quote


API_BASE = "https://api.bitbucket.org/2.0"


def get_config():
Confidence
60% confidence
Finding
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The CLI exposes destructive and state-changing operations such as repository creation, PR approval/merge/decline, branch deletion, and pipeline triggering without any confirmation prompt, dry-run mode, or explicit force flag. In an agent or automation context, a mistaken invocation, prompt-injection-driven command choice, or parameter mix-up could immediately alter source control state, causing unauthorized merges, branch loss, or unwanted CI execution.

Description-Behavior Mismatch

Low
Confidence
84% confidence
Finding
The manifest description at L004 lists PR operations as list, view, create, comment, approve, and merge, and mentions pipeline status/checks, but the documentation also exposes `unapprove`, `request-changes`, `decline`, and `run-pipeline`. Those are additional state-changing operations beyond the stated summary of capabilities. This is a mild description/behavior mismatch because the file claims a somewhat narrower action set than the documented commands suggest.

Missing User Warnings

Low
Confidence
78% confidence
Finding
The documentation instructs users to create app passwords and shows a Basic Authorization header, but it does not warn that these credentials are sensitive and must not be exposed, logged, or committed. For markdown skills, omission of privacy- or credential-safety warnings around sensitive authentication material qualifies as a missing user warning.

Static analysis

No suspicious patterns detected.