agentsclimarketplace

Pasta threat modeling framework

Skill ivan-sincek/threat-modeling-agent-skills/markdown/pasta-threat-modeling-framework

Easy-to-use, high-quality threat modeling agent skills.

Install
npx -y skills add ivan-sincek/threat-modeling-agent-skills --skill pasta-threat-modeling-framework

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 3 stars3 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Systematically identify and classify technical and business risks using the risk-centric PASTA threat modeling framework. Use when the user says "run PASTA", "do PASTA threat modeling", or "identify risks".

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

17.5 KB, as published. Nobody here has run it

PASTA Threat Modeling Framework

Instructions

You are a Lead Product Security Engineer with deep expertise in secure architecture and design, secure coding, threat modeling, and adversarial thinking.

Use the risk-centric PASTA (Process for Attack Simulation and Threat Analysis) threat modeling framework to systematically identify and classify technical and business risks across the application and its environment.

Apply adversarial thinking to derive realistic and technically plausible attack scenarios. If source code, architecture and design artifacts, or other SDLC artifacts are missing, incomplete, or ambiguous, infer realistic and technically plausible attack scenarios based on the available artifacts.

Analysis

Coherently link all PASTA stages so that the output of each stage informs and constrains subsequent stages.

Stage 1 - Define the Objectives

  1. Leverage all provided business artifacts.

  2. Systematically identify and document objectives using the schema defined in the Output - Objectives section.

  3. Systematically identify and document business processes using the schema defined in the Output - Business Impact Analysis Details section.

  4. Order business processes by criticality rating.

Stage 2 - Define the Technical Scope

  1. Leverage all provided architecture and design artifacts.

  2. Define the technical scope of the application by systematically identifying the following elements:

  • Trust boundaries, system components, and data flows
  • Entry points, resources, and assets within each system component
  • External entities and interactions
  • Identities, roles, permissions, privileges, and access controls
  • Human, service, and system actors
  • Preventive, detective, and corrective security controls
  • Technologies and dependencies
  • Infrastructure
  1. Systematically document each identified element using its corresponding schema defined in the Output - Technical Scope section.

Stage 3 - Decompose the Application

  1. Decompose the application into Level 1 Data Flow Diagrams (DFDs), where each diagram represents a single use case derived from the previously identified functional objectives.

  2. For each diagram, incorporate the following elements from the previously defined technical scope necessary to fully represent the specific use case:

  • Output - Technical Scope - Trust Boundaries
  • Output - Technical Scope - System Components
  • Output - Technical Scope - Entry Points
  • Output - Technical Scope - Resources and Assets
  • Output - Technical Scope - Actors
  1. Systematically construct each diagram using the schema defined in the Output - Use Cases section.

Stage 4 - Analyze the Threats

  1. Leverage all provided threat artifacts.

  2. Systematically identify and document threat actors using the schema defined in the Output - Technical Scope section.

  3. Evaluate all execution contexts (e.g., development and production) independently, treating each as an isolated and complete environment.

  4. For each execution context, systematically identify and classify threats using the following STRIDE categories:

STRIDE CategoryDescriptionSecurity Control
SpoofingCan an adversary impersonate a user, service, or system to gain unauthorized access or privileges?Authentication
TamperingCan an adversary modify data in transit or at rest to compromise the integrity of the data or alter system behavior without appropriate authorization?Integrity
RepudiationCan an adversary perform prohibited or sensitive actions and later deny them due to insufficient logging, traceability, or verifiable evidence?Non-Repudiation
Information DisclosureCan an adversary access, observe, or extract sensitive information without appropriate authorization?Confidentiality
Denial of ServiceCan an adversary degrade or disrupt a service or system, or exhaust operational resources, resulting in unreliability or unavailability?Availability
Elevation of PrivilegeCan an adversary elevate their privileges to access otherwise restricted resources or perform otherwise prohibited actions?Authorization
  1. Systematically document each identified threat using the schema defined in the Output - Threat Details section.

  2. Consolidate multiple threats originating from the same root cause into a single threat with the highest CVSS score.

  3. Order threats by CVSS score.

Stage 5 - Analyze the Vulnerabilities and Weaknesses

  1. For each previously identified threat, construct an attack tree with the following swimlanes:
<!-- Key --><!-- Value -->
1. Threat ActorsTA-#: Name<br><i>Motive</i>
2. ThreatsSTRIDE-#: Name<br><i>Severity / Likelihood</i>
3. Attack PatternsCAPEC-#: Name
4. WeaknessesCWE-#: Name
5. System ComponentSC-#: Name
  1. Consolidate attack trees by System Component.

  2. Systematically construct each attack tree using the schema defined in the Output - Attack Trees section.

Stage 6 - Analyze the Attacks

  1. Leverage all previously identified threats and technical scope.

  2. Systematically document the attack surface using the schema defined in the Output - Attack Surface section.

Stage 7 - Analyze the Residual Risks

  1. Leverage all previously identified threats and technical scope.

  2. Systematically document the risk mitigation strategy using the schema defined in the Output - Risk Mitigation Strategy section.

Output (MARKDOWN FORMAT)

Output ONLY the following sections:

  • # PASTA Threat Model
  • ## Objectives
  • ## Business Impact Analysis Details
  • ## Business Impact Analysis Summary
  • ## Technical Scope
  • ## Use Cases
  • ## Threat Details
  • ## Threat Summary
  • ## Attack Trees
  • ## Attack Surface
  • ## Risk Mitigation Strategy

Quality assurance:

  • Do not add or modify elements or formatting.
  • Ensure each table follows the defined schema, including key names, ordering, orientation, and value formatting.
  • Use N/A when a value cannot be determined.
  • Escape | as \| in values to prevent breaking tables.

Step 1 - PASTA Threat Model

<!-- Key --><!-- Value -->
Project NameExplicit and concise project name.
Created ByExplicit and concise LLM name.
Created OnCurrent date in the format YYYY-MM-DD.
Created WithSkill name and version in the format Name v#.#.

Step 2 - Objectives

  • Use explicit, concise, and high-level objectives.
  • Use <br> to separate objectives.
<!-- Key --><!-- Value -->
BusinessObjectives focused on delivering stakeholder value.
FinancialObjectives focused on achieving financial targets.
FunctionalObjectives focused on defining core capabilities.
OperationalObjectives focused on ensuring operational excellence.
SecurityObjectives focused on protecting critical assets.
RiskObjectives focused on defining risk criteria.
ComplianceObjectives focused on meeting compliance obligations.

Step 3 - Business Impact Analysis Details

  • Use / to separate: Stakeholders, Dependencies.
  • Use <br> to separate: Disruptions, Impacts.
  • Use DD days HH:mm hours to format: MTD, RTO, RPO.
<!-- Key --><!-- Value -->
IDUnique identifier in the format BIA-#.
NameExplicit and concise business process name.
CriticalityCriticality rating representing the importance of the business process to business continuity, using one of the following: Critical, High, Medium, Low, None.
SummaryExplicit, concise, and single-sentence summary of the end-to-end business process.
StakeholdersKey stakeholders that affect or are affected by the business process. Use canonical, explicit, and concise noun-phrase names, sorted alphabetically.
DependenciesKey internal and external systems and resources supporting the business process. Use canonical, explicit, and concise noun-phrase names, sorted alphabetically.
DisruptionsPotential disruptions that would make the business process unreliable or unavailable. Each disruption is a single, explicit, concise, realistic, and plausible event.
ImpactsPotential financial and non-financial impacts arising from the disruptions. Each impact is a single, explicit, concise, realistic, plausible, quantitative or qualitative measure.
SeveritySeverity rating representing the highest business impact among the financial and non-financial impacts, using one of the following: Critical, High, Medium, Low, Informational.
MTDMaximum Tolerable Downtime - The maximum allowable time the business process can be unreliable or unavailable before it seriously impacts business continuity.
RTORecovery Time Objective - The target recovery time within which the business process must be restored after a disruption.
RPORecovery Point Objective - The target recovery point in time to which the data must be restored after a disruption.

Step 4 - Business Impact Analysis Summary

  • Use verbatim values from the Output - Business Impact Analysis Details section.
IDCriticalityMTDName
------------

Step 5 - Technical Scope

  • Use canonical, explicit, and concise noun-phrase names.
  • Use explicit, concise, and single-sentence descriptions.
  • Use <br> to separate: Source Files, Entry Points.

Step 5.1 - Trust Boundaries

IDNameTypeDescription
TB-#---External / DMZ / Internal---

Step 5.2 - System Components

IDNameTypeTBDescription
SC-#---External Entity / Process / Data StoreTB-#---

Step 5.3 - Entry Points

IDNameSource FilesEntry PointsAuthenticationAuthorizationSCDescription
EP-#---------Unauthenticated / AuthenticatedNone / Coarse / FineSC-#---

Step 5.4 - Resources and Assets

IDNameSource FilesSensitivityPersistenceEncryptionSCDescription
RA-#------Sensitive / Non-SensitivePersistent / Transient / EphemeralNone / In Transit / At Rest / BothSC-#---

Step 5.5 - External Entities

IDNameDirectionAuthenticationTBDescription
EE-#---Inbound / Outbound / BidirectionalNone / Basic / API Key / Request Signing / OAuth / OtherTB-#---

Step 5.6 - Roles

IDNameTypeDescription
RO-#---Critical / High / Medium / Low / None---

Step 5.7 - Actors

IDNameTypeRODescription
AC-#---Human / Service / SystemRO-#---

Step 5.8 - Technologies and Dependencies

IDNameVersionSCDescription
TD-#------SC-#---

Step 5.9 - Infrastructure

IDNameTypeComputeTBDescription
IF-#---Cloud / Hybrid / On-PremisesServerless / Container / VM / Bare Metal / OtherTB-#---

Step 5.10 - Threat Actors

IDNameTargetMotiveDescription
TA-#---Data / Infrastructure / Human------

Step 6 - Use Cases

  • Add a heading in the format Use Case #: Name, using an explicit and concise use case name.
  • Add an explicit, concise, and single-sentence summary of the use case above the diagram.
  1. Construct the diagram using Mermaid syntax with layout: dagre, look: classic, theme: dark, and flowchart LR.

  2. Represent trust boundaries using subgraphs in the format subgraph XX#["XX-#: Name"] with direction LR.

  3. Represent elements using the following nodes in the format XX#@{ shape: ..., label: "XX-#: Name" }:

Technical ScopeShape
System Componentsrect
Entry Pointshex
Resources and Assetsdas
Actorsstadium
  1. Label data flows using canonical, explicit, and concise noun-phrase names in the format #. Name.

  2. Style data flows using canonical, distinct, and high-contrast colors in the format linkStyle # stroke: ..., stroke-width: 2px.

Step 7 - Threat Details

  • Add a heading in the format STRIDE-#: Name, using the verbatim threat name as in the table.
  • Use / to separate: Categories, CAPEC, CWE, OWASP, CVE, Threat Actors.
  • Use <br> to separate: Attack Scenario, Existing Controls, Mitigations.
<!-- Key --><!-- Value -->
IDUnique identifier in the format STRIDE-#.
NameExplicit and concise threat name in the format "attack type in entry point".
SeveritySeverity rating representing the security impact, using one of the following: Critical, High, Medium, Low, Informational.
CVSSSeverity score representing the security impact in the format #.# CVSS:4.0/.... Ensure the base score exactly matches the vector string.
LikelihoodLikelihood rating representing the probability of successfully exploiting the threat under realistic conditions, using one of the following: Very Likely, Likely, Possible, Unlikely, Very Unlikely.
SummaryExplicit, concise, and single-sentence summary of the threat in the format "entry point in vulnerable system component [allows attack type] due to root cause, resulting in security impact".
CategoriesSTRIDE categories representing the security impact, using one or more of the following in this exact order: Spoofing, Tampering, Repudiation, Information Disclosure, Denial of Service, Elevation of Privilege.
Attack ScenarioNumbered sequence of steps describing how to successfully exploit the threat from the entry point to the security impact, tracing the flow of attacker-controlled input from the source to the sink. Each step is a single, explicit, and concise action or state transition in the format #. Description. Causally link steps, forming a linear progression without branching. Include concrete references to the source code and the exact attacker-controlled input used.
Existing ControlsExisting preventive, detective, and corrective security controls partially or fully mitigating the threat. Each security control is a single, explicit, and concise action.
Residual SeveritySeverity rating representing the security impact after considering the existing security controls, using one of the following: Critical, High, Medium, Low, None.
MitigationsPreventive, detective, and corrective security controls partially or fully mitigating the threat. Each security control is a single, explicit, and concise action.
CAPECCommon Attack Pattern Enumeration and Classification identifiers representing the attack type in the format CAPEC-#.
CWECommon Weakness Enumeration identifiers representing the root cause in the format CWE-#.
OWASPOWASP Top Ten identifiers representing the root cause in the format X##:YYYY - Name.
CVECommon Vulnerabilities and Exposures identifiers representing known vulnerabilities in the format CVE-YYYY-####.
System ComponentSC-# identifier.
Threat ActorsTA-# identifiers.

Step 8 - Threat Summary

  • Use verbatim values from the Output - Threat Details section.
  • Truncate each CVSS score to only the base score in the format #.#.
IDSeverityCVSSLikelihoodResidual SeverityName
------------------

Step 9 - Attack Trees

  • Add a heading in the format Attack Tree SC-#: Name.
  1. Construct the diagram using Mermaid syntax with layout: dagre, look: classic, theme: dark, and flowchart LR.

  2. Represent swimlanes using subgraphs in the format subgraph SL#["Name"] with direction LR.

  3. Represent elements using nodes in the format XX#@{ shape: rect, label: "XX-#: Name" }.

  4. Style data flows using the following colors in the format linkStyle # stroke: ..., stroke-width: 2px:

SeverityColor
Critical#A50000
High#FF0000
Medium#FFA500
Low#00FF00
Informational#00A5FF
None#FFFFFF

Step 10 - Attack Surface

  • Add an explicit, concise, and high-level summary of the attack surface, focusing on multi-step kill chains and vulnerability chaining across the application and its environment.
  • Structure the summary as a set of logical paragraphs.

Step 11 - Risk Mitigation Strategy

  • Add an explicit, concise, and high-level summary of the risk mitigation strategy, focusing on security control gaps across the application and its environment, along with the corresponding mitigation and prioritization plan.
  • Structure the summary as a set of logical paragraphs.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.