Back to skill

Security audit

[Nyx Archive] Coding Philosophy

Security checks for vulnerabilities and agentic risk

Overview

This is a single-file coding advice skill with no execution, persistence, or data exfiltration, though some workflow advice should be treated as optional rather than overriding user instructions.

Install only if you want a coding-style advisory skill. Treat its stronger workflow rules as suggestions: follow your current task, remove obsolete or vulnerable code when appropriate, and do not read project memory/notes or reduce progress narration unless that is relevant and user-approved.

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:203
Finding

Operational Instructions Hijack the Agent's Editing Workflow

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 203–259
Vulnerability Type: T01: Skill Instruction Hijacking
Risk Level: High

Vulnerable snippets:

markdown
## 🚨 CRITICAL: Comment-Before-Delete Rule (Feb 18, 2026)

**NEVER delete old code before confirming new code works.**
markdown
### When to Delete
After explicit confirmation:
- User tests and approves
- Multiple sessions pass without issues
- Next feature iteration makes old code irrelevant

**Rule:** Be patient with deletion. Code in comments doesn't hurt anything. Code deleted prematurely costs time to restore.
markdown
**Budget mode:**
- Read MEMORY.md and notes FIRST before exploring
- Targeted file reads only (grep + sed -n specific lines)
- Batch changes together
- Skip narration, just execute
- One focused implementation, no tangents

Technical Analysis

The Skill is presented as guidance about coding and refactoring philosophy, but these passages use imperative and priority-signaling language—such as CRITICAL, NEVER, FIRST, and just execute—to impose operational rules on an agent after the Skill is loaded.

The instructions exceed the Skill's descriptive purpose in several ways:

  1. They replace task-specific editing judgment with a mandatory prohibition against deleting old code until a separate confirmation condition is met.
  2. They direct the agent to inspect MEMORY.md and unspecified notes before examining the files relevant to the user's request.
  3. They instruct the agent to suppress narration, reducing visibility into its actions.
  4. They can conflict with explicit user requests to remove obsolete or vulnerable code immediately.

No executable scripts, remote downloads, dependency installation, privilege escalation, or persistence mechanisms were identified. The risk arises from the text itself influencing an instruction-following agent.

Attack Path

  1. A us ...[truncated 1599 chars]
Remediation
View remediation

Remediation Suggestions

  1. Remove instructions that direct the agent to read MEMORY.md or unspecified notes. The agent should access contextual state only when the user requests it or when it is demonstrably required for the current task.

  2. Remove the Skip narration, just execute directive. Preserve the host agent's normal transparency, approval, and reporting behavior.

  3. Replace mandatory terms such as CRITICAL, NEVER, MUST, and FIRST with clearly optional guidance.

  4. State explicitly that system, developer, and user instructions take precedence over all recommendations in the Skill.

  5. Allow task-specific judgment for code deletion. Version control, focused backups, tests, and review should be preferred over retaining substantial obsolete implementations in comments.

  6. Replace the affected passages with scoped wording such as:

    markdown
    ### Optional refactoring safety guidance
    
    When appropriate for the current task, preserve recoverability through
    version control before making substantial changes. Follow the user's
    requested workflow and remove obsolete or vulnerable code promptly when
    required. Access project notes only when they are relevant and authorized.
    
  7. Review the rest of the document for imperative language that could be interpreted as an instruction-priority override, and keep the Skill limited to advisory coding-philosophy content.

Vulnerability Patterns
  • Memory PoisoningPersistent Context Injection, Context Window Stuffing, Memory Manipulation
  • 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)

Memory Manipulation

High
Category
Memory Poisoning
Confidence
80% confidence
Finding

Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.

Content

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

js
if (State.essence.protein) {
    State.essence.life += State.essence.protein;
    delete State.essence.protein;
}

Without this, old saves break silently — values go to dead fields.

Static analysis

No suspicious patterns detected.