Back to skill

Security audit

meta-constitutional-self-alignment

Security checks for vulnerabilities and agentic risk

Overview

The skill mainly does local text alignment, but it also instructs persistent learning and possible self-modification that conflict with its stated read-only safety boundary.

Install only if you are comfortable with a skill that may keep local cross-session notes and whose documentation encourages future behavior changes. Treat learned_patterns.json as untrusted data, avoid storing sensitive prompts or preferences there, and do not allow automatic edits to SKILL.md without manual review.

Vulnerability Patterns
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • 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
  • 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)

T02 · Agent Memory Poisoning

Warning
Location
scripts/learner.py:5
Finding

Unvalidated Persistent Notes Can Poison Future Agent State

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/align.py:20
Finding

Attacker-Controlled Regular Expressions Permit Denial of Service

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
Findings (14)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description portrays a highly capable meta-skill with advanced autonomous capabilities layered on top of a teacher skill: self-verification, self-reflection, super-agent orchestration, and continual self-improvement. The supplied code does not implement those capabilities. Instead, it performs a specific and limited task: given a constitution expressed as patterns, it detects forbidden/required regex matches in text, applies simple replacements or insertions, iterates a few times, and returns an audit trail and verdict. This does align loosely with the phrase 'constitutional self-alignment,' but it does not support the much broader claims of enhanced meta-reasoning, orchestration, or self-evolving behavior. Therefore the declared description materially overstates and misrepresents the actual behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a broad, advanced meta-skill with autonomous alignment, orchestration, reflection, and ongoing self-improvement capabilities. The supplied code only implements a lightweight local logging mechanism that tracks total operations, failures, and optional pattern notes in a JSON file. While this could support a learning or meta-evolution loop, it does not itself perform the described high-level functions. Therefore the code's actual primary purpose is materially narrower and different from the declared purpose.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The file claims a read-only alignment workflow, yet elsewhere instructs the system to persist memory and evolve behavior across uses. This is dangerous because consumers may trust the documented safety boundary and invoke the skill in contexts that assume no state changes, while the skill actually retains data and mutates state over time.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The documented boundary says the skill only outputs revised text and audit traces, but the same document authorizes writing memory files and modifying SKILL.md. This contradiction creates a strong risk of hidden side effects, unauthorized persistence, and integrity issues for the skill itself because self-modification can silently change future behavior.

Content

No source excerpt is available for this finding.

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding

The skill documents behaviors that write persistent state (learned_patterns.json) and even suggests writing back to SKILL.md, but it declares no explicit tool scope or permission boundary. In an agent ecosystem, undeclared write capability increases the chance of unexpected file mutation, policy bypass, or unsafe execution because callers cannot accurately constrain what the skill may modify.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The description centers on constitutional self-alignment enhanced with verification and reflection, but the body claims integration into a full '感知→规划→执行→自验证→反思→记忆' super-agent loop and mandatory learner/meta-evolver injection. That is materially broader than a text-alignment skill and changes the operational scope from alignment to general agent orchestration and persistent adaptation.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The trigger patterns shown (投资, 收益) are broad everyday terms that can cause over-triggering of constitutional checks or automatic revisions in benign contexts. In an auto-editing workflow, overly broad patterning can suppress legitimate content, distort meaning, and create easy denial-of-service or manipulation avenues by inserting common trigger words.

Content

No source excerpt is available for this finding.

Ssd 3

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

Persistent logging of usage history, errors, preferences, and reflections in natural-language files creates a data retention and disclosure risk. Such logs often accumulate sensitive prompts, operational details, and user-specific information that can later be exfiltrated, reused out of context, or poisoned to influence future runs.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

A constitutional text-alignment skill does not need broad user-preference tracking or cross-use memory to perform its stated task. Retaining generalized preferences expands data collection beyond necessity, increasing privacy and prompt leakage risk and creating a larger attack surface for poisoned memory or unintended personalization.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill records and reuses a persistent output-language preference without clear opt-in or retention disclosure. Even seemingly harmless preferences become identifiable cross-session state and can leak user habits or be reused in contexts where the user did not intend persistence.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The entire markdown file is written in Chinese, including headings and operational descriptions, with no indication that language selection is configurable or intentionally limited to a Chinese-speaking context. This can violate language/locale policy where skills must not force a specific language without user opt-in or a documented justification.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

This Python file contains natural-language documentation and CLI-facing usage text entirely in Chinese, with no indication that language choice is optional or that the skill is intentionally region-specific. Under the policy, forcing a specific language without user opt-in is a natural-language locale violation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The top-level docstring is written as a Chinese-only description and gives no indication that language is configurable or intentionally limited to a region-specific context. Per the policy, forcing a specific language or locale without opt-in or justification is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code writes persisted data to learned_patterns.json, including caller-supplied notes, but provides no confirmation prompt, user-facing log, or warning that local state will be modified. Because this is a code file, persistent file writes that affect user data should have some visible disclosure unless clearly communicated elsewhere in the file.

Content

No source excerpt is available for this finding.