T09 · Insecure Skill Coding Practices
- Location
assets/demo.html:477- Finding
Exposed Client-Side Administrator Credentials and Ineffective Authorization
- Content
View full analysis
- Remediation
View remediation
Security audit
Security checks for vulnerabilities and agentic risk
This skill is a classroom-finding demo with sample campus data; its demo admin code is insecure for production but there is no evidence of hidden persistence, exfiltration, or real-world authority.
Install this only as a sample classroom-recommendation skill or prototype. Do not connect the included demo admin page to real classroom-management APIs or production data without replacing the hardcoded accounts, moving authorization server-side, and safely rendering all user/admin-entered text.
assets/demo.html:477Exposed Client-Side Administrator Credentials and Ineffective Authorization
assets/demo.html:693DOM-Based Cross-Site Scripting Through Unsanitized Administrator Notes
The core behavior does align substantially with the declared purpose: it searches and recommends available classrooms using classroom metadata, schedules, and feedback, which matches the empty-classroom/study-room use case. However, the code also provides additional undeclared capabilities that are materially beyond a simple student-facing recommendation skill: authentication, separate admin/student roles, and an admin interface that aggregates classroom availability statistics and feedback. These are not merely internal helpers; they are exposed functional features with a different audience and purpose. Therefore the description does not fully and accurately represent what the code chunk actually does.
The manifest says trigger phrases include specific examples 'and similar expressions,' which leaves activation scope open-ended. In a markdown skill description, this is an ambiguous trigger boundary because it does not clearly define what nearby phrasings should or should not activate the skill.
Phrases like '想找个安静的地方学习' are broad everyday requests that could refer to libraries, cafes, dorm spaces, or general advice rather than this classroom-finding skill specifically. The section does not provide negative examples or explicit constraints limiting activation to empty classrooms or campus teaching spaces.
The document declares lang="zh-CN", and the visible UI text throughout the file is exclusively Chinese. Under the policy, forcing a specific language/locale without user opt-in is a natural-language policy issue unless the constraint is explicitly justified or the user is offered a choice.
The file includes an admin console for status management, feedback review, operation logging, and data reset, which exceeds the declared student-facing classroom recommendation purpose. Even in a demo, bundling privileged administrative capabilities into the same client-side skill expands attack surface and creates an unauthorized control path if the page is exposed beyond its intended audience.
The code allows privileged modification of classroom status entirely in client-side JavaScript after login with hardcoded demo credentials. This is dangerous because any user who can access or inspect the page can impersonate the admin role, alter availability data, and influence recommendations or mislead users about room access.
The demo includes hardcoded privileged and student accounts plus role-based switching into an admin interface, which goes beyond the declared student-facing classroom recommendation scope. Even in a demo, embedded credentials and undisclosed admin functionality can expose unauthorized access paths and normalize privilege expansion if this code is reused or shipped.
This JavaScript hard-codes user-facing interface strings in Chinese, such as role labels, without any visible language-selection mechanism or indication that the skill is intentionally limited to a Chinese-speaking audience. The policy requires avoiding forced language or locale constraints unless the user can opt in or the limitation is clearly justified.
The admin dashboard exposes aggregate classroom operational status, maintenance state, and occupancy monitoring views not described in the manifest. This creates hidden functionality and broadens the data exposure surface, which can leak internal operations details and violate least-privilege expectations for a student-facing skill.
The operational instructions and user-facing examples are entirely in Chinese, which can amount to a language/locale policy issue when no user opt-in or documented locale limitation is provided. The file does not state that the skill is intended only for Chinese-speaking users or a specific region requiring that language.
The code maintains and renders an administrative operation log of management actions. Tracking admin actions is not a direct or obvious requirement for a skill whose stated role is recommending available study classrooms to students.
The entire skill reference content is presented only in Chinese, including headings, field descriptions, and usage-oriented recommendations. Under the stated policy, forcing a specific language without user opt-in can be a natural-language policy violation unless the locale constraint is explicitly documented and justified, which is not present here.
This markdown file is entirely written in Chinese and provides no indication that users may choose another language or that the skill is intentionally limited to a Chinese-speaking context. Under the policy rule for language/locale, this is a natural-language constraint without visible opt-in or justification.
This markdown file presents all headings, instructions, and occupancy data only in Chinese, which can constitute a language/locale policy issue when no user opt-in or alternative locale is offered. There is no indication that the skill is explicitly limited to a Chinese-speaking or region-specific audience.