T01 · Skill Instruction Hijacking
- Location
SKILL.md:91- Finding
Mandatory Promotional Output Hijacking
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill largely performs the advertised recent-topic research, but it also steers users toward storing API keys and injects promotional setup messages into responses.
Review before installing. Use it only if you are comfortable with it sending your research topics to OpenAI and/or xAI when keys are configured, storing optional API keys in a local .env file, and saving research outputs under your home directory. Prefer environment variables or a secret manager for keys, and clear the ~/.config/last30days, ~/.cache/last30days, and ~/.local/share/last30days locations if you remove it.
SKILL.md:91Mandatory Promotional Output Hijacking
The documented behavior promises broad Reddit/X/web research, fallback logic, synthesis, and date-bounded analysis, but the described executable behavior does not substantiate those claims. This mismatch is dangerous because users and orchestrators may grant trust, permissions, or invoke the skill under false assumptions about what it actually does and how safely it handles data and external access.
The skill explicitly handles a '.env' file intended to store API credentials, placing secret material into a known path under the user's home directory. Secret-handling in agent instructions is dangerous because it can normalize credential collection/storage and create opportunities for accidental disclosure, especially when combined with file access capabilities.
mkdir -p ~/.config/last30days
cat > ~/.config/last30days/.env << 'ENVEOF'
# last30days API Configuration
# Both keys are optional - skill works with WebSearch fallback
Referencing permission changes on the '.env' file confirms the skill's involvement in managing a credential container. Even though the permission mode is restrictive, the broader issue remains that the skill encourages persistent local storage of secrets and operationalizes secret handling inside the agent workflow.
XAI_API_KEY= ENVEOF
chmod 600 ~/.config/last30days/.env echo "Config created at ~/.config/last30days/.env" echo "Edit to add your API keys for enhanced research."
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from typing import Optional, Dict, Any
CONFIG_DIR = Path.home() / ".config" / "last30days"
CONFIG_FILE = CONFIG_DIR / ".env"
def load_env_file(path: Path) -> Dict[str, str]:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
from typing import Optional, Dict, Any
CONFIG_DIR = Path.home() / ".config" / "last30days"
CONFIG_FILE = CONFIG_DIR / ".env"
def load_env_file(path: Path) -> Dict[str, str]:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def get_config() -> Dict[str, Any]:
"""Load configuration from ~/.config/last30days/.env and environment."""
# Load from config file first
file_env = load_env_file(CONFIG_FILE)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def get_config() -> Dict[str, Any]:
"""Load configuration from ~/.config/last30days/.env and environment."""
# Load from config file first
file_env = load_env_file(CONFIG_FILE)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def get_config() -> Dict[str, Any]:
"""Load configuration from ~/.config/last30days/.env and environment."""
# Load from config file first
file_env = load_env_file(CONFIG_FILE)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def get_config() -> Dict[str, Any]:
"""Load configuration from ~/.config/last30days/.env and environment."""
# Load from config file first
file_env = load_env_file(CONFIG_FILE)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def get_config() -> Dict[str, Any]:
"""Load configuration from ~/.config/last30days/.env and environment."""
# Load from config file first
file_env = load_env_file(CONFIG_FILE)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def get_config() -> Dict[str, Any]:
"""Load configuration from ~/.config/last30days/.env and environment."""
# Load from config file first
file_env = load_env_file(CONFIG_FILE)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def get_config() -> Dict[str, Any]:
"""Load configuration from ~/.config/last30days/.env and environment."""
# Load from config file first
file_env = load_env_file(CONFIG_FILE)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def get_config() -> Dict[str, Any]:
"""Load configuration from ~/.config/last30days/.env and environment."""
# Load from config file first
file_env = load_env_file(CONFIG_FILE)
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def get_config() -> Dict[str, Any]:
"""Load configuration from ~/.config/last30days/.env and environment."""
# Load from config file first
file_env = load_env_file(CONFIG_FILE)
The skill declares no explicit tool scope or permissions despite instructing the agent to use environment variables, local file operations, networked research, and script execution. Without clear least-privilege boundaries, an agent may invoke broader capabilities than users expect, increasing the blast radius if the skill is misused or modified.
The manifest description says to use the skill when the user wants to 'learn current best practices' or asks 'what are people saying about X,' which are broad phrases that can overlap with many ordinary research or advice requests. The trigger scope is not tightly constrained to a specific command or explicit invocation pattern, increasing the chance of unintended activation.
The instruction 'Research ANY topic across Reddit, X, and the web' is extremely broad and does not define when the skill should be used versus a normal web research flow. Without explicit constraints or negative examples, this creates ambiguous activation conditions.
The skill instructs the agent to create a local credentials file under the user's home directory even though API keys are described as optional for a research skill. Directing an agent to create or modify credential storage expands the skill from research into secret-handling and persistent system modification, which can lead to accidental exposure or unauthorized configuration changes.
The setup instructions encourage storing API keys locally without an explicit warning about credential sensitivity, exposure risks, or safer alternatives. Users may paste secrets into predictable filesystem locations without understanding the security implications, increasing the chance of leakage through backups, logs, screenshots, or later file access by other tools.
Creating a persistent directory and configuration file under '~/.config/last30days' causes session-to-session state retention for a skill whose primary purpose is research. Persistence increases the risk of long-lived secrets, hidden configuration drift, and future unintended reuse by agents or processes that can access the same path.
If the user wants to add API keys for better results:
mkdir -p ~/.config/last30days
cat > ~/.config/last30days/.env << 'ENVEOF'
# last30days API Configuration
# Both keys are optional - skill works with WebSearch fallback
Commands invoke sudo or root privileges. Verify this elevated access is necessary and justified.
XAI_API_KEY= ENVEOF
chmod 600 ~/.config/last30days/.env echo "Config created at ~/.config/last30days/.env" echo "Edit to add your API keys for enhanced research."
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
from . import cache, http
# OpenAI API
OPENAI_MODELS_URL = "https://api.openai.com/v1/models"
OPENAI_FALLBACK_MODELS = ["gpt-5.2", "gpt-5.1", "gpt-5", "gpt-4o"]
# xAI API - Agent Tools API requires grok-4 family
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
from . import cache, http
# OpenAI API
OPENAI_MODELS_URL = "https://api.openai.com/v1/models"
OPENAI_FALLBACK_MODELS = ["gpt-5.2", "gpt-5.1", "gpt-5", "gpt-4o"]
# xAI API - Agent Tools API requires grok-4 family
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
OPENAI_FALLBACK_MODELS = ["gpt-5.2", "gpt-5.1", "gpt-5", "gpt-4o"]
# xAI API - Agent Tools API requires grok-4 family
XAI_MODELS_URL = "https://api.x.ai/v1/models"
XAI_ALIASES = {
"latest": "grok-4-1-fast", # Required for x_search tool
"stable": "grok-4-1-fast",
Data is being sent to an external URL. This could be legitimate telemetry or data exfiltration. Manual review is recommended.
OPENAI_FALLBACK_MODELS = ["gpt-5.2", "gpt-5.1", "gpt-5", "gpt-4o"]
# xAI API - Agent Tools API requires grok-4 family
XAI_MODELS_URL = "https://api.x.ai/v1/models"
XAI_ALIASES = {
"latest": "grok-4-1-fast", # Required for x_search tool
"stable": "grok-4-1-fast",
No suspicious patterns detected.