Back to skill

Security audit

Filechat

Security checks across malware telemetry and agentic risk

Overview

This Google Drive document-search skill mostly matches its purpose, but it needs review because it handles private Drive content, credentials, and third-party AI services with some under-disclosed and unsafe patterns.

Install only if you are comfortable granting Drive access and having selected document contents, image data, and search queries processed by Gemini or OpenAI and possibly stored in local JSON files or Qdrant. Avoid syncing highly sensitive folders until the publisher fixes the native-OCR misstatement, removes embedded credentials, validates folder IDs, and adds clear opt-in, retention, and deletion controls.

SkillSpector

By NVIDIA
Vulnerability Patterns
  • Data ExfiltrationExternal Transmission, Env Variable Harvesting, File System Enumeration
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Tool MisuseTool Parameter Abuse, Chaining Abuse, Unsafe Defaults
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • MCP Least PrivilegeUnderdeclared Capability, Wildcard Permission, Missing Permission Declaration
Findings (21)

Lp3

Medium
Category
MCP Least Privilege
Confidence
92% confidence
Finding
The skill instructs the agent to use environment variables, external APIs, and Google Drive/network-capable tooling, but it does not declare corresponding permissions. This creates a transparency and policy-enforcement gap: operators may approve the skill without realizing it can access credentials and exfiltrate document content to external embedding providers or cloud vector stores.

Tp4

High
Category
MCP Tool Poisoning
Confidence
95% confidence
Finding
The documented behavior overstates security and functionality while omitting important side effects such as OAuth authentication flows, external service usage, and credential handling. This mismatch is dangerous because users and reviewers may rely on the description to authorize a skill that can access Drive data, upload/download files, and transmit contents to third-party services under the guise of a simpler local search tool.

Context-Inappropriate Capability

Medium
Confidence
96% confidence
Finding
The skill tells the agent to create or overwrite a local .env file with API credentials, which encourages plaintext secret storage in the workspace. In an agent environment, this can expose keys to other tools, logs, future tasks, or accidental check-in, and the overwrite behavior can also destroy safer existing configuration.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
This code sends the full contents of user-provided images to Google's Gemini API for OCR, which is an external third-party service. In a skill marketed as secure Google Drive storage/search, undisclosed off-platform transmission of potentially sensitive document content materially expands the data exposure surface and can violate user expectations, policy, or compliance requirements.

Intent-Code Divergence

High
Confidence
92% confidence
Finding
The manifest claims the skill 'OCRs images natively,' but the implementation transmits image bytes to a remote Gemini model instead. This mismatch is security-relevant because it can mislead users and reviewers about where sensitive data is processed, causing them to trust the skill with documents they would not upload if the true architecture were disclosed.

Context-Inappropriate Capability

Medium
Confidence
95% confidence
Finding
The code constructs a shell command with string interpolation and passes `folder.id` directly into `execSync`, which invokes a shell. If `folders.json` is modified to contain shell metacharacters, an attacker could achieve command injection and execute arbitrary OS commands with the privileges of the skill process. In this skill, folder IDs are treated as local configuration, but the skill’s purpose is to manage many Drive folders automatically, so trusting persisted folder metadata without validation increases the blast radius.

Context-Inappropriate Capability

Medium
Confidence
99% confidence
Finding
The test hardcodes a live-looking Google/Gemini API key and injects it into subprocess environments. Hardcoded secrets are a real security issue because they can be harvested from source control, reused outside the intended context, and may grant unauthorized access or incur billing and data exposure if still valid.

Context-Inappropriate Capability

Medium
Confidence
99% confidence
Finding
This is a second instance of embedding and exporting the same hardcoded API key into an integration-test subprocess. Repeating secret exposure increases the chance of leakage and misuse, especially in a skill that interfaces with external cloud services and may be run in shared CI or developer environments.

Missing User Warnings

Medium
Confidence
93% confidence
Finding
The README advertises recursive Google Drive sync, OCR, embedding, and persistent local vector storage, but does not clearly warn users that potentially sensitive document contents may be copied, transformed, and retained locally beyond the original Drive location. In a document-ingestion skill, this omission materially increases the risk of unintentionally indexing confidential files, exposing sensitive text through local storage, backups, or later retrieval without informed user consent.

Vague Triggers

Medium
Confidence
84% confidence
Finding
The trigger language for sync/flush/update is broad enough to match common user phrasing, increasing the chance the skill runs on ambiguous requests. In this context, unintended sync can cause bulk Drive enumeration, downloading, OCR, embedding, and transmission of document content to external providers, which materially raises privacy risk.

Vague Triggers

Medium
Confidence
90% confidence
Finding
The instruction to save files when a user 'implicitly sends a file' is ambiguous and could trigger automatic uploads without clear user intent. Because the destination is Google Drive and subsequent indexing may send contents to embedding providers, an accidental invocation could expose sensitive attachments and create persistent copies unexpectedly.

Missing User Warnings

Medium
Confidence
94% confidence
Finding
The image content is sent to an external AI service without any visible user warning, consent flow, or in-code indication of disclosure. Because this skill is designed to process stored documents from Google Drive, the affected images may contain highly sensitive business or personal information, making silent third-party transmission particularly risky.

Missing User Warnings

Medium
Confidence
95% confidence
Finding
The script sends raw user search queries to external embedding providers (OpenAI or Google Gemini) to generate embeddings. In a document-retrieval skill, queries may contain sensitive business data, personal information, or confidential document references, and the code provides no consent, minimization, or disclosure mechanism before transmitting that data off-system.

Missing User Warnings

Medium
Confidence
92% confidence
Finding
Subprocess execution is performed using configuration-derived data with no validation or escaping context, and because `execSync` runs through a shell, configuration poisoning becomes code execution. Even though the input is not directly user-entered here, local config files are a common trust boundary, and a compromised or tampered `folders.json` could trigger arbitrary commands during a bulk sync run across all folders.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
Document chunks are sent to OpenAI or Gemini embedding endpoints, which means potentially sensitive file contents leave the local environment and are transmitted to third-party services. In a file-sync/RAG skill handling arbitrary Google Drive documents, this is especially sensitive because users may store confidential business or personal data and the code shows no consent gate, data classification, or provider restriction.

Missing User Warnings

Medium
Confidence
97% confidence
Finding
The OCR path sends entire image contents to Gemini for transcription, which can expose screenshots, scans, IDs, invoices, and other highly sensitive material to an external AI provider. In this skill's context of indexing arbitrary Drive folders, that greatly increases privacy and compliance risk if users are unaware that images are being uploaded off-platform.

External Transmission

Medium
Category
Data Exfiltration
Content
async function getEmbedding(text) {
  if (EMBEDDING_PROVIDER === "openai") {
    const response = await fetch("https://api.openai.com/v1/embeddings", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
Confidence
93% confidence
Finding
fetch("https://api.openai.com/v1/embeddings", { method: "POST"

External Transmission

Medium
Category
Data Exfiltration
Content
async function getEmbedding(text) {
  if (EMBEDDING_PROVIDER === "openai") {
    const response = await fetch("https://api.openai.com/v1/embeddings", {
      method: "POST",
      headers: {
        "Content-Type": "application/json",
Confidence
93% confidence
Finding
https://api.openai.com/

Tool Parameter Abuse

High
Category
Tool Misuse
Content
*Note: Syncs are highly incremental and use a local cache! If a file hasn't been modified in Drive, the script will skip it instantly and output "0 chunks" embedded. This is NORMAL behavior. If you are debugging, testing, or the user specifically requests a hard flush, you MUST delete the cache files first:*
```bash
rm ./skills/filechat/meta_<FOLDER_ID>.json
rm ./skills/filechat/vector_db_<FOLDER_ID>.json
```
Confidence
88% confidence
Finding
rm ./skills/filechat/

Tool Parameter Abuse

High
Category
Tool Misuse
Content
*Note: Syncs are highly incremental and use a local cache! If a file hasn't been modified in Drive, the script will skip it instantly and output "0 chunks" embedded. This is NORMAL behavior. If you are debugging, testing, or the user specifically requests a hard flush, you MUST delete the cache files first:*
```bash
rm ./skills/filechat/meta_<FOLDER_ID>.json
rm ./skills/filechat/vector_db_<FOLDER_ID>.json
```

## How to Answer User Questions (RAG)
Confidence
88% confidence
Finding
rm ./skills/filechat/

Tool Parameter Abuse

High
Category
Tool Misuse
Content
*(If this fails, check folder permissions or GWS credentials.)*
3. **Force a Clean Sync:** Clear the cache for the test folder to guarantee a fresh run, then sync.
   ```bash
   rm -f ./skills/filechat/meta_<FOLDER_ID>.json ./skills/filechat/vector_db_<FOLDER_ID>.json
   node ./skills/filechat/sync.js <FOLDER_ID>
   ```
   *(You should see files being downloaded, OCR'd, and chunks being embedded. If it says "0 chunks", verify the folder isn't empty.)*
Confidence
90% confidence
Finding
rm -f ./skills/filechat/meta_<FOLDER_ID>.json ./skills/filechat/

VirusTotal

64/64 vendors flagged this skill as clean.

View on VirusTotal

Static analysis

Detected: suspicious.dangerous_exec, suspicious.env_credential_access, suspicious.exposed_secret_literal

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
sync-all.js:17

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
sync.js:50

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
tests/setup.js:30

Shell command execution detected (child_process).

Critical
Code
suspicious.dangerous_exec
Location
tests/skill.test.js:17

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
query.js:16

Environment variable access combined with network send.

Critical
Code
suspicious.env_credential_access
Location
sync.js:17

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
tests/setup.js:14

File appears to expose a hardcoded API secret or token.

Critical
Code
suspicious.exposed_secret_literal
Location
tests/skill.test.js:39