Data is one of the most precious assets an organization can have; it may have a huge impact on its longterm performance, or even, existence. Hence, data quality and data security remain a real challenge. Ensuring the quality and security of data should never be considered as an expense, but as a wise investment. On the one hand, data should be protected to prevent attacks or violations of their confidentiality, integrity, and availability. On the other hand, it must be of high quality to ensure the efficiency of the decision-making process. Unfortunately, the majority of existing works deal with quality and security separately whereas these two areas are closely related and may be jointly addressed;this can be handled in three ways: quality and security could be mutually blocked, security can be used to improve quality, and inversely, quality can serve to enhance security. In this paper, we present a study on big data quality and security, the conflict between them as well as our proposed approach that uses Artificial Intelligence to enforce quality in the service of security by improving the quality of log data before applying Machine Learning algorithms to detect threats.