Right now, internal threats to your fort consist of random tantrums and nobles making impossible mandates. However, now that dwarvern personalities are more fleshed out, it's time to make these personalities relevant by applying politics to your fortress.
Factions
All forts have 7 political factions (though they do not necessarily need to actually contain dwarves), one of each type that will be described later. They have randomly generated names. All non-children dwarves support one of the factions, although the amount of effort they will put into supporting their faction varies by dwarf. Factions have an "Agitation" level, which is a similar system to a dwarves happiness level with factors that increase and decrease it. Highly agitated factions can begin planning and carrying out revolts against the nobility or members of the other factions.
Dwarves will switch between factions periodically, with more frequent switches for dwarves with a greater INTELLECTUAL_CURIOSITY changing faction more frequently, and other personality traits affecting when they will switch faction. Dwarves with high LIBERALISM will actively move towards factions with higher agitation, while Dwarves with high DUTIFULNESS will often leave factions that have recently attempted a revolt or are highly agitated.
Nobility, the Ruling Faction and speeches
The ruling faction of a fort is determined by the faction makeup of the Nobility. Each faction gains a certain number of "power" per noble, and the faction with the greatest power becomes the ruling faction.
Here is a list of power granted by each Noble.
Expedition leader: 2
Mayor: 5
Baron : 2
Count: 3
Duke: 4
Monarch: 5
Captain of the Guard: 2
Sherrif: 2
Every other noble is worth 1 power.
The faction that Rules the fortress never gains additional agitation. Factions that have no power at all within the nobility will never lose agitation. Mayor, the elected title, is thus of great importance as the easiest way for factions not represented by the other nobility to gain more power. While factions with no agitation will only care about the social skills of the Mayor, increasingly agitated factions will begin caring more about what faction the Mayor is a part of.
Speeches are another method by which factions can gain or lose agitation. Speeches are made at meeting halls with greater frequency by dwarves who have lower SELF_CONSCIOUSNESS and with greater skill by dwarves who have greater Persuader skill. Speeches made by ruling faction nobles reduce agitation of the other factions. Speeches made by anyone else increase the agitation of their own faction and can convince dwarves to immediately switch faction.
Revolt, Rebellion and Revolution
Factions with very high agitation will have members attempt to organize a Rebellion. The leader of a rebellion is more likely to be a dwarf with high ANGER and ASSERTIVENESS. They will then attempt to recruit other dwarves within the faction. The success of this depends upon the personality of the dwarf they try to recruit, how agitated the faction is, and how happy that dwarf is. An ecstatic fortress won't rebel even if individual factions are highly agitated, while an unhappy fortress can rebel even with only moderately high agitation. Anyone in a rebellion will try to recruit other dwarves within the faction during free time.
After the rebellion has at least 3 members, they will begin preparing for revolt. This is carried out by dwarves stealing military supplies and stashing them in personal rooms. If a dwarf is caught doing this, the rebellion can be discovered by the justice system, but a dwarf which is in the same faction as the rebellion will not report these actions.
Once supplied, the Revolting action taken by each faction can be vastly different. If the Military Faction revolts during a siege, it will attack the Siege itself (which may or may not be the only positive revolt). The Peasant Faction will raid food stockpiles and vandalize the rooms of nobility. The Industrial Faction will refuse to work. The Diplomat Faction will disrupt the military of your fortress. All factions may barricade meeting rooms and high-traffic areas of your fort as part of their revolt. During this step, a revolt can be calmed by sufficiently reducing their agitation, or can be destroyed by military action. Otherwise, if the revolt continues long enough, they will attempt a revolution.
Revolution is the most dangerous internal threat your fortress can face if it's large enough. Dwarves that are participating in the revolt will attempt to murder nobles of different factions in your fortress and replace them with their own until they become the faction with the greatest level of power. Once this happens, their agitation will drop to zero while the factions of murdered dwarves will become much more agitated, and all their murder charges will be removed from the justice system.
The justice system can choose to respond to Rebellions or not. They can arrest rebellion members if they are known to be members of a rebellion, but this increases agitation and can make things worse in the long run. The ideal way of dealing with revolts is to reduce that factions agitation before it becomes a Revolution. They can attempt to break up a revolt less forcefully via warnings which will convince less dedicated dwarves and have no positive or negative affect on agitation.
List of Factions
The Military Faction is made up of dwarves who believe that dwarves justice should be swift against it's enemies. Dwarves with high military skills, high ORDERLINESS, high DUTIFULNESS and low SYMPATHY are more likely to join the Military Faction. The military faction has agitation increased if the current number of active military dwarves is <10% of the adult population and while an active siege is happening. Their agitation is decreased by an army with >20% of the adult population and by killing invaders directly in combat (not by traps). The Military faction therefore becomes dangerous if you attempt to turtle your way through a siege instead of directly confronting the enemy with weapons.
The Diplomatic Faction is made up of dwarves who desire peace with the other civilizations of the world. Dwarves with high social skills, high TRUST, high COOPERATION and high SYMPATHY are more likely to join this faction. Their agitation is increased by making enemies, destroying caravans and breaking agreements with elves. Their agitation is decreased by trading with any caravan. The Diplomatic faction therefore becomes dangerous if you keep stealing stuff from caravans.
The Industrial Faction is made up of dwarves who desire increased wealth and prosperity for the fortress. Dwarves with high crafting skills, high ACHIEVEMENT_STRIVING, high ACTIVITY_LEVEL and high SELF_DISCIPLINE are more likely to join this faction. Their agitation is increased by having masterwork items destroyed and by not producing much wealth, and also by having strange moods fail. Their agitation is decreased by production of artifacts, masterwork items and great amounts of wealth. The Industrial faction becomes dangerous when the economy of a fortress stagnates.
The Peasant Faction is made up of dwarves who desire better living standards. Dwarves with very few skills, high ALTRUISM and high VULNERABILITY are more likely to join this faction. Their agitation is increased if there are substandard bedrooms, food and drinks available for it's members. Agitation decreases in the opposite situation. This faction becomes dangerous if you have a lot of unskilled dwarves in your fortress and if you have generally substandard living conditions for them.
The Safety Faction is made up of dwarves who don't enjoy the idea of dying. Dwarves will join this faction if a lot of deaths are happening in your fortress. They are also more likely to join if they are parents, if they are wounded or if they are doctors. Their agitation is increased by dwarves dying or becoming wounded, and their agitation is decreased by dwarves being healed and periods of peace. This faction becomes dangerous if you perform actions such as exterminating inbound migrants, mindlessly slaughtering your own dwarves and generally being a tyrant.
The Religious Faction is made up of dwarves with great reverence for the gods. Dwarves will join this faction more frequently if they worship many gods, if they have high IMAGINATION, high EMOTIONALITY and high CAUTIOUSNESS. Their agitation is increased by ghost hauntings and vampire presence. Their agitation is decreased by killing demons, burying the dead properly and eliminating vampires. This faction becomes dangerous if you ignore vampires and ghosts infesting your fortress.
The Moderation Faction is made up of dwarves who like things the way they currently are. Dwarves will join this faction if none of the others are suitable. Their agitation is increased only by revolts from the other factions, and this increase is very large such that the moderation faction will act as counter-revolutionaries. Their agitation is decreased by revolts being eliminated, regardless of method. They become dangerous during times of political turmoil if you decide to allow the Revolution to win.