Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | // SPDX-FileCopyrightText: 2024-2026 Hack23 AB
// SPDX-License-Identifier: Apache-2.0
/**
* @module Types/PoliticalThreats
* @description Political Threat Assessment types adapted from ISMS threat modeling
* (STRIDE, MITRE ATT&CK, attack trees) applied to parliamentary political dynamics.
*
* The Political STRIDE framework maps information-security threat categories to
* equivalent political intelligence threat categories for structured analysis of
* European Parliament activity.
*
* @see {@link https://github.com/Hack23/ISMS-PUBLIC/blob/main/Threat_Modeling.md} ISMS Threat Modeling Policy
*/
import type {
PoliticalActorType as ClassificationPoliticalActorType,
ImpactLevel as ClassificationImpactLevel,
} from './political-classification.js';
// ─── Type aliases to canonical classification types ───────────────────────────
// These align Political Threats with the political-classification module (#804)
// to avoid divergent type definitions and name collisions.
/**
* Political actor types in the European Parliament context.
* Adapted from ISMS threat agent classification for political intelligence.
*
* Extends the canonical classification module with threat-specific roles
* (rapporteur / shadow_rapporteur) used only in threat consequence trees.
*/
export type PoliticalActorType =
| ClassificationPoliticalActorType
| 'mep' // Alias for individual_mep in threat-assessment context
| 'rapporteur' // Legislative rapporteur for a specific procedure
| 'shadow_rapporteur'; // Shadow rapporteur from opposing group
/**
* Impact severity levels for political consequences.
* Alias for the canonical classification module ImpactLevel.
*
* Note: The threat assessment module uses this directly. Downstream code
* should prefer importing ImpactLevel from political-classification.
*/
export type ImpactLevel = ClassificationImpactLevel;
// ─── Political STRIDE Categories ──────────────────────────────────────────────
/**
* Political STRIDE threat categories — adapted from information security STRIDE.
*
* Each category maps a classic security threat to its political equivalent:
* - **Shift** ← Spoofing: Coalition shifts, political realignment, defections
* - **Transparency** ← Tampering: Information asymmetry, procedural opacity
* - **Reversal** ← Repudiation: Policy reversals, legislative rollbacks
* - **Institutional** ← Information Disclosure: Institutional power grabs
* - **Delay** ← Denial of Service: Legislative delays, procedural obstruction
* - **Erosion** ← Elevation of Privilege: Democratic norm degradation
*/
export type PoliticalThreatCategory =
| 'shift' // Coalition shifts, political realignment, defections
| 'transparency' // Information asymmetry, procedural opacity, hidden agendas
| 'reversal' // Policy reversals, legislative rollbacks, abandoned positions
| 'institutional' // Institutional power grabs, procedural manipulation
| 'delay' // Legislative delays, filibustering, procedural obstruction
| 'erosion'; // Public trust erosion, democratic norm degradation
// ─── Actor Threat Profiles ────────────────────────────────────────────────────
/**
* Political actor threat profile — adapted from ISMS threat agent classification.
*
* Models capability × motivation × opportunity (CMO) for each political actor,
* parallel to the threat agent classification in ISMS security assessments.
*/
export interface PoliticalActorThreatProfile {
/** Name of the political actor (group, institution, individual) */
readonly actor: string;
/** Classification of the actor type */
readonly actorType: PoliticalActorType;
/** Resources and influence capacity: high = major EP group or institution */
readonly capability: 'high' | 'medium' | 'low';
/** Incentive to act against current political trajectory */
readonly motivation: 'high' | 'medium' | 'low';
/** Current political window of opportunity to act effectively */
readonly opportunity: 'high' | 'medium' | 'low';
/** Past similar actions or demonstrated threat behaviours */
readonly trackRecord: readonly string[];
/** Which Political STRIDE categories this actor threatens */
readonly threatCategories: readonly PoliticalThreatCategory[];
/** Overall threat level derived from CMO composite score */
readonly overallThreatLevel: ImpactLevel;
}
// ─── Political Consequence Trees ──────────────────────────────────────────────
/**
* A single node in a political consequence tree — adapted from attack trees.
* Represents a downstream effect of a political action at a specific timeframe.
*/
export interface ConsequenceNode {
/** Human-readable description of the consequence */
readonly description: string;
/** Estimated probability of this consequence materialising (0–1) */
readonly probability: number;
/** Impact severity if the consequence occurs */
readonly impact: ImpactLevel;
/** Stakeholder groups affected by this consequence */
readonly affectedStakeholders: readonly PoliticalActorType[];
/** Expected timeframe for this consequence to materialise */
readonly timeframe: 'immediate' | 'short-term' | 'medium-term' | 'long-term';
}
/**
* Political consequence tree — adapted from attack trees in ISMS threat modeling.
*
* Traces how a root political action cascades through institutions and actors,
* including mitigating and amplifying factors that affect overall impact.
*/
export interface PoliticalConsequenceTree {
/** The initiating political action being analysed */
readonly rootAction: string;
/** Direct, near-term consequences (days to weeks) */
readonly immediateConsequences: readonly ConsequenceNode[];
/** Secondary effects triggered by immediate consequences (weeks to months) */
readonly secondaryEffects: readonly ConsequenceNode[];
/** Long-term structural implications (months to years) */
readonly longTermImplications: readonly ConsequenceNode[];
/** Factors that could reduce the severity or probability of consequences */
readonly mitigatingFactors: readonly string[];
/** Factors that could increase the severity or probability of consequences */
readonly amplifyingFactors: readonly string[];
}
// ─── Legislative Process Disruption Analysis ─────────────────────────────────
/**
* Stages in the EU legislative process — adapted from kill chain analysis.
* Maps the legislative procedure stages where disruption can occur.
*/
export type LegislativeStage =
| 'proposal' // Commission proposal / own-initiative
| 'committee' // Committee phase (rapporteur, amendments, vote)
| 'plenary_first_reading' // EP first reading plenary vote
| 'council_position' // Council common position adoption
| 'plenary_second_reading' // EP second reading with amendments
| 'conciliation' // Conciliation committee (trilogue)
| 'adoption'; // Final adoption and entry into force
/**
* A disruption point in the legislative process — adapted from kill chain stages.
* Identifies where, how, and by whom the legislative process can be blocked.
*/
export interface DisruptionPoint {
/** The legislative stage where disruption could occur */
readonly stage: LegislativeStage;
/** Which Political STRIDE category the disruption falls under */
readonly threatCategory: PoliticalThreatCategory;
/** Estimated likelihood of disruption at this stage (0–1) */
readonly likelihood: number;
/** Names of actors with capability and motivation to disrupt at this stage */
readonly potentialDisruptors: readonly string[];
/** Available countermeasures to prevent or mitigate disruption */
readonly countermeasures: readonly string[];
}
/**
* Legislative process disruption analysis — adapted from kill chain analysis.
*
* Maps the complete legislative procedure to identify vulnerability points,
* assess overall resilience, and document alternative pathways.
*/
export interface LegislativeDisruptionAnalysis {
/** Name or ID of the legislative procedure being analysed */
readonly procedure: string;
/** Current stage of the procedure */
readonly currentStage: LegislativeStage;
/** All identified potential disruption points across procedure stages */
readonly disruptionPoints: readonly DisruptionPoint[];
/** Overall resilience of the legislative procedure to disruption */
readonly resilience: 'high' | 'medium' | 'low';
/** Alternative legislative pathways if primary route is disrupted */
readonly alternativePathways: readonly string[];
}
// ─── Political STRIDE Assessment ──────────────────────────────────────────────
/**
* Assessment result for a single Political STRIDE threat category.
* Contains threat level, evidence, and analysis for one STRIDE dimension.
*/
export interface PoliticalStrideCategory {
/** Which Political STRIDE category this assessment covers */
readonly category: PoliticalThreatCategory;
/** Assessed threat level for this category */
readonly threatLevel: ImpactLevel;
/** Evidence supporting the threat level assessment */
readonly evidence: readonly string[];
/** Human-readable analysis narrative for this category */
readonly analysis: string;
}
/**
* Complete Political Threat Assessment — the top-level output of the
* political threat assessment pipeline.
*
* Combines all STRIDE categories, actor profiles, consequence trees, and
* legislative disruption analyses into a single structured assessment report.
*/
export interface PoliticalThreatAssessment {
/** Date of the assessment (ISO 8601) */
readonly date: string;
/** Overall threat level across all dimensions */
readonly overallThreatLevel: ImpactLevel;
/** Confidence level in the assessment */
readonly confidence: 'high' | 'medium' | 'low';
/** Political STRIDE analysis for each of the six categories */
readonly strideCategories: readonly PoliticalStrideCategory[];
/** Threat profiles for key political actors */
readonly actorProfiles: readonly PoliticalActorThreatProfile[];
/** Consequence trees for identified high-risk political actions */
readonly consequenceTrees: readonly PoliticalConsequenceTree[];
/** Legislative disruption analyses for active procedures */
readonly legislativeDisruptions: readonly LegislativeDisruptionAnalysis[];
/** Key findings and executive summary points */
readonly keyFindings: readonly string[];
/** Recommended monitoring actions */
readonly recommendations: readonly string[];
}
// ─── Input data type ──────────────────────────────────────────────────────────
/**
* Input data for political threat assessment functions.
*
* Named `ThreatAssessmentInput` to avoid collision with the separate
* `ArticleData` interface in article strategy modules.
* Mirrors the structure of MCP-fetched data used throughout the pipeline.
*/
export interface ThreatAssessmentInput {
/** Voting records from plenary sessions */
readonly votingRecords?: readonly unknown[];
/** Coalition dynamics data */
readonly coalitionData?: readonly unknown[];
/** MEP influence scores */
readonly mepInfluence?: readonly unknown[];
/** Legislative procedure data */
readonly procedures?: readonly unknown[];
/**
* Voting anomaly intelligence.
*
* The existing MCP fetch pipeline and article strategies expose voting
* anomalies under the field name `anomalies`. Both `anomalies` and the
* legacy `votingAnomalies` alias are accepted; `anomalies` takes precedence.
*/
readonly anomalies?: readonly unknown[];
/** @deprecated Use `anomalies` instead — kept for backward compatibility */
readonly votingAnomalies?: readonly unknown[];
/** Parliamentary questions */
readonly questions?: readonly unknown[];
/** Committee data */
readonly committees?: readonly unknown[];
/** Feed data (adopted texts, procedures, MEPs) */
readonly feedData?: Record<string, unknown>;
}
|