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
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 · scripts/bitbucket.py (reported line 69)May include surrounding context.

python
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:

Undeclared Tool Scope

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.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
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.

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

md
"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 .

Missing User Warnings

Medium
Category
Not specified by scanner
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.

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

md
from urllib.parse import urlencode, quote


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


def get_config():

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

md
from urllib.parse import urlencode, quote


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


def get_config():

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

md
from urllib.parse import urlencode, quote


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


def get_config():

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 · references/api.md (reported line 32)May include surrounding context.

md
from urllib.parse import urlencode, quote


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


def get_config():

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 · references/api.md (reported line 44)May include surrounding context.

md
from urllib.parse import urlencode, quote


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


def get_config():

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/bitbucket.py (reported line 26)May include surrounding context.

python
from urllib.parse import urlencode, quote


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


def get_config():

Missing User Warnings

Medium
Category
Not specified by scanner
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.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
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.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
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.

Content

No source excerpt is available for this finding.