Back to skill

Security audit

douban-monitor

Security checks for vulnerabilities and agentic risk

Overview

It does what it says, but the default settings can automatically publish generated monitoring data to a Git remote.

Install only if you are comfortable with this skill contacting Douban/TMDB and writing local monitoring files. Before first run, set auto_git_push = false or DOUBAN_MONITOR_NO_PUSH=1 unless you intentionally want generated data pushed to the configured Git remote; review repository privacy and generated files before enabling push. Keep TMDB credentials limited, and do not change tmdb_base_url away from the official TMDB API unless you understand that credentials may be sent there.

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/monitor.py:343
Finding

Configurable TMDB Endpoint Can Receive API Credentials

Content
View full analysis
dict[str, Any]: api_key = get_env("TMDB_API_KEY") bearer = get_env("TMDB_BEARER_TOKEN") if not api_key and not bearer: return {} query = dict(params) headers = {"User-Agent": config["user_agent"], "Accept": "application/json"} if bearer: headers["Authorization"] = f"Bearer {bearer}" else: query["api_key"] = api_key url = f"{config['tmdb_base_url']}{path}?{urllib.parse.urlencode(query)}" request = urllib.request.Request(url, headers=headers) with urllib.request.urlopen(request, timeout=config["request_timeout_seconds"]) as response: return json.loads(response.read().decode("utf-8")) ``` ### Technical Analysis The destination receiving `TMDB_API_KEY` or `TMDB_BEARER_TOKEN` is constructed from `config["tmdb_base_url"]`. Configuration loaded from the project-level `config.toml` overrides the safe default, but the resulting URL is not validated against the official TMDB origin. When an API key is used, it is placed directly in the query string. When a bearer token is used, it is placed in the `Authorization` header. An attacker who can modify the project configuration can set `tmdb_base_url` to an attacker-controlled endpoint, including a plaintext HTTP endpoint, and receive the configured credential during the next execution. The checked-in `config.toml` does not currently override the official default endpoint, so the audited version does not contain an active credential-exfiltration host. Nevertheless, the code exposes a concrete credential disclosure path if repository or configuration contents are tampered with. ### Attack Path 1. An attacker obtains the ability to modify `config.tom ...[truncated 1169 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
config.toml:42
Finding

Generated Monitoring and Preference Data Is Pushed to Git by Default

Content
View full analysis
>>>>>>") suspicious = [m for m in conflict_markers if f"\n+{m}" in (staged_diff.stdout or "")] if suspicious: log_kv("检测到冲突标记,中止提交", " ".join(suspicious)) subprocess.run(["git", "reset", "HEAD", "--", "data/", "reports/"], **git_kw) return ...[truncated 3238 chars]
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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Supply ChainUnpinned Dependencies, External Script Fetching, Obfuscated Code
Findings (43)

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 · .env.example (reported line 1)May include surrounding context.

text
# 复制此文件为 .env 并填入你的 API key
# cp .env.example .env

# TMDB API Key(二选一)

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 · .env.example (reported line 2)May include surrounding context.

text
# 复制此文件为 .env 并填入你的 API key
# cp .env.example .env

# TMDB API Key(二选一)

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 · README.md (reported line 19)May include surrounding context.

  1. 配置 TMDB Key(可选但推荐)
    bash
    cp .env.example .env
    # 编辑 .env,填入 TMDB_API_KEY(或 TMDB_BEARER_TOKEN,二选一)
    
    不填也能运行,但不会有封面、简介和 TMDB 候选源。config.toml 里的阈值和榜单开箱即用,一般不用改。

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 · README.md (reported line 113)May include surrounding context.

  1. 配置 TMDB Key(可选但推荐)
    bash
    cp .env.example .env
    # 编辑 .env,填入 TMDB_API_KEY(或 TMDB_BEARER_TOKEN,二选一)
    
    不填也能运行,但不会有封面、简介和 TMDB 候选源。config.toml 里的阈值和榜单开箱即用,一般不用改。

Ae1

High
Category
analysis-evasion
Confidence
100% confidence
Finding

Referenced artifact was not completely inspected

Content

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

md
项目根目录的 `index.html` 是一个静态网页,读取 `data/` 下的 JSON 文件展示达标内容。

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 · README.md (reported line 114)May include surrounding context.

md
from difflib import SequenceMatcher
from pathlib import Path

# Load .env from project root
_ROOT = Path(__file__).parent.parent
_ENV_FILE = _ROOT / ".env"
if _ENV_FILE.exists():

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 · scripts/fetch_posters.py (reported line 17)May include surrounding context.

python
from difflib import SequenceMatcher
from pathlib import Path

# Load .env from project root
_ROOT = Path(__file__).parent.parent
_ENV_FILE = _ROOT / ".env"
if _ENV_FILE.exists():

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 · scripts/fetch_favorites.py (reported line 20)May include surrounding context.

python
from pathlib import Path

_ROOT = Path(__file__).parent.parent
_ENV_FILE = _ROOT / ".env"
if _ENV_FILE.exists():
    for _line in _ENV_FILE.read_text(encoding="utf-8").splitlines():
        _line = _line.strip()

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 · scripts/fetch_metadata.py (reported line 13)May include surrounding context.

python
from pathlib import Path

_ROOT = Path(__file__).parent.parent
_ENV_FILE = _ROOT / ".env"
if _ENV_FILE.exists():
    for _line in _ENV_FILE.read_text(encoding="utf-8").splitlines():
        _line = _line.strip()

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 · scripts/fetch_posters.py (reported line 19)May include surrounding context.

python
from pathlib import Path

_ROOT = Path(__file__).parent.parent
_ENV_FILE = _ROOT / ".env"
if _ENV_FILE.exists():
    for _line in _ENV_FILE.read_text(encoding="utf-8").splitlines():
        _line = _line.strip()

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 · scripts/fetch_reviews.py (reported line 11)May include surrounding context.

python
from pathlib import Path

_ROOT = Path(__file__).parent.parent
_ENV_FILE = _ROOT / ".env"
if _ENV_FILE.exists():
    for _line in _ENV_FILE.read_text(encoding="utf-8").splitlines():
        _line = _line.strip()

Context-Inappropriate Capability

High
Category
Not specified by scanner
Confidence
95% confidence
Finding

The script performs git pull, commit, and push operations, which means it can both ingest unreviewed remote repository changes and publish local generated content outward. In an agent skill, that is security-relevant because it creates an external modification/exfiltration channel beyond the expected read-only monitoring task.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README states that step 8 will automatically commit and push generated files to GitHub, but it does not prominently warn users that locally generated data may be published to a remote repository. In this skill's context, the pushed artifacts include monitoring results, reports, detail pages, and other derived content, which could unintentionally expose local/private data or metadata if the repository is public or misconfigured.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The settings hard-code tmdb_language = "zh-CN" and tmdb_region = "CN", which imposes a locale choice in natural-language/config behavior without indicating user choice or documented justification. This matches the policy category for language or locale constraints that are not clearly optional or justified.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

Enabling automatic Git push by default can cause unattended publication of generated data or accidental propagation of sensitive or incorrect repository changes when the skill runs in a repository with valid credentials. In an agent setting, this increases the chance of unintended external side effects because execution may write and then push without an explicit confirmation step.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The notes explicitly document an automatic git commit/push mode that publishes tracked data under data/, detail/, and reports/ to a remote repository, but they do not include a clear warning about remote publication, data sensitivity review, or safeguards against accidental disclosure. In a skill that scrapes third-party content and generates reports, this increases the risk that generated artifacts, operational metadata, or user-maintained data files are unintentionally exposed via automatic synchronization.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The comment states in Chinese that the project uses only the Python standard library and requires no extra dependencies. Because this natural-language content fixes a specific language without any opt-in, alternative locale, or documented regional justification, it may violate the language/locale policy criteria.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The code forces TMDB queries to use language: "zh-CN", and later also sets tmdb_language to zh-CN and tmdb_region to CN, which imposes a specific locale in behavior and returned content. This is a natural-language policy concern because users are not offered a language or locale choice, and no region-specific justification is documented in this file.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The TMDB lookup by IMDb ID hard-codes the request language to zh-CN. This enforces a specific locale in natural-language-facing metadata retrieval without offering user opt-in or documenting that the skill is intentionally region-specific.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
97% confidence
Finding

The search parameters force language='zh-CN', causing titles and metadata to be retrieved in Chinese regardless of user preference. This is a language policy concern because the file imposes a locale choice rather than allowing configuration or clearly documenting a region-specific purpose.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The detail fetch operation explicitly requests zh-CN content and prioritizes zh/en image languages, shaping all natural-language output to a fixed locale. This is a policy violation unless users can choose the locale or the regional restriction is clearly justified.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
99% confidence
Finding

The main configuration sets tmdb_language to zh-CN and tmdb_region to CN globally, ensuring all downstream metadata is localized to China-specific defaults. Because there is no user opt-in or visible justification in this file, this violates the language/locale policy constraint.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

This file contains natural-language and config intent that forces the TMDB request language to zh-CN. The same locale constraint appears repeatedly elsewhere in the script, and there is no opt-in, fallback, or explanation that the skill is intended only for a China-specific workflow.

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

python
"rating_delta_for_realert": 0.3,
    "rating_count_delta_for_realert": 5000,
    "milestone_counts": [10000, 30000, 100000],
    "tmdb_base_url": "https://api.themoviedb.org/3",
    "tmdb_language": "zh-CN",
    "tmdb_region": "CN",
    "tmdb_movie_pages": 1,

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The default configuration forces TMDB queries to use zh-CN language and CN region, which is a natural-language locale policy choice embedded in code. The file does not offer a user-facing language/locale choice or explain a justified region-specific compliance need, so this can violate the language/locale policy requirement.

Content

No source excerpt is available for this finding.