Back to skill

Security audit

surrealism

Security checks for vulnerabilities and agentic risk

Overview

This skill is a small SurrealDB extension-development guide with one insecure local credential example users should avoid copying into real deployments.

Install only if you are comfortable with a developer guide for SurrealDB WASM extensions. Do not reuse the shown root/root credentials outside an isolated local test instance, avoid passing real passwords on the command line, and create a least-privileged database user for shared or production environments.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (1)

T09 · Insecure Skill Coding Practices

Warning
Location
SKILL.md:67
Finding

Hardcoded Administrative Credentials Exposed in Command-Line Example

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 67
Vulnerability Type: Hardcoded weak credentials and plaintext secret exposure
Risk Level: Medium

Vulnerable Code:

bash
surreal sql --endpoint http://localhost:8000 --user root --pass root --ns test --db test

Technical Analysis

The example supplies the predictable administrative credential root/root directly through command-line arguments. Users who copy this command may deploy a SurrealDB instance with weak credentials or expose an existing credential in plaintext.

Command-line secrets can be retained in shell history and may be visible to local process-inspection mechanisms while the process is running. The use of the root account also violates least-privilege principles because it grants broader database permissions than are normally required for extension development and testing.

The endpoint is explicitly local, which limits direct remote exposure in the documented configuration. However, the risk increases if users reuse the example against an externally reachable instance, bind the service to a non-loopback interface, or retain the same credentials outside an isolated development environment.

Attack Path

  1. A user copies and runs the documented command with the root/root administrative credential.
  2. The plaintext password is recorded in shell history or temporarily exposed through process arguments.
  3. An attacker with local access, access to command-history files, or suitable process-inspection permissions obtains the credential.
  4. The attacker connects to the SurrealDB endpoint while the credential remains valid.
  5. The attacker authenticates as root and exercises the administrative permissions assigned to that account.

If the database is exposed beyond localhost and still uses the documented credential, an attacker may instead attempt the predictable root/root combination directly.

Impact Assessment

...[truncated 555 chars]

Remediation
View remediation

Remediation Suggestions

  • Remove hardcoded passwords from command examples.
  • Instruct users to create a strong, unique credential during initial database setup.
  • Use an interactive password prompt or a supported protected secret mechanism rather than passing the password as a command-line argument.
  • Demonstrate a dedicated, least-privileged development account instead of the root account.
  • Clearly label any development-only credentials and warn users never to reuse them in shared, production, or remotely reachable environments.
  • Restrict development database listeners to the loopback interface unless remote access is explicitly required.
  • Advise affected users to rotate credentials and remove exposed commands from shell-history files where appropriate.
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • 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 (1)

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The quick-start command demonstrates connecting to SurrealDB with the default root username and password and does so without any warning that these credentials are for local development only. This can normalize insecure deployment practices, leading users to expose administrative access or reuse default credentials in non-local environments, which could result in full database compromise.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.