After buying a used computer from a stranger, what steps should be taken to ensure it is safe to use for connecting to a network that handles sensitive information? (I am defining "sensitive" broadly: notes to a loved one, corporate trade secrets, and the location of several of Russia's submarines.)
I am imagining that the system's components should be passively inspected and dealt with in a more active way. By "active" I mean, for instance, repeatedly erasing a mechanical storage device with the assumption that it contains some form of malware.
I am assuming that any used computer may have reparable security problems. The seller may not be aware of those problems. In more extreme cases, he or she may intentionally provide a compromised system.
A common, but of course not universal, situation arises when buying a system on eBay which previously ran Windows but will now be used for Linux.
In the event that a system's issues are actually too severe to repair, it would be nice to know that so that it can be avoided.