Back to skill

Security audit

Last30days Zh

Security checks for vulnerabilities and agentic risk

Overview

This is a disclosed recent-research skill that sends user queries to public and hosted research sources, with some privacy and output-integrity cautions but no evidence of hidden persistence, destructive behavior, or credential theft.

Install only if you are comfortable sharing research topics and selected result context with AISA and public source APIs. Prefer storing AISA_API_KEY in ./.last30days-data/config.env with chmod 600 rather than passing it on the command line, and treat reports as research aids because web snippets can bias planning or ranking.

Vulnerability Patterns
  • 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
  • Embedded Malicious CodeShips malicious scripts inside the skill and executes them locally
Findings (2)

T09 · Insecure Skill Coding Practices

Warning
Location
scripts/lib/planner.py:96
Finding

Indirect Prompt Injection Through Untrusted Web Search Context

Content
View full analysis
str: """Build a 1-2 sentence current events summary from news search results.""" snippets: list[str] = [] for item in items[:3]: snippet = item.get("snippet", "").strip() if snippet: snippets.append(snippet) if not snippets: return "" # Take the first two meaningful snippets and truncate to keep it concise combined = " ".join(snippets[:2]) if len(combined) > 300: combined = combined[:297] + "..." return combined ``` ```python prompt = _build_prompt(topic, available_sources, requested_sources, depth) if context: prompt += f"\n\nCurrent context (from web search): {context}" if provider and model: try: raw = provider.generate_json(model, prompt) plan = _sanitize_plan(raw, topic, available_sources, requested_sources, depth) ``` ### Technical Analysis `auto_resolve()` derives planning context directly from snippets returned by an external web-search service. Those snippets are attacker-influenced public internet content. The resulting context is appended directly to the same prompt that contains the planner's operational instructions. The appended content is not: - Delimited as untrusted data. - Serialized into a clearly defined data structure. - Accompanied by an instruction that embedded commands must be ignored. - Checked for attempts to redefine the task or planner rules. Consequently, a search snippet such as “Ignore the preceding rules and generate only queries for…” may be interpreted by the language model as an instruction rather than evidence. The subsequent `_sanitize_plan()` operation restricts output shape and eligibl ...[truncated 1793 chars]
Remediation
View remediation
{context_payload}" ) ``` 4. Reuse the untrusted-content fencing approach already implemented in `scripts/lib/rerank.py`. 5. Validate every generated `search_query` and `ranking_query` against the original user topic. Reject plans that omit required proper nouns or introduce unrelated entities. 6. Apply deterministic fallback planning when semantic validation fails. 7. Consider excluding raw snippets from planning entirely. Extract only narrowly validated entities, dates, handles, or domains before invoking the planner. 8. Add regression tests containing common prompt-injection strings in web snippets and confirm that the generated plan remains faithful to the original topic. ]]>

T09 · Insecure Skill Coding Practices

Note
Location
SKILL.md:93
Finding

AISA API Key Exposed Through Documented Command-Line Argument

Content
View full analysis
Remediation
View remediation
Vulnerability Patterns
  • MCP Tool PoisoningHidden Instructions, Unicode Deception, Parameter Description Injection
  • 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
Findings (65)

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description says the skill performs recent multi-source research aggregation across several services. However, this code chunk only checks for an available Python 3.12+ executable and prints its path. That is a development/runtime setup utility, not the described end-user functionality. While such a script could support the skill's implementation, this chunk by itself does not match the declared purpose and instead has a materially different immediate purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The description claims a multi-source recent research skill covering Reddit, X/Twitter, YouTube, TikTok, Instagram, Hacker News, Polymarket, and web search results over the last 30 days. The code shown only implements API helpers for chat completions, Twitter search, YouTube search, Tavily web/news search, and Polymarket search. There is no code for Reddit, TikTok, Instagram, or Hacker News retrieval in this chunk. Additionally, the code includes a chat completion function, which is not mentioned in the declared description. Recency filtering is inconsistent: Twitter appends a since: date to the query, Tavily optionally filters by date range, YouTube post-filters by from_date only if enough recent items exist, and Polymarket has no 30-day filtering logic. So the code behavior materially differs from the declared purpose both by omitting several claimed sources and by adding an undeclared chat capability.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description says this skill aggregates recent results across several named platforms over the last 30 days. The provided code chunk does not perform any source access, querying, web search, API calls, or date filtering. Instead, it operates on already-provided candidate objects, clustering them by similarity/entities, choosing representative items, and annotating uncertainty. While clustering could be a supporting component inside a larger aggregation pipeline, this specific code chunk's behavior is materially different from the declared primary purpose, so this is a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says this skill aggregates recent content from several external platforms over the last 30 days. The provided code does not access any external services, perform searches, retrieve platform data, or filter by recency. Instead, it is a utility module for comparing text similarity and removing near-duplicate items within a set of source items. This is a materially different primary purpose from the declared behavior, so it is a clear mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description says this skill aggregates recent results from many platforms over the last 30 days. The supplied code does not perform aggregation, recency filtering, external access, or multi-source research. Instead, it is a helper module that parses provided Reddit and X items to extract frequent @handles, #hashtags, and subreddit names for follow-on searches. This is a materially different primary purpose and a narrower capability set than declared.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
94% confidence
Finding

The description says the skill aggregates recent multi-source research results across specific platforms. This code chunk does not perform that primary function; it only loads configuration and determines whether various sources/backends are available. There is a material mismatch because key declared capabilities are absent in the supplied code, especially actual querying/aggregation and web search. Additionally, Polymarket is declared as a source, but this code explicitly marks it unavailable. The code also includes extra source handling for Threads, Pinterest, and Xiaohongshu that are not mentioned in the description. While config management is a supporting detail, the gap between declared primary behavior and actual code behavior is substantial enough to count as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description says the skill aggregates results across many named platforms plus web search for the last 30 days. The supplied code chunk only performs web search using AIsa/Tavily and includes helper functions for date normalization, date-range checks, and domain extraction. There is no evidence in this chunk of connectors, retrieval, or aggregation logic for Reddit, X/Twitter, YouTube, TikTok, Instagram, Hacker News, or Polymarket. This is a material mismatch in primary purpose and implemented capabilities, not just an omitted implementation detail.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The description says the skill aggregates last-30-days research across specific sources: Reddit, X/Twitter, YouTube, TikTok, Instagram, Hacker News, Polymarket, and web search. This code chunk instead is a dedicated Pinterest module. It searches for Pinterest content via site:pinterest.com through AISA/Tavily, parses Pinterest-style items, and returns Pinterest results with saves/comments metadata. Pinterest is an undeclared source, and the code does not reflect the declared set of platforms for this chunk. While date filtering and recent-search behavior are consistent with a last-30-days research tool, the platform/resource behavior materially differs from the declared description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The core behavior substantially matches the declared purpose: the pipeline gathers recent data across the listed major sources and uses a 30-day lookback by default. However, the description is not fully accurate because the code also supports additional sources not mentioned in the declaration—Xiaohongshu, Threads, and Pinterest—when configured or requested. These are material extra retrieval capabilities, not merely implementation details. Additionally, the code does more than straightforward aggregation: it generates/plans subqueries, runs supplemental entity-based searches, retries thin sources, reranks results, scores them, clusters candidates, and produces a structured report. That analytical orchestration is adjacent to the declared purpose, but the undeclared source access is enough to count as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code chunk is narrowly focused on Polymarket. It sends GET requests to gamma-api.polymarket.com, retrieves prediction market events, expands queries, filters and ranks results, and formats Polymarket-specific output. There is no code here for querying or combining results from Reddit, X/Twitter, YouTube, TikTok, Instagram, Hacker News, or generic web search. Also, while the function accepts from_date and to_date parameters and surfaces event dates, it does not actually filter results to the declared recent 30-day window. Therefore the supplied code does not accurately represent the broad multi-source recent-research description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
92% confidence
Finding

The declared description says this skill aggregates recent results across several social/web sources over the last 30 days. The supplied code chunk does not implement source retrieval, search, recency filtering, or aggregation. Instead, it defines a provider catalog and runtime client for a reasoning/model backend (AISA or local), resolves planner/rerank models, determines X backend configuration, and parses JSON/text/SSE model responses. While this could be supporting infrastructure for a larger research skill, this specific code chunk's actual behavior is materially different from the declared end-user purpose, so it should be flagged as a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description says this skill aggregates recent results across multiple named sources for the last 30 days. The provided code does not fetch, aggregate, or search any external sources. Instead, it evaluates already-produced research results, checks whether certain sources were active or errored, calculates a percentage score from five core sources, and builds a user-facing nudge text. It also only references five sources and omits declared sources such as TikTok, Instagram, and web search. This is a materially different primary purpose, so the description does not accurately represent the code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The description claims a broad multi-source research capability spanning eight named sources plus web search for the last 30 days. The supplied code chunk is narrowly scoped to Reddit, as stated in its own module docstring and evidenced by functions like search_reddit, fetch_post_comments, enrich_with_comments, subreddit discovery, and Reddit-specific normalization/parsing. There is no code for the other declared platforms or any cross-source aggregation logic. The month/week timeframes in config are consistent with recent Reddit retrieval, but that is only a subset of the declared functionality. This is therefore a clear description-to-behavior mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a broad multi-source research aggregator covering eight platforms plus web search over the last 30 days. The supplied code chunk is narrowly scoped to Reddit enrichment. It extracts Reddit paths, fetches Reddit thread JSON, parses submission and comments, sorts top comments, derives comment insights, and updates a Reddit item's engagement/date fields. There is no evidence of cross-source aggregation, recency-window filtering, general search, or handling of X/Twitter, YouTube, TikTok, Instagram, Hacker News, Polymarket, or web results. This is a material description-behavior mismatch, not merely an implementation detail.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared purpose describes a multi-source last-30-days research aggregator spanning eight named platforms plus web search. The supplied code chunk is narrowly scoped to Reddit only. It searches Reddit public JSON endpoints globally and by subreddit, filters to month-range results, deduplicates, sorts by engagement, and can optionally enrich top posts with comments. While this aligns with one component of the declared system (Reddit, recent 30-day search), it does not implement the broader stated capability of aggregating across the other listed sources. Therefore the description does not accurately represent what this code chunk actually does.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description says this skill aggregates recent results across several external platforms within the last 30 days. The supplied code does not perform any fetching, aggregation, API access, date filtering, or source-specific handling beyond generic hashtag support in text scoring. Instead, it is a local relevance-ranking helper that scores how well a piece of text matches a query. This is a materially different primary purpose, so the description does not accurately represent the code chunk.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description says the skill aggregates recent results across multiple external sources for the last 30 days. However, this code chunk is a presentation/rendering module: it takes a precomputed report object and generates textual summaries, cluster views, stats, source coverage, and detailed dumps. It includes formatting for various source-specific metadata such as Reddit comments, YouTube transcript highlights, and Polymarket odds, but there is no evidence of querying Reddit, X/Twitter, YouTube, TikTok, Instagram, Hacker News, Polymarket, or web search. The code’s actual role is downstream report rendering, so the declared purpose materially overstates and misstates this chunk’s behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description says the skill aggregates recent multi-source search/social results across several platforms. The supplied code does not perform source querying or aggregation from Reddit, Twitter/X, YouTube, TikTok, Instagram, Hacker News, Polymarket, or web search. Instead, it operates downstream on an existing candidate list: building prompts, asking an LLM to score relevance, applying fallback heuristics, computing final scores, and sorting results. Additionally, it contains a separate capability to score items for humor, cleverness, and shareability ('score_fun'), which is materially outside the declared purpose of recent multi-source research aggregation. While reranking could be a supporting part of a broader research pipeline, the fun/virality scoring is an undeclared and unrelated capability, so this code chunk does not accurately match the declared description.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The description promises a recent 30-day multi-source research aggregator across many named platforms. The actual code runs four web searches ('subreddit', 'news', 'x_handle', 'github') and extracts subreddit names, a probable X handle, GitHub user/repos, and a short news summary. Reddit and X are only indirectly inferred from web search results, and there is no handling of YouTube, TikTok, Instagram, Hacker News, or Polymarket. Additionally, GitHub extraction is an undeclared capability. This is a material description-behavior mismatch in both scope and primary purpose.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared purpose describes a capability that gathers recent results from multiple platforms and web search. This code chunk does not fetch, query, or aggregate any external data. Instead, it scores existing items using lexical relevance, recency, engagement, and source-quality weights, then sorts and prunes them. That is a materially different primary purpose: post-retrieval ranking/filtering rather than cross-source research aggregation. The extra mention of Xiaohongshu and GitHub-related relevance flooring also indicates behavior beyond the stated source list, though the main mismatch is that no source access or 30-day aggregation happens here.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The declared description says this skill aggregates recent results across several online platforms. The supplied code does none of that. It only manipulates already-available text fields on a SourceItem: truncating text, creating overlapping word windows, and choosing the window with the highest token-overlap relevance to a query. This is a supporting snippet-extraction/reranking helper, not a source aggregation or recency-filtering implementation. Therefore the description materially overstates and misrepresents the code chunk’s actual behavior.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The code chunk is narrowly focused on Threads. It searches Threads content through AISA using a site:threads.net Tavily query, filters by date, and parses/normalizes Threads items. The declared description says the skill aggregates recent results from several named platforms and web search over the last 30 days, but this chunk neither aggregates those sources nor handles the listed platforms. Instead, it introduces an undeclared source (Threads). This is a material description-versus-behavior mismatch, not just an implementation detail.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
97% confidence
Finding

The declared description presents a broad last-30-days multi-source research skill spanning many platforms. The supplied code chunk, however, is narrowly scoped to TikTok. It builds TikTok queries, calls an AISA/Tavily proxy with a site:tiktok.com search, filters results by date, and returns normalized TikTok items. There is no orchestration or aggregation across Reddit, X/Twitter, YouTube, Instagram, Hacker News, Polymarket, or general web results in this chunk. While using a web proxy to discover TikTok pages is consistent with implementing TikTok search, the primary purpose here is materially narrower than the declared multi-source aggregator. No concerning undeclared exfiltration or unrelated capabilities are evident; the mismatch is about scope and primary function.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The declared description presents a broad multi-source recent-research skill covering several platforms. The actual code chunk is narrowly scoped to X/Twitter search and response parsing only. While X/Twitter is one of the declared sources, this chunk does not reflect the declared primary purpose of aggregating results across many sources. There is no undeclared dangerous behavior, but there is a material scope mismatch between the broad description and the code shown.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
98% confidence
Finding

The description claims a multi-source recent-research aggregator covering Reddit, X/Twitter, YouTube, TikTok, Instagram, Hacker News, Polymarket, and web search for the last 30 days. The supplied code does something materially different: it is a dedicated Xiaohongshu API client. It contacts Xiaohongshu-specific endpoints, requires the service to be logged in, searches Xiaohongshu feeds only, and returns normalized Xiaohongshu note results. That is an undeclared resource/platform and not the declared cross-source aggregation behavior. Additionally, its time filtering uses coarse preset values ('一天内', '一周内', '半年内') rather than enforcing a 30-day window.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.