Derive Security From Risk logo

Derive Security From Risk

Community
andreaswasita
derive-security-from-risk

Derives security requirements from a named threat.

Overview

Publisherandreaswasita
Repositorycopilot-agents-dojo
Skill namederive-security-from-risk
Stars
54
Forks
15
Bundled files
Instructions only
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • Self-contained

    Everything the model needs lives in the instructions — no extra files to sync.

  • Open source

    Published by andreaswasita on GitHub. Read the source before you install it.

Installation

Install the Derive Security From Risk AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/andreaswasita/copilot-agents-dojo/tree/main/skills/derive-security-from-risk
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/andreaswasita/copilot-agents-dojo.git /tmp/copilot-agents-dojo
mkdir -p .claude/skills
cp -r /tmp/copilot-agents-dojo/skills/derive-security-from-risk .claude/skills/derive-security-from-risk
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Derive Security From Risk in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Derive Security From Risk on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Derive Security From Risk is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

Derive Security From Risk

Turns a ratified business driver or functional requirement — together with a named threat — into a Security Requirement (SR) the gate can verify. This skill does NOT propose generic controls and does NOT parent SRs to unspecified parent risks; every SR names the obligation or threat it satisfies.

When to Use

  • A BR-* or FR-* exists for the engagement and processes regulated data, money, identity, or controlled access.
  • A threat modelling session (STRIDE, LINDDUN, attack tree) has produced a concrete threat the architecture must mitigate.
  • A compliance obligation (PCI, HIPAA, APRA CPS 234, GDPR, ISO 27001 Annex A) maps to a control the design must enforce.
  • NOT when nobody can name the threat yet — run a threat-modelling session first; do not derive a control to look productive.

Prerequisites

  • The parent BR-* or FR-* exists in requirements/<engagement>/ and is ratified.
  • A named threat or obligation is recorded in requirements/<engagement>/threats/<threat-id>.md (free-form, but the SR body must cite it).
  • spec/artifact-schema.md is the contract for SR frontmatter.

If no named threat exists, stop. The TOGAF red thread breaks the moment a control mitigates a threat nobody named.

How to Run

bash
bash scripts/verify-traceability.sh requirements/<engagement>
# create requirements/<engagement>/SR/SR-NNN.md
bash scripts/verify-traceability.sh requirements/<engagement>

Quick Reference

ActionToolNotes
Read parent BR/FRviewGet exact id.
Read threat recordviewThe threat ID goes in the SR body.
Write SRcreateFrontmatter per schema; measurable: true.
Verify lineagebash scripts/verify-traceability.shMust pass before commit.

Example SR frontmatter:

yaml
---
id: SR-003
layer: SR
title: PII masking before persistence
parent_ids: [BR-001, FR-002]
owner: security.lead@example.com
measurable: true
ratified_by: ""
target: "Zero unmasked PII fields in storage; verified by daily DLP scan."
derivation_skill: derive-security-from-risk
tags: [pii, masking, data-protection, threat-T03]
---

Procedure

Step 1: Assess

  • Read the parent artifact with view. Confirm the data classification (public / internal / confidential / regulated) is stated.
  • Read the threat record. Confirm it names a threat actor, a target asset, and a damaging outcome. A "threat" of "users might do something bad" is not a threat — stop.

Step 2: Derive

For each named threat or obligation, produce one SR with:

  • A control statement that names what the system MUST or MUST NOT do (RFC 2119 register, not prose).
  • A measurable target: a scan, a metric, an audit query, an attestation cadence. If the control cannot be measured the gate rejects it.
  • A traceable obligation: cite the threat ID or the regulation clause in the body. The agent never invents the obligation — it cites one.

Step 3: Link

  • parent_ids includes the affected BR-* and/or FR-*. SRs MAY also parent to an NFR-* when the control constrains an existing quality attribute (e.g. an availability SR for a fraud-detection service).
  • derivation_skill: derive-security-from-risk is mandatory.

Step 4: Confirm

bash
bash scripts/verify-traceability.sh requirements/<engagement>

Must exit 0. Then regenerate the RTM:

bash
bash scripts/gen-rtm.sh requirements/<engagement>

Pitfalls

  • DO NOT emit a generic "encrypt everything" SR with no threat cited. Generic controls produce generic audits and miss the actual risk.
  • DO NOT parent an SR to a threat record directly — the threat is the justification (cited in the body); the parent is always a ratified requirement.
  • DO NOT mark measurable: true without defining how it is measured. The gate cannot tell, but the auditor can.
  • DO NOT ratify the SR from the agent. The Security Architect (or a human approver) sets ratified_by after review.
  • DO NOT write an SR that mitigates a threat without an owner. An unowned control is an unowned control failure six months from now.

Verification

  • SR-*.md filename equals its id.
  • parent_ids resolves to ratified BR-*/FR-*/NFR-*.
  • Body cites a named threat ID or a specific regulatory clause.
  • target describes how the control is measured.
  • bash scripts/verify-traceability.sh requirements/<engagement> exits 0.
  • bash scripts/verify.sh passes the full gate.

Frequently asked questions

What does the Derive Security From Risk AI skill do?

Derives security requirements from a named threat.

Why use Derive Security From Risk on TypingMind?

Because you install it once and use it with any model. Derive Security From Risk is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Derive Security From Risk in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/andreaswasita/copilot-agents-dojo/tree/main/skills/derive-security-from-risk. TypingMind reads its SKILL.md and installs it as a skill you can enable per chat.

Which AI models can use Derive Security From Risk?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Derive Security From Risk?

As many as you like. As long as a model supports skills, you can use Derive Security From Risk with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Derive Security From Risk AI skill free?

Yes. It is published on GitHub by andreaswasita under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇