Back to skill

Security audit

face-api.js

Security checks for vulnerabilities and agentic risk

Overview

This skill is a coherent face-api.js documentation aid with no hidden executable behavior, but users should treat its face recognition, webcam, emotion, and age/gender examples as sensitive biometric processing.

Install only if you are intentionally building face-analysis features. Before using the examples in a real product, add clear user notice and consent flows, avoid covert identification, minimize retention of face descriptors or webcam data, and check applicable biometric privacy and anti-discrimination requirements.

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
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • Prompt InjectionInstruction Override, Hidden Instructions, Exfiltration Commands
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Privilege EscalationExcessive Permissions, Sudo/Root Execution, Credential Access
Findings (9)

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The skill prominently enables privacy-sensitive biometric processing including face recognition, emotion inference, webcam tracking, and age/gender estimation, but provides no warning about consent, lawful basis, retention, or misuse risks. In this context, the omission can normalize deployment of intrusive capabilities without safeguards, increasing the chance of privacy harm, unlawful surveillance, or discriminatory use.

Missing User Warnings

Medium
Confidence
90% confidence
Finding
The file explicitly documents `.withAgeAndGender()` and `predictAgeAndGender(faceImage)`, which infer demographic attributes from facial images. For markdown files, behaviors that affect privacy should include warnings, but the reference does not mention sensitivity, consent, or appropriate use considerations.

Missing User Warnings

Medium
Confidence
88% confidence
Finding
This markdown file documents biometric identification features such as labeled face descriptors and face matching, which can affect user privacy and identity data. Under the markdown-specific warning rule, descriptions of behaviors affecting privacy should disclose the sensitivity of the operation, but no warning or caution is provided here.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The face recognition examples perform identity matching using face descriptors and labeled identities without warning that this is sensitive biometric identification. In documentation, this can lead integrators to deploy recognition features without consent controls, purpose limitation, or accuracy/bias considerations, increasing privacy and misuse risk.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
The webcam example captures live video and performs face detection/expression analysis without any user-facing privacy notice, consent guidance, or retention limitation. Although browser permissions gate camera access, the example normalizes biometric processing in a way that downstream developers may copy directly without informing end users about sensitive collection and inference.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The age and gender estimation example demonstrates inference of sensitive or potentially protected attributes from faces without any caution about privacy, consent, or fairness concerns. This is risky because developers may treat these outputs as routine metadata and deploy demographic inference in contexts where it is intrusive, inaccurate, or discriminatory.

Missing User Warnings

Medium
Confidence
96% confidence
Finding
The file describes face recognition as producing an 'identity fingerprint' and enabling comparison of any two faces, but provides no warning that this is highly privacy-sensitive biometric identification functionality. In this context, the lack of consent, retention, surveillance, and misuse guidance increases the risk that downstream users adopt identity matching features without appropriate safeguards.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The documentation promotes age and gender estimation from faces without any warning about biometric sensitivity, consent, privacy, or bias concerns. In a face-analysis skill, omitting these safeguards can normalize deployment of sensitive inference features in contexts where users may not realize protected attributes are being derived from their images.

Scope Creep

Low
Category
Excessive Agency
Content
- **Size:** ~6.2 MB (`shard1` + `shard1`; two shards)
- **Role:** compute a **128-d face descriptor** (Float32Array) — the "identity fingerprint".
- **Architecture:** ResNet-34-like; equivalent to dlib's FaceRecognizerNet. **99.38% on LFW**.
- **Key property:** not limited to training identities — descriptors work for any face; compare any two faces by euclidean distance.
- Chain with `.withFaceDescriptors()` / `.withFaceDescriptor()`.

## Face expression model (`face_expression_model`)
Confidence
70% confidence
Finding
Skill's behavior or capabilities extend beyond its stated purpose. Scope creep allows an agent to perform actions unrelated to its documented functionality, increasing the attack surface.

Static analysis

No suspicious patterns detected.