Back to skill

Security audit

headteacher

Security checks for vulnerabilities and agentic risk

Overview

This skill appears purpose-built for class-management workflows, but it should be reviewed before install because it can create remote Feishu workspaces and exposes Feishu Base identifiers in local state and output.

Install only after reviewing the Feishu permissions and using test data first. Avoid sharing logs, JSON output, or .headteacher-skill files because they may contain Feishu Base identifiers; add that state directory to gitignore and prefer redacted outputs. Confirm the exact Feishu tenant, Base, and schema changes before running bootstrap against real student data.

Vulnerability Patterns
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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
Findings (4)

T09 · Insecure Skill Coding Practices

Warning
Location
tools/feishu_bootstrap.py:43
Finding

Feishu Base token is exposed through command errors, local state, and terminal output

Content
View full analysis
Dict[str, Any]: result = subprocess.run(cmd, capture_output=True, text=True) if result.returncode != 0: message = result.stderr.strip() or result.stdout.strip() raise RuntimeError(f"Command failed: {' '.join(cmd)}\n{message}") return json.loads(result.stdout) ``` ```python workspace_manifest.update( { "status": "ready", "created_at": datetime.now(timezone.utc).isoformat(), "base": { "base_token": base_info["base_token"], "name": base_info["name"], "url": base_info["url"], }, "tables": created_tables, "dashboards": [ {"name": item["name"], "dashboard_id": item["dashboard_id"]} for item in created_dashboards ], "capabilities": { "setup_complete": True, "artifact_generation": True, "remote_sync": True, }, } ) ensure_state_dir() WORKSPACE_MANIFEST_PATH.write_text( json.dumps(workspace_manifest, ensure_ascii=False, indent=2), encoding="utf-8" ) ``` ```python lines = ["# Feishu Bootstrap Result", ""] lines.append(f"- Status: `{result['status']}`") lines.append(f"- Base token: `{result['base']['base_token']}`") if result["base"].get("url"): lines.append(f"- Base URL: {result['base']['url']}") ``` ### Technical Analysis The bootstrap tool passes Feishu Base and folder tokens to `lark-cli` through a subprocess argument array. This avoids shell injection because `shell=True` is not used. However, token-bearing commands are reconstructed verbatim in exceptions, the Base token is saved in plaintext under `.headteacher-skill/w ...[truncated 1835 chars]
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
tools/migration_inspector.py:146
Finding

Migration inspection JSON output unnecessarily returns the supplied Feishu Base token

Content
View full analysis
Remediation
View remediation

T09 · Insecure Skill Coding Practices

Note
Location
tools/setup_doctor.py:123
Finding

Setup diagnostics expose configured Feishu user metadata beyond readiness requirements

Content
View full analysis
Remediation
View remediation

T08 · Insecure Dependencies

Warning
Location
requirements.txt:1
Finding

Installation process relies on mutable repository content and unpinned dependency versions

Content
View full analysis
=2.28.0 # Office artifact generation python-docx>=1.1.0 openpyxl>=3.1.0 python-pptx>=0.6.23 ``` ### Technical Analysis The installation instructions clone the current default branch of a repository in a personal GitHub namespace without pinning a release tag or commit hash. Consequently, the installed Skill may differ from the version that was audited. Python dependencies use lower-bound constraints only. A future installation may resolve any later release that satisfies the lower bound, including versions not reviewed with this Skill. No lockfile, integrity hashes, signed release verification, or reproducible build procedure is provided. No currently embedded malicious package or remote payload was identified. The vulnerability is the ability of mutable upstream sources to change the effective code after review. ### Attack Path 1. An attacker compromises the upstream GitHub account, repository, package-publishing account, or another relevant supply-chain component. 2. The attacker modifies the repository default branch or publishes a malicious package release that satisfies the broad version constraint. 3. A user follows `INSTALL.md` or runs `pip3 install -r requirements.txt`. 4. Git or the package installer retrieves the attacker-modified content. 5. The malicious code executes during package installation, Skill loading, or later runtime invocat ...[truncated 563 chars]
Remediation
View remediation
Vulnerability Patterns
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Rogue AgentSelf-Modification, Session Persistence
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
Findings (44)

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The code matches part of the description: it does bootstrap a Feishu Base workspace, checks CLI prerequisites, builds schema plans, creates base/tables/link fields/dashboards, and stores a manifest. However, the declared purpose is substantially broader than the actual implementation. The description emphasizes operating the workspace, backend choice, environment-aware routing, persistent student/class data handling, and artifact/document generation. In this file, core operational methods like read_entities, write_entities, and materialize_views explicitly return not_implemented, and register_artifact merely delegates. There is no evidence of backend-selection logic beyond a fixed FeishuBaseAdapter, nor environment-specific routing, nor Word/Excel/PPT generation. Therefore the description materially overstates the implemented capabilities, making this a mismatch.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
96% confidence
Finding

The declared description presents a broad operational headteacher workspace covering setup, environment-specific Feishu access, database initialization, ongoing student/class data management, onboarding, and document generation. The supplied code does something much narrower and different: it is a standalone inspector for an existing Feishu Base schema. It fetches table and field metadata through lark-cli, compares names against a schema manifest, classifies the base for migration, and emits a report. While this may support onboarding or migration in a related ecosystem, it does not itself perform the core declared behaviors, and its primary purpose is materially different from the advertised workspace operation.

Content

No source excerpt is available for this finding.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding

The declared description presents a full operational workspace assistant covering backend choice, environment-sensitive Feishu routing, onboarding flows, database initialization, continuous record handling, and document generation. The supplied code only builds static schema/table specifications and renders them in different output formats. It contains no API calls, no filesystem or service onboarding logic, no environment detection/routing, no record mutation logic, and no actual document generation. The code does align with one subset of the description—schema planning for a headteacher workspace and backend projection guidance—but the overall description materially overstates implemented functionality, so this is a mismatch.

Content

No source excerpt is available for this finding.

Lp1

High
Category
MCP Least Privilege
Confidence
80% confidence
Finding

This script inspects numerous environment variables to detect the agent runtime and includes that evidence in its output. In an agent skill context, undeclared environment access is sensitive because it can expose runtime identifiers, workspace metadata, or other environment-derived signals without explicit permission or user awareness.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

This markdown file presents all user-facing instructions in Chinese and does not provide an opt-in, alternative language, or justification for a Chinese-only locale. Under the stated policy, forcing a specific language without user choice is a natural-language policy violation.

Content

No source excerpt is available for this finding.

Skill Enumeration

Medium
Category
Agent Snooping
Confidence
85% confidence
Finding

Skill enumerates or reads other installed skills. Access to other skills' SKILL.md files or the skills directory reveals prompt instructions, capabilities, and secrets that should be invisible to peer skills.

Content

Scanner excerpt · INSTALL.md (reported line 6)May include surrounding context.

安装到 Claude Code

bash
mkdir -p .claude/skills
git clone https://github.com/YZDame/headteacher-skill .claude/skills/headteacher-workbench

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · INSTALL.md (reported line 6)May include surrounding context.

安装到 Claude Code

bash
mkdir -p .claude/skills
git clone https://github.com/YZDame/headteacher-skill .claude/skills/headteacher-workbench

Session Persistence

Medium
Category
Rogue Agent
Confidence
60% confidence
Finding

Skill establishes unauthorized persistence across sessions via cron jobs, startup scripts, or state files. Session persistence allows an attacker to maintain access beyond the current interaction.

Content

Scanner excerpt · INSTALL.md (reported line 6)May include surrounding context.

安装到 Claude Code

bash
mkdir -p .claude/skills
git clone https://github.com/YZDame/headteacher-skill .claude/skills/headteacher-workbench

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README explicitly promotes importing, storing, reading, and generating artifacts from student records, grades, conduct logs, and parent communications, but it does not provide clear privacy, consent, retention, or access-control guidance. In an education context handling minors' sensitive data, this omission can lead users to deploy the skill in ways that expose personal information or violate school policy and data-protection requirements.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The README explicitly encourages importing, storing, and analyzing student rosters, scores, behavior, and parent communication records, which are sensitive education records and personal data. Omitting any privacy, consent, retention, access-control, or compliance guidance creates a real risk that users will process regulated student data insecurely or unlawfully.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
90% confidence
Finding

The README directs users to initialize a Feishu Base workspace and route access through OpenClaw plugins or local CLI paths, but it does not clearly disclose that student data will be transmitted to and stored in third-party systems. This can mislead users into sending sensitive records through external services without evaluating data residency, plugin permissions, logging exposure, or vendor security posture.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
91% confidence
Finding

The README explicitly promotes persistent management, import, and read/write of student records, grades, conduct, and parent communication data, but provides no privacy, consent, retention, or access-control guidance. In an education context this data is highly sensitive, so omission of handling warnings increases the likelihood that users will process protected student information insecurely or in violation of policy.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
94% confidence
Finding

The README instructs users to initialize Feishu/Lark integrations and route data through plugins, APIs, or CLI tooling, yet it does not warn that student records may be transmitted to third-party services or local tooling outside the immediate workspace. Because the skill is specifically designed for ongoing student data operations, this omission can lead to unintended disclosure of sensitive educational records to external platforms, logs, or misconfigured integrations.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
87% confidence
Finding

This skill is designed to process highly sensitive student information, including contact details, addresses, IDs, grades, conduct records, and parent communications, and to route that data to external systems and tools. Without an explicit upfront warning and consent/handling guidance, users may unknowingly transmit regulated or confidential education data to third-party backends, increasing privacy, compliance, and data-leak risk.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The PRD explicitly covers student records, grades, conduct logs, and parent communication, which are sensitive education and child-related personal data. Documentation that defines collection, storage, and generation workflows for such data without any privacy warning, consent guidance, access control expectations, retention limits, or compliance requirements creates a real security and privacy risk because implementers may build unsafe defaults around minors' data.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
96% confidence
Finding

The instruction 'Use this prompt when the user asks for a concrete output file' does not define specific trigger phrases, scope boundaries, or exclusion conditions. Many common requests could be interpreted as asking for a 'concrete output file,' which increases the risk of unintended invocation.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
84% confidence
Finding

The supported output examples and guidance are written specifically for Chinese-language school artifacts such as 家访记录, 班级通知, and 家长会 PPT, but the file does not state that this is a region-specific skill or offer the user a language choice. This can violate language/locale policy when the skill is used in broader contexts.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The workflow instructs the agent to generate a local file and optionally sync it to the cloud, but it does not require a clear user-facing warning or explicit consent before writing files or transferring potentially sensitive student and parent-related data. In a headteacher workspace handling grades, conduct logs, and parent communication, silent local persistence or cloud sync can create confidentiality, privacy, and data-governance risks.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The instructions require always recommending a default and specifically stating that Feishu is the only fully supported v1 backend. This effectively biases the skill toward a single platform choice regardless of user preference, and the language does not offer an explicit user opt-in or balanced choice framework.

Content

No source excerpt is available for this finding.

Autonomous Decision Making

Medium
Category
Excessive Agency
Confidence
75% confidence
Finding

Skill enables autonomous high-impact decisions without human-in-the-loop verification. Critical operations (destructive commands, financial transactions, data deletion) should require explicit user confirmation.

Content

Scanner excerpt · prompts/schema-installer.md (reported line 15)May include surrounding context.

md
## Rules

- always start from the unified semantic model
- do not invent backend-specific tables or fields without checking the schema manifest
- if the backend is not fully implemented, emit a mapping plan and limitations instead of pretending to install it

## Typical commands

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

This code path invokes lark-cli to create or modify remote Feishu Base resources, yet the implementation provides no explicit confirmation, dry-run default, or warning at the point of execution. Because this skill is designed to bootstrap a real school-management workspace, hidden remote side effects are more dangerous than in a purely local utility and can lead to unintended data structure creation or modification in production tenants.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
88% confidence
Finding

The bootstrap flow writes a workspace manifest to a local state directory containing operational metadata such as base tokens, table IDs, and remote workspace details, but there is no user-facing disclosure or consent boundary in code before persisting it. In a skill that manages school records and Feishu workspaces, silently storing this metadata can expose sensitive identifiers to other local users, accidental commits, or downstream tooling.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
89% confidence
Finding

The classification logic is built around fixed Chinese strings such as 学生信息, 学生记录, and subject-score hints, which constrains the tool to a specific language/locale implicitly. The file does not document this limitation as a justified region-specific constraint or provide any user opt-in or language selection.

Content

No source excerpt is available for this finding.

Missing User Warnings

Medium
Category
Not specified by scanner
Confidence
98% confidence
Finding

The tool copies the supplied Feishu base token into the result object and prints it to stdout in JSON mode, while also dumping table and field metadata. In CLI, agent, CI, or shared logging environments, stdout is commonly captured, persisted, or exposed to other operators, which can leak credentials and sensitive schema information.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Medium
Category
Not specified by scanner
Confidence
93% confidence
Finding

The generated markdown title is hard-coded as "Headteacher Schema" while much of the schema content and default workspace naming are fixed in Chinese elsewhere in the file, with no option for the user to choose language or locale. This creates a mixed but effectively predetermined language experience rather than offering explicit locale selection or documenting a justified region-specific constraint.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.