T01 · Skill Instruction Hijacking
- Location
scripts/tf-plan-review.sh:305- Finding
Unconditional Promotional Content Injection into Agent-Facing Results
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This Terraform review skill is mostly purpose-aligned, but it overstates its read-only guarantees while automatically running Terraform initialization that can write local files, use credentials, and contact external services.
Install only if you are comfortable letting the agent run Terraform commands in the target repository. Use it in a trusted, preferably disposable workspace with reviewed provider/module sources and scoped cloud credentials. Do not rely on its write:false/read-only claims as meaning no local filesystem changes or dependency/network activity.
scripts/tf-plan-review.sh:305Unconditional Promotional Content Injection into Agent-Facing Results
scripts/tf-plan-review.sh:106Automatic Download and Execution of Project-Controlled Terraform Dependencies
The skill is presented as a read-only Terraform plan analyzer, but its documented behavior includes state inspection, validation, and automatic initialization. While these actions are not inherently malicious, they expand capability beyond passive plan parsing and can surprise operators, especially because terraform init may change the local workspace and contact external providers/backends.
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
rm -rf /tmp/tf-plan-review-* /tmp/tf-report.md
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
rm -rf /tmp/tf-plan-review-* /tmp/tf-report.md
Tool parameters are crafted to achieve unintended or unsafe behavior. Parameter abuse can bypass intended safety checks (e.g. shell=True, --force, dangerous glob patterns).
rm -rf /tmp/tf-plan-review-* /tmp/tf-report.md
The explicit 'STRICTLY READ-ONLY' claim is contradicted by code paths that invoke terraform init, creating a dangerous trust mismatch. Users and higher-level agents may grant this skill access under the assumption it has no side effects, when in fact it can modify the working directory and initiate external interactions.
The tool claims to be strictly read-only, but terraform init can write local files, download plugins/modules, and contact remote backends or registries. In hostile or sensitive environments, merely invoking analysis can trigger unintended network access, credential use, backend initialization, and workspace changes, violating the safety contract users rely on.
The validation path silently runs terraform init -backend=false, which still writes .terraform artifacts and may fetch providers/modules from the network. Because the skill is presented as a read-only analyzer, this hidden initialization can surprise users and create side effects in repositories or CI runners processing untrusted Terraform code.
The usage text reinforces that the tool never modifies state and is strictly read-only, but implementation performs initialization writes in normal execution paths. This discrepancy increases operational risk because humans and automation may execute the tool on untrusted repos expecting passive analysis, inadvertently allowing networked initialization and local filesystem changes.
The README makes a strong 'entirely read-only' claim, but terraform init is not read-only in the filesystem sense: it creates or updates .terraform/ metadata and may update lockfiles. This is primarily a documentation and trust-boundary issue rather than code execution abuse, but users relying on the claim could run the skill in sensitive repositories expecting zero local side effects.
The safety section overstates guarantees by saying the skill is 'Strictly read-only' and implying no disk-side effects, while also documenting terraform init, which writes local state metadata and possibly dependency/plugin artifacts. In a security-sensitive agent context, inaccurate safety claims are dangerous because they can cause operators to grant broader trust or run the skill in environments where even local mutation is unacceptable.
The manifest says the skill is entirely read-only and never writes, but the documented workflow includes Terraform initialization, which performs local filesystem writes. This mismatch can undermine trust boundaries and cause operators or automation to permit the skill under assumptions that are not actually true.
Claiming the skill is 'STRICTLY READ-ONLY' is inaccurate because terraform init writes .terraform metadata, provider plugins, and potentially lock files in the working directory. This can alter repositories, pollute CI workspaces, or trigger unintended backend/provider interactions despite the user's expectation of non-modifying behavior.
Declaring write: false and 'NEVER writes' while documenting terraform init creates a concrete permission-model mismatch. In practice, users or platforms may authorize the skill in read-only contexts where local modification is prohibited, leading to policy bypass or accidental changes to tracked files.
Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.
## Safety — CRITICAL RULES
1. **NEVER run `terraform apply`** — not even with `-auto-approve`, not even with `-target`, not even "just this one resource". NEVER.
2. **NEVER run `terraform destroy`** — not under any circumstances.
3. **NEVER run `terraform import`** — this modifies state.
4. **NEVER run `terraform taint` or `terraform untaint`** — these modify state.
The safety section says the skill never writes and should never store plan output, yet it still allows init, which writes locally. This inconsistency is dangerous because users may rely on the safety guarantees when deciding whether the skill can touch sensitive infrastructure repositories or controlled build environments.
The manifest describes a plan-risk review tool that analyzes Terraform plans before apply, but the script also implements state and validate subcommands. Those capabilities go beyond plan analysis and expand the skill's behavior into state inventory and configuration validation, which are not reflected in the stated description.
The documentation says the script does not extract sensitive attribute values, but it also allows use of terraform show, which can reveal detailed plan or state content if not carefully sanitized. In a skill focused on presenting analysis back to users, that creates a potential secret disclosure path through logs, stderr/stdout, or AI-generated summaries.
No suspicious patterns detected.