Back to skill

Security audit

tw fashion social manager

Security checks for vulnerabilities and agentic risk

Overview

The skill is mostly a legitimate social-media analytics assistant, but it asks for broad long-lived Meta credentials and handles them in ways users should review carefully.

Install only if you are comfortable granting this skill access to your Meta and Threads business analytics. Use the narrowest possible read-only permissions, avoid administrator/full-control tokens where Meta allows it, keep .env out of version control with strict file permissions, rotate tokens regularly, and review the fetch script before running it.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • Insecure Skill Coding PracticesFinds exploitable flaws such as hardcoded secrets or command injection
  • 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
Findings (4)

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
README.md:22
Finding

Excessive Administrative and Asset Permissions for Read-Only Analytics

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
SKILL.md:23
Finding

Unpinned Third-Party Packages Installed into the Runtime Environment

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
README.md:136
Finding

OAuth Credentials Exposed Through Shell Command Arguments and URL Query Strings

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/fetch_insights.py:36
Finding

Access Tokens Transmitted as GET Query Parameters Throughout the Fetcher

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
Findings (38)

Tainted flow: 'url' from os.environ.get (line 192, credential/environment) → requests.get (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/fetch_insights.py (reported line 42)May include surrounding context.

python
'fields': 'access_token',
        'access_token': user_token,
    }
    resp = requests.get(url, params=params).json()
    token = resp.get('access_token')
    if token:
        print('✅ Page Access Token 取得成功')

Tainted flow: 'url' from os.environ.get (line 192, credential/environment) → requests.get (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/fetch_insights.py (reported line 62)May include surrounding context.

python
'fields': 'access_token',
        'access_token': user_token,
    }
    resp = requests.get(url, params=params).json()
    token = resp.get('access_token')
    if token:
        print('✅ Page Access Token 取得成功')

Tainted flow: 'url' from os.environ.get (line 192, credential/environment) → requests.get (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/fetch_insights.py (reported line 93)May include surrounding context.

python
'access_token': ACCESS_TOKEN,
        'limit': 20,
    }
    response = requests.get(url, params=params).json()
    if 'error' in response:
        print(f'⚠️ IG media 抓取失敗:{response["error"].get("message")}')
        return []

Tainted flow: 'url' from os.environ.get (line 192, credential/environment) → requests.get (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/fetch_insights.py (reported line 149)May include surrounding context.

python
'access_token': ACCESS_TOKEN,
        'limit': 20,
    }
    response = requests.get(url, params=params).json()
    if 'error' in response:
        print(f'⚠️ IG media 抓取失敗:{response["error"].get("message")}')
        return []

Tainted flow: 'url' from os.environ.get (line 192, credential/environment) → requests.get (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/fetch_insights.py (reported line 198)May include surrounding context.

python
'access_token': ACCESS_TOKEN,
        'limit': 20,
    }
    response = requests.get(url, params=params).json()
    if 'error' in response:
        print(f'⚠️ IG media 抓取失敗:{response["error"].get("message")}')
        return []

Tainted flow: 'ins_params' from os.environ.get (line 206, credential/environment) → requests.get (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/fetch_insights.py (reported line 107)May include surrounding context.

python
'metric': 'reach,plays,ig_reels_avg_watch_time,ig_reels_video_view_total_time,likes,comments,saved,shares',
            'access_token': ACCESS_TOKEN,
        }
        ins = requests.get(ins_url, params=ins_params).json()
        data = ins.get('data', [])

        reach      = extract_metric(data, 'reach')

Tainted flow: 'ins_params' from os.environ.get (line 206, credential/environment) → requests.get (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/fetch_insights.py (reported line 162)May include surrounding context.

python
'metric': 'reach,plays,ig_reels_avg_watch_time,ig_reels_video_view_total_time,likes,comments,saved,shares',
            'access_token': ACCESS_TOKEN,
        }
        ins = requests.get(ins_url, params=ins_params).json()
        data = ins.get('data', [])

        reach      = extract_metric(data, 'reach')

Tainted flow: 'ins_params' from os.environ.get (line 206, credential/environment) → requests.get (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/fetch_insights.py (reported line 211)May include surrounding context.

python
'metric': 'reach,plays,ig_reels_avg_watch_time,ig_reels_video_view_total_time,likes,comments,saved,shares',
            'access_token': ACCESS_TOKEN,
        }
        ins = requests.get(ins_url, params=ins_params).json()
        data = ins.get('data', [])

        reach      = extract_metric(data, 'reach')

Tainted flow: 'THREADS_CLIENT_SECRET' from os.environ.get (line 21, credential/environment) → requests.get (network output)

Critical
Category
Data Flow
Confidence
92% confidence
Finding

The script sends THREADS_CLIENT_SECRET as a URL query parameter in a GET request. Query parameters are more likely to be captured in proxy logs, web server logs, monitoring systems, browser history equivalents, or error traces, which increases exposure of a long-lived secret even though the destination is the legitimate Threads API.

Content

Scanner excerpt · scripts/fetch_insights.py (reported line 240)May include surrounding context.

python
"""把短效 Threads token 換成長效(60天)token"""
    if not THREADS_CLIENT_ID or not THREADS_CLIENT_SECRET:
        return token
    resp = requests.get(f'{THREADS_BASE_URL}/access_token', params={
        'grant_type': 'th_exchange_token',
        'client_secret': THREADS_CLIENT_SECRET,
        'access_token': token,

Tainted flow: 'token' from os.environ.get (line 272, credential/environment) → requests.get (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/fetch_insights.py (reported line 255)May include surrounding context.

python
def get_threads_user_id(token):
    """取得 Threads 數字 User ID"""
    resp = requests.get(f'{THREADS_BASE_URL}/me', params={
        'fields': 'id,username',
        'access_token': token,
    }).json()

Tainted flow: 'threads_user_id' from os.environ.get (line 273, credential/environment) → requests.get (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/fetch_insights.py (reported line 277)May include surrounding context.

python
if not threads_user_id:
        return []

    response = requests.get(f'{THREADS_BASE_URL}/{threads_user_id}/threads', params={
        'fields': 'id,text,timestamp,permalink',
        'access_token': token,
        'limit': 20,

Tainted flow: 'token' from os.environ.get (line 272, credential/environment) → requests.get (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/fetch_insights.py (reported line 288)May include surrounding context.

python
rows = []
    for post in response.get('data', []):
        ins = requests.get(f'{THREADS_BASE_URL}/{post["id"]}/insights', params={
            'metric': 'views,likes,replies,reposts,quotes',
            'access_token': token,
        }).json()

Credential Access

High
Category
Privilege Escalation
Confidence
82% confidence
Finding

The README instructs creation of a permanent system-user access token with broad permissions, including page and insights access. Long-lived privileged tokens significantly increase blast radius because compromise enables persistent API access without repeated user interaction.

Content

Scanner excerpt · README.md (reported line 34)May include surrounding context.

md
2. 選擇「**粉絲專頁**」→ 勾選你的 FB 粉專 → 權限選「**完整控制**」
3. 再次「**新增資產**」→ 選「**應用程式**」→ 勾選你在 developers.facebook.com 建立的 App → 權限選「**開發者**」

### 1-3. 產生永久 Access Token

1. 點進系統使用者 → **產生新的 token**
2. 選擇你的 App

Credential Access

High
Category
Privilege Escalation
Confidence
80% confidence
Finding

The documented permission set includes multiple read scopes and page-list access, which together create meaningful authenticated access to business social-media data. While this is likely needed for analytics, the README does not justify scope minimization or warn about the sensitivity of the resulting tokens.

Content

Scanner excerpt · README.md (reported line 46)May include surrounding context.

md
| `instagram_manage_insights` | 讀取 IG 貼文/Reels insights |
| `pages_read_engagement` | 讀取 FB 粉專貼文 insights |
| `pages_read_user_content` | 讀取粉專貼文內容 |
| `pages_show_list` | 取得 Page Access Token |
| `read_insights` | 讀取 FB 粉專層級 insights |
| `threads_business_basic` | 讀取 Threads 資料 |

Credential Access

High
Category
Privilege Escalation
Confidence
94% confidence
Finding

The .env section instructs users to store sensitive API credentials, including long-lived access tokens and a client secret, in a local plaintext file. If that file is exposed, an attacker could access social media account insights and possibly manage app-linked resources within the granted scopes.

Content

Scanner excerpt · README.md (reported line 157)May include surrounding context.

md
---

## 四、.env 設定總覽

在 openclaw 專案根目錄的 `.env` 加入以下變數:

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · README.md (reported line 179)May include surrounding context.

bash
cd /path/to/openclaw
source .env
python3 ~/.openclaw/workspace/skills/tw-fashion-social-manager/scripts/fetch_insights.py

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/fetch_insights.py (reported line 324)May include surrounding context.

python
```bash
cd /path/to/openclaw
source .env
python3 ~/.openclaw/workspace/skills/tw-fashion-social-manager/scripts/fetch_insights.py
```

Credential Access

High
Category
Privilege Escalation
Confidence
60% confidence
Finding

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

Content

Scanner excerpt · scripts/fetch_insights.py (reported line 327)May include surrounding context.

python
```bash
cd /path/to/openclaw
source .env
python3 ~/.openclaw/workspace/skills/tw-fashion-social-manager/scripts/fetch_insights.py
```

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The manifest presents the skill as a social-media strategy advisor, but the instructions also include operational data collection using local credentials, external API calls, and local file output. That mismatch is dangerous because users may invoke what appears to be a content-planning skill without realizing it can access account data and perform authenticated actions against external services.

Content

No source excerpt is available for this finding.

Vague Triggers

High
Category
Not specified by scanner
Confidence
97% confidence
Finding

The skill is configured to auto-trigger on a very broad range of social-media and advertising topics, which increases the chance it runs in contexts where users did not intend to authorize its stronger capabilities. In combination with hidden credential and network behaviors, broad invocation materially raises the likelihood of unintended secret access or external calls.

Content

No source excerpt is available for this finding.

Credential Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

The instruction explicitly accesses a local .env file to export META_ variables, which is credential access. In skill context, this is especially risky because the declared purpose is advisory marketing assistance, not secret management, so the credential use is both over-privileged and insufficiently disclosed.

Content

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

執行 fetch_insights.py

bash
# 只載入 META_ 變數,避免 .env 中含空格的行(如 apt packages)造成錯誤
export $(grep -E '^META_' /Users/shangweilin/projects/openclaw/.env | xargs) && \
cd /tmp && \
PYTHONPATH="/Users/shangweilin/Library/Python/3.9/lib/python/site-packages" \

Credential Access

High
Category
Privilege Escalation
Confidence
99% confidence
Finding

This command sequence continues the credential-loading flow and immediately uses the exported variables to run an external-data retrieval script. That coupling of secret extraction and execution increases the chance of account misuse, token leakage through process state/logging, and unauthorized access to Meta/Threads analytics.

Content

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

執行 fetch_insights.py

bash
# 只載入 META_ 變數,避免 .env 中含空格的行(如 apt packages)造成錯誤
export $(grep -E '^META_' /Users/shangweilin/projects/openclaw/.env | xargs) && \
cd /tmp && \
PYTHONPATH="/Users/shangweilin/Library/Python/3.9/lib/python/site-packages" \
python3 ~/.openclaw/workspace/skills/tw-fashion-social-manager/scripts/fetch_insights.py

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 · README.md (reported line 121)May include surrounding context.

md
IG_ACCOUNT_ID     = None


# --- 3. 取得 Page Access Token ---
# FB Page insights 必須用 Page Access Token,User Token 會回 200 但數據為空或報錯
def get_page_access_token(user_token):
    url = f'{BASE_URL}/{PAGE_ID}'

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/fetch_insights.py (reported line 34)May include surrounding context.

python
IG_ACCOUNT_ID     = None


# --- 3. 取得 Page Access Token ---
# FB Page insights 必須用 Page Access Token,User Token 會回 200 但數據為空或報錯
def get_page_access_token(user_token):
    url = f'{BASE_URL}/{PAGE_ID}'

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/fetch_insights.py (reported line 35)May include surrounding context.

python
IG_ACCOUNT_ID     = None


# --- 3. 取得 Page Access Token ---
# FB Page insights 必須用 Page Access Token,User Token 會回 200 但數據為空或報錯
def get_page_access_token(user_token):
    url = f'{BASE_URL}/{PAGE_ID}'