T09 · Insecure Skill Coding Practices
- Location
scripts/generate_itinerary.py:312- Finding
Unescaped Data Injection in Generated HTML Itineraries
- Content
View full analysis
') content_parts.append(f'Day {day["day_number"]} - {day["date"]} ({day["weekday"]})') content_parts.append(f'') # Weather if day['weather']: w = day['weather'] content_parts.append(f'🌤️ {w.get("condition", "N/A")} | {w.get("temperature", "N/A")}') # Bookings if day['bookings']: for booking in day['bookings']: if booking['type'] == 'flight': f = booking['data'] content_parts.append(f'✈️ Flight: {f.get("airline", "N/A")} {f.get("flight_number", "N/A")}') elif booking['type'] == 'hotel': h = booking['data'] content_parts.append(f'
{f.get("departure_time", "N/A")} → {f.get("arrival_time", "N/A")}🏨 Hotel: {h.get("name", "N/A")}') # Activities placeholder if day['activities']: content_parts.append('
Check-in: {h.get("checkin_date", "N/A")}- ')
for activity in day['activities']:
content_parts.append(f'
- {activity} ') content_parts.append('
- Remediation
View remediation
``` 7. Add tests containing HTML metacharacters, event handlers, SVG payloads, and malformed values to verify that they are rendered as text. ]]>
