T09 · Insecure Skill Coding Practices
- Location
scripts/collect-network.js:85- Finding
Incomplete Redaction Can Persist Authentication and Session Data in Plaintext
- Content
View full analysis
` : redactValue(key, value); } return obj; } if (typeof body === 'object') return redactObject(body); return truncate(String(body)); } ``` `scripts/collect-network.js:142-153`: ```js const response = await originalFetch(input, init); const cloned = response.clone(); let responseText = null; try { responseText = await cloned.text(); } catch {} const parsed = tryParseJson(responseText); pushLog({ source: 'fetch', url, method, durationMs: Date.now() - startedAt, requestHeaders, requestBody, status: response.status, ok: response.ok, responseHeaders: normalizeHeaders(response.headers), responseBody: parsed ? redactObject(parsed) : truncate(responseText), }); ``` `scripts/collect-network.js:180-185`: ```js let responseBody = null; try { if (typeof this.responseText === 'string') { const parsed = tryParseJson(this.responseText); responseBody = parsed ? redactObject(parsed) : truncate(this.responseText); } } catch {} ``` `scripts/collect-network.js:204` and `scripts/collect-netwo ...[truncated 3890 chars]- Remediation
View remediation
