Ensuring cybersecurity in smart cities (SCs) presents a complex, multidimensional challenge that requires robust methodologies for threat identification, risk assessment, and the development of effective countermeasures. This article presents a web-based expert system powered by ontologies, designed to assist cybersecurity architects in modeling and analyzing security scenarios in SC environments, with a particular emphasis on open data. The system employs formal ontologies to structure cybersecurity knowledge, including assets, threats, vulnerabilities, and countermeasures, and uses automated reasoning to support informed decision-making and risk mitigation. The case study is based on Business Process Model and Notation extended for Smart Cities (BPMN-SC), tailored to SC services and data flows. The results demonstrate that an ontology-driven expert system can enhance transparency, consistency, and formal rigor in cybersecurity governance within SC initiatives driven by open data.