Back to skill

Security audit

Local Context Bridge

Security checks for vulnerabilities and agentic risk

Overview

This skill is a local document search bridge, but it encourages broad automatic searches of private documents and unpinned package installation/update behavior that users should review before installing.

Install only if you are comfortable with an agent searching the directories you add to ContextBridge. Use a narrowly scoped document folder, avoid credential stores or unrelated private records, review the cbridge-agent package and version before installing or updating, and require confirmation before searches that may touch sensitive local or business data.

Vulnerability Patterns
  • Unauthorized Access and Privilege EscalationObtains permissions beyond the task's legitimate needs
  • Insecure DependenciesIntroduces malicious components through unsafe dependency sources
  • 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 (2)

T08 · Insecure Dependencies

Warning
Location
SKILL.md:47
Finding

Unpinned Third-Party Package Installation and Update

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, lines 30 and 47-50
Vulnerability Type: Unverified third-party dependency installation and update
Risk Level: Medium

Vulnerable Code

text
B -- Yes --> C[Check for updates\n`cbridge update`]
markdown
> 🔓 **Open Source & Trustworthy**: `cbridge-agent` is fully open-source, hosted on [GitHub](https://github.com/whyischen/context-bridge) for audit and verification. Runs entirely locally with zero data leakage risk.

```bash
pip install cbridge-agent
text

### Technical Analysis

The Skill instructs the Agent to install `cbridge-agent` from the Python package registry without specifying an audited version, integrity hash, package signature, or immutable source revision. It also directs existing installations to execute `cbridge update`.

Consequently, the code that is executed can differ from the version originally reviewed. Linking to a GitHub repository does not cryptographically establish that the registry package was built from the reviewed source. The assertion that the software has “zero data leakage risk” is also unsupported by controls present in this project.

This creates a supply-chain trust boundary: compromise of the package publisher, registry account, release process, update mechanism, or a future package release could introduce attacker-controlled code.

### Attack Path

1. An attacker compromises the package publisher, distribution account, release process, or update channel.
2. The attacker publishes a malicious release under the expected package identity.
3. The Agent follows the Skill and runs `pip install cbridge-agent` or `cbridge update`.
4. The unverified package or update executes with the privileges of the Agent user.
5. Malicious code accesses local files, indexed documents, configuration, credentials available to that user, or performs further system actions.

### Impact Assessment

Successful exploitati
...[truncated 479 chars]
Remediation
View remediation

Remediation Suggestions

  • Pin cbridge-agent to a specifically reviewed version rather than installing the latest available release.
  • Lock all transitive dependencies and require cryptographic hashes, such as through a reviewed requirements file and pip --require-hashes.
  • Disable automatic updates. Require explicit user approval and security review before changing versions.
  • Verify package provenance using signed releases, attestations, or reproducible builds that bind the registry artifact to a reviewed source commit.
  • Install the dependency in an isolated virtual environment or restricted container under a dedicated, least-privileged account.
  • Restrict the process to explicitly approved document directories and deny unnecessary network, credential, and filesystem access.
  • Replace absolute trust claims such as “zero data leakage risk” with documented, verifiable security properties and limitations.

T05 · Unauthorized Access and Privilege Escalation

Warning
Location
SKILL.md:78
Finding

Autonomous Search of Private Local Documents Without Per-Request Consent

Content
View full analysis

Vulnerability Details

File Location: SKILL.md, line 78
Vulnerability Type: Excessive autonomous access to private and internal data
Risk Level: Medium

Vulnerable Code

markdown
1. **Seamless Execution:** Act autonomously. Determine semantic intent from the user's prompt and seamlessly invoke `cbridge search` to retrieve local content without explicitly asking the user, unless authorization is required.

Technical Analysis

The instruction directs the Agent to search local content autonomously and without explicit per-request approval. The Skill is specifically designed for personal, private, and internal documents, but it does not define authorization boundaries, approved directories, document sensitivity rules, result redaction, or conditions under which authorization is required.

Semantic intent detection can be ambiguous. A broad, indirect, or adversarially crafted request may therefore trigger retrieval from sensitive indexed material even when the user did not knowingly authorize that search. Returned snippets and file paths enter the Agent context and may subsequently be included in responses or processed by other tools.

The issue does not establish an operating-system privilege escalation. It instead breaks least-privilege expectations at the data-access layer by encouraging access beyond clearly confirmed, task-specific scope.

Attack Path

  1. Sensitive personal or internal documents are added to directories monitored by ContextBridge.
  2. A user or untrusted prompt supplies an ambiguous request containing terms related to those documents.
  3. Following the Skill instruction, the Agent infers semantic intent and invokes cbridge search without obtaining explicit approval.
  4. The search returns sensitive excerpts and file paths from indexed documents.
  5. Retrieved information enters the Agent context and may be exposed in its answer or passed to another enabled tool.

Impact Ass

...[truncated 439 chars]

Remediation
View remediation

Remediation Suggestions

  • Require explicit, informed user consent before searching private or internal document collections.
  • Display the intended query and search scope before execution, particularly when sensitive directories may be involved.
  • Maintain a user-approved allowlist of searchable directories and exclude credential stores, secrets, personal records, and unrelated workspaces by default.
  • Use a dedicated least-privileged service account with read access only to specifically approved data.
  • Classify and redact sensitive snippets and filesystem paths before placing results into the Agent context or response.
  • Bind search authorization to the current user and task; do not treat previous consent as blanket authorization for future searches.
  • Define clear rules for when authorization is required instead of leaving that decision unspecified.
  • Record auditable search events containing the requesting identity, approved scope, query, and accessed files without logging sensitive document contents.
Vulnerability Patterns
  • Excessive AgencyUnrestricted Tool Access, Autonomous Decision Making, Scope Creep
  • Trigger AbuseOverly Broad Trigger, Shadow Command Trigger, Keyword Baiting Trigger
  • 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 (4)

Missing User Warnings

High
Category
Not specified by scanner
Confidence
96% confidence
Finding

The skill explicitly tells the agent to 'act autonomously' and invoke semantic search over local content without explicitly asking the user unless authorization is required. Because the tool targets personal and internal documents, autonomous searching can expose highly sensitive snippets and file paths with minimal user awareness, making the privacy risk substantial in this skill's context.

Content

No source excerpt is available for this finding.

Vague Triggers

Medium
Category
Not specified by scanner
Confidence
92% confidence
Finding

The activation guidance is broad enough that the skill may be invoked for many requests involving 'local files, private data, or internal knowledge' without strong narrowing conditions. In this context, that increases the chance an agent searches sensitive local content when the user did not clearly intend a privacy-impacting action.

Content

No source excerpt is available for this finding.

Intent-Code Divergence

Low
Category
Not specified by scanner
Confidence
77% confidence
Finding

The trust statement says the tool 'runs entirely locally with zero data leakage risk,' which conveys a strongly local-only safety posture. However, the documented setup explicitly installs cbridge-agent via pip, which is a network-dependent external download and not purely local behavior. While this may be acceptable operationally, the wording overstates the locality of the overall tool workflow.

Content

No source excerpt is available for this finding.

Natural-Language Policy Violations

Low
Category
Not specified by scanner
Confidence
98% confidence
Finding

The command example explicitly switches the CLI language to English with no indication that this is optional or user-selected. That is a natural-language locale constraint and can violate language-choice policy when presented as the default behavior without opt-in or justification.

Content

No source excerpt is available for this finding.

Static analysis

No suspicious patterns detected.