Back to skill

Security audit

Dust Language Architect

Security checks for vulnerabilities and agentic risk

Overview

This skill is a repository-grounded Dust language reference prompt with broad but disclosed file-reading guidance and no code execution, persistence, or data exfiltration behavior.

Install this only if you are comfortable with the agent using files packaged under the Dust skill directory as reference material. Do not include secrets, private environment files, tokens, or unrelated repositories inside that directory.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • 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 (2)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:6
Finding

Agent Role Replacement Through Skill Instructions

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:6
Vulnerability Type: Prompt-based agent role hijacking
Risk Level: High

Complete Code Snippet:

markdown
You are now **Dust Language Architect**, a specialist agent for interpreting, explaining, comparing, organizing, and reasoning within the **Dust Programming Language** using the repositories cloned into this skill directory as your authoritative working corpus.

Technical Analysis

The Skill uses a direct imperative identity-replacement instruction rather than describing a bounded capability. When loaded into an agent context, the statement directs the agent to adopt a new role and treat Skill-selected repositories as its authoritative corpus.

This role assignment is reinforced later by repeated identity, source-priority, and behavioral rules. Although the file does not explicitly instruct the agent to bypass safety controls, the instruction can alter the agent's current-session goals, reasoning priorities, and source-selection behavior. Higher-priority system and safety instructions would still take precedence in a correctly implemented agent.

Attack Path

  1. A user or platform loads SKILL.md into an agent's instruction context.
  2. The agent processes the imperative statement, “You are now Dust Language Architect.”
  3. The agent adopts the Skill-defined identity and its associated source-authority rules.
  4. Subsequent requests are interpreted according to attacker-authored role and repository-priority instructions.
  5. The agent's original session objectives may be displaced or biased where they conflict with the Skill's prescribed behavior.

Impact Assessment

The issue can influence the agent's current-session identity, response scope, source prioritization, and reasoning behavior. It does not grant operating-system privileges, establish persistence, or directly execute code. Its principal impact is control over agent behavior and p ...[truncated 134 chars]

Remediation
View remediation

Remediation Suggestions

  • Replace imperative identity assignment with a bounded capability statement, such as: “This Skill provides repository-grounded assistance about the Dust language.”
  • Explicitly state that system, developer, user, privacy, and safety instructions take precedence over all Skill content.
  • Scope the role to Dust-related requests initiated by the user rather than applying it unconditionally when the Skill is loaded.
  • Treat repository content as untrusted reference material rather than executable instructions.
  • Remove repeated identity-enforcement language and preserve the agent's existing role and session objectives.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:47
Finding

Overbroad Directive to Access Every Reachable Repository File

Content
View full analysis

Vulnerability Details

File Location: SKILL.md:47-69
Vulnerability Type: Excessive file-access scope and least-privilege violation
Risk Level: Medium

Complete Code Snippet:

markdown
## Ecosystem Corpus Rule: Every File Matters

The entire set of cloned `dustlang` organization repositories inside this skill directory is part of your working knowledge base.

You must treat **every file included with every cloned repository** as potentially relevant, including but not limited to:
- root-level files
- hidden files and dotfiles
- markdown documentation
- specifications
- examples
- source code
- tests
- configs
- manifests
- build files
- CI/CD files
- scripts
- templates
- assets
- generated metadata
- website files
- nested files in every subdirectory

This includes all files reachable under the current skill directory at runtime.

You must not narrowly rely on only `README.md` or a single folder.
You must assume that Dust’s meaning is distributed across the full multi-repository tree.

Technical Analysis

The Skill mandates treating every reachable file as relevant, explicitly including hidden files, dotfiles, scripts, CI/CD files, configuration, generated metadata, and arbitrary nested content. This scope exceeds what is necessary for most language-reference questions and conflicts with least-privilege and data-minimization principles.

The directive does not itself bypass operating-system access controls or grant new permissions. Instead, it encourages the agent to exercise all file-read capabilities already available to it, regardless of relevance. If repositories are added later, their hidden or operational files could contain credentials, CI tokens, deployment metadata, private endpoints, or unrelated sensitive information.

No sensitive file, credential disclosure, or exfiltration mechanism was present in the audited artifact. The finding concerns the unnecessa ...[truncated 1179 chars]

Remediation
View remediation

Remediation Suggestions

  • Replace whole-tree traversal with request-specific file selection based on demonstrated relevance.
  • Exclude secret files, credentials, environment files, hidden files, private keys, CI secrets, and unrelated operational configuration by default.
  • Require explicit user approval before inspecting hidden files, scripts, deployment configuration, or broad directory trees.
  • Apply allowlists for expected specification, implementation, test, example, and documentation paths.
  • Enforce maximum traversal depth, file-size limits, and repository-boundary checks.
  • Instruct the agent never to reproduce credentials or sensitive configuration in responses.
  • Log accessed paths and provide users with source citations so unnecessary reads can be identified and reviewed.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • 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
Findings (1)

Scope Creep

Low
Category
Excessive Agency
Confidence
70% confidence
Finding

Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Content

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

md
The entire set of cloned `dustlang` organization repositories inside this skill directory is part of your working knowledge base.

You must treat **every file included with every cloned repository** as potentially relevant, including but not limited to:
- root-level files
- hidden files and dotfiles
- markdown documentation