T09 · Insecure Skill Coding Practices
- Location
scripts/download.sh:72- Finding
Path Traversal and Arbitrary File Overwrite Through Untrusted Episode Metadata
- Content
View full analysis
&1 | tail -1 # Check if conversion succeeded if [ ! -f "$MP3_FILE" ]; then echo -e "${RED}Error: Conversion failed${NC}" exit 4 fi # Delete m4a (unless KEEP_M4A=true) if [ "$KEEP_M4A" != "true" ]; then echo "Deleting m4a..." rm "$M4A_FILE" fi # Save show notes as markdown echo "Saving show notes..." echo "$INFO" | jq -r '.props.pageProps.episode.shownotes' > "$NOTES_FILE" ``` ### Technical Analysis The podcast name and episode title are obtained from remotely supplied Xiaoyuzhou metadata and used directly as directory and file-name components. The script does not reject path separators, `..` traversal components, control characters, or other unsafe file-name content. Shell quoting prevents word splitting and command substitution, but it does not prevent filesys ...[truncated 2187 chars]- Remediation
View remediation
