Back to skill

Security audit

NeonDB-skill

Security checks for vulnerabilities and agentic risk

Overview

This Neon database skill is purpose-aligned, but it handles real database credentials and destructive database operations without enough guardrails.

Review this before installing if you plan to let an agent use real Neon credentials. Restrict it to test projects where possible, require explicit approval before delete/reset/export operations, avoid running the setup script in logged environments, and treat any printed connection string as a secret that may need rotation if exposed.

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/setup-org-db.sh:19
Finding

Database Connection Credentials Exposed in Standard Output

Content
View full analysis

Vulnerability Details

File Location: scripts/setup-org-db.sh, lines 19 and 88
Vulnerability Type: Plaintext sensitive-data disclosure
Risk Level: High

Vulnerable Code

bash
CONN_STRING=$(neonctl connection-string --project-id "$PROJECT_ID" --pooled)
bash
echo "Project ID: $PROJECT_ID"
echo "Connection: $CONN_STRING"
echo ""
echo "Save these to your org config!"

Technical Analysis

The script retrieves a Neon PostgreSQL connection string and stores it in CONN_STRING. Such connection strings normally include a database username, password, hostname, and database name. Line 88 then prints the complete value to standard output without redaction.

Standard output is frequently retained in CI/CD job logs, terminal capture files, AI Agent transcripts, centralized log aggregation systems, and automation records. Consequently, a user or service with permission to read those records may obtain reusable database credentials even if they are not authorized to access Neon secrets directly.

Attack Path

  1. An authorized user or automation service executes scripts/setup-org-db.sh.
  2. neonctl connection-string returns a credential-bearing PostgreSQL URI.
  3. The script prints the complete URI to standard output.
  4. A CI system, Agent platform, terminal recorder, or logging service retains the output.
  5. An attacker or lower-privileged user obtains read access to the retained output.
  6. The exposed URI is supplied to psql or another PostgreSQL client.
  7. The attacker gains the database privileges assigned to the role embedded in the URI.

Impact Assessment

Exploitation can grant remote access to the newly created Neon database with all privileges assigned to the disclosed database role. Depending on that role, an attacker may be able to read, insert, modify, or delete organizational leads, tasks, metrics, and activity-log data. The attacker may also alter the schema or d ...[truncated 293 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove the statement that prints CONN_STRING.
  • Display only non-sensitive identifiers, such as the Neon project ID and a redacted database hostname.
  • Transfer the connection URI directly into an approved secret manager rather than returning it in terminal output.
  • If a local configuration file is necessary, create it with restrictive permissions such as mode 0600, avoid committing it to version control, and document its sensitive nature.
  • Configure CI/CD and Agent platforms to mask known secret values and prevent command output containing credentials from being retained.
  • Rotate the associated Neon database password if the script has already been run in any logged environment.
  • Prefer a dedicated least-privileged application role rather than distributing a project owner or administrative connection string.

T08 · Insecure Dependencies

Warning
Location
SKILL.md:28
Finding

Unpinned Global Installation of a Mutable npm Dependency

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 28-29; dependency metadata also appears on line 5
Vulnerability Type: Unpinned third-party dependency installation
Risk Level: Medium

Vulnerable Code

bash
# Or npm
npm i -g neonctl

The Skill metadata likewise declares the npm package without a fixed version:

yaml
metadata: {"openclaw":{"emoji":"🐘","requires":{"bins":["neonctl"]},"install":[{"id":"brew","kind":"brew","package":"neonctl","bins":["neonctl"],"label":"Install neonctl (Homebrew)"},{"id":"npm","kind":"node","package":"neonctl","bins":["neonctl"],"label":"Install neonctl (npm)"}]}}

Technical Analysis

The installation instruction globally installs the current registry version of neonctl without pinning a reviewed version or verifying package integrity. The corresponding Skill metadata also identifies only the mutable package name.

As a result, the code installed by the Skill can change independently of the reviewed project. If the package, maintainer account, publishing pipeline, or package registry is compromised, a future installation may retrieve attacker-controlled content. npm installation may execute package lifecycle scripts with the privileges of the invoking user, and a global installation also places executable files into shared command locations.

This finding does not establish that the current neonctl package is malicious. The issue is the absence of reproducible version and integrity controls.

Attack Path

  1. An attacker compromises the npm package, a maintainer account, or its release pipeline.
  2. The attacker publishes a malicious version under the legitimate neonctl package name.
  3. A user or Agent follows the Skill instruction and runs npm i -g neonctl.
  4. npm resolves the mutable package name to the compromised release.
  5. Malicious lifecycle code may execute during installation, or the installed neonctl executable may execute wh ...[truncated 705 chars]
Remediation
View remediation

Remediation Suggestions

  • Pin neonctl to a specific reviewed version in both the installation documentation and Skill metadata.
  • Use a lockfile or another reproducible installation mechanism where supported.
  • Verify package provenance and integrity using npm registry signatures, trusted publishing provenance, or documented checksum validation.
  • Review dependency updates before changing the pinned version, and automate vulnerability and provenance checks.
  • Prefer installation without elevated privileges and avoid unnecessary global package installation where an isolated tool environment can be used.
  • Disable npm lifecycle scripts during installation when compatible with the package, then explicitly validate the installed executable before use.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (8)

Tp4

High
Category
MCP Tool Poisoning
Confidence
90% confidence
Finding

The code is related to Neon/Postgres management, so it is not unrelated; however, the declared description presents a general-purpose Neon database management capability including projects, branches, databases, and query execution. This code chunk instead performs a narrower and more opinionated setup task: it creates a single Neon project, fetches a connection string, and applies a predefined organizational schema. It does not show branch management, explicit database creation, or arbitrary query execution. Additionally, the schema bootstrapping behavior is a substantive capability absent from the description, and printing the connection string is an operational behavior with security relevance that is also undeclared. Therefore the description does not accurately represent this specific code chunk.

Content

No source excerpt is available for this finding.

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

Database deletion directly removes stored data, and the file documents this operation without any warning about permanence, backup, or environment validation. Because this skill is specifically for persistent storage workflows, the context makes accidental deletion more dangerous than in a non-stateful tool.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The description says the skill can 'Manage Neon serverless Postgres databases' and is 'Perfect for agent workflows needing persistent storage,' but it does not define explicit trigger phrases, scope boundaries, or exclusion conditions. In a markdown skill file, this broad natural-language description can act as an ambiguous activation cue for many generic database-related requests.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The documentation includes project deletion commands without any warning, confirmation pattern, or advice to verify environment/target. In an agentic context, this raises the risk of accidental destructive operations against the wrong Neon project, causing irreversible service disruption or data loss.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

Branch reset and deletion are destructive operations that can discard changes or eliminate recovery points, yet the documentation presents them as routine commands without caution. In a skill used by autonomous agents, missing guardrails materially increases the chance of unintended rollback or data loss.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
86% confidence
Finding

The guide shows retrieving and piping connection strings, which are effectively secrets granting database access, but gives no warning about exposure through shell history, logs, subprocess arguments, or agent output. In an agent workflow, printing or forwarding these values can lead to credential leakage and unauthorized database access.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

The documentation encourages exporting table contents to CSV without warning that the data may contain sensitive or regulated information and that flat-file exports are easy to mishandle. In a database-management skill, this increases the risk of bulk exfiltration, accidental sharing, or insecure local storage of production data.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The script echoes the full Neon connection string to stdout, which commonly includes database credentials or access tokens. In agent, CI/CD, or shared terminal environments, stdout is often captured in logs, transcripts, or observability systems, creating an easy credential leakage path that can enable unauthorized database access.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.