Back to skill

Security audit

Iran Intelligence Radar (Persian X Monitor)

Security checks for vulnerabilities and agentic risk

Overview

This skill is mostly transparent about Iran-related X monitoring, billing, and alerts, but it needs Review because failed searches can silently produce realistic mock intelligence that may trigger charges and external alerts.

Review this before installing in any operational setting. Disable or strictly configure Telegram/channel alerts, confirm exactly what is sent to SkillPay, translation providers, and alert destinations, and do not treat reports as live intelligence until the mock fallback is removed or clearly marked and blocked from billing, persistence, and alerts. Billing should also use provider-side idempotency or transactional state before real users are charged.

Vulnerability Patterns
  • 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
  • Remote Payload Retrieval and ExecutionFetches external code whose behavior can change after review
Findings (3)

T09 · Insecure Skill Coding Practices

Error
Location
skills/persian_x_radar/search.py:119
Finding

Fabricated fallback data can trigger operational intelligence alerts

Content
View full analysis
List[RawTweet]: query = build_x_query(req) tool_order = [ ("x_keyword_search", x_keyword_search), ("x_semantic_search", x_semantic_search), ("web_search", web_search), ] for _, tool_fn in tool_order: if tool_fn is None: continue try: rows = tool_fn(query=query) if rows: return _normalize_tool_rows(rows) except Exception: continue now = datetime.now(timezone.utc) # Deterministic local mock data to keep the skill runnable without external tools. mock = [ RawTweet( id="m1", author="@analyst_fa", timestamp=now - timedelta(hours=2), text="بحث درباره حمله و موشک در حال افزایش است", likes=420, retweets=130, replies=12, url="https://x.com/analyst_fa/status/1", ), RawTweet( id="m2", author="@iran_watch", timestamp=now - timedelta(hours=3), text="گزارش هایی از اعتراض در چند شهر منتشر شده است", likes=170, retweets=42, replies=9, url="https://x.com/iran_watch/status/2", ), ] return mock ``` The returned rows are subsequently processed and dispatched as ordinary intelligence: ```python tweets = search_with_fallback( req=req, x_keyword_search=self.tools.x_keyword_sea ...[truncated 2397 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Warning
Location
skills/persian_x_radar/agent.py:100
Finding

Race condition can cause duplicate billing and cooldown-state corruption

Content
View full analysis
Dict[str, Any]: billing_cfg = self.config.get("billing", {}) cooldown_minutes = int(billing_cfg.get("charge_cooldown_minutes", 15)) skill_id = str(billing_cfg.get("skill_id", "")) price = float(billing_cfg.get("price_per_call", 0.0)) if has_recent_charge(user_id, cooldown_minutes): self.logger.info("charge skipped (recent payment) user_id=%s price=$%.2f", user_id, price) return {"allowed": True, "billing_state": "recent_payment", "price": price} charge_result = charge_user(user_id=user_id) if charge_result.get("success"): record_charge(user_id) self.logger.info( "User charged $%.2f for Persian X Radar scan user_id=%s skill_id=%s", price, user_id, skill_id, ) ``` The cache uses an unsynchronized read-modify-write sequence: ```python def has_recent_charge(user_id: str, cooldown_minutes: int) -> bool: last_ts = get_last_charge_timestamp(user_id) if last_ts is None: return False now = datetime.now(timezone.utc) if last_ts.tzinfo is None: last_ts = last_ts.replace(tzinfo=timezone.utc) return now - last_ts <= timedelta(minutes=cooldown_minutes) def record_charge(user_id: str) -> None: cache = _read_cache() cache[user_id] = datetime.now(timezone.utc).isoformat() _write_cache(cache) ``` ```python def _write_cache(cache: Dict[str, str]) -> None: with CACHE_FILE.open("w", encoding="utf-8") as f: json.dump(cache, f, ensure_ascii=False, indent=2) ``` ### Technical Analysis Cooldown verification, remote charging, and charge recording are ...[truncated 1808 chars]
Remediation
View remediation

T08 · Insecure Dependencies

Note
Location
requirements.txt:1
Finding

Unpinned and unnecessary dependencies create supply-chain exposure

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
Findings (33)

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 · .gitignore (reported line 4)May include surrounding context.

text
__pycache__/
*.pyc
logs/
.env

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

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

md
# System Prompt: Persian X Radar OSINT Intelligence Radar

You are an OSINT intelligence radar focused on high-signal Persian content from X (Twitter) related to Iran.

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

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

md
# System Prompt: Persian X Radar OSINT Intelligence Radar

You are an OSINT intelligence radar focused on high-signal Persian content from X (Twitter) related to Iran.

Hidden Instructions

High
Category
Prompt Injection
Confidence
60% confidence
Finding

Hidden instructions were detected in comments or invisible text. These could contain malicious directives. Manual review is recommended.

Content

Scanner excerpt · prompts/system_prompt.md (reported line 1)May include surrounding context.

md
# System Prompt: Persian X Radar OSINT Intelligence Radar

You are an OSINT intelligence radar focused on high-signal Persian content from X (Twitter) related to Iran.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README states that the skill sends operational and Telegram alerts but does not clearly warn users that analyzed content may be transmitted to an external messaging service. In an OSINT/intelligence context, this can expose sensitive query results, monitored subjects, or user activity to third-party systems without informed consent.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The skill description says content is translated to English, Arabic, and Chinese as a fixed behavior, without indicating that users can choose languages or opt out. Forced translation can create unnecessary disclosure of monitored content into additional representations and may violate user expectations or policy constraints in intelligence workflows.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The skill advertises automatic Telegram alert dispatch and channel hooks, which implies external transmission of collected content or derived intelligence to a third-party service. Because the description does not clearly state what data is sent, when it is sent, and whether this requires explicit user opt-in, users may unknowingly exfiltrate monitored content, metadata, or sensitive analysis outputs outside the local agent environment.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The prompt instructs the skill to always use lang:fa, which imposes a specific language scope by default. Elsewhere it also requires translation/output in fixed languages, but does not offer the user a language or locale choice or document this as an opt-in regional constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The instructions require translation to English, Arabic, and Chinese, which enforces specific language outputs regardless of user preference. This is a natural-language policy concern because no opt-in, selection mechanism, or documented justification is provided for these locale choices.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The markdown requires the report to always include English and Chinese summaries, imposing fixed locale behavior. Because the skill does not offer language selection or explain why these summaries are mandatory, this violates the language/locale policy guidance.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
94% confidence
Finding

The first line contains a suspicious hidden Unicode character, most likely a UTF-8 BOM before pyyaml. Hidden or non-printing characters in dependency manifests can cause parsing inconsistencies across tools, make reviews less reliable, and in some cases be abused to disguise dependency names or alter interpretation.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
85% confidence
Finding

The core code behavior appears to be scanning Persian-language X/Twitter content, translating it, ranking results, and generating alerts/reports. In addition to that monitoring functionality, the skill enforces per-user charging, checks balances, and constructs external payment links, which is a distinct monetization capability not implied by the scan/reporting logic itself.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Medium
Category
Not specified by scanner
Confidence
81% confidence
Finding

The file presents itself through names and command parsing as a 'Persian X Radar' scanner/report generator, but it also sends Telegram alerts as a side effect of running a scan. Without a manifest or documentation declaring external messaging/notification behavior, this outbound communication capability is broader than the evident analytical purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The bilingual summary function always returns English and Chinese text, and the main execution path prints a Chinese summary when present. This imposes a specific locale/language choice in user-facing output without offering a language preference or documenting why Chinese is required.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
82% confidence
Finding

The natural-language alert text explicitly states it is monitoring 'Persian X', and the code is structured around Persian-language content via text_fa. There is no indication of user opt-in or configurable locale/language selection, which can violate language or locale policy requirements.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code sends a composed alert message to external channels via send_alert_tool, including author and link fields from each row. The file contains no confirmation prompt, logging/print statement, or comment/docstring warning that data will be transmitted to alert channels.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The charge_user function sends user_id, skill_id, and amount to an external billing endpoint via _request_json. In this file there is no confirmation prompt, print/log disclosure, or explanatory comment/docstring warning that calling this function initiates a remote billing action affecting user data and charges.

Content

No source excerpt is available for this finding.

Ae4

Medium
Category
analysis-evasion
Confidence
80% confidence
Finding

Suspicious Unicode normalization or mixed-script content

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This manifest describes the skill in broad terms as an 'OSINT Intelligence Radar for Persian-language X content related to Iran' that detects trends, translates, and sends alerts, but it does not define clear trigger phrases, invocation boundaries, or exclusion conditions. In a manifest file, this kind of open-ended description can make it unclear when the skill should activate versus when it should not.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The translation configuration hard-codes destination languages to English, Arabic, and Chinese. This is a natural-language policy concern because the skill imposes specific output locales without indicating user choice, opt-in, or a documented justification for the forced language set.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
95% confidence
Finding

The file generates output with a mandatory "AI Summary (Chinese)" section and returns a chinese_summary field, but there is no indication of user opt-in, locale selection, or region-specific justification. This creates a natural-language locale policy issue because the skill imposes a specific language in its output rather than offering a choice.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The search query is forced to lang:fa, which imposes a specific language/locale constraint in code. The file does not show any user choice, opt-in mechanism, or documented region-specific justification for limiting results to Persian content.

Content

No source excerpt is available for this finding.

External Transmission

Medium
Category
Data Exfiltration
Confidence
90% confidence
Finding

The function transmits monitored content, including escalation details and example links, to an external third-party service (Telegram) based solely on configuration. In this skill context, the data appears operationally sensitive, and sending it to Telegram can expose intelligence, metadata, or internal monitoring results to an external platform if enabled unintentionally or used in an environment with stricter handling requirements.

Content

Scanner excerpt · skills/persian_x_radar/telegram_alert.py (reported line 61)May include surrounding context.

python
logger.warning("telegram alert skipped due to missing bot_token/chat_id")
        return False

    url = f"https://api.telegram.org/bot{bot_token}/sendMessage"
    payload = {
        "chat_id": chat_id,
        "text": _build_message(escalation, trending, rows),

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code performs an outbound HTTP request to Telegram and includes generated alert text plus example links derived from rows, which may transmit user or system-derived monitoring data off-platform. While failures and success are logged, there is no user-facing warning, confirmation, or explanatory comment/docstring disclosing that this skill sends collected data to a third-party service.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

This code passes the input text to an injected translation tool, which could perform a network/API call and transmit user-provided content externally. There is no confirmation prompt, logging, comment, or docstring in this file warning that text may be sent to another service.

Content

No source excerpt is available for this finding.