Back to skill

Security audit

meta-formal-capability-contract

Security checks for vulnerabilities and agentic risk

Overview

This skill needs review because it asks the agent to persist and reuse learner notes across sessions and to join broader agent control loops beyond a normal contract-checking helper.

Install only if you intentionally want an experimental meta-agent skill with cross-session learner state. Keep persisted learner notes inspectable and resettable, treat all saved notes as untrusted data, and avoid automatic injection into future planning or memory without explicit user review.

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 (2)

T02 · Agent Memory Poisoning

Error
Location
scripts/learner.py:5
Finding

Persistent Poisoning of Cross-Session Agent Memory Through Unrestricted Notes

Content
View full analysis
1 else True rec = (sys.argv[2] if len(sys.argv) > 2 else "") print(json.dumps(record(ok, rec), ensure_ascii=False)) ``` The related Skill directives state, in English translation: ```text 2. Self-reflection loop: after execution, write to the self-reflection loop and accumulate failure patterns in the learner. 5. Continuous self-evolution: inject the learner into the meta-evolver sense/plan/record loop so that it improves across sessions. ``` ### Technical Analysis The command-line argument at `sys.argv[2]` is accepted as an unrestricted `note`. The `record()` function appends that value directly to the persistent `patterns` array in `scripts/learned_patterns.json`. There is no schema validation, maximum length, trust classification, content filtering, authorization check, or distinction between inert telemetry and instruction-like text. The Skill documentation additionally directs the agent to inject learner state into future reflection and evolution workflows. This creates a memory-poisoning channel: text controlled by a caller can survive the current invocation and later be ...[truncated 1478 chars]
Remediation
View remediation

T01 · Skill Instruction Hijacking

Error
Location
SKILL.md:22
Finding

Formal-Contract Skill Expands Into Mandatory Agent Orchestration and Memory Control

Content
View full analysis
planning -> execution -> self-verification -> reflection -> memory super-agent loop, where it can be orchestrated for long-running tasks. 4. Adversarial validation of distillation quality: perform counterexample tests on key distilled decision rules. 5. Continuous self-evolution: inject the learner into the meta-evolver sense/plan/record loop so that it improves across sessions. ``` The comparison section further characterizes learner injection as mandatory and states that the Skill is integrated into the super-agent loop. ### Technical Analysis The declared capability concerns formal contracts, including preconditions, postconditions, invariants, and trajectory validation. However, the enhancement instructions expand that limited purpose into agent-wide verification, reflection, orchestration, and persistent memory operations. In particular, the Skill directs integration into a “super-agent” execution loop and mandates learner injection into a cross-session evolution process. These behaviors are not necessary to validate a formal contract and can alter how the hosting agent plans, executes, reflects on, and remembers tasks. This becomes secur ...[truncated 1899 chars]
Remediation
View remediation
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
Findings (5)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description portrays a sophisticated meta-skill with layered capabilities such as self-validation, reflective reasoning, orchestration, and ongoing self-improvement beyond a teacher skill. The supplied code does not implement those capabilities. It only loads and writes a local JSON file to track counts of operations, failures, and optional notes. While this logging could support a larger evolution loop, by itself it is only a supporting telemetry component, not the described primary functionality. Therefore the description materially overstates what this code chunk actually does.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The skill’s descriptive content is entirely in Chinese and presents the capability as-is, with no indication that users may choose another language or opt in to this locale. Under the policy, language constraints should either offer a choice or be clearly justified as region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file uses Chinese throughout, including the title and all section content, but does not mention that the skill is Chinese-only or offer a language choice. Under the language/locale policy, forcing a specific language without user opt-in can be a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
87% confidence
Finding

This code writes persistent data to a local JSON file, appending notes and updating counters, but there is no confirmation prompt, log message, or other user-visible disclosure at the point of write. Because the file may store arbitrary note content from command-line input, users are not informed that their input will be persisted.

Content

No source excerpt is available for this finding.