Commit c7b4981
fix(security): Add integrity verification before chmod +x in btrace-perfetto skill
Add validation to verify downloaded trace_processor file is a valid executable
before making it executable. This prevents potential execution of malicious or
corrupted downloads.
Changes:
- Verify file exists and has non-zero size
- Check file type to confirm it's an executable
- Remove file and exit with error if validation fails
- Only chmod +x after successful verification
Fixes: https://linear.app/getsentry/issue/EME-1060
Parent ticket: https://linear.app/getsentry/issue/VULN-1513
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>1 parent 6cf6485 commit c7b4981
1 file changed
+12
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
26 | 37 | | |
27 | 38 | | |
28 | 39 | | |
| |||
0 commit comments