T09 · Insecure Skill Coding Practices
- Location
scripts/frame.sh:61- Finding
FFmpeg Filtergraph Injection Through Unvalidated Frame Index
- Content
View full analysis
- Remediation
View remediation
&2 exit 2 fi ``` Place this validation after option parsing and before `mkdir` or any FFmpeg invocation. Additional hardening measures: 1. Reject missing values explicitly for `--index`, `--time`, and `--out` rather than allowing a subsequent option to be consumed as a value. 2. Apply a reasonable maximum frame index to reduce accidental or intentional resource consumption. 3. Validate `--time` against a strict supported timestamp format. 4. Continue passing all filenames as quoted arguments. 5. Add negative tests covering filtergraph metacharacters, alphabetic values, negative numbers, empty values, and excessively large integers. 6. Run FFmpeg with least privilege and restrict filesystem and network access when processing untrusted media. ]]>
