Key to reliable manufacturing systems is ensuring the trustworthiness of the decision-making and control mechanisms that supplant human control, i.e., systems need to remain safe while being resilient against functional failures, unpredictable changes, and cyber-security threats. We present a correct-by-construction approach to identify and analyze essential requirements that ensure the safety and security of a manufacturing system using a combination of System Theoretic Process Analysis (STPA)-based verification and attack simulation. This approach utilizes formal modeling and analysis to remove ambiguities in the requirement and specify safety properties that should be satisfied in system design. Potential safety hazards are identified using STPA-based model checking and possible cyber-security threats are diagnosed through attack simulation. Additional safety and security constraints inhibiting the hazards and threats are generated to improve the system design accordingly. Our approach is demonstrated on an autonomous assembly line system case study.