T09 · Insecure Skill Coding Practices
- Location
SKILL.md:219- Finding
Overbroad Git staging and destructive preview branch force-push
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent blog-publishing workflow, but it uses broad Git publishing commands and under-disclosed external image-generation behavior that users should review before installing.
Install only if you are comfortable letting the agent modify and push the dev-blog repository. Before use, replace git add -A with explicit file paths, review the staged diff, avoid force-push or use force-with-lease only with confirmation, and require a clean working tree. Treat image prompts and Telegram-transferred files as shared with third parties, avoid secrets or sensitive drafts in prompts, strip image metadata when needed, and use restricted provider API keys.
SKILL.md:219Overbroad Git staging and destructive preview branch force-push
scripts/generate-image.py:65Google API credential embedded in the request URL
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
req = urllib.request.Request(url, data=payload, headers={"Content-Type": "application/json"})
try:
with urllib.request.urlopen(req, timeout=180) as resp:
data = json.loads(resp.read())
except Exception as e:
print(f"ERROR: Google API call failed: {e}", file=sys.stderr)
Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.
req = urllib.request.Request(url, data=payload, headers={"Content-Type": "application/json"})
try:
with urllib.request.urlopen(req, timeout=180) as resp:
data = json.loads(resp.read())
except Exception as e:
print(f"ERROR: Google API call failed: {e}", file=sys.stderr)
설명은 블로그 발행 파이프라인과 이미지 프롬프트 제공/후처리를 말하지만, 실제 코드 조각은 블로그 발행이나 문서 변환, 배포 승인 흐름을 다루지 않는다. 대신 Google AI Studio 또는 OpenRouter에 직접 요청을 보내 AI 이미지를 생성하는 기능이 핵심이다. 특히 '사용자가 직접 생성한 이미지 후처리'와 달리 이 코드는 이미지를 생성한다는 점이 materially different primary purpose에 해당한다. 또한 외부 API 키를 읽고 원격 서비스에 요청하는 능력은 설명에 드러나지 않는다. 따라서 설명과 실제 동작은 불일치한다.
Using git push origin preview --force allows the skill to overwrite remote branch history unconditionally. In an automated workflow, this can destroy collaborators' work, erase audit history on the preview branch, and make recovery difficult if the agent operates on stale or incorrect state.
git checkout -B preview git add -A git commit -m "Add blog post: {title}" git push origin preview --force
확인 링크:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
import urllib.request
from pathlib import Path
# Load .env from skill directory
env_path = Path(__file__).parent.parent / ".env"
if env_path.exists():
with open(env_path) as f:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from pathlib import Path
# Load .env from skill directory
env_path = Path(__file__).parent.parent / ".env"
if env_path.exists():
with open(env_path) as f:
for line in f:
The skill describes operations that require filesystem, environment, git, and network access, but it does not declare an explicit tool scope such as permissions or allowed-tools. This increases the chance an agent will run with broader capabilities than intended, making unintended repository modification, credential exposure, or outbound actions harder to constrain and audit.
The skill instructs users to transmit generated images through Telegram without warning about third-party handling, retention, or the possibility that images may contain sensitive information or metadata. This can lead to privacy leakage, especially if screenshots, drafts, or embedded EXIF/location data are shared through an external messaging platform.
The manifest describes publishing blog content, converting Markdown, and handling user-generated images, but this script proactively loads secrets from a local .env file into the process environment. While networked image generation itself is documented, custom credential harvesting from local files is a broader capability than the manifest states and is not obviously required by the declared skill purpose.
The script transmits user-supplied prompts to external AI services without any explicit consent prompt, privacy notice, or warning that prompt contents leave the local environment. In a blog-publishing workflow, prompts may contain unpublished drafts, proprietary ideas, or personal data, so silent transmission increases confidentiality and compliance risk.
The instructions say to write a detailed English prompt for image generation, which imposes a language choice in the workflow. Because the file does not offer user opt-in or explain that English is required for a specific tool limitation, this is a natural-language locale policy issue.
The markdown states that text inside images should preferably be in English, which is a locale/language preference expressed as a rule. This can conflict with the policy against forcing a specific language unless users are given a choice or the constraint is clearly justified.
The script's primary natural-language documentation and several comments are written in Korean, while the tool itself does not offer any language selection or document a locale-specific constraint. This can violate language/locale policy when a skill implicitly forces a specific language without user opt-in.
The module usage comment states that Google AI Studio is the default provider, but the actual default is taken from IMAGE_PROVIDER with a fallback of "openrouter". This is an active contradiction between the script documentation and runtime behavior, which can mislead operators about which external service receives prompts by default.
No suspicious patterns detected.