04 · How a pathway is built
Six steps, each one visible to the manager
InitializeResolve the manager and their company. The job is bound to both.
FrameworksLoad the MITRE and NICE catalogs in the manager's language.
AI mappingShortlist, prompt, schema-bound call, plan validation.
RecommendationsSQL over TKS and TTP mappings, with tenant and publish filters.
AI filteringRerank with screened descriptions, then filter validation.
CompletedPlan, ranked items and notes saved for the owner.
The contract the model must follow
The mapping call returns IDs only, grouped by framework. Each MITRE ID must sit under the framework it belongs to, so an ICS technique under Enterprise is treated as an error, not a lucky match.
{ "version": "2.0",
"mitre": { "mitre_attack_entreprise": ["T1548", "T1053", …], "mitre_attack_mobile": [],
"mitre_attack_ics": [], "mitre_atlas": [], "mitre_defend": ["D3-UAP"] },
"nist": { "work_role_ids": [5], "task_ids": [109], "knowledge_ids": [205, 209], "skill_ids": [307] },
"rationale": "plain text, ≤ 120 words", "warnings": ["assumptions, ambiguity"] }
Scoring a resource
For each course or lab the platform already knows which TKS statements and techniques it covers, so relevance is the share of the resource that's about the plan.
relevance = ½ × ( matched TKS ÷ TKS of the resource + matched techniques ÷ techniques of the resource )
Resources under 0.5 are dropped. Among the rest, a small bonus goes to items that cover plan entries nothing else covers yet, so six labs on the same technique don't crowd out the rest. Here is the goal from the demo, “I need to train my team on Linux”, on the evaluation replica:
| Resource | TKS | Techniques | Relevance | Kept |
| Course · Linux Privilege Escalation | 6/6 | 12/12 | 1.00 | ✓ |
| Lab · Log Tampering Hunt | 6/8 | 10/10 | 0.88 | ✓ |
| Lab · Evidence Collection on Linux | 6/11 | 10/12 | 0.69 | ✓ |
| Lab · Pass-the-Hash Lateral Movement | 1/3 | 7/11 | 0.48 | ✗ |
| Course · Windows and Active Directory Attacks | 2/6 | 8/14 | 0.45 | ✗ |
| Course · SOC Analyst Foundations | 1/15 | 2/13 | 0.11 | ✗ |
| Lab · Network Recon and Service Discovery | 0/12 | 1/8 | 0.06 | ✗ |
“Any match” logic returned 24 resources for this goal. Coverage ranking returned 7, all of them about Linux.
Ordering the pathway
Easy to hard. Within each level, theory comes before practice. The manager can still reorder in the builder.
Course · beginnerLinux Fundamentals for Defenders→
Course · beginnerBash Scripting for Security→
Lab · beginnerSudo Misconfigurations→
Course · intermediateLinux Privilege Escalation→
Lab · intermediateCron Job Takeover→
Lab · intermediateLog Tampering Hunt→
Lab · intermediateEvidence Collection on Linux
05 · Guardrails
Three gates around every model call
This feature sends customer-written text to an external model, together with our whole framework catalog, and turns the answer into recommendations shown to paying customers. I treated all three of those as attack surface: the goal a manager types, the prompt we assemble, and the answer the model returns. Each one has its own gate, and each gate has a test set.
Gate 1 · before the model
Input validation
- Length cap (2,000 characters), Unicode normalisation, invisible characters stripped.
- Prompt-injection scoring: override, prompt extraction, persona switch, fake role tags, spaced-out and French variants.
- Hard block for patterns that only make sense as attacks in a goal box, such as role tags or markdown-image exfiltration.
- Requests to dump the catalog, SQL fragments, and asks for other companies' content are refused.
- Off-topic requests are refused. Vague goals get a clarifying question.
- Emails, phone numbers and links are redacted before the model and the logs see them.
Gate 2 · the prompt itself
Prompt validation
- Rules live in the system message. The goal and the catalog are passed as data.
- The goal is embedded as an escaped string inside
<goal>, with tag look-alikes removed so it can't close the block.
- A topic shortlist of the catalog cuts prompt size and leaves fewer wrong IDs to choose from.
- Precision rules and hard caps: ≤ 25 techniques, ≤ 4 work roles, ≤ 30 TKS.
- A per-job canary token detects system-prompt leakage.
- Course and lab descriptions, which customers can write, are screened before the rerank prompt, and suspicious ones are withheld.
Gate 3 · after the model
Output validation
- Strict schema and version check. Malformed JSON triggers a retry.
- Each ID must exist, sit under its own framework, and be one the model was actually shown.
- Strict typing:
"9999abc" isn't quietly read as 9999.
- Duplicates removed and caps enforced.
- Rationale and warnings are shown to managers, so links, markup and instruction echoes are stripped. A leaked canary rejects the answer.
- Fails closed: one retry with the findings, then a fallback plan clearly labelled as such. Unknown IDs never move forward.
- The reranker may only keep candidates. An empty or broken answer falls back to the coverage ranking, never to everything.
Around the gates: who may run what, and how often
A
Role and tenant from the session
Only a company-manager authenticated by JWT can start a job. The job is bound to that user and company. Retrieval only returns published resources that are public or private to that company.
B
Owner-only results that can't be probed
Job IDs are random UUIDs. Status and result calls check the owner, and a missing job and someone else's job get the same answer.
C
Cost controls
Per-user and per-company rate limits, de-duplication of identical requests within 10 minutes, and a budget of three model calls per job (map, one retry, rerank).
D
Logs that don't become a data leak
Job logs keep counts, IDs and step timings, not the full goal text or the serialised catalogs. Results expire after 24 hours.
Gate 1: attacks on the goal box
25 attacks in 9 categories, all blocked. 0 of 32 real goals refused.
Show as table
Gate 3: broken or hostile model answers
14 failure types × 32 goals. Answers where bad content got through.
Earlier validatorGate 3
Show as table
| Failure type | Earlier | Gate 3 |
|---|
The earlier validator already dropped unknown IDs when some were valid. But when every ID was invalid, it kept the model's raw selections and passed them on. It also displayed the rationale unscreened. Gate 3 closes both gaps.
06 · Evaluation
A recommender that has to stand up in front of an auditor
“Looks relevant” isn't a metric. I built an evaluation harness that scores every stage separately, so a regression points to the layer that caused it. It runs offline on a replica of the catalogs: public MITRE identifiers, NICE work roles, and a fictional set of courses and labs, including another company's private items, a draft, and one lab with a poisoned description.
Test sets
32 goals, 8 families
Linux, SOC, incident response, offensive, AppSec, cloud and identity, ICS/OT, and others (phishing, AI, mobile). Each goal is labelled with the topics an expert expects. Those labels define the gold techniques, work roles, TKS and resources.
12 held-out goals
Written before any tuning and never used for it. They give the honest number when the dev set looks too good.
25 attacks · 6 vague · 3 with PII
Goal-box attacks in 9 categories, vague goals that should get a question, and goals with emails, phones and links that must be redacted.
448 model answers
14 failure types derived from each goal's correct plan: invented IDs, wrong framework, loose integers, duplicates, oversized lists, links, markup, prompt echo, canary leak, broken JSON and more.
What is scored at each stage
| Stage | Metrics |
| Input gate | attacks blocked · real goals refused · vague goals clarified · PII reaching the prompt |
| Shortlist | recall of gold techniques, work roles and TKS (the ceiling for everything after) · prompt size |
| Mapping | ID precision, recall and F1 per framework against gold · invalid-ID rate · cap violations · stability over 3 runs per goal |
| Output gate | unknown IDs reaching retrieval · unscreened text shown · clean plans left untouched |
| Retrieval & ranking | precision, recall and F1 against gold resources · list size · off-topic items · cross-tenant or draft leaks, per family |
| End to end | recorded scenarios: model invents IDs twice, reranker adds or drops everything, poisoned description |
Retrieval is scored with the gold plan as input, so ranking quality is measured apart from mapping quality. The mapping stage takes a pluggable model client and is scored with the same functions against the live model.
0
precision of recommended resources (was 0.32)
0
recall (was 0.97): fewer items, nearly all of them right
0
items per pathway draft (was 19.3)
0
unknown IDs reaching retrieval (was 160)
0
of 32 clean plans passed untouched
0
cross-tenant or draft items recommended
Precision of recommended resources, by goal family
Same gold plan in, two ranking strategies out. Hover for recall and list size.
Any match (union)Coverage ranking
Show as table
| Family | Precision | Recall | Items |
|---|
Shortlist recall of gold techniques
The model can only pick what the shortlist contains.
Prompt size for the mapping call
Characters, average per goal on the replica catalog.
What the first run caught
3 of 25 attacks got through. “Pretend you are the database”, a reversed phrasing of the cross-tenant ask, and a markdown image pointing at an outside server. They scored as suspicious but not blockable. Patterns that only make sense as attacks in a goal box now block outright.
3 of 32 real goals were refused, including “I want something for developers” and “our devops team leaks keys in S3 buckets”. The domain check didn't know sudo, cron, S3 or developers. It now reuses the shortlist's topic vocabulary, so the gate and the mapper agree on what counts as security.
2 of 6 vague goals were handled badly. “Help” was refused instead of getting a question. Very short goals are now always clarified.
6 goals had shortlist gaps. Response verbs like contain, recover and investigate didn't pull the defensive techniques, and plurals like “PLCs” or “pentesters” didn't match. I added those terms and light stemming. Held-out technique recall rose from 0.63 to 0.89 and work-role recall from 0.85 to 1.0. The remaining misses are PowerShell-style tradecraft and evidence collection, which is next on the list.
All figures were measured offline on the replica catalog with recorded model answers; none come from customer data. The topic labels, vocabulary and gold set were written by the same person, so dev-set scores are optimistic. The held-out set is the fairer number.