From Micro to Macro: Scaling Software Security from Code-Level to System-Wide Protection