Back to skill

Security audit

B站网课笔记 Bilibili course notes (大纲+分P)

Security checks for vulnerabilities and agentic risk

Overview

The skill is rated suspicious because scanners report that multipart processing may spend credits before disclosing costs and getting confirmation, and the skill does not declare its tool scope.

Consider avoiding installation until the billing sequence and tool scope are clarified. Skillspector reports partial analysis because some local references could not be resolved, and the possible environment-data flow to a network request was disputed, so the scan does not settle whether sensitive data is transmitted.

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
  • Taint TrackingDirect Taint Flow, Variable-Mediated Taint Flow, Credential Exfiltration Chain
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
  • 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
Findings (6)

Tainted flow: 'req' from os.environ.get (line 225, credential/environment) → urllib.request.urlopen (network output)

Critical
Category
Data Flow
Confidence
90% confidence
Finding

Credentials or environment variables flow to a network sink. This is a high-confidence indicator of credential exfiltration.

Content

Scanner excerpt · scripts/bili2notes.py (reported line 227)May include surrounding context.

python
data = json.dumps(body).encode()
    req = urllib.request.Request(API + path, method=method, headers=headers, data=data)
    try:
        with urllib.request.urlopen(req, timeout=120) as r:
            return r.status, json.loads(r.read() or b"{}")
    except urllib.error.HTTPError as e:
        try:

Description-Behavior Mismatch

High
Category
MCP Tool Poisoning
Confidence
99% confidence
Finding

The multipart workflow performs a potentially chargeable initial read before presenting the promised cost disclosure and requesting confirmation, including during unattended runs without --yes. Cancellation then incorrectly claims no credits were deducted, and batches exceeding 30 remaining parts omit some individual estimates, weakening informed spending authorization.

Content

No source excerpt is available for this finding.

Skill declares no tool scope ('permissions' or 'allowed-tools') but code capabilities were detected: env, file_write, network.

Medium
Category
MCP Least Privilege
Confidence
70% confidence
Finding

Without declared permissions the skill's intent is opaque and cannot be validated.

Content

No source excerpt is available for this finding.

Multi-part mode performs a potentially billable read before reporting per-part durations and credit costs or requesting confirmation.

Medium
Category
Excessive Agency
Confidence
99% confidence
Finding

run() calls read_one() with the user's API key before reaching multipart cost disclosure and confirm(), so an uncached initial part can consume credits even if the user subsequently declines. This also bypasses the stated unattended-run safeguard and can charge for an initial part outside the requested range.

Content

No source excerpt is available for this finding.

Tainted flow: 'path' from os.environ.get (line 358, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/bili2notes.py (reported line 359)May include surrounding context.

python
written = []
        if current in wanted:
            path = os.path.join(args.out_dir, file_name(d, current))
            with open(path, "w", encoding="utf-8") as f:
                f.write(render_note(d, on_screen=args.on_screen))
            written.append(path)
        if todo:

Tainted flow: 'path' from os.environ.get (line 358, credential/environment) → open (file write)

Medium
Category
Data Flow
Confidence
65% confidence
Finding

Data from a source is assigned to a variable that is later passed to a sink, creating a variable-mediated taint flow.

Content

Scanner excerpt · scripts/bili2notes.py (reported line 389)May include surrounding context.

python
continue
                    p = links.get(link) or int(((dg.get("parts") or {}).get("current")) or 0) or None
                    path = os.path.join(args.out_dir, file_name(dg, p))
                    with open(path, "w", encoding="utf-8") as f:
                        f.write(render_note(dg, on_screen=args.on_screen))
                    written.append(path)
            say(f"\n批量读完:实际扣了 {spent} 积分" + (f",{failed} 个分 P 没读成(没扣费)" if failed else ""))