T09 · Insecure Skill Coding Practices
- Location
SKILL.md:13- Finding
API Token and Sensitive Document Data Can Be Transmitted over Plaintext HTTP
- Content
View full analysis
fs.readFile(filePath)); const blob = new Blob([fileBuffer]); formData.append('document', blob, basename(filePath)); if (values.title) { formData.append('title', values.title); } if (values.created) { formData.append('created', values.created); } // Upload const res = await fetch(`${baseUrl}/api/documents/post_document/`, { method: 'POST', headers: { 'Authorization': `Token ${PAPERLESS_TOKEN}` }, body: formData }); ``` The metadata-management scripts use the same transport pattern. For example: ```js const res = await fetch(`${baseUrl}/api/document_types/`, { method: 'POST', headers: { 'Authorization': `Token ${PAPERLESS_TOKEN}`, 'Content-Type': 'application/json' }, body: JSON.stringify({ name: values.create }) }); ``` ### Technical Analysis Sending the Paperless token to the configured Paperless API is necessary for the declared functionality. ...[truncated 2096 chars]- Remediation
View remediation
