T01 · Skill Instruction Hijacking
- Location
anti_loop/core.py:249- Finding
Untrusted Agent Content Is Injected into Privileged System Messages
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This is a real anti-loop guard, but it promotes observed agent text into system messages and stores loop samples locally by default.
Review before installing in tool-enabled agents. Treat heal output as advisory data, not a trusted system prompt, unless you sanitize and preserve role separation. Avoid passing secrets in action strings, configure or isolate the Loop DNA storage path, periodically delete retained loop history, and install from a pinned, reviewed package in a virtual environment.
anti_loop/core.py:249Untrusted Agent Content Is Injected into Privileged System Messages
anti_loop/core.py:423Agent Actions Are Persisted in Plaintext with Inadequate File Protection
SKILL.md:89Installation Instructions Resolve Unpinned Remote Packages and Dependencies
Skill manipulates agent memory, state, or stored context. Memory corruption can alter personality, override safety rules, or cause unpredictable behavior.
}
def reset(self):
"""Reset state between sessions."""
self.iteration = 0
self.entropy = PredictiveEntropy(threshold=0.3)
self.novelty = NoveltyDetector()
Suspicious Unicode normalization or mixed-script content
The skill documents code that writes persistent data to ~/.anti_loop/loops.json but does not declare any tool scope, permissions, or storage behavior up front. In agent ecosystems, undeclared file-write capability weakens least-privilege controls and can lead to unexpected persistence of user or workflow data on the host.
The description states 'English release,' and the manifest also sets language: "en", but the document does not indicate that users can opt into other languages or that the English-only constraint is necessary for a region-specific or compliance reason. Under the stated policy, forcing a specific language without user opt-in is a natural-language policy violation.
The Loop DNA feature stores cross-session loop fingerprints in a local file and the documentation also mentions optional community upload, but the skill description does not present this as a clear privacy and persistence warning. Users may enable or integrate the skill without realizing it creates durable local state and may transmit derived behavioral data externally.
Suspicious Unicode normalization or mixed-script content
The docstring states 'Si même DNA revu → kill instant,' which promises immediate termination for previously seen loop fingerprints. In practice, is_known is computed at L597, but it is not included in the intervention decision at L599-L606 and only affects later recording at L611-L612, so the documented behavior contradicts the actual code.
The component persistently stores loop fingerprints and action samples under the user's home directory by default, creating cross-session retention of potentially sensitive prompts or model outputs. In an agent context, actions may contain secrets, proprietary data, or user content, so silent local persistence expands the data exposure surface beyond runtime memory.
The code writes loop history to disk without any user-facing disclosure in this file, which can surprise users and violate data-minimization expectations. Because the stored structure includes action samples and timestamps, it may retain sensitive operational context unnecessarily and create local forensic artifacts.
Suspicious Unicode normalization or mixed-script content
The module docstring and class descriptions are written primarily in French, including the target audience and operational philosophy, with no indication that users can choose another language or locale. This is a natural-language policy concern because the skill appears to impose a specific language presentation rather than offering user choice or documenting a justified locale restriction.
The top-level docstring describes the skill behavior entirely in French, which can impose a specific language/locale on users without offering a choice or documenting that the skill is region-specific. This matches the policy category for language or locale constraints lacking user opt-in.
The module docstring is written in French ('Avant même d'exécuter un plan...') while the rest of the file is otherwise generic example code. This imposes a specific language without user opt-in or a documented regional/compliance reason, which matches the language/locale policy violation criteria.
Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.
def looks_like_a_loop(plan: str) -> bool:
"""Detect: does this plan look like it could loop forever?"""
guard = AntiLoop()
issues = guard.pre_flight(plan)
return len(issues) > 0
Skill allows unbounded resource consumption (API calls, storage, compute). Without rate limits or quotas, a compromised or misbehaving agent can cause denial-of-service or cost overruns.
def looks_like_a_loop(plan: str) -> bool:
"""Detect: does this plan look like it could loop forever?"""
guard = AntiLoop()
issues = guard.pre_flight(plan)
return len(issues) > 0
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
The docstring uses French for the module description and usage notes, which can impose a language preference on users or maintainers without opt-in. The policy allows language constraints only when user choice is offered or the locale limitation is clearly justified, neither of which appears here.
The docstring and notes are partially written in French while also naming multiple English-language integrations, which imposes a language expectation without any opt-in or stated locale scope. Under the policy for natural-language issues, forcing or assuming a specific language without user choice can be a locale-policy violation.
These adapter methods ingest and normalize content from external API responses across multiple providers, but the code provides no user-facing disclosure in this file about processing third-party response data. For a safety-oriented skill, handling external/model data should be documented, especially since the skill's stated purpose is loop monitoring across harnesses.
Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.
"""Generic adapter: try common attributes."""
for attr in ['content', 'text', 'message', 'output', 'result']:
if hasattr(response, attr):
return str(getattr(response, attr))
return str(response)
The manifest describes a standalone anti-loop guard focused on detecting and healing agent loops. This file's documented capabilities also include wrappers for specific external APIs/harnesses and a main() entrypoint, which broadens behavior from a narrow guard library into integration/driver functionality.
A loop-prevention skill primarily needs to inspect actions/intents and optionally inject remediation. Providing dedicated adapters for Anthropic, OpenAI, LangChain, AutoGen, and Hermes introduces ecosystem-specific integration capability not inherently required by the anti-loop function itself.
This markdown file contains natural-language guidance in French ('Le cas le plus simple', 'Tu wrap ton agent avec le guard') while the rest of the file is otherwise English-oriented. The skill does not indicate that it is intentionally locale-specific or give users an opt-in choice for language, which can violate language/locale policy requirements.
The natural-language content in the docstring is written in French, with no indication that the skill supports user language choice or that French is required for a region-specific purpose. This can violate language/locale policy expectations when a skill implicitly enforces a language without opt-in.
Dependency has known vulnerabilities (CVEs). Using packages with unpatched security flaws exposes the environment to known exploits.
Detected: suspicious.dynamic_code_execution