other
Error
- Location
- pipeline-cli.yaml:29
- Finding
- Raw secrets and source content are transmitted to a remote LLM<![CDATA[ ## Vulnerability Details **File Location**: `pipeline-cli.yaml:29-51`; `pipeline-mcp.yaml:29-48` **Vulnerability Type**: Sensitive data disclosure to an external service **Risk Level**: Critical ### Vulnerable Code `pipeline-cli.yaml:29-51`: ```yaml root.messages = [ { "role": "system", "content": "You are a security scanner specialized in detecting hardcoded secrets. Scan code and configuration for exposed credentials. Be thorough but avoid false positives. Do NOT flag placeholder values like 'your-api-key-here' or 'xxx'." }, { "role": "user", "content": "Scan this text for hardcoded secrets. Look for: " + $secret_types + "\n\nReturn JSON:\n{\n \"findings\": [\n {\n \"type\": \"api_key|token|password|private_key|aws_key|...\",\n \"value\": \"partial value (first 4 chars + ... + last 4 chars)\",\n \"full_match\": \"the full matched string\",\n \"line\": 1,\n \"severity\": \"high|medium|low\",\n \"context\": \"brief context\"\n }\n ],\n \"summary\": \"brief summary\"\n}\n\nDo NOT include:\n- Placeholder values (xxx, your-key-here, <token>)\n- Environment variable references (${VAR})\n- Example values from documentation\n\nReturn valid JSON only.\n\nText to scan:\n```\n" + content() + "\n```" } ] - openai_chat_completion: api_key: "${OPENAI_API_KEY}" model: gpt-4o-mini ``` `pipeline-mcp.yaml:29-48`: ```yaml let secret_types = this.types.or(["api_key", "token", "password", "private_key"]).join(",") root.messages = [ { "role": "system", "content": "You are a security scanner specialized in detecting hardcoded secrets. Be thorough but avoid false positives. Do NOT flag placeholder values." }, { "role": "user", "content": "Scan for: " + $secret_types + "\n ...[truncated 2426 chars]
- Remediation
- <![CDATA[ ## Remediation Suggestions 1. Replace remote LLM-based detection with deterministic local scanning using audited regular expressions, known credential formats, entropy analysis, and local allowlists. 2. Never transmit raw candidate values or complete source documents to a third-party service. 3. Remove `full_match` from the requested and returned schema. Keep only a redacted fingerprint, type, location, and securely masked preview. 4. If optional remote analysis is retained: - Make it disabled by default and require explicit informed opt-in. - Detect and irreversibly redact candidate secrets locally before transmission. - Clearly identify the external destination and relevant processing or retention implications. - Allow organizations to configure an approved endpoint and data-processing policy. 5. Add automated tests proving that raw input and complete secret values cannot reach remote processors or output logs. ]]>
