docs: consolidate vulnerabilities and threat profiles into one section - #521
Conversation
Merge the standalone Threat Profiles pages into each vulnerability's own page so "Vulnerabilities" is a single sidebar entry (a folder of 13 per-vulnerability pages, each with its threat profile inline) instead of two parallel, overlapping doc trees. Closes #517
There was a problem hiding this comment.
Pull request overview
This PR restructures the Docusaurus documentation by consolidating “Threat Profiles” content into the “Vulnerabilities” section, aiming to remove duplication and make each vulnerability page self-contained.
Changes:
- Replaces the separate “Threat Profiles” sidebar section with a single “Vulnerabilities” category containing one page per vulnerability.
- Moves threat-profile concepts/anatomy into
risks/vulnerabilities.mdand updates cross-links across the risks docs. - Deletes the standalone
threat-profiles.mdand per-profile pages, and adds “Run an Evaluation Campaign” examples to vulnerability pages.
Reviewed changes
Copilot reviewed 34 out of 34 changed files in this pull request and generated 15 comments.
Show a summary per file
| File | Description |
|---|---|
| docs/sidebars.ts | Updates sidebar structure to remove “Threat Profiles” and nest vulnerability pages under “Vulnerabilities”. |
| docs/docs/risks/vulnerabilities.md | Moves threat-profile conceptual docs into the Vulnerabilities overview page and updates “Learn more” links. |
| docs/docs/risks/custom-vulnerabilities.md | Updates custom vulnerability docs to include threat-profile creation guidance and helper references. |
| docs/docs/risks/risk-categories.mdx | Updates “Next steps” links to point at Vulnerabilities instead of Threat Profiles. |
| docs/docs/risks/index.mdx | Updates Risks overview links and wording to reflect the new documentation structure. |
| docs/docs/risks/evaluation-campaigns.md | Updates “Learn more” links to remove Threat Profiles. |
| docs/docs/risks/evaluation-campaigns/custom-campaigns.md | Replaces Threat Profiles link with Vulnerabilities link. |
| docs/docs/risks/vulnerabilities/jailbreak.md | Converts threat profile content into the vulnerability page and adds a profile-driven campaign example. |
| docs/docs/risks/vulnerabilities/prompt-injection.md | Converts threat profile content into the vulnerability page and adds a profile-driven campaign example. |
| docs/docs/risks/vulnerabilities/system-prompt-leakage.md | Converts threat profile content into the vulnerability page and adds a profile-driven campaign example. |
| docs/docs/risks/vulnerabilities/input-manipulation-attack.md | Converts threat profile content into the vulnerability page and adds a profile-driven campaign example. |
| docs/docs/risks/vulnerabilities/model-evasion.md | Converts threat profile content into the vulnerability page and adds a profile-driven campaign example. |
| docs/docs/risks/vulnerabilities/craft-adversarial-data.md | Converts threat profile content into the vulnerability page and adds a profile-driven campaign example. |
| docs/docs/risks/vulnerabilities/sensitive-information-disclosure.md | Converts threat profile content into the vulnerability page and adds a profile-driven campaign example. |
| docs/docs/risks/vulnerabilities/misinformation.md | Converts threat profile content into the vulnerability page and adds a profile-driven campaign example. |
| docs/docs/risks/vulnerabilities/excessive-agency.md | Converts threat profile content into the vulnerability page and adds a profile-driven campaign example. |
| docs/docs/risks/vulnerabilities/malicious-tool-invocation.md | Converts threat profile content into the vulnerability page and adds a profile-driven campaign example. |
| docs/docs/risks/vulnerabilities/credential-exposure.md | Converts threat profile content into the vulnerability page and adds a custom-goals campaign example. |
| docs/docs/risks/vulnerabilities/public-facing-application-exploitation.md | Converts threat profile content into the vulnerability page and adds a profile-driven campaign example. |
| docs/docs/risks/vulnerabilities/vector-embedding-weaknesses-exploit.md | Converts threat profile content into the vulnerability page and adds a profile-driven campaign example. |
| docs/docs/risks/threat-profiles.md | Deletes the standalone Threat Profiles overview page. |
| docs/docs/risks/threat-profiles/jailbreak.md | Deletes standalone threat profile page (content migrated). |
| docs/docs/risks/threat-profiles/prompt-injection.md | Deletes standalone threat profile page (content migrated). |
| docs/docs/risks/threat-profiles/system-prompt-leakage.md | Deletes standalone threat profile page (content migrated). |
| docs/docs/risks/threat-profiles/input-manipulation-attack.md | Deletes standalone threat profile page (content migrated). |
| docs/docs/risks/threat-profiles/model-evasion.md | Deletes standalone threat profile page (content migrated). |
| docs/docs/risks/threat-profiles/craft-adversarial-data.md | Deletes standalone threat profile page (content migrated). |
| docs/docs/risks/threat-profiles/sensitive-information-disclosure.md | Deletes standalone threat profile page (content migrated). |
| docs/docs/risks/threat-profiles/misinformation.md | Deletes standalone threat profile page (content migrated). |
| docs/docs/risks/threat-profiles/excessive-agency.md | Deletes standalone threat profile page (content migrated). |
| docs/docs/risks/threat-profiles/malicious-tool-invocation.md | Deletes standalone threat profile page (content migrated). |
| docs/docs/risks/threat-profiles/credential-exposure.md | Deletes standalone threat profile page (content migrated). |
| docs/docs/risks/threat-profiles/public-facing-application-exploitation.md | Deletes standalone threat profile page (content migrated). |
| docs/docs/risks/threat-profiles/vector-embedding-weaknesses-exploit.md | Deletes standalone threat profile page (content migrated). |
Comments suppressed due to low confidence (5)
docs/docs/risks/custom-vulnerabilities.md:125
- This should use
STATIC_TEMPLATE_ONLYto matchhackagent.risks.profile_helpers(the constant used by built-in profiles) rather than the non-existentSTATIC_TEMPLATE_ATTACKS.
attacks=STATIC_TEMPLATE_ATTACKS,
docs/docs/risks/custom-vulnerabilities.md:145
profile_helpersexportsSTATIC_TEMPLATE_ONLY, notSTATIC_TEMPLATE_ATTACKS. The docs' helper import list should match the actual API so readers can copy/paste it.
STATIC_TEMPLATE_ATTACKS, # Static Template-only attack list
docs/docs/risks/custom-vulnerabilities.md:168
- This bullet refers to
STATIC_TEMPLATE_ATTACKS, but the helper constant is namedSTATIC_TEMPLATE_ONLYinhackagent.risks.profile_helpers.
- **STATIC_TEMPLATE_ATTACKS** — Simple direct testing, no adversarial optimization
docs/docs/risks/vulnerabilities/jailbreak.md:76
HackAgent.hack()expects snake_case attack_type keys likestatic_template. LowercasingStaticTemplateproducesstatictemplate, which is not a supported strategy key.
"attack_type": attack.technique.lower(),
docs/docs/risks/vulnerabilities/input-manipulation-attack.md:68
HackAgent.hack()expects snake_case attack_type keys likestatic_template. LowercasingStaticTemplateproducesstatictemplate, which is not a supported strategy key.
"attack_type": attack.technique.lower(),
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # ['strongreject', 'harmbench', 'advbench', 'jailbreakbench', ...] | ||
|
|
||
| print(JAILBREAK_PROFILE.attack_techniques) | ||
| # ['StaticTemplate', 'PAIR', 'AdvPrefix'] |
| for attack in SYSTEM_PROMPT_LEAKAGE_PROFILE.primary_attacks: | ||
| for dataset in SYSTEM_PROMPT_LEAKAGE_PROFILE.primary_datasets + SYSTEM_PROMPT_LEAKAGE_PROFILE.secondary_datasets: | ||
| attack_config = { | ||
| "attack_type": attack.technique.lower(), |
| for attack in SENSITIVE_INFORMATION_DISCLOSURE_PROFILE.primary_attacks: | ||
| for dataset in SENSITIVE_INFORMATION_DISCLOSURE_PROFILE.primary_datasets + SENSITIVE_INFORMATION_DISCLOSURE_PROFILE.secondary_datasets: | ||
| attack_config = { | ||
| "attack_type": attack.technique.lower(), |
| for attack in VECTOR_EMBEDDING_WEAKNESSES_EXPLOIT_PROFILE.primary_attacks: | ||
| for dataset in VECTOR_EMBEDDING_WEAKNESSES_EXPLOIT_PROFILE.primary_datasets: | ||
| attack_config = { | ||
| "attack_type": attack.technique.lower(), |
| for attack in EXCESSIVE_AGENCY_PROFILE.primary_attacks: | ||
| for dataset in EXCESSIVE_AGENCY_PROFILE.primary_datasets: | ||
| attack_config = { | ||
| "attack_type": attack.technique.lower(), |
| for attack in CRAFT_ADVERSARIAL_DATA_PROFILE.primary_attacks: | ||
| for dataset in CRAFT_ADVERSARIAL_DATA_PROFILE.primary_datasets: | ||
| attack_config = { | ||
| "attack_type": attack.technique.lower(), |
| - **Static Template**: Template-based prompt injection | ||
| - **PAIR**: Iterative refinement for bypass discovery | ||
| - **RAG Attack**: Indirect Injection through document poisoning in RAG pipelines | ||
|
|
| - PAIR (PRIMARY): Iterative refinement for bypass discovery | ||
| - AdvPrefix (SECONDARY): Adversarial prefix optimisation | ||
| **Secondary** | ||
| - **wmdp_cyber**: Cybersecurity knowledge covering SQL injection and command injection techniques |
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
- risk-categories.mdx had no title/sidebar_label frontmatter, so
Docusaurus fell back to its first H1 ("# Vulnerabilities"), producing
a second sidebar entry with the same label as the real Vulnerabilities
folder. Remove it and fold its dangling references into the kept page.
- Fix STATIC_TEMPLATE_ATTACKS -> STATIC_TEMPLATE_ONLY, the actual export
name in hackagent.risks.profile_helpers.
- Fix jailbreak.md's Attack Techniques to match the real JAILBREAK_PROFILE
source (h4rm3l/TAP/PAIR), which had drifted from the old StaticTemplate/
PAIR/AdvPrefix content carried over from the previous docs.
- Fix attack_type derivation in the "Run an Evaluation Campaign" examples:
attack.technique.lower() silently breaks for "StaticTemplate" (need
"static_template"), so use an explicit technique -> attack_type mapping.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 34 out of 34 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (2)
docs/docs/risks/vulnerabilities/prompt-injection.md:50
- The Threat Profile section lists RAG Attack as a PRIMARY technique, but
PROMPT_INJECTION_PROFILEin code usesJAILBREAK_ATTACKS(StaticTemplate, PAIR, AdvPrefix) and does not include theragtechnique. This makes the profile documentation inconsistent with the actual profile constant that the page’s code example imports.
- **Static Template**: Template-based prompt injection
- **PAIR**: Iterative refinement for bypass discovery
- **RAG Attack**: Indirect Injection through document poisoning in RAG pipelines
docs/docs/risks/vulnerabilities.md:120
- The example output for
JAILBREAK_PROFILE.attack_techniquesis incorrect.JAILBREAK_PROFILEdefines attacks["h4rm3l", "TAP", "PAIR"](seehackagent/risks/jailbreak/profile.py), so this comment will mislead users copying the snippet.
# ['StaticTemplate', 'PAIR', 'AdvPrefix']
|
|
||
| - `asr` — Attack Success Rate | ||
| - `judge_score` — LLM-based evaluation score | ||
| - `toxicity_score` — Toxicity measurement | ||
| - `refusal_rate` — Percentage of refused requests |
- vulnerabilities.md: JAILBREAK_PROFILE.attack_techniques example output still showed the old StaticTemplate/PAIR/AdvPrefix list; correct it to the real h4rm3l/TAP/PAIR values. - prompt-injection.md: PROMPT_INJECTION_PROFILE.attacks is JAILBREAK_ATTACKS (StaticTemplate, PAIR, AdvPrefix) and has no "rag" entry, so drop the fabricated "RAG Attack" primary technique from the Threat Profile section; the Indirect Injection guidance above already covers pairing this vulnerability with a RAG Attack campaign.
| A --> |relevance| R2[PRIMARY / SECONDARY] | ||
| ``` | ||
|
|
||
| Each `ThreatProfile` is a frozen dataclass with these fields: |
Summary
Vulnerabilitiesoverview page; the "creating a custom threat profile" reference moved intoCustom Vulnerabilities, next to where custom vulnerabilities are already documented.threat-profiles.mdpage andthreat-profiles/folder (14 files) and updated every cross-reference and the sidebar config accordingly.Closes #517
Test plan
npx docusaurus buildcompletes successfully with no broken-link warningsthreat-profilesanywhere indocs/