Back to skill

Security audit

Atlassian Bitbucket Cloud by @altf1be

Security checks for vulnerabilities and agentic risk

Overview

This Bitbucket skill is mostly coherent, but it needs review because it can perform broad administrative Bitbucket changes and contains a verified bug that can forward Bitbucket credentials to an untrusted pagination URL.

Install only with a narrowly scoped Bitbucket API token and avoid using this skill with admin-wide credentials until the pagination URL validation bug is fixed. Review every command that changes permissions, keys, variables, webhooks, runners, schedules, commits, downloads, or addons, and avoid passing real secrets directly on the command line.

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

Error
Location
scripts/bitbucket.mjs:84
Finding

Bitbucket Credentials Can Be Disclosed to an Untrusted Pagination Origin

Content
View full analysis
setTimeout(r, backoff)); continue; } } if (resp.status === 204) return null; const body = await resp.text(); let json; try { json = JSON.parse(body); } catch { json = null; } if (!resp.ok) { const msg = json?.error?.message || json?.error?.detail || (json?.error && typeof json.error === 'string' ? json.error : null) || json?.message || body || resp.statusText; const err = new Error(msg); err.statusCode = resp.status; throw err; } return json; } } ``` ```js async function fetchAllPages(path, o, extra = {}) { if (!o.all) { return await bbFetch(`${path}${qs(o, extra)}`); } const allValues = []; let url = `${path}${qs(o, extra)}`; while (url) { const d = await bbFetch(url); if (d && d.values) allValues.push(...d.values); url = d && d.next ? d.next : null; ...[truncated 2460 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
package.json:27
Finding

Unpinned Dependency Resolution Prevents Reproducible Installation

Content
View full analysis
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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (26)

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

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

md
npm install

# 3. Configure environment
cp .env.example .env
# Edit .env with your Bitbucket credentials:
#   BITBUCKET_EMAIL=you@example.com
#   BITBUCKET_API_TOKEN=your-api-token

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

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

md
# 3. Configure environment
cp .env.example .env
# Edit .env with your Bitbucket credentials:
#   BITBUCKET_EMAIL=you@example.com
#   BITBUCKET_API_TOKEN=your-api-token
#   BITBUCKET_WORKSPACE=your-workspace

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

User SSH/GPG key administration is highly sensitive and not necessary for typical Bitbucket repository CRUD workflows. Exposure of these endpoints allows adding attacker-controlled keys, removing legitimate keys, or altering signing trust, which can facilitate account takeover, persistence, or integrity compromise.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
94% confidence
Finding

This range includes pipeline and account/workspace variable management, SSH keypair management, runner administration, and other secret-bearing or credential-adjacent operations that exceed ordinary repository/PR CRUD expectations. If exposed through an agent without strict scoping and confirmation, an attacker or prompt injection could create, modify, or delete secrets and execution infrastructure, enabling persistence, code execution, or data exfiltration.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

Repository, project, and workspace permission administration is security-critical because it can grant or revoke access across collaboration boundaries. In an agent context, these endpoints can be abused to escalate privileges, add unauthorized users/groups, or weaken governance far beyond normal content-management tasks.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
94% confidence
Finding

The skill advertises capabilities that require environment-variable access and outbound network access, but it does not explicitly declare tool scope such as permissions or allowed-tools. That weakens least-privilege controls and makes it easier for a host agent to grant broader execution than users expect, especially for a skill that can perform authenticated CRUD actions against Bitbucket.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This skill provides broad write and delete operations across repositories, pull requests, pipelines, keys, variables, hooks, and other Bitbucket resources, but the markdown does not prominently warn about those high-impact state-changing capabilities. In practice, a user or agent may invoke destructive or privilege-altering commands without appreciating that the skill can modify production repos, secrets, deployment settings, or access controls.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The setup section instructs users to place credentials in environment variables or a .env file, and the skill later supports creating remote variables, keys, and tokens, but it does not include a clear privacy/security warning about credential storage, shell history, workspace exposure, or handling of remotely stored secrets. That omission materially increases the likelihood of users leaking secrets locally or propagating them into Bitbucket variables without understanding the risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The examples include secret values directly on the command line, such as --value secret123 and --value tok_abc. Command-line secrets are commonly exposed through shell history, process listings, terminal logs, audit tools, and agent transcripts, so documenting this pattern normalizes an unsafe practice and can lead to credential disclosure.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The manifest/setup text says the skill uses API Token auth, while the Security section says the auth method is Basic auth with App Passwords. This inconsistency can cause operators to provision the wrong credential type, misunderstand how secrets are transmitted, or keep legacy credentials enabled longer than intended, increasing the chance of insecure deployment and accidental overexposure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

This markdown checklist includes a natural-language requirement that README author lines include specific locale/national-identity symbols (🇧🇪 🇲🇦). That imposes a locale/identity presentation constraint without any opt-in, choice, or stated regional compliance reason, which fits the policy's language/locale violation category.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The examples in the "Usage with OpenClaw" section use very generic phrases like "List all items" and "Delete item #42", which can overlap with normal conversational language and accidentally trigger real tool actions. In a skill with broad CRUD access to Bitbucket resources, especially destructive actions, ambiguous natural-language examples increase the risk of unintended repository, PR, pipeline, or workspace operations.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The endpoint inventory appears broader and differently scoped than the manifest framing of 'full CRUD on repos, PRs, pipelines, issues, snippets, workspaces, branches, deployments, and more,' yet it omits or mismatches some represented resource claims while including unrelated privileged surfaces. This creates a capability-transparency problem: operators may grant or trust the skill under incorrect assumptions, increasing the chance of unsafe use or over-privileged deployment.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The file exposes many destructive and security-sensitive operations—such as deleting repositories, keys, variables, permissions, webhooks, and environments—without any embedded warning, user-consent, or policy constraints. In an agentic setting, that omission materially increases the risk of accidental destructive actions or malicious prompt-driven misuse.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

Webhook creation and modification can redirect repository or workspace events to attacker-controlled endpoints, enabling metadata leakage, workflow manipulation, and follow-on attacks against integrated systems. Because webhooks are integration primitives rather than simple CRUD objects, including them without clear justification or controls increases the blast radius of agent misuse.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
50% 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.mjs (reported line 82)May include surrounding context.

js
return `Basic ${Buffer.from(`${CFG.authUser}:${CFG.authToken}`).toString('base64')}`;
}

const BASE = 'https://api.bitbucket.org/2.0';

async function bbFetch(path, options = {}, retries = 3) {
  const url = path.startsWith('http') ? path : `${BASE}${path}`;

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest describes a Bitbucket Cloud REST API skill focused on CRUD over Bitbucket resources. While network access to Bitbucket is expected, these commands additionally read arbitrary local files from disk and upload their contents to remote Bitbucket resources, introducing local filesystem access that is not stated in the manifest description.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This code reads a local file from disk and uploads its contents to the Bitbucket API, which is a network transfer of potentially sensitive user data. Although the command description says 'Upload an attachment', there is no explicit warning, confirmation, or disclosure that a local file will be read and sent to a remote service.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The manifest description lists major Bitbucket resource families and says 'and more,' but the implementation extends into user account credential material management (SSH/GPG keys) and addon/app administration. Those capabilities are materially different from the collaboration/repository-oriented scope emphasized by the manifest and are not clearly disclosed.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The src-create command goes beyond remote API orchestration by reading a caller-specified local file and uploading it as a repository commit. That local filesystem access is not clearly justified by the manifest’s description of a Bitbucket REST API CRUD skill, which emphasizes remote Bitbucket objects rather than host file ingestion.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

This command reads a local file, sends it to Bitbucket, and creates a repository commit, which can affect both privacy and repository integrity. The description mentions creating a commit by uploading a file, but there is no explicit safety warning or confirmation for this remote write action.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This command reads a local file path from the host filesystem and uploads it to Bitbucket downloads. The manifest describes API CRUD functionality, but does not disclose that the skill can ingest arbitrary local files from the machine where it runs.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The command reads a local file from disk and uploads it as a Bitbucket download artifact, which is an external transmission of local data. There is no explicit disclosure, confirmation, or warning beyond the terse command description.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 28)May include surrounding context.

json
"url": "https://github.com/ALT-F1-OpenClaw/openclaw-skill-atlassian-bitbucket-by-altf1be.git"
  },
  "dependencies": {
    "commander": "^12.0.0",
    "dotenv": "^16.0.0"
  },
  "engines": {

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
40% confidence
Finding

Dependencies lack version pinning, allowing potential malicious package updates. Consider pinning versions.

Content

Scanner excerpt · package.json (reported line 29)May include surrounding context.

json
},
  "dependencies": {
    "commander": "^12.0.0",
    "dotenv": "^16.0.0"
  },
  "engines": {
    "node": ">=18.0.0"