facebook state
Facebook will now alert customers about attacks from "state-sponsored actors." Reuters/Dado Ruvic

Facebook will now tell you if your account is under attack from people suspected of working for governments. The company revealed the new feature Friday, detailing how the site's desktop version will alert users to attacks from "state-sponsored actors."

However, an alert will not necessarily mean Facebook is being compromised. Rather, the notification may show that the device in use has been infected with malware. Facebook will not explain most of the time how it decided the user was under attack, in a move the company claims will help protect the methods that make this feature possible.

"While we have always taken steps to secure accounts that we believe to have been compromised, we decided to show this additional warning if we have a strong suspicion that an attack could be government-sponsored," said Alex Stamos, chief security officer at Facebook. "We do this because these types of attacks tend to be more advanced and dangerous than others, and we strongly encourage affected people to take the actions necessary to secure all of their online accounts."

The prompt will ask the user if they want to switch on "Login Approvals." With this feature activated, Facebook will send a special code to the user's mobile phone and ask for the code during login. Assuming a person trying to fraudulently log in does not have access to the licensed user's phone, this will stop that unauthorized user from getting into the account.

The news follows a move by Facebook and several other tech companies to put a stop to a cybersecurity information sharing bill due for consideration in the U.S. Senate. CISA, as it is known, aims to improve information sharing to boost cybersecurity in the U.S. The Computer and Communications Industry Association, which represents tech giants like Facebook, Google and Yahoo, said the bill does not do enough to protect users' privacy.