T09 · Insecure Skill Coding Practices
- Location
transcribe.py:47- Finding
Unrestricted Local File Upload to External Transcription Service
- Content
View full analysis
- Remediation
View remediation
MAX_AUDIO_SIZE: raise RuntimeError("Audio file exceeds the maximum allowed size") ``` 5. Where operationally possible, restrict input paths to approved media directories and reject paths that resolve outside those directories. 6. Clearly notify users that the selected file will be sent to an external service. For interactive use, consider requiring confirmation before uploading files outside a designated media directory. 7. Avoid keeping more copies of the file in memory than necessary. If supported by the remote API, use bounded or streaming uploads. 8. Add tests confirming rejection of unsupported extensions, non-regular files, oversized files, path traversal outside approved directories, and files with invalid audio signatures. ]]>
