T01 · Skill Instruction Hijacking
- Location
CONSTITUTION.md:12- Finding
Persistent Agent Identity and Policy Hijacking
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a real autonomous operations loop, but it can persist broad agent rules and automatically publish repository changes with misleading setup guidance.
Install only after reviewing the script and running it in a sandbox or private test repository. Do not paste the constitution into global agent policy or SOUL.md unless you intentionally want those rules to persist across agents. Avoid the raw main-branch curl install, do not rely on '--help' as harmless, and disable automatic git add/commit/push until you add path allowlists, secret checks, and human review.
CONSTITUTION.md:12Persistent Agent Identity and Policy Hijacking
CONSTITUTION.md:154Unreviewed Agent-Generated Content Is Promoted into Persistent Memory
SKILL.md:32Installation Retrieves Mutable Remote Python Code and the Documented Help Command Executes It
autonomy-loop.py:215Repository-Wide Automatic Git Staging and Push Can Publish Sensitive Data
autonomy-loop.py:110Confidence Consultation Gate Logs a Warning but Continues Execution
Skill modifies its own code, configuration, or behavior at runtime. Self-modification enables an agent to escalate privileges, disable safety constraints, or install persistent backdoors.
## 13. Operating Cadence
- **Daily (heartbeat):** work the task board, close finished tickets, log outcomes, write/update skill files.
- **Weekly:** review each active project's metric vs. its Section 11 target; kill or promote; commit knowledge-base updates.
- **Monthly:** re-run the Section 4 validation pass on core stack; revisit Section 10 with real numbers, not projections.
The README markets a '24/7' autonomous company loop that can track tasks, revenue, and self-improve, but it does not clearly warn users that autonomous operation may change business state or trigger consequential actions if the underlying script is run. Although the document mentions confidence-gating and escalation, those claims are not a substitute for explicit safety limitations, approval requirements, and scope boundaries, especially in an agent/automation context where users may overtrust promotional language.
The skill explicitly promotes a 24/7 autonomous loop that manages tasks, revenue, and self-improvement, but it does not present concrete warnings, guardrails, approval requirements, or limits on what systems/data the automation may affect. Even though the text mentions 'confidence-gated' behavior and escalation of low-confidence actions, that is a safety claim rather than an enforceable safeguard in the skill description, so users may deploy continuous autonomous operations without understanding operational, financial, or data-handling risks.
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
def free_ram_mb():
try:
out = subprocess.check_output(
["wmic", "OS", "Get", "FreePhysicalMemory", "/Value"],
stderr=subprocess.DEVNULL, text=True, timeout=20)
for ln in out.splitlines():
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
return 9999
def git(*args, cwd=REPO_LOCAL, timeout=60):
return subprocess.run(["git"] + list(args), cwd=cwd, timeout=timeout,
capture_output=True, text=True)
def pull_source_of_truth():
The function logs that 50-74% confidence actions should be deferred or consulted, but it only blocks execution below the lower threshold and still performs work for mid-confidence tasks. In an autonomous agent that writes files and later commits/pushes changes, this mismatch weakens a stated safety control and can lead to unintended actions being carried out under uncertainty.
The script autonomously modifies local knowledge-base files as part of normal operation without any interactive approval, dry-run mode, or scoped authorization. In this skill's context, that is more dangerous because the loop is explicitly designed for recurring autonomous execution, so accidental or manipulated task selection can repeatedly alter repository contents.
The script automatically commits and pushes any detected changes to GitHub with no confirmation or transmission-time warning. In an autonomous loop that first pulls remote content and selects tasks from repository-controlled files, this creates a clear path for unreviewed changes to be propagated externally, amplifying mistakes or malicious task-board manipulation.
This helper executes an arbitrary Python file from the target product directory (python <file> self-test) as part of verification. In a CI or analyst environment, an untrusted repository can place malicious code in any discovered .py file and gain code execution during the verification step, making this a real command-execution risk even though shell=True is not used.
def has_self_test(fp):
r = subprocess.run([sys.executable, fp, "self-test"], capture_output=True, text=True, timeout=30)
return r.returncode == 0 and "PASS" in r.stdout
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
all_ok &= axis(False, "frontmatter (no SKILL.md)")
all_ok &= axis(False, "docs (no SKILL.md)")
# 3 compiles
comp_ok = all(subprocess.run([sys.executable, "-m", "py_compile", fp],
capture_output=True).returncode == 0 for fp in files)
all_ok &= axis(comp_ok, "compiles (py_compile all .py)")
# 4 self-test (any of 3 valid forms)
This code executes any test_*.py or *_test.py file found in the target folder. Since the repository under verification is untrusted, an attacker can include a malicious test file that runs arbitrary code during CI verification, potentially exfiltrating secrets or modifying the runner environment.
tests = [os.path.join(folder, f) for f in os.listdir(folder)
if (f.startswith("test_") or f.endswith("_test.py")) and f.endswith(".py")]
if tests:
st_ok = all(subprocess.run([sys.executable, t], capture_output=True, text=True,
timeout=30).returncode == 0 for t in tests)
st_note = f"{len(tests)} test_*.py"
elif re.search(r"(?im)^test\s*:", skill_txt):
subprocess module calls execute external commands. Without careful input validation, this enables command injection.
# 7 deploy-ready
ci = os.path.join(os.path.dirname(os.path.abspath(__file__)), "ci_check.py")
if os.path.isfile(ci) and os.path.isfile(skill):
r = subprocess.run([sys.executable, ci], cwd=folder, capture_output=True, text=True)
all_ok &= axis(r.returncode == 0, "deploy-ready (ci/ci_check.py PASS)")
else:
all_ok &= axis(True, "deploy-ready (skipped)")