Dead code frequently contains outdated or unpatched libraries and dependencies, often with known CVEs; eliminating it removes these vulnerable components from the final executable, directly reducing the attack surface.
Open the full topic