Skip to content

fix: the algolia api key is stored in encrypted form... in doc-search.js - #8

Open
anupamme wants to merge 1 commit into
angular:mainfrom
anupamme:fix-repo-cli-builds-v-001-src-commands-mcp-tools-doc-search.js
Open

fix: the algolia api key is stored in encrypted form... in doc-search.js#8
anupamme wants to merge 1 commit into
angular:mainfrom
anupamme:fix-repo-cli-builds-v-001-src-commands-mcp-tools-doc-search.js

Conversation

@anupamme

@anupamme anupamme commented Aug 1, 2026

Copy link
Copy Markdown

Summary

Address critical severity security finding in src/commands/mcp/tools/doc-search.js.

Vulnerability

Field Value
ID V-001
Severity CRITICAL
Scanner multi_agent_ai
Rule V-001
File src/commands/mcp/tools/doc-search.js:44
Assessment Likely exploitable
Chain Complexity 2-step

Description: The Algolia API key is stored in encrypted form directly in source code with decryption keys also embedded, making it effectively plaintext. An attacker with source code access can extract and decrypt the API key to gain unauthorized access to external services.

Evidence

Exploitation scenario: Attacker gains read access to source code repository, extracts encrypted API key and decryption constants, runs decryption logic locally to obtain plaintext API key, then makes unauthorized requests.

Scanner confirmation: multi_agent_ai rule V-001 flagged this pattern.

Threat Model Context

This is a Node.js library - vulnerabilities affect downstream consumers who use this package.

Changes

  • src/commands/mcp/tools/doc-search.js

Behavior Preservation

The change is scoped to 1 file on the vulnerable path; it only tightens handling of untrusted input and leaves valid inputs unaffected.


This change addresses a pattern flagged by static analysis. The code path handles user-influenced input and the fix reduces the attack surface against both manual and automated exploitation.


Automated security fix by OrbisAI Security

The Algolia API key is stored in encrypted form directly in source code with decryption keys also embedded, making it effectively plaintext
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant