Back to skill

Security audit

AWS Redshift Skills

Security checks for vulnerabilities and agentic risk

Overview

The skill appears to do what it claims, but it can make destructive Redshift changes and has unsafe defaults and input handling, so it needs review before use.

Use this only with least-privilege AWS credentials in a non-production or tightly controlled account until safeguards are added. Review every delete, restore, resize, COPY, UNLOAD, and SQL execution request before allowing it, avoid passing untrusted text into COPY/UNLOAD options, remove the default master password pattern, and pin installer and dependency versions.

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 (3)

T09 · Insecure Skill Coding Practices

Error
Location
scripts/data_api/queries.py:565
Finding

SQL Injection in Redshift COPY and UNLOAD Command Builders

Content
View full analysis

Vulnerability Details

File Location: scripts/data_api/queries.py:565-568 and scripts/data_api/queries.py:607-611
Vulnerability Type: SQL injection through unsafe string interpolation
Risk Level: High

Vulnerable Code

python
sql = f"COPY {table} FROM '{s3_path}' IAM_ROLE '{role}' FORMAT AS {data_format}"
if options:
    sql += f" {options}"
sql += ";"
python
escaped_query = query.replace("'", "''")
sql = f"UNLOAD ('{escaped_query}') TO '{s3_path}' IAM_ROLE '{role}' FORMAT AS {data_format}"
if options:
    sql += f" {options}"
sql += ";"

Technical Analysis

The command builders interpolate caller-controlled values directly into executable Redshift SQL. The affected values include:

  • table
  • s3_path
  • iam_role_arn
  • data_format
  • options

The options parameter is explicitly free-form SQL text. The table identifier is not safely quoted or validated, while string values such as the S3 path and IAM role ARN are inserted between single quotes without escaping. An attacker who can influence tool arguments can therefore introduce quotes, SQL comments, semicolons, additional clauses, or additional statements.

The nested query used by UNLOAD has its single quotes doubled, which protects that specific string boundary. However, this does not protect s3_path, role, data_format, or options. The same protection is absent from all dynamic fields in the COPY builder.

This is particularly significant because these functions are exposed as agent tools in scripts/data_api/redshift_data_cli.py. Untrusted natural-language content that is converted into tool arguments can reach the SQL builder without an intervening validation layer.

Attack Path

  1. An attacker supplies content that causes the agent to invoke execute_copy or execute_unload.
  2. The attacker influences a structured argument such as table, s3_path, data_format, or options.

...[truncated 1372 chars]

Remediation
View remediation

Remediation Suggestions

  1. Replace free-form command construction with a strict structured builder.
  2. Validate data_format against a fixed allowlist such as CSV, JSON, PARQUET, AVRO, and ORC.
  3. Remove the free-form options parameter. Represent each supported option as a typed field and render only predefined syntax.
  4. Validate table and schema names against Redshift identifier rules, then quote each identifier component safely. Do not accept comments, quotes, whitespace, or semicolons in identifier fields.
  5. Parse S3 destinations with a URI parser and require the s3 scheme, a valid bucket name, and an allowed bucket or prefix.
  6. Validate IAM role values as properly formed IAM role ARNs and, where possible, restrict them to an administrator-configured allowlist.
  7. Escape all SQL string literals with a centralized routine. Parameterized Data API parameters should be used where supported, although identifier and command-option allowlisting remains necessary.
  8. Reject multi-statement syntax, SQL comments, unexpected quotes, and control characters in every structured field.
  9. Run Data API operations under a least-privileged database user and restrict the Redshift IAM role to required S3 buckets and prefixes.
  10. Add negative tests covering quote termination, semicolons, comments, Unicode separators, malformed ARNs, unsupported formats, and unauthorized S3 destinations.

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/provisioned/clusters.py:159
Finding

Predictable Hardcoded Default for the Redshift Master Password

Content
View full analysis

Vulnerability Details

File Location: scripts/provisioned/clusters.py:159-184 and scripts/provisioned/redshift_provisioned_cli.py:144-174
Vulnerability Type: Hardcoded predictable administrative credential
Risk Level: Medium

Vulnerable Code

python
def create_cluster(
    self,
    cluster_id: str,
    node_type: str = "ra3.xlplus",
    number_of_nodes: int = 2,
    master_username: str = "admin",
    master_password: str = "CHANGEME",
    db_name: str = "dev",
    iam_roles: Optional[List[str]] = None,
    publicly_accessible: bool = False,
) -> Dict[str, Any]:
python
kwargs: Dict[str, Any] = {
    "ClusterIdentifier": cluster_id,
    "NodeType": node_type,
    "MasterUsername": master_username,
    "MasterUserPassword": master_password,
    "DBName": db_name,
    "PubliclyAccessible": publicly_accessible,
}

The tool-facing wrapper repeats the insecure default:

python
def create_cluster(
    cluster_id: str,
    node_type: str = "ra3.xlplus",
    number_of_nodes: int = 2,
    master_username: str = "admin",
    master_password: str = "CHANGEME",
    db_name: str = "dev",
    iam_roles: Optional[List[str]] = None,
    publicly_accessible: bool = False,
) -> Dict[str, Any]:

Technical Analysis

Cluster creation silently substitutes the fixed value CHANGEME when the caller does not provide a master password. Because the default appears both in the manager and in the agent-facing function, an omitted tool argument is propagated directly to AWS as MasterUserPassword.

AWS password policy may reject this particular value in some configurations. However, service-side rejection is not a secure control for application credential management. If the value is accepted under current or future service validation, every cluster created without an explicit password receives a publicly predictable administrator credential.

Exposing the ...[truncated 1309 chars]

Remediation
View remediation

Remediation Suggestions

  1. Remove the default value and require an explicitly supplied secure credential.
  2. Prefer AWS-managed administrator credentials or generate a password with a cryptographically secure generator.
  3. Store generated credentials directly in AWS Secrets Manager rather than returning or displaying them.
  4. Avoid carrying plaintext passwords through natural-language prompts or ordinary tool arguments.
  5. If a password argument must remain available, mark it as sensitive in the hosting tool framework and ensure it is excluded from telemetry and logs.
  6. Enforce minimum length, complexity, and prohibited-value checks before making the AWS API call.
  7. Explicitly reject known defaults such as CHANGEME, password, and values derived from the cluster name.
  8. Add tests proving that cluster creation fails locally when no secure credential or managed-password option is provided.

T08 · Insecure Dependencies

Warning
Location
pyproject.toml:7
Finding

Mutable and Unpinned Third-Party Installation Sources

Content
View full analysis

Vulnerability Details

File Location: pyproject.toml:7-9, README.md:84, README.md:102-105, and README.md:120-122
Vulnerability Type: Dependency and installation supply-chain exposure
Risk Level: Medium

Vulnerable Code

toml
dependencies = [
    "boto3>=1.26.0",
]

The documentation also recommends mutable package resolution:

bash
npx skills add danjin/aws-redshift-skills
bash
npx clawhub@latest install aws-redshift-skills
bash
pip install boto3>=1.26.0

Technical Analysis

The Python dependency specifies only a minimum version, without a reviewed upper bound, lockfile, or integrity hash. Installation at different times can therefore resolve to materially different boto3 and transitive dependency versions.

The documented npx clawhub@latest command explicitly resolves and executes the latest registry release. The npx skills workflow similarly depends on mutable registry and repository state unless a revision is pinned externally.

No evidence was found that the currently named dependencies are malicious. The issue is that the installation procedure does not guarantee that the code installed in the future is the same code that was audited.

Attack Path

  1. A user follows the documented installation command or installs the Python project.
  2. The package manager queries a third-party registry or repository.
  3. It resolves the latest release or any version satisfying the broad constraint.
  4. If a maintainer account, registry entry, release, or transitive dependency has been compromised, altered code is downloaded.
  5. Package installation hooks or imported runtime code execute with the privileges of the user or agent host.

This path is conditional on an upstream compromise or unsafe future release; no such compromise was identified during this audit.

Impact Assessment

A compromised installer or Python dependency could execu ...[truncated 520 chars]

Remediation
View remediation

Remediation Suggestions

  1. Pin boto3 and important transitive dependencies to reviewed versions through a lockfile.
  2. Use hash-verified Python installations, such as a requirements file containing --hash entries.
  3. Establish a controlled update process that reviews and tests dependency changes before widening version constraints.
  4. Replace @latest installation examples with a specific reviewed version.
  5. Pin skill installations to a release tag or immutable commit digest where the installer supports it.
  6. Document the expected package source and provide checksums or signature-verification instructions.
  7. Use automated dependency scanning and alerting for newly disclosed vulnerabilities.
  8. Perform installation in a restricted environment without production AWS credentials, then promote reviewed artifacts into the operational environment.
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
Findings (28)

Tp4

High
Category
MCP Tool Poisoning
Confidence
93% confidence
Finding

If the skill advertises broad Redshift Provisioned, snapshot, and Data API support while the visible implementation is narrower, reviewers may miss what is actually present and what is absent. In an AWS administration skill, this can lead to overtrust, unsafe invocation decisions, and poor permission design because the effective attack surface is not accurately described.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

If the skill advertises broad Redshift Provisioned, snapshot, and Data API support while the visible implementation is narrower, reviewers may miss what is actually present and what is absent. In an AWS administration skill, this can lead to overtrust, unsafe invocation decisions, and poor permission design because the effective attack surface is not accurately described.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

If the skill advertises broad Redshift Provisioned, snapshot, and Data API support while the visible implementation is narrower, reviewers may miss what is actually present and what is absent. In an AWS administration skill, this can lead to overtrust, unsafe invocation decisions, and poor permission design because the effective attack surface is not accurately described.

Content

No source excerpt is available for this finding.

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- **Cluster & snapshot management**: `scripts/provisioned/redshift_provisioned_cli.py` — 12 @tool functions

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
- **Cluster & snapshot management**: `scripts/provisioned/redshift_provisioned_cli.py` — 12 @tool functions

Self-Modification

High
Category
Rogue Agent
Confidence
85% confidence
Finding

Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.

Content

Scanner excerpt · references/data_api/query_guide.md (reported line 91)May include surrounding context.

md
- `HEADER` — Include column headers (CSV/JSON)
- `PARALLEL ON/OFF` — Parallel file output
- `MAXFILESIZE n` — Maximum output file size
- `ALLOWOVERWRITE` — Overwrite existing files
- `ADDQUOTES` — Enclose strings in quotes (CSV)

## Metadata Operations

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The feature list advertises create/delete/resize/pause/resume/reboot, snapshot restore/delete, namespace/workgroup delete, and SQL/COPY/UNLOAD capabilities, but the README does not provide any caution about resource deletion, service disruption, costs, or potential data impact. For a markdown skill description, these are behaviors that can affect user data and system integrity and should be disclosed clearly.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The README instructs users to execute npx skills without pinning a specific package version, which can fetch and run whatever version is current at install time. That creates a supply-chain risk: a compromised or maliciously updated package could execute code on the user's machine during installation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This command uses npx skills without a pinned version, so users will execute an unbounded package version from the registry. If the upstream package is hijacked or publishes a malicious release, the installation step could run attacker-controlled code locally.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The unpinned npx skills invocation exposes users to registry and package-update supply-chain risk because npx may download and execute the latest available release. In an agent-skill ecosystem, this is especially relevant because users may copy-paste setup commands with elevated trust.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

Referencing npx skills without version pinning means the executed installer is mutable over time and could become malicious after the README is published. That can lead to arbitrary local code execution at install time via the npm package lifecycle.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

This README example tells users to run an unpinned npx skills command, which is a classic supply-chain weakness because the command implicitly trusts the latest registry state. A malicious or compromised release could execute arbitrary commands during installation.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
95% confidence
Finding

The use of npx skills without version pinning leaves installation behavior non-deterministic and vulnerable to malicious package substitution or compromised future releases. Because this is an installation instruction, the risk is direct and user-triggered.

Content

No source excerpt is available for this finding.

Rp1

Medium
Category
MCP Rug Pull
Confidence
97% confidence
Finding

Although clawhub is invoked with @latest, that is still an explicitly mutable target and therefore equivalent to an unpinned install for security purposes. Running npx clawhub@latest install ... can execute whatever code is currently published under that package name, enabling supply-chain compromise.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The usage example includes a plaintext master_password directly in sample code without any warning about secure secret handling. Readers may copy this pattern into real workflows, leading to credentials being embedded in source files, shell history, logs, or prompts, which is especially risky for an AWS infrastructure management skill.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
87% confidence
Finding

The skill declares operational capabilities involving environment-variable access and file reading, but it does not define an explicit tool scope such as permissions or allowed-tools. That ambiguity weakens least-privilege controls and can let the runtime grant broader access than reviewers or users expect, especially in a skill that can interact with AWS resources and process SQL-related inputs.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The catch-all trigger phrase 'or similar keywords' makes invocation conditions overly broad, increasing the chance this AWS administration skill is activated for loosely related prompts. Because the skill can manage Redshift resources and execute SQL-oriented operations, accidental or adversarial triggering could cause sensitive metadata exposure or destructive actions in the wrong context.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The manifest describes this skill as interacting with Redshift provisioned/serverless resources and executing SQL via the Redshift Data API. This file also exposes a generic S3 client factory, which is a separate AWS service capability not declared in the manifest and not inherently required for basic Redshift management or query execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The delete_cluster tool directly exposes a destructive infrastructure operation without any explicit confirmation, dry-run, or secondary safeguard in this interface. In an agent-tooling context, ambiguous user prompts, prompt injection, or simple model error could trigger irreversible deletion or deletion with skip_final_snapshot=True, causing downtime and potential data loss.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The delete_snapshot tool performs irreversible snapshot deletion with no built-in confirmation or protective workflow. In this Redshift administration skill, snapshots are often the recovery path for accidental cluster changes or failures, so unintended deletion can materially weaken backup posture and hinder recovery.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The restore_from_snapshot method provisions or changes infrastructure without any explicit warning, approval gate, or confirmation step. In the context of a Redshift management skill, a restore can create costly resources, alter deployment state, or expose data through configuration choices such as PubliclyAccessible, making accidental or manipulated invocation security-relevant.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The delete_snapshot method performs an irreversible destructive operation immediately when called, with no built-in confirmation, dry-run safeguard, or higher-level acknowledgment mechanism. In an agent skill that may be triggered from natural language, this increases the risk of accidental or prompt-induced deletion of valuable Redshift backups, which can directly affect recovery capabilities and business continuity.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The file exposes a delete_workgroup tool that directly performs a destructive Redshift Serverless deletion through the manager with no built-in confirmation, dry-run, or other safety interlock. In an agent-tooling context, this increases the chance of accidental or prompt-induced infrastructure deletion because the operation is one callable step away from execution.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The delete_namespace tool exposes deletion of a Redshift Serverless namespace, which can destroy a data environment and potentially lead to data loss if no final snapshot is supplied. Because this skill is specifically designed for Redshift administration, an LLM or user error could trigger irreversible destructive actions without any mandatory confirmation or protective workflow.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The delete_workgroup method directly performs irreversible infrastructure deletion using either an explicit name or a default from environment-derived configuration, with no confirmation, dry-run safeguard, or higher-level validation. In an agent skill context, this is more dangerous because natural-language task routing or parameter confusion can cause unintended destructive actions against production Redshift Serverless resources.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.