T01 · Skill Instruction Hijacking
- Location
SKILL.md:241- Finding
Fixed Promotional Link Injected into Agent Completion Responses
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
The skill mostly matches its stock-review purpose, but it handles credentials, publishing, and output paths unsafely enough that users should review it before installing.
Install only if you are comfortable running a local stock-report generator that can call Gemini and create WeChat drafts. Before using real WeChat credentials, fix or verify redaction of secrets in logs, validate dates as YYYYMMDD, remove the fixed demo-blog link from completion output, and run it in a workspace where writing data and content/posts is acceptable.
SKILL.md:241Fixed Promotional Link Injected into Agent Completion Responses
scripts/fetch_data.py:45Unvalidated Date Allows Writes Outside the Configured Data Directory
scripts/config.py:71Environment File Loading Order Can Silently Replace Intended Credentials
scripts/post_to_wechat.py:208WeChat Secrets and Access Tokens Can Be Exposed Through Exception Logging
Referenced artifact was not completely inspected
| `scripts/fetch_data.py` | Fetch A-share market data (indices, stocks, sectors, etc.) |
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def check_env_vars():
"""检查环境变量"""
env_file = Path(__file__).parent.parent / '.env'
if env_file.exists():
print(f"✅ 找到.env文件: {env_file}")
else:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def check_env_vars():
"""检查环境变量"""
env_file = Path(__file__).parent.parent / '.env'
if env_file.exists():
print(f"✅ 找到.env文件: {env_file}")
else:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def check_env_vars():
"""检查环境变量"""
env_file = Path(__file__).parent.parent / '.env'
if env_file.exists():
print(f"✅ 找到.env文件: {env_file}")
else:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def check_env_vars():
"""检查环境变量"""
env_file = Path(__file__).parent.parent / '.env'
if env_file.exists():
print(f"✅ 找到.env文件: {env_file}")
else:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def check_env_vars():
"""检查环境变量"""
env_file = Path(__file__).parent.parent / '.env'
if env_file.exists():
print(f"✅ 找到.env文件: {env_file}")
else:
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
def __init__(self, config: Optional[Dict[str, Any]] = None):
config = config or {}
# step 1. load .env files
self._load_env_files()
# step 2. load environment variables with fallback to config dict
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return None
try:
# 1. Get access token
token = self._get_access_token()
if not token:
self.logger.error("Failed to get access token")
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return None
try:
# 1. Get access token
token = self._get_access_token()
if not token:
self.logger.error("Failed to get access token")
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return None
try:
# 1. Get access token
token = self._get_access_token()
if not token:
self.logger.error("Failed to get access token")
Code accesses credential files (SSH keys, AWS credentials, etc.). This could indicate credential theft attempts.
return None
try:
# 1. Get access token
token = self._get_access_token()
if not token:
self.logger.error("Failed to get access token")