Back to skill

Security audit

AI Instagram Auto Poster

Security checks for vulnerabilities and agentic risk

Overview

This skill does what it says: it generates promotional images, uploads them to Cloudinary, and posts them to Instagram using user-provided credentials.

Install only if you intend the agent to publish to an Instagram Business account and upload images to Cloudinary. Use a test account or least-privilege Meta token first, review captions and images before running the post command, and avoid giving it internal/private URLs for scraping.

Vulnerability Patterns
  • Skill Instruction HijackingAlters the agent's session goals or safety constraints when the skill loads
  • Agent Memory PoisoningWrites attacker-controlled rules into memory that affect later sessions
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (9)

Tainted flow: 'req1' from os.environ.get (line 38, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/post_to_instagram.py (reported line 46)May include surrounding context.

python
)

    try:
        with urllib.request.urlopen(req1, timeout=30) as r:
            result1 = json.loads(r.read().decode())
            creation_id = result1.get("id")
            if not creation_id:

Tainted flow: 'req2' from os.environ.get (line 59, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/post_to_instagram.py (reported line 67)May include surrounding context.

python
)

    try:
        with urllib.request.urlopen(req2, timeout=30) as r:
            result2 = json.loads(r.read().decode())
            post_id = result2.get("id")
            if post_id:

Tainted flow: 'req' from os.environ.get (line 62, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/upload_cloudinary.py (reported line 64)May include surrounding context.

python
req = urllib.request.Request(url, data=data)
    try:
        with urllib.request.urlopen(req, timeout=30) as r:
            result = json.loads(r.read().decode())
            secure_url = result.get("secure_url")
            if secure_url:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 6)May include surrounding context.

md
Two-step: (1) create media container, (2) publish.

Required env vars:
  IG_ACCESS_TOKEN    - Page Access Token from Meta Graph API Explorer
  IG_BUSINESS_ACCOUNT_ID - Numeric IG Business Account ID

Usage:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 95)May include surrounding context.

md
Two-step: (1) create media container, (2) publish.

Required env vars:
  IG_ACCESS_TOKEN    - Page Access Token from Meta Graph API Explorer
  IG_BUSINESS_ACCOUNT_ID - Numeric IG Business Account ID

Usage:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · SKILL.md (reported line 172)May include surrounding context.

md
Two-step: (1) create media container, (2) publish.

Required env vars:
  IG_ACCESS_TOKEN    - Page Access Token from Meta Graph API Explorer
  IG_BUSINESS_ACCOUNT_ID - Numeric IG Business Account ID

Usage:

Credential Access

High
Category
Privilege Escalation
Confidence
70% confidence
Finding

Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.

Content

Scanner excerpt · scripts/post_to_instagram.py (reported line 6)May include surrounding context.

python
Two-step: (1) create media container, (2) publish.

Required env vars:
  IG_ACCESS_TOKEN    - Page Access Token from Meta Graph API Explorer
  IG_BUSINESS_ACCOUNT_ID - Numeric IG Business Account ID

Usage:

External Transmission

Medium
Category
Data Exfiltration
Confidence
60% confidence
Finding

Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.

Content

Scanner excerpt · scripts/upload_cloudinary.py (reported line 55)May include surrounding context.

python
b64 = base64.b64encode(img_data).decode("ascii")

    url = f"https://api.cloudinary.com/v1_1/{cloud_name}/image/upload"
    data = urllib.parse.urlencode({
        "file": f"data:image/png;base64,{b64}",
        "folder": folder,

Missing User Warnings

Low
Category
Not specified by scanner
Confidence
85% confidence
Finding

This code performs an HTTP(S) request to a user-supplied site and reads the full response body, then extracts email and phone information from it. While the script's purpose is scraping, there is no runtime disclosure or confirmation near the network operation itself that it will contact external hosts and process retrieved content.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.