Back to skill

Security audit

Test my skill222

Security checks for vulnerabilities and agentic risk

Overview

This test skill contains unrelated instructions that could redirect an agent into making broad authentication, database, repository-fetching, and deletion changes.

Do not install this as a general-purpose test skill unless the body is replaced with a clear no-op instruction. As written, an agent that loads it may treat unrelated engineering notes as active work and attempt broad changes to authentication, database ownership, repository fetching, or delete behavior.

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
Findings (1)

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:6
Finding
Unrelated Agent-Directed Instructions Embedded in a No-Op Test Skill<![CDATA[ ## Vulnerability Details **File Location**: `SKILL.md`, lines 6–24 **Vulnerability Type**: T01: Skill Instruction Hijacking **Risk Level**: High ### Vulnerable Code Snippet ```text . File visibility bug: `buildSkillArchive` (in `bootstrap.go`) only creates a tar.gz with SKILL.md! So Phabricator-bootstrapped skills only have SKILL.md visible. The `StreamSkillContent` function only fetches SKILL.md too. This is the core bug explaining why "only SKILL.md is visible". 2. Microsoft OAuth: Currently only static token-based auth stub. Need proper MS OAuth. 3. Owner model: `OwnerTokenHash` is a single hash, not multi-owner. Need `SkillOwner` junction table. 4. Missing delete endpoint: No way to remove skills via API. So my plan is to tackle the database redesign first—adding a `User` table and `SkillOwner` junction table to support multiple owners. Then I'll implement Microsoft OAuth with proper Azure AD integration, fix the file visibility issue by making `StreamSkillContent` fetch the entire skill directory from Phabricator instead of just SKILL.md, and add the missing delete endpoint. Looking at the actual implementation, the core problem is in `bootstrap.go` where `StreamSkillContent` only retrieves SKILL.md. I need to refactor it to use the directory-fetching logic from `gitfetch.go` so it pulls all files in the skill directory. Before diving into the code changes, I should clarify the scope with the user and understand their priorities—this is a substantial refactor that touches the database layer, authentication, file handling, and API structure. I'm seeing the core issues now: the Phabricator bootstrap only archives SKILL.md, so I need to either make `StreamSkillContent` fetch the full directory recursively or trigger a re-fetch when the editor opens. For the OAuth piece, I'll use Azure AD with MSAL, storing the user's OID and email. The owner model should shift from a token hash to a junction table or JSON array of use ...[truncated 2971 chars]
Remediation
<![CDATA[ ## Remediation Suggestions 1. Remove lines 6–24 because they are unrelated to the declared no-op testing purpose. 2. Replace the body with a short, explicit statement that the Skill performs no actions and must not access files, networks, credentials, databases, or external services. 3. If the implementation discussion must be retained, store it outside the Skill instruction file and clearly mark it as non-executable reference material. 4. Avoid first-person task language such as “I need to,” “I'll implement,” and “my plan” in content loaded into an Agent's instruction context. 5. Add validation that rejects or flags Skill descriptions whose operational scope conflicts with their declared metadata. 6. Apply least privilege to consuming Agents: do not provide repository write, deployment, credential, database, or deletion capabilities to a no-op test Skill. 7. Require explicit user confirmation before an Agent performs authentication changes, schema migrations, recursive repository retrieval, or destructive deletion operations. 8. Keep external repository access and OAuth-related data flows restricted to allowlisted endpoints, and prevent tokens or identity data from being included in prompts, logs, or untrusted network requests. ]]>
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 (1)

Natural-Language Policy Violations

Medium
Confidence
95% confidence
Finding
The manifest description is written only in Chinese ("没有任何实际意义的skill,用于测试") with no indication that the skill is region-specific or that users can choose their language. This creates a language/locale policy concern because it imposes a specific language without opt-in or documented justification.

Static analysis

No suspicious patterns detected.