Skip to content

DeepTeam is a framework to red team LLMs and AI agents.

updated docs

penguineba4106ad173e
diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js
index 72b48824..4d174b3f 100644
--- a/docs/docusaurus.config.js
+++ b/docs/docusaurus.config.js
@@ -61,14 +61,14 @@ module.exports = {
defer: true,
"data-domain": "trydeepteam.com",
},
- // {
- // src: "https://unpkg.com/lucide@latest",
- // async: true,
- // },
- // {
- // src: "/js/lucide-icons.js",
- // async: true,
- // },
+ {
+ src: "https://unpkg.com/lucide@latest",
+ async: true,
+ },
+ {
+ src: "/js/lucide-icons.js",
+ async: true,
+ },
],
stylesheets: [
{
diff --git a/docs/sidebars.js b/docs/sidebars.js
index dc207478..27c06d7b 100644
--- a/docs/sidebars.js
+++ b/docs/sidebars.js
@@ -3,138 +3,140 @@ module.exports = {
{
type: "category",
label: "Getting Started",
- className: "sidebar-item-getting-started",
+ className: "sidebar-item-getting-started root-sidebar-item",
items: ["getting-started", "what-is-llm-red-teaming"],
collapsed: false,
},
{
type: "category",
- label: "Red Teaming",
- className: "sidebar-item-icon-red-teaming",
+ label: "LLM Red Teaming",
+ className: "sidebar-item-red-teaming root-sidebar-item",
items: [
"red-teaming-introduction",
"red-teaming-agentic-introduction",
+ ],
+ collapsed: false,
+ },
+ {
+ type: "category",
+ label: "Adversarial Attacks",
+ className: "sidebar-item-attacks root-sidebar-item",
+ items: [
+ "red-teaming-adversarial-attacks",
+ {
+ type: "category",
+ label: "Single-Turn",
+ items: [
+ "red-teaming-adversarial-attacks-prompt-injection",
+ "red-teaming-adversarial-attacks-roleplay",
+ "red-teaming-adversarial-attacks-gray-box-attack",
+ "red-teaming-adversarial-attacks-leetspeak",
+ "red-teaming-adversarial-attacks-rot13-encoding",
+ "red-teaming-adversarial-attacks-multilingual",
+ "red-teaming-adversarial-attacks-math-problem",
+ "red-teaming-adversarial-attacks-base64-encoding",
+ ],
+ collapsed: true,
+ },
+ {
+ type: "category",
+ label: "Multi-Turn",
+ items: [
+ "red-teaming-adversarial-attacks-linear-jailbreaking",
+ "red-teaming-adversarial-attacks-tree-jailbreaking",
+ "red-teaming-adversarial-attacks-sequential-jailbreaking",
+ "red-teaming-adversarial-attacks-crescendo-jailbreaking",
+ "red-teaming-adversarial-attacks-bad-likert-judge",
+ ],
+ collapsed: true,
+ },
+ {
+ type: "category",
+ label: "Agentic",
+ items: [
+ "red-teaming-agentic-attacks",
+ "red-teaming-agentic-attacks-system-override",
+ "red-teaming-agentic-attacks-permission-escalation",
+ "red-teaming-agentic-attacks-objective-reframing",
+ "red-teaming-agentic-attacks-semantic-manipulation",
+ "red-teaming-agentic-attacks-input-bypass",
+ "red-teaming-agentic-attacks-context-poisoning",
+ ],
+ collapsed: true,
+ },
+ ],
+ collapsed: false,
+ },
+ {
+ type: "category",
+ label: "Vulnerabilties",
+ className: "sidebar-item-vulnerabilities root-sidebar-item",
+ items: [
+ "red-teaming-vulnerabilities",
+ "red-teaming-custom-vulnerability",
+ {
+ type: "category",
+ label: "Data Privacy",
+ items: [
+ "red-teaming-vulnerabilities-pii-leakage",
+ "red-teaming-vulnerabilities-prompt-leakage",
+ ],
+ collapsed: true,
+ },
+ {
+ type: "category",
+ label: "Responsible AI",
+ items: [
+ "red-teaming-vulnerabilities-bias",
+ "red-teaming-vulnerabilities-toxicity",
+ ],
+ collapsed: true,
+ },
{
type: "category",
- label: "Adversarial Attacks",
+ label: "Security",
items: [
- "red-teaming-adversarial-attacks",
- {
- type: "category",
- label: "Single-Turn",
- items: [
- "red-teaming-adversarial-attacks-prompt-injection",
- "red-teaming-adversarial-attacks-roleplay",
- "red-teaming-adversarial-attacks-gray-box-attack",
- "red-teaming-adversarial-attacks-leetspeak",
- "red-teaming-adversarial-attacks-rot13-encoding",
- "red-teaming-adversarial-attacks-multilingual",
- "red-teaming-adversarial-attacks-math-problem",
- "red-teaming-adversarial-attacks-base64-encoding",
- ],
- collapsed: true,
- },
- {
- type: "category",
- label: "Multi-Turn",
- items: [
- "red-teaming-adversarial-attacks-linear-jailbreaking",
- "red-teaming-adversarial-attacks-tree-jailbreaking",
- "red-teaming-adversarial-attacks-sequential-jailbreaking",
- "red-teaming-adversarial-attacks-crescendo-jailbreaking",
- "red-teaming-adversarial-attacks-bad-likert-judge",
- ],
- collapsed: true,
- },
- {
- type: "category",
- label: "Agentic",
- items: [
- "red-teaming-agentic-attacks",
- "red-teaming-agentic-attacks-system-override",
- "red-teaming-agentic-attacks-permission-escalation",
- "red-teaming-agentic-attacks-objective-reframing",
- "red-teaming-agentic-attacks-semantic-manipulation",
- "red-teaming-agentic-attacks-input-bypass",
- "red-teaming-agentic-attacks-context-poisoning",
- ],
- collapsed: true,
- },
+ "red-teaming-vulnerabilities-bfla",
+ "red-teaming-vulnerabilities-bola",
+ "red-teaming-vulnerabilities-rbac",
+ "red-teaming-vulnerabilities-debug-access",
+ "red-teaming-vulnerabilities-shell-injection",
+ "red-teaming-vulnerabilities-sql-injection",
+ "red-teaming-vulnerabilities-ssrf",
],
- collapsed: false,
+ collapsed: true,
+ },
+ {
+ type: "category",
+ label: "Safety",
+ items: [
+ "red-teaming-vulnerabilities-illegal-activity",
+ "red-teaming-vulnerabilities-graphic-content",
+ "red-teaming-vulnerabilities-personal-safety",
+ ],
+ collapsed: true,
},
{
type: "category",
- label: "Vulnerabilties",
+ label: "Business",
items: [
- "red-teaming-vulnerabilities",
- "red-teaming-custom-vulnerability",
- {
- type: "category",
- label: "Data Privacy",
- items: [
- "red-teaming-vulnerabilities-pii-leakage",
- "red-teaming-vulnerabilities-prompt-leakage",
- ],
- collapsed: true,
- },
- {
- type: "category",
- label: "Responsible AI",
- items: [
- "red-teaming-vulnerabilities-bias",
- "red-teaming-vulnerabilities-toxicity",
- ],
- collapsed: true,
- },
- {
- type: "category",
- label: "Security",
- items: [
- "red-teaming-vulnerabilities-bfla",
- "red-teaming-vulnerabilities-bola",
- "red-teaming-vulnerabilities-rbac",
- "red-teaming-vulnerabilities-debug-access",
- "red-teaming-vulnerabilities-shell-injection",
- "red-teaming-vulnerabilities-sql-injection",
- "red-teaming-vulnerabilities-ssrf",
- ],
- collapsed: true,
- },
- {
- type: "category",
- label: "Safety",
- items: [
- "red-teaming-vulnerabilities-illegal-activity",
- "red-teaming-vulnerabilities-graphic-content",
- "red-teaming-vulnerabilities-personal-safety",
- ],
- collapsed: true,
- },
- {
- type: "category",
- label: "Business",
- items: [
- "red-teaming-vulnerabilities-misinformation",
- "red-teaming-vulnerabilities-intellectual-property",
- "red-teaming-vulnerabilities-competition",
- ],
- collapsed: true,
- },
- {
- type: "category",
- label: "Agentic",
- items: [
- "red-teaming-agentic-vulnerabilities-goal-theft",
- "red-teaming-agentic-vulnerabilities-output-verification",
- "red-teaming-agentic-vulnerabilities-recursive-hijacking",
- "red-teaming-vulnerabilities-excessive-agency",
- "red-teaming-vulnerabilities-robustness",
- ],
- collapsed: true,
- },
+ "red-teaming-vulnerabilities-misinformation",
+ "red-teaming-vulnerabilities-intellectual-property",
+ "red-teaming-vulnerabilities-competition",
],
- collapsed: false,
+ collapsed: true,
+ },
+ {
+ type: "category",
+ label: "Agentic",
+ items: [
+ "red-teaming-agentic-vulnerabilities-goal-theft",
+ "red-teaming-agentic-vulnerabilities-output-verification",
+ "red-teaming-agentic-vulnerabilities-recursive-hijacking",
+ "red-teaming-vulnerabilities-excessive-agency",
+ "red-teaming-vulnerabilities-robustness",
+ ],
+ collapsed: true,
},
],
collapsed: false,
@@ -142,7 +144,7 @@ module.exports = {
{
type: "category",
label: "Guardrails",
- className: "sidebar-item-icon-guardrails",
+ className: "sidebar-item-guardrails root-sidebar-item",
items: [
"guardrails-introduction",
{
@@ -165,14 +167,14 @@ module.exports = {
{
type: "category",
label: "Guidelines & Frameworks",
- className: "sidebar-item-icon-guidelines-frameworks",
+ className: "sidebar-item-guidelines-frameworks root-sidebar-item",
items: ["red-teaming-guidelines-framework-introduction","red-teaming-owasp-top-10-for-llms", "red-teaming-nist-ai-rmf"],
collapsed: false,
},
{
type: "category",
label: "Others",
- className: "sidebar-item-icon-others",
+ className: "sidebar-item-others root-sidebar-item",
items: ["data-privacy"],
collapsed: false,
},
diff --git a/docs/src/css/custom.scss b/docs/src/css/custom.scss
index f9e2a97c..5ae5781c 100644
--- a/docs/src/css/custom.scss
+++ b/docs/src/css/custom.scss
@@ -244,32 +244,7 @@ html[data-theme="dark"] #light-invertable-img {
filter: invert(100%);
}
-#confident-workflow {
- width: 70%;
-}
-
-html[data-theme="dark"] #confident-workflow {
- filter: invert(100%);
-}
-
-#rag-evaluation {
- margin-left: 140px;
- width: 50%;
-}
-
-#rag-triad {
- width: 70%;
-}
-
-html[data-theme="dark"] #rag-evaluation {
- filter: invert(100%);
-}
-
@media (max-width: 1200px) {
- #rag-evaluation {
- width: 60%;
- }
-
.header-confident-link {
font-size: 13px;
padding: 4px 10px;
@@ -286,18 +261,6 @@ html[data-theme="dark"] #rag-evaluation {
}
}
-
-@media (max-width: 600px) {
- #confident-workflow {
- width: 100% !important;
- }
-
- #rag-evaluation {
- margin-left: 0 !important;
- width: 80% !important;
- }
-}
-
.theme-tabs__label {
margin: 0 !important;
padding: 0 !important;
@@ -307,25 +270,93 @@ img, video {
border-radius: 6px;
}
-/* Adjust borders for subcategories */
-.sidebar-item-getting-started ul,
-.sidebar-item-icon-red-teaming ul,
-.sidebar-item-icon-guidelines-frameworks ul,
-.sidebar-item-icon-others ul {
- margin-left: 20px !important;
+
+// COLLAPSIBLE STYLING
+
+details {
+ color: #1d232e;
+ background-color: white !important;
+ border: 1px solid #cad1d8 !important;
+ border-radius: 4px !important;
+ padding: 0.75rem 1rem !important;
+ margin-bottom: 1rem !important;
+ box-shadow: 0 1px 6px 0 rgba(192, 194, 205, 0.409) !important;
+}
+
+details summary {
+ font-weight: 600 !important;
+}
+
+details summary::before {
+ border-color: transparent transparent transparent rgb(49, 53, 62) !important;
+}
+
+details [class*="collapsibleContent"] {
+ border-top: 1px solid #e2e8f0 !important;
+}
+
+.tabs-container > div {
+ padding: 1rem;
+ border: 1px solid #cbd4de8d;
+ border-radius: 6px;
+}
+
+/* Remove styling from nested tabs containers */
+.tabs-container .tabs-container > div {
+ padding: 0;
+ border: none;
+ border-radius: 0;
+}
+
+
+ul.tabs {
+ border-bottom: 1px solid #cbd4de !important;
+ column-gap: 0.5rem !important;
+}
+
+li.tabs__item {
+ padding: 0.5rem !important;
+ font-weight: 500 !important;
+ border-bottom: 1px solid transparent !important;
+}
+
+li.tabs__item--active {
+ border-bottom: 1px solid #d92860 !important;
+}
+
+// TOP NAV STYLING
+
+.navbar__link {
+ font-weight: 400 !important;
+ font-size: 15px !important;
+ border-bottom: 2px solid transparent !important;
+}
+
+.navbar__link--active {
+ font-weight: 500 !important;
+ border-bottom: 2px solid #ee0b5e !important;
+}
+
+// MENU STYLING
+
+/* Remove all the sidebar item ::before content */
+.root-sidebar-item > .menu__list-item-collapsible > a::before {
+ content: none;
+}
+
+
+.root-sidebar-item ul:not(:first-child) {
+ margin-left: 18px !important;
border-left: 1px solid #e0e0e0;
}
-html[data-theme='dark'] .sidebar-item-getting-started > ul,
-html[data-theme='dark'] .sidebar-item-icon-red-teaming > ul,
-html[data-theme='dark'] .sidebar-item-icon-guidelines-frameworks > ul,
-html[data-theme='dark'] .sidebar-item-icon-others > ul {
+html[data-theme="dark"] .root-sidebar-item > ul {
border-left-color: #383f4b;
}
/* Styling for Lucide icons in sidebar */
.sidebar-icon {
- margin-right: 0.5rem;
+ margin-right: 0.4rem;
width: 1em;
height: 1em;
display: inline-flex;
@@ -333,3 +364,104 @@ html[data-theme='dark'] .sidebar-item-icon-others > ul {
justify-content: center;
vertical-align: middle;
}
+
+/* Color adjustments for light/dark mode */
+html[data-theme="light"] .sidebar-icon {
+ color: black;
+ font-weight: 500;
+}
+
+html[data-theme="dark"] .sidebar-icon {
+ color: black;
+ font-weight: 500;
+}
+
+
+/* Adjust color for light/dark modes */
+html[data-theme="light"] .root-sidebar-item > a::before {
+ filter: invert(35%) sepia(90%) saturate(1000%) hue-rotate(240deg)
+ brightness(90%) contrast(95%);
+}
+
+html[data-theme="dark"] .root-sidebar-item > a::before {
+ filter: invert(60%) sepia(75%) saturate(1000%) hue-rotate(240deg)
+ brightness(95%) contrast(95%);
+}
+
+.menu {
+ font-weight: 400;
+ background-image: radial-gradient(rgba(0, 0, 0, 0.121) 1px, transparent 1px);
+ background-size: 20px 20px;
+}
+
+html[data-theme="dark"] .menu {
+ background-image: radial-gradient(
+ rgba(30, 29, 32, 0.131) 1px,
+ transparent 1px
+ );
+ background-size: 20px 20px;
+}
+
+.menu_list {
+ padding-left: 0rem!important;
+}
+
+.menu__link {
+ font-size: 15px;
+ padding-top: 0.4rem !important;
+ padding-bottom: 0.4rem !important;
+}
+
+.menu__link--active {
+ font-weight: 500 !important;
+ background-color: rgba(255, 0, 106, 0.083) !important;
+}
+
+.menu__link--sublist-caret:after {
+ width: 0.7rem;
+ height: 0.7rem;
+ min-width: 0.7rem;
+ background: var(--ifm-menu-link-sublist-icon) 50% / 1.2rem 1.2rem;
+}
+
+.theme-doc-sidebar-item-category-level-1 > .menu__list-item-collapsible > .menu__link:first-of-type {
+ color: black; // Example: orange text
+ font-weight: 600 !important;
+ font-size: 15px;
+}
+
+.theme-doc-sidebar-item-category-level-1 {
+ margin-bottom: 2rem!important;
+}
+
+.menu__list .menu__list {
+ padding-left: 3px!important;
+}
+
+// CODE BLOCKS STYLING
+
+[class*="codeBlockTitle"] {
+ font-size: 14px !important;
+ font-weight: 400 !important;
+ padding: 0.5rem 1rem !important;
+ border-bottom: 1px solid #51565d !important;
+}
+
+
+/* Add border to code blocks */
+.prism-code {
+ border-radius: 6px;
+ font-size: 15px !important;
+}
+
+html[data-theme="dark"] .prism-code {
+ border: 1px solid #334155;
+}
+
+.theme-code-block-highlighted-line {
+ background-color: #242945 !important;
+}
+
+.theme-code-block-highlighted-line > span {
+ background-color: #242945 !important;
+}
\ No newline at end of file
diff --git a/docs/static/js/lucide-icons.js b/docs/static/js/lucide-icons.js
index 3f7dfc8e..bdf09177 100644
--- a/docs/static/js/lucide-icons.js
+++ b/docs/static/js/lucide-icons.js
@@ -3,107 +3,110 @@ function addLucideIcons() {
// Define icon mapping
const iconMapping = {
'sidebar-item-getting-started': 'rocket',
- 'sidebar-item-icon-red-teaming': 'shield-alert',
- 'sidebar-item-icon-guidelines-frameworks': 'book-open',
- 'sidebar-item-icon-others': 'more-horizontal'
+ 'sidebar-item-red-teaming': 'shield-alert',
+ 'sidebar-item-attacks': 'target',
+ 'sidebar-item-vulnerabilities': 'bug',
+ 'sidebar-item-guardrails': 'train-front',
+ 'sidebar-item-guidelines-frameworks': 'book-open',
+ 'sidebar-item-others': 'more-horizontal'
};
- // Add icons to sidebar
- function applyIcons() {
- // Process each sidebar item class
- Object.keys(iconMapping).forEach(className => {
- const item = document.querySelector('.' + className);
- if (item) {
- // Find the link element inside the sidebar item
- const linkEl = item.querySelector('.menu__list-item-collapsible > a');
+ // Add icons to sidebar
+ function applyIcons() {
+ // Process each sidebar item class
+ Object.keys(iconMapping).forEach(className => {
+ const item = document.querySelector('.' + className);
+ if (item) {
+ // Find the link element inside the sidebar item
+ const linkEl = item.querySelector('.menu__list-item-collapsible > a');
+
+ if (linkEl && !linkEl.querySelector('.sidebar-icon')) {
+ // Only add if icon doesn't exist
+ console.log('Adding icon to', className);
+
+ // Create the icon element
+ const iconEl = document.createElement('i');
+ iconEl.setAttribute('data-lucide', iconMapping[className]);
+ iconEl.classList.add('sidebar-icon');
- if (linkEl && !linkEl.querySelector('.sidebar-icon')) {
- // Only add if icon doesn't exist
- console.log('Adding icon to', className);
-
- // Create the icon element
- const iconEl = document.createElement('i');
- iconEl.setAttribute('data-lucide', iconMapping[className]);
- iconEl.classList.add('sidebar-icon');
-
- // Insert the icon at the beginning of the link
- linkEl.insertBefore(iconEl, linkEl.firstChild);
- }
+ // Insert the icon at the beginning of the link
+ linkEl.insertBefore(iconEl, linkEl.firstChild);
}
- });
-
- // Initialize all icons
- if (window.lucide) {
- window.lucide.createIcons({
- attrs: {
- stroke: 'currentColor',
- 'stroke-width': '1.5',
- 'stroke-linecap': 'round',
- 'stroke-linejoin': 'round'
- }
- });
}
+ });
+
+ // Initialize all icons
+ if (window.lucide) {
+ window.lucide.createIcons({
+ attrs: {
+ stroke: 'currentColor',
+ 'stroke-width': '1.5',
+ 'stroke-linecap': 'round',
+ 'stroke-linejoin': 'round'
+ }
+ });
}
+ }
+
+ // Progressive enhancement approach with multiple attempts
+ let attempts = 0;
+ const maxAttempts = 5;
- // Progressive enhancement approach with multiple attempts
- let attempts = 0;
- const maxAttempts = 5;
+ function attemptToAddIcons() {
+ const sidebarItems = document.querySelectorAll('.menu__list-item-collapsible');
- function attemptToAddIcons() {
- const sidebarItems = document.querySelectorAll('.menu__list-item-collapsible');
+ if (sidebarItems.length > 0) {
+ applyIcons();
+ attempts++;
- if (sidebarItems.length > 0) {
- applyIcons();
- attempts++;
-
- // Schedule another check to handle React hydration
- if (attempts < maxAttempts) {
- setTimeout(attemptToAddIcons, 300 * attempts); // Increasing delays
- }
- } else if (attempts < maxAttempts) {
- // No sidebar items yet, try again later
- attempts++;
- setTimeout(attemptToAddIcons, 200);
+ // Schedule another check to handle React hydration
+ if (attempts < maxAttempts) {
+ setTimeout(attemptToAddIcons, 300 * attempts); // Increasing delays
}
+ } else if (attempts < maxAttempts) {
+ // No sidebar items yet, try again later
+ attempts++;
+ setTimeout(attemptToAddIcons, 200);
}
-
- // Start the process
- setTimeout(attemptToAddIcons, 100);
}
- // Attach MutationObserver to detect any DOM changes in the content area
- (function setupSidebarObserver() {
- let currentPath = window.location.pathname;
- let observer = null;
-
- // Run the icon adder when the path changes
- function handlePathChange() {
- const newPath = window.location.pathname;
- if (newPath !== currentPath) {
- currentPath = newPath;
-
- // Only act on doc paths
- if (currentPath.startsWith('/docs') || currentPath === '/') {
- // Wait for React to render the sidebar
- setTimeout(addLucideIcons, 200);
- }
+ // Start the process
+ setTimeout(attemptToAddIcons, 100);
+}
+
+// Attach MutationObserver to detect any DOM changes in the content area
+(function setupSidebarObserver() {
+ let currentPath = window.location.pathname;
+ let observer = null;
+
+ // Run the icon adder when the path changes
+ function handlePathChange() {
+ const newPath = window.location.pathname;
+ if (newPath !== currentPath) {
+ currentPath = newPath;
+
+ // Only act on doc paths
+ if (currentPath.startsWith('/docs') || currentPath === '/' || currentPath.startsWith('/tutorials')) {
+ // Wait for React to render the sidebar
+ setTimeout(addLucideIcons, 200);
}
}
-
- // Watch for navigation events
- ['pushState', 'replaceState'].forEach(method => {
- const original = history[method];
- history[method] = function(...args) {
- original.apply(this, args);
- handlePathChange();
- };
- });
-
- window.addEventListener('popstate', handlePathChange);
-
- // Run once on initial load
- if (currentPath.startsWith('/docs') || currentPath === '/') {
- addLucideIcons();
- }
- })();
+ }
+
+ // Watch for navigation events
+ ['pushState', 'replaceState'].forEach(method => {
+ const original = history[method];
+ history[method] = function(...args) {
+ original.apply(this, args);
+ handlePathChange();
+ };
+ });
+
+ window.addEventListener('popstate', handlePathChange);
+
+ // Run once on initial load
+ if (currentPath.startsWith('/docs') || currentPath === '/' || currentPath.startsWith('/tutorials')) {
+ addLucideIcons();
+ }
+})();
\ No newline at end of file