Social media, in recent times, has with eased an explosion of data with so many social media platforms available to interact and express opinions freely. This has led to easy access to the privacy of social media users which raise broader security concerns and issues. The present paper provides an overview of various sentiment analysis approaches and techniques for social media security and analytics. The multiple security application domains like deception detection, anomaly detection, risk management, and disaster relief have been identified where sentiment analysis is used for social media security. An indepth study on security issues related to data provenance, distrust, e-commerce security, consumer security breaches, market surveillance, credibility, and risk assessment in social media have been presented. A comparison of various techniques, methodologies, dataset, and application domain where sentiment analysis is used has been discussed. The present work discusses the results of different machine learning techniques based on the performance metrics that have been used for the implementation of sentiment analysis in the respective security domains. It identifies the various gaps, issues, and the recent advancements in the field and presents a line of work that needs to be carried forward in future.