What sources of information should a commercial pilot review before takeoff to become aware of military activity that might pose a risk to their flight?
All countries chart Special Use Airspace (with various classifications such as Prohibited, Restricted, Danger, Warning, Alert, etc.) designated for military training, defense or other national security purposes, along with the hours it is active (if not full time). Many national and international authorities also publish lists/maps of conflict zones and risk levels.
When planning a flight, airline dispatchers will generally avoid SUA and conflict zones. This includes even SUA expected to be inactive at flight time because delays before departure or en route could change that, so it's simpler to just use a route that is valid at all times, which is generally easy to do by following charted airways. However, special routes to avoid severe weather, which are inherently time-sensitive anyway, may go through inactive SUA.
Different airlines will have different policies on conflict zones and how much risk is too much; some knowingly fly into conflict zones to cash in on desperate travelers with no other options, though they usually stop doing that after one or two of their planes get shot down.
The pilot will review the flight plan before departure and contact the dispatcher with any questions, which a route through SUA or a conflict zone would likely generate, and won't accept it until they are satisfied. However, since they spend all day flying planes rather than staying up to date on military conflicts around the world, they are often at the mercy of dispatchers (and airline policy) when it comes to rapidly changing conflict zones.