Skip to content

docs: consolidate vulnerabilities and threat profiles into one section - #521

Merged
Nicola Franco (franconicola) merged 3 commits into
mainfrom
517-fix-vulnerabilities-documentation
Jul 26, 2026
Merged

docs: consolidate vulnerabilities and threat profiles into one section#521
Nicola Franco (franconicola) merged 3 commits into
mainfrom
517-fix-vulnerabilities-documentation

Conversation

@franconicola

Copy link
Copy Markdown
Member

Summary

  • Previously the docs had two parallel, overlapping sidebar entries: Vulnerabilities (13 pages) and Threat Profiles (13 pages), duplicating most of the same information.
  • Vulnerabilities is now a single sidebar entry — a folder containing one page per vulnerability class, and each page now includes its threat profile (objective, primary/secondary datasets, primary/secondary attack techniques, metrics) inline, plus a profile-driven "Run an Evaluation Campaign" example.
  • The general threat-profile concepts (profile anatomy, relevance levels, objectives) moved into the Vulnerabilities overview page; the "creating a custom threat profile" reference moved into Custom Vulnerabilities, next to where custom vulnerabilities are already documented.
  • Deleted the standalone threat-profiles.md page and threat-profiles/ folder (14 files) and updated every cross-reference and the sidebar config accordingly.

Closes #517

Test plan

  • npx docusaurus build completes successfully with no broken-link warnings
  • Verified no remaining references to threat-profiles anywhere in docs/

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

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.md and updates cross-links across the risks docs.
  • Deletes the standalone threat-profiles.md and 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_ONLY to match hackagent.risks.profile_helpers (the constant used by built-in profiles) rather than the non-existent STATIC_TEMPLATE_ATTACKS.
    attacks=STATIC_TEMPLATE_ATTACKS,

docs/docs/risks/custom-vulnerabilities.md:145

  • profile_helpers exports STATIC_TEMPLATE_ONLY, not STATIC_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 named STATIC_TEMPLATE_ONLY in hackagent.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 like static_template. Lowercasing StaticTemplate produces statictemplate, 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 like static_template. Lowercasing StaticTemplate produces statictemplate, 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.

Comment thread docs/docs/risks/custom-vulnerabilities.md Outdated
Comment thread docs/docs/risks/vulnerabilities.md Outdated
# ['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(),
Comment on lines +48 to 51
- **Static Template**: Template-based prompt injection
- **PAIR**: Iterative refinement for bypass discovery
- **RAG Attack**: Indirect Injection through document poisoning in RAG pipelines

Comment thread docs/docs/risks/vulnerabilities/jailbreak.md Outdated
- 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

codecov Bot commented Jul 26, 2026

Copy link
Copy Markdown

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.
Copilot AI review requested due to automatic review settings July 26, 2026 12:57

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_PROFILE in code uses JAILBREAK_ATTACKS (StaticTemplate, PAIR, AdvPrefix) and does not include the rag technique. 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_techniques is incorrect. JAILBREAK_PROFILE defines attacks ["h4rm3l", "TAP", "PAIR"] (see hackagent/risks/jailbreak/profile.py), so this comment will mislead users copying the snippet.
# ['StaticTemplate', 'PAIR', 'AdvPrefix']

Comment on lines +100 to +104

- `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.
Copilot AI review requested due to automatic review settings July 26, 2026 13:16

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 34 out of 34 changed files in this pull request and generated 1 comment.

A --> |relevance| R2[PRIMARY / SECONDARY]
```

Each `ThreatProfile` is a frozen dataclass with these fields:
@franconicola
Nicola Franco (franconicola) merged commit ecf1b7e into main Jul 26, 2026
25 checks passed
@franconicola
Nicola Franco (franconicola) deleted the 517-fix-vulnerabilities-documentation branch July 26, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix vulnerabilities documentation

2 participants