T08 · Insecure Dependencies
- Location
scripts/fetch_tweets.py:68- Finding
Unpinned Third-Party Dependency Receives a Reusable Twitter/X Session Token
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill is a coherent news-briefing automation, but it asks users to use a sensitive Twitter/X browser session token with an unpinned third-party package and even suggests storing the token in source code.
Review carefully before installing. Use a dedicated low-privilege Twitter/X account, pass the token only through a protected environment variable or secret manager, never edit it into source code, pin and verify Scweet and its dependencies, and require confirmation before the skill changes tracked bloggers or automation prompts.
scripts/fetch_tweets.py:68Unpinned Third-Party Dependency Receives a Reusable Twitter/X Session Token
scripts/fetch_tweets.py:62Instructions Permit Plaintext Twitter/X Session Token Storage in Source Code
The code chunk implements only one subset of the declared system: collecting recent tweets from configured accounts via Scweet. It does not generate summaries, assign star ratings, send briefings to Feishu/Lark, perform scheduling, or implement any fallback retrieval method such as WebSearch. While tweet fetching is consistent with part of the description, the actual behavior is materially narrower than the declared end-to-end automated briefing system, so this is a description/behavior mismatch.
The skill tells users to obtain and use a Twitter/X auth_token from browser cookies, which is a sensitive session credential equivalent to account access. Without strong warnings, secure storage guidance, and scope minimization, the token could be leaked through logs, prompts, scripts, or local files, enabling account compromise or unauthorized scraping activity.
The skill instructs the agent to write files, read local state, and use credentials/tokens, yet it declares no explicit tool scope or permission boundaries. In an automation context, this increases the chance of unintended file modification or secret exposure because the agent may be granted broader capabilities than users expect.
The conversational trigger for adding bloggers is broad enough that normal dialogue could unintentionally cause persistent configuration changes. In a skill that edits source/config files and automation prompts, accidental activation could silently alter tracked accounts, poison future briefings, or introduce unwanted data sources.
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.
> "Add Finance blogger example_handle"
The AI then automatically performs these three steps:
### Step 1: Update sources.yaml
The code reads a Twitter/X auth token from an environment variable and the module docstring instructs users to obtain it from browser cookies, which is a sensitive credential-handling operation. While the script documents how to supply the token, it does not include any warning about protecting the token, avoiding hardcoding it, or the security implications of extracting browser cookies.
This markdown file contains a natural-language instruction that prefers a specific language/locale: 'translate to Chinese if preferred.' Under the policy, language constraints should offer explicit user choice or clear justification; this line introduces a locale preference without explaining who prefers it or ensuring user opt-in.
No suspicious patterns detected.