Back to skill

Security audit

Local YDB Toolkit

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local YDB/Docker operations guide with powerful but clearly disclosed maintenance actions and repeated confirmation safeguards.

Install this only if you want an agent to help administer local-ydb stacks. Review any plan that touches Docker containers, volumes, auth files, passwords, public monitoring, or schema changes, and keep it limited to disposable or intended local-ydb hosts unless you have backups and a rollback path.

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
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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
Findings (29)

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

Scanner excerpt · SKILL.md (reported line 32)May include surrounding context.

md
- Read `references/mcp-tool-scenarios.md` when testing MCP tools, exercising the managed SQL safety matrix, planning structured schema generation/apply flows, o

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/mcp-tool-scenarios.md (reported line 72)May include surrounding context.

md
- Do not mix static and dynamic image tags inside one profile.
- For stable GHCR tests, use the exact patch tag `ghcr.io/ydb-platform/local-ydb:26.1.1.6`.

<!-- BEGIN DECLARATIVE TOPOLOGY CONTRACT -->
## Declarative Topology Contract

- `dynamicNodeCount` is the total configured tenant-node count, including primary, and defaults to `1`.

Hidden Instructions

High
Category
Prompt Injection
Confidence
70% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · references/mcp-tool-scenarios.md (reported line 106)May include surrounding context.

md
8. Confirm destroy, then bootstrap again. Inventory must contain exactly the three configured dynamic containers and no `-4`.
9. In `finally`, destroy the disposable stack and independently remove any leftover disposable containers, network, and volume.

<!-- BEGIN MANAGED SQL SCENARIOS -->
## Managed SQL Scenario: Query Service Safety Matrix

Goal: exercise `local_ydb_sql` against the selected configured local-ydb profile. Use the official `ydb-mcp` server instead when the target is an arbitrary YDB endpoint rather than a toolkit-managed local-ydb profile.

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/auth-hardening.md (reported line 96)May include surrounding context.

md
umask 077
  credentials_dir=$(mktemp -d)
  cleanup() {
    rm -f -- "$credentials_dir/root.password"
    rmdir -- "$credentials_dir"
  }
  trap cleanup EXIT

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/storage-migration.md (reported line 51)May include surrounding context.

md
umask 077
  credentials_dir=$(mktemp -d)
  cleanup() {
    rm -f -- "$credentials_dir/root.password"
    rmdir -- "$credentials_dir"
  }
  trap cleanup EXIT

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/storage-migration.md (reported line 120)May include surrounding context.

md
umask 077
  credentials_dir=$(mktemp -d)
  cleanup() {
    rm -f -- "$credentials_dir/root.password"
    rmdir -- "$credentials_dir"
  }
  trap cleanup EXIT

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
85% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/storage-migration.md (reported line 189)May include surrounding context.

md
umask 077
  credentials_dir=$(mktemp -d)
  cleanup() {
    rm -f -- "$credentials_dir/root.password"
    rmdir -- "$credentials_dir"
  }
  trap cleanup EXIT

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · references/verification.md (reported line 17)May include surrounding context.

Unauthenticated local-dev examples:

bash
curl -sSL 'http://127.0.0.1:8765/viewer/json/tenants?database=/local'

curl -sSL 'http://127.0.0.1:8765/viewer/json/nodelist?database=%2Flocal%2Fexample&enums=true&type=any' \
  | python3 -m json.tool

Tool Parameter Abuse

High
Category
Tool Misuse
Confidence
60% confidence
Finding

Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).

Content

Scanner excerpt · references/verification.md (reported line 117)May include surrounding context.

whoami reachability checks:

bash
curl -sS -o /tmp/local-whoami.out -w '%{http_code}\n' \
  'http://127.0.0.1:8765/viewer/json/whoami'

curl -k -sS -o /tmp/public-whoami.out -w '%{http_code}\n' \

External Script Fetching

High
Category
Supply Chain
Confidence
90% confidence
Finding

Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.

Content

Scanner excerpt · references/verification.md (reported line 199)May include surrounding context.

| jq -r '.[0].Id') NOW=$(date +%s) FROM=$((NOW - 600)) curl -fsS "http://127.0.0.1:8765/node/${GRAPH_NODE_ID}/viewer/json/graph?database=%2Flocal%2Fexample&target=resources.memory.used_bytes&from=${FROM}&until=${NOW}&maxDataPoints=1000"

text

The root `/viewer/json/graph` endpoint can return `GraphShard is not enabled on the database` even when `GraphShardExists=true` for `/local/<tenant>`.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/mcp-tool-scenarios.md (reported line 795)May include surrounding context.

md
- treating the profile's main `dynamicContainer` as removable through this tool
- assuming default removal can select configured suffixes
- using `nodeIds` for the base dynamic node; only IDs that resolve to suffix containers are removable
- removing multiple extra nodes at once on a live stack without checking `nodelist` after each removal

## Scenario 13: Add Storage Groups

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · references/mcp-tool-scenarios.md (reported line 855)May include surrounding context.

md
- treating the profile's main `dynamicContainer` as removable through this tool
- assuming default removal can select configured suffixes
- using `nodeIds` for the base dynamic node; only IDs that resolve to suffix containers are removable
- removing multiple extra nodes at once on a live stack without checking `nodelist` after each removal

## Scenario 13: Add Storage Groups

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/auth-hardening.md (reported line 89)May include surrounding context.

md
trap cleanup_input EXIT
trap "exit 130" INT
trap "exit 143" TERM
sudo cat /path/to/root.password >"$password_input"
test -s "$password_input"
docker exec -i ydb-local bash -lc '
  set -euo pipefail

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/storage-migration.md (reported line 44)May include surrounding context.

md
trap cleanup_input EXIT
trap "exit 130" INT
trap "exit 143" TERM
sudo cat /path/to/root.password >"$password_input"
test -s "$password_input"
docker exec -i ydb-local bash -lc '
  set -euo pipefail

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/storage-migration.md (reported line 102)May include surrounding context.

md
trap cleanup_input EXIT
trap "exit 130" INT
trap "exit 143" TERM
sudo cat /path/to/root.password >"$password_input"
test -s "$password_input"
docker exec -i ydb-local bash -lc '
  set -euo pipefail

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/storage-migration.md (reported line 106)May include surrounding context.

md
trap cleanup_input EXIT
trap "exit 130" INT
trap "exit 143" TERM
sudo cat /path/to/root.password >"$password_input"
test -s "$password_input"
docker exec -i ydb-local bash -lc '
  set -euo pipefail

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
70% confidence
Finding

Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.

Content

Scanner excerpt · references/storage-migration.md (reported line 177)May include surrounding context.

md
trap cleanup_input EXIT
trap "exit 130" INT
trap "exit 143" TERM
sudo cat /path/to/root.password >"$password_input"
test -s "$password_input"
docker exec -i ydb-local bash -lc '
  set -euo pipefail

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Sudo/Root Execution

Medium
Category
Privilege Escalation
Confidence
90% confidence
Finding

This rebuild procedure explicitly starts a fresh database with anonymous access enabled and TLS disabled. Even though the text warns it is temporary, this weakens authentication and transport protections and can expose the database to unauthorized local or network access if bindings, Docker networking, or host isolation are broader than assumed.

Content

Scanner excerpt · references/storage-migration.md (reported line 144)May include surrounding context.

bash
docker rm -f ydb-local ydb-dyn-example 2>/dev/null || true
sudo install -d -o root -g root -m 0755 /path/to/ydb-data

docker run -d --name ydb-local \
  --no-healthcheck \

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
75% confidence
Finding

Docker image references without a specific tag (:latest is implicit) or digest (@sha256:...) can be silently replaced by a malicious image.

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

whoami reachability checks:

bash
curl -sS -o /tmp/local-whoami.out -w '%{http_code}\n' \
  'http://127.0.0.1:8765/viewer/json/whoami'

curl -k -sS -o /tmp/public-whoami.out -w '%{http_code}\n' \

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation includes a state-changing GraphShard backend switch followed immediately by a container restart, but it does not clearly warn that this mutates runtime configuration and can cause service interruption. In an ops skill, omission of impact/rollback guidance can lead an agent or operator to execute the sequence during verification when they intended to perform a read-only check.

Content

No source excerpt is available for this finding.

Static analysis

Detected: suspicious.exposed_secret_literal

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
references/verification.md:43