T09 · Insecure Skill Coding Practices
- Location
index.js:296- Finding
Bearer credential and source data can be transmitted to an untrusted configurable endpoint
- Content
View full analysis
Vulnerability Details
File Location:
index.js:296-326
Vulnerability Type: Credential disclosure through an insufficiently validated network destination
Risk Level: HighTechnical Analysis
The
solidifypublishing workflow sends an authorization secret, the complete contents ofindex.js, and basic environment information to a remote endpoint:js const response = await fetch(publishUrl, { method: 'POST', headers: { 'Content-Type': 'application/json', 'Authorization': `Bearer ${nodeSecret}` }, body: JSON.stringify({ protocol: 'gep-a2a', protocol_version: '1.0.0', message_type: 'publish', message_id: `msg_${Date.now()}_${Math.random().toString(16).slice(2, 6)}`, sender_id: 'log-analyzer-capsule', timestamp: new Date().toISOString(), payload: { assets: [{ type: 'Capsule', schema_version: '1.5.0', trigger: ['log', 'error', 'stack trace', 'exception', 'debugging', '分析日志'], summary: packageJson.description, content: `EvoMap Error Log Analyzer Capsule\n\nFunctions:\n- parseError(logText): Parse stack traces, extract error type, message, file paths\n- classifyError(error): Classify errors as network/io/permission/memory/timeout/unknown\n- extractLessons(logText): Extract prevention suggestions from error history\n- summarize(logs, options): Batch analyze logs, generate summary report\n- analyzeEvolverLogs(): Analyze logs from ~/evolver-memory/\n\nSupported languages: JavaScript/Node.js, Python, Java/Kotlin, Go`, code_snippet: indexJs, confidence: 0.8, blast_radius: { files: 1, lines: 450 }, outcome: { status: 'success', score: 0.8 }, env_fingerprint: { platform: process.platform, arch: process.arch }, }], }, }), });The destination is constructed from
A2A_HUB_URL, falling back to `https://e ...[truncated 2677 chars]- Remediation
View remediation
Remediation Suggestions
-
Restrict publishing to trusted origins
- Parse the destination with
new URL(). - Require
https:. - Allow only an explicit list of approved hostnames, preferably exactly
evomap.aiand any documented API hostname. - Reject URLs containing unexpected ports, credentials, or non-approved paths.
- Parse the destination with
-
Do not attach credentials to arbitrary URLs
- Construct the publish endpoint from a fixed trusted origin rather than accepting a complete URL from the environment.
- If endpoint customization is required for development, use a separate development credential that cannot access production resources.
- Require an explicit unsafe-development flag before permitting non-production hosts.
-
Control redirects
- Configure the request to reject or manually validate redirects.
- Never forward the
Authorizationheader unless every redirect destination independently passes the same HTTPS and origin checks.
-
Require informed confirmation
- Before publishing interactively, display the validated destination and the categories of data being uploaded.
- Require explicit confirmation unless running in a separately configured, trusted CI environment.
-
Minimize transmitted data
- Upload only files and metadata necessary for the publishing protocol.
- Avoid transmitting host platform and architecture unless required.
- Scan source payloads for secrets before upload and fail closed if likely credentials are detected.
-
Harden credential handling
- Use short-lived, narrowly scoped publishing tokens.
- Retrieve credentials from an appropriate secret manager where possible.
- Rotate the node secret immediately if it may already have been sent to an untrusted endpoint.
- Ensure error reporting and request diagnostics never log the authorization header.
-
Add security tests
- Verify that HTTP destinations, look-alike d ...[truncated 166 chars]
-
