This is a general travel warning given by US State Department. (under Level 04 Category). Although US travel advisory re SL issued due to COVID situation, the threat on terrorism also included by default.The similar travel warning have been issued to many countries that include INDIA, PAKISTAN, BANGLADESH, MALDIVES etc.
SRI LANKA
https://travel.state.gov/content/travel/en/traveladvisories/traveladvisories/sri-lanka-travel-advisory.html
INDIA
https://travel.state.gov/content/travel/en/traveladvisories/traveladvisories/india-travel-advisory.html
PAKISTAN
https://travel.state.gov/content/travel/en/traveladvisories/traveladvisories/pakistan-travel-advisory.html
BANGLADESH
https://travel.state.gov/content/travel/en/traveladvisories/traveladvisories/bangladesh-travel-advisory.html
MALDIVES
https://travel.state.gov/content/travel/en/traveladvisories/traveladvisories/maldives-travel-advisory.html