Back to skill

Security audit

iran-finance-markets-monitor

Security checks for vulnerabilities and agentic risk

Overview

This skill is a disclosed Iranian market-data collector that uses public web sources and optional local snapshot files, with no evidence of hidden exfiltration, persistence, privilege escalation, or destructive behavior.

Install only if you are comfortable with a skill that fetches live market data from TGJU, CoinGecko, Alternative.me, and fallback RSS sources, and that may write dated JSON snapshots when run with an output directory. For stricter environments, pin dependency versions and run with --stdout-only or in an offline/test-only mode.

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
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Behavioral ASTexec() Call, eval() Call, Dynamic Import
Findings (17)

YARA rule 'agent_skill_mcp_tool_poisoning_metadata': MCP/tool metadata poisoning indicators in tool schemas or skill manifests [agent_skills]

High
Category
YARA Match
Confidence
80% confidence
Finding

YARA rule matched a hack tool or exploit indicator (offensive tools, reconnaissance, privilege escalation, or exploit frameworks).

Content

Scanner excerpt · scripts/iran_market_watcher.py (reported line 260)May include surrounding context.

python
old_18k", ("طلای 18 عیار", "طلای ۱۸ عیار"), 5, 0)

        if len(tables) > 33:
            mids = []
            for row in tables[33].find_all("tr"):
                cells = [cell.get_text(" ", strip=True) for cell in row.find_all(["td", "th"])]
                if len(cells) >= 4 and normalize_digits(cells[0]).strip() in {"نوبیتکس", "والکس", "بیت پین", "بیت‌پین"}:
                    buy, sell = parse_number(cells[1]), parse_number(cells[2])
                    if buy and sell and abs(buy - sell) / ((buy + sell) / 2) <= 0.005:
                        mids.append((buy + sell) / 2 / 10)
            if mids:
                spread = (max(mids) - min(mids)) / statistics.mean(mids)
                if spread <= 0.005:
                    set_validated_price(data, "crypto", "usdt_toman", round(statistics.mean(mids)), "TGJU table 33 exchange median")
                else:
                    data["errors"].append({"source": "TGJU table 33", "type":

Undeclared Tool Scope

Medium
Category
MCP Least Privilege
Confidence
91% confidence
Finding

The skill instructs the agent to install dependencies, run a watcher script, and perform live collection, which implies network, filesystem, and environment access, but it does not declare any explicit tool or permission scope. This creates an over-privileged execution model where the agent may invoke sensitive capabilities without a clear least-privilege boundary or user-visible authorization contract.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The activation text is extremely broad, covering generic verbs like monitor, collect, validate, compare, summarize, and report, plus a wide set of market terms. Over-broad triggering can cause the skill to activate for loosely related user requests and then perform networked data collection or code-execution steps unexpectedly, increasing the chance of unintended tool use and data exposure.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The workflow instructs the system to confirm the desired output language, but if unspecified, it defaults to Persian. This imposes a language choice on the user without opt-in, which is a locale/language policy concern under the stated rules.

Content

No source excerpt is available for this finding.

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

python
data = empty_snapshot(timestamp)
    try:
        params = {"ids": "bitcoin,ethereum,tether,solana,binancecoin,ripple", "vs_currencies": "usd", "include_24hr_change": "true", "include_24hr_vol": "true"}
        response = requests.get("https://api.coingecko.com/api/v3/simple/price", params=params, headers={"User-Agent": USER_AGENT}, timeout=15) if requests else None
        if response is None:
            raise RuntimeError("requests is required")
        response.raise_for_status()

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

python
data = empty_snapshot(timestamp)
    try:
        params = {"ids": "bitcoin,ethereum,tether,solana,binancecoin,ripple", "vs_currencies": "usd", "include_24hr_change": "true", "include_24hr_vol": "true"}
        response = requests.get("https://api.coingecko.com/api/v3/simple/price", params=params, headers={"User-Agent": USER_AGENT}, timeout=15) if requests else None
        if response is None:
            raise RuntimeError("requests is required")
        response.raise_for_status()

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

python
except Exception as exc:
        data["errors"].append({"source": "CoinGecko /global", "type": "network", "detail": str(exc)})
    try:
        response = requests.get("https://api.alternative.me/fng/", timeout=15) if requests else None
        if response is None:
            raise RuntimeError("requests is required")
        response.raise_for_status()

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

The dependency is specified with a minimum version only, so future installs may resolve to different releases over time. This weakens build reproducibility and can unintentionally pull in vulnerable or breaking versions from the package index.

Content

Scanner excerpt · requirements.txt (reported line 1)May include surrounding context.

text
jdatetime>=5.2
requests>=2.31
beautifulsoup4>=4.12
feedparser>=6.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
99% confidence
Finding

Using an unpinned requests dependency means the installed version is not deterministic and may vary across environments or over time. Because requests has a history of security advisories, version drift increases the chance of silently installing an affected release.

Content

Scanner excerpt · requirements.txt (reported line 2)May include surrounding context.

text
jdatetime>=5.2
requests>=2.31
beautifulsoup4>=4.12
feedparser>=6.0

Unverifiable Dependency: requests has 16 known advisory(ies) (CVE-2014-1830 (Exposure of Sensitive Information to an Unauthorized Actor in Requests); CVE-2024-47081 (Requests vulnerable to .netrc credentials leak via malicious URLs); CVE-2024-35195 (Requests `Session` object does not verify requests after making first request wi) +13 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
95% confidence
Finding

Because requests is not pinned, the manifest does not establish whether deployment will use a version affected by known CVEs. In a skill that likely performs outbound HTTP collection from market and feed sources, a vulnerable HTTP client could expose credentials, weaken TLS or redirect handling, or otherwise increase attack surface when contacting untrusted endpoints.

Content

No source excerpt is available for this finding.

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
97% confidence
Finding

An unpinned beautifulsoup4 dependency allows non-reproducible installs and increases supply-chain uncertainty. Even without a cited active advisory here, uncontrolled version resolution can introduce future vulnerable or incompatible releases.

Content

Scanner excerpt · requirements.txt (reported line 3)May include surrounding context.

text
jdatetime>=5.2
requests>=2.31
beautifulsoup4>=4.12
feedparser>=6.0

Unpinned Dependencies

Low
Category
Supply Chain
Confidence
98% confidence
Finding

The unpinned feedparser dependency permits version drift and makes it impossible to know which code will actually be installed. Since feedparser has historical advisories, this uncertainty is particularly relevant for security review.

Content

Scanner excerpt · requirements.txt (reported line 4)May include surrounding context.

text
jdatetime>=5.2
requests>=2.31
beautifulsoup4>=4.12
feedparser>=6.0

Unverifiable Dependency: feedparser has 10 known advisory(ies) (CVE-2011-1157 (feedparser Cross-site Scripting vulnerability); CVE-2009-5065 (feedparser Cross-site Scripting vulnerability); CVE-2011-1158 (feedparser Cross-site Scripting vulnerability) +7 more), but the manifest does not pin a version, so it is unknown whether the installed release is affected

Low
Category
Supply Chain
Confidence
94% confidence
Finding

Since feedparser is unpinned, there is no assurance that the installed version avoids known advisories. This matters more in this skill because it is designed to ingest external market and feed content, so parsing bugs in a feed library may be reachable through attacker-controlled or compromised upstream feeds.

Content

No source excerpt is available for this finding.

Context-Inappropriate Capability

Low
Category
Not specified by scanner
Confidence
75% confidence
Finding

Using an environment variable is not obviously required to monitor or summarize Iranian market data; it adds ambient configuration access unrelated to the core collection logic. The manifest describes data collection and reporting behavior, not environment inspection or credential/config loading.

Content

No source excerpt is available for this finding.

Description-Behavior Mismatch

Low
Category
Not specified by scanner
Confidence
84% confidence
Finding

The manifest scope is market monitoring and provenance-rich reporting for Iranian financial markets and listed sources such as TGJU, Nobitex, Wallex, Bitpin, and crypto prices. Falling back to Cointelegraph RSS introduces a separate news-aggregation behavior from a non-Iranian global media source that is not described in the manifest and is not necessary to collect the requested market snapshot.

Content

No source excerpt is available for this finding.

Dynamic attribute access via getattr()

Low
Category
Dangerous Code Execution
Confidence
50% confidence
Finding

Dynamic getattr() with a non-literal attribute name can access arbitrary object attributes, potentially bypassing access controls.

Content

Scanner excerpt · scripts/iran_market_watcher.py (reported line 314)May include surrounding context.

python
parser.add_argument("--stdout-only", action="store_true", help="Print JSON without writing a snapshot")
    parser.add_argument("--log-level", default="WARNING", choices=("DEBUG", "INFO", "WARNING", "ERROR"))
    args = parser.parse_args()
    logging.basicConfig(level=getattr(logging, args.log_level), format="%(levelname)s %(message)s")
    snapshot = fetch_market_data()
    if not args.stdout_only:
        output_dir = Path(args.output_dir)

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
90% confidence
Finding

The template content is entirely in Persian and explicitly states the report time is 'به وقت تهران', which imposes a specific language and locale. Under the policy rule, forcing a language or locale without user opt-in can be a natural-language policy violation unless clearly documented as region-specific.

Content

No source excerpt is available for this finding.