T09 · Insecure Skill Coding Practices
- Location
scripts/gtm.sh:227- Finding
Python Code Injection Through Unsafely Interpolated Version Metadata
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill has a coherent Google Tag Manager purpose, but it can make live/destructive GTM changes and contains a real local code-injection bug in version creation.
Install only if you are comfortable giving the skill GTM edit and publish authority. Use a least-privilege Google identity limited to the intended containers, avoid running create-version with untrusted name or notes values until the injection bug is fixed, review all JSON before upload, and require human confirmation before delete or publish operations.
scripts/gtm.sh:227Python Code Injection Through Unsafely Interpolated Version Metadata
references/recipes.md:95Generic Cross-Domain Tracking Recipe Contains Hard-Coded Third-Party Domains
Remote code is downloaded and executed. This bypasses code review and could introduce malicious code.
CONTAINER_PATH="accounts/$ACCOUNT/containers/$CONTAINER"
api_get() {
curl -sf -H "$(auth_header)" "$BASE/$1"
}
api_post() {
The skill documents shell-based and network-capable operations against the GTM API but does not declare any explicit tool scope or permissions boundary. In an agent environment, this increases the chance that the skill can be invoked with broader-than-expected execution privileges, reducing reviewability and making misuse of external API access harder to control.
The skill advertises destructive actions like delete-tag/delete-trigger/delete-variable and high-impact actions like create-version and publish without warning that they can alter or push live GTM configuration. Because GTM changes can affect analytics, ad conversion tracking, and production site behavior, a user or agent could unintentionally cause outages, data loss, or incorrect measurement in a live environment.
The file provides ready-to-use Google Tag Manager templates for conversion tracking, GA4 events, cross-domain tracking, and dataLayer variable extraction, but it does not include any warning or guidance about consent, lawful basis, PII handling, or privacy impact. In a skill specifically designed to help users deploy tracking, this omission can directly encourage unsafe or non-compliant analytics implementations, especially where user identifiers or cross-domain attribution are involved.
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
CONTAINER_PATH="accounts/$ACCOUNT/containers/$CONTAINER"
api_get() {
curl -sf -H "$(auth_header)" "$BASE/$1"
}
api_post() {
The script exposes state-changing GTM operations such as delete-tag, delete-trigger, delete-variable, create-version, and publish directly from command dispatch with no confirmation prompt, dry-run mode, or explicit safety flag. In an agent/tooling context, this increases the chance of accidental destructive or production-impacting changes from mistaken prompts, bad parameters, or automation errors.
No suspicious patterns detected.