With the development of connected communication and automated driving technologies, connected automated vehicles (CAVs) are expected to gradually replace human-driven vehicles (HDVs), owing to their significant safety advantages. However, widespread adoption of CAVs will still require a considerable amount of time due to constraints such as technological development, legal regulations, and social acceptance. During the transitional period of CAVs’ proliferation, road traffic will comprise vehicles with different levels of connection and automation. These vehicles will differ in technology regarding communication, perception, decision-making, and other aspects, potentially posing severe challenges to mixed traffic flow safety. To address this issue, this paper proposes a mixed traffic flow model from both automation and connection perspectives to consider time delay and communication degradation. Four safety evaluation metrics are employed, and three-speed scenarios are set to investigate the influence of connection levels, automation levels, and their combined effects on mixed traffic flow safety. The result shows that (1) low automation enhances traffic safety in a non-connected environment, whereas medium and high automation decreases traffic safety. Conversely, in a connected environment, the role of automation levels exhibits the opposite pattern. (2) non-connected vehicles enhance traffic safety in a low-automated environment, while connected vehicles diminish it. However, connection level effects are reversed in medium and highly automated environments. (3) In connected and automated environments, traffic safety is increased by non-connected and low-automated vehicles, connected and medium automated vehicles, and connected and highly automated vehicles. However, other vehicle configurations decrease traffic safety. (4) Across various scenarios, the integration of connection and high automation proves beneficial for reducing traffic collision risks and improving traffic safety. In summary, this study provides theoretical support for managing and controlling mixed traffic flow with different automation and connection levels in the future.