mirror of
https://github.com/CyberSecurityUP/NeuroSploit.git
synced 2026-12-05 02:24:17 +01:00
Merge pull request #127 from JoasASantos/feat/mobile-ai-skills
feat(skills): mobile, binary and AI frontmatter; dedupe colliding names
This commit is contained in:
65 files changed
+496
No files matched your search
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: chatbot, render, markdown, completion
|
||||
chains: xss_stored, command_injection
|
||||
priority: 26
|
||||
max_rounds: 2
|
||||
modes: ai, web
|
||||
---
|
||||
# Improper Output Handling Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: rag, retrieval, agent, document
|
||||
chains: llm_rag_embedding_weakness, llm_excessive_agency
|
||||
priority: 28
|
||||
max_rounds: 2
|
||||
modes: ai, web
|
||||
---
|
||||
# Indirect Prompt Injection Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
---
|
||||
triggers: chatbot, assistant, grounding
|
||||
priority: 16
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Misinformation & Overreliance Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: chatbot, assistant, gpt, claude, completion
|
||||
chains: llm_system_prompt_leak, llm_improper_output_handling, llm_excessive_agency
|
||||
priority: 30
|
||||
max_rounds: 2
|
||||
modes: ai, web
|
||||
---
|
||||
# Direct Prompt Injection Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: rag, embedding, vector, retrieval
|
||||
chains: vector_db_injection
|
||||
priority: 24
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Vector & Embedding Weaknesses Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: chatbot, assistant, rag, embedding
|
||||
chains: llm_rag_embedding_weakness
|
||||
priority: 24
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Sensitive Information Disclosure Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: huggingface, model weights, checkpoint
|
||||
chains: typosquatting_package
|
||||
priority: 20
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# AI Supply Chain Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: completion, token, chatbot
|
||||
chains: llm_model_dos
|
||||
priority: 20
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Unbounded Consumption Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: mcp, scope, permission, tool
|
||||
chains: mcp_unsafe_tool_execution
|
||||
priority: 24
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# MCP Excessive Permissions & Confused Deputy Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: mcp, tool, function call
|
||||
chains: mcp_unsafe_tool_execution, mcp_excessive_permissions
|
||||
priority: 28
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# MCP Tool Poisoning & Description Injection Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: mcp, tool, exec, function call
|
||||
chains: command_injection, llm_excessive_agency
|
||||
priority: 28
|
||||
max_rounds: 2
|
||||
modes: ai, web
|
||||
---
|
||||
# MCP Unsafe Tool Execution Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: n8n, ai node, workflow
|
||||
chains: llm_excessive_agency, mcp_unsafe_tool_execution
|
||||
priority: 22
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# n8n AI/LLM Node Audit Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: n8n, workflow, automation
|
||||
chains: n8n_ai_node_audit, api_key_exposure
|
||||
priority: 24
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# n8n Workflow Security Audit Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
priority: 0
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Adversarial Prefix/Suffix Jailbreak Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
---
|
||||
chains: redteam_many_shot, redteam_pair
|
||||
priority: 0
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Crescendo Multi-Turn Jailbreak Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
priority: 0
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Encoding & Obfuscation Bypass Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
---
|
||||
chains: redteam_tool_function_abuse
|
||||
priority: 0
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Goal Hijacking Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
---
|
||||
chains: llm_indirect_prompt_injection
|
||||
priority: 0
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Indirect Prompt Injection (Scenario Matrix) Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
---
|
||||
chains: redteam_tap
|
||||
priority: 0
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Many-Shot Jailbreak Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
---
|
||||
chains: redteam_tap
|
||||
priority: 0
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# PAIR Automated Jailbreak Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
---
|
||||
chains: redteam_encoding_obfuscation
|
||||
priority: 0
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Refusal Suppression / Prefix Injection Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
---
|
||||
chains: redteam_refusal_suppression
|
||||
priority: 0
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Roleplay / Persona Jailbreak Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
---
|
||||
chains: llm_system_prompt_leak
|
||||
priority: 0
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# System-Prompt & Secret Exfiltration Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,8 @@
|
||||
---
|
||||
priority: 0
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Tree-of-Attacks Jailbreak Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
---
|
||||
chains: mcp_unsafe_tool_execution
|
||||
priority: 0
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Agentic Tool/Function-Call Abuse Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: plugin, skill, prompt, instruction
|
||||
chains: llm_indirect_prompt_injection
|
||||
priority: 22
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# Skill/Plugin Injection Surface Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: plugin, skill, manifest, extension
|
||||
chains: skill_injection_surface, mcp_tool_poisoning
|
||||
priority: 22
|
||||
max_rounds: 1
|
||||
modes: ai, web
|
||||
---
|
||||
# AI Skill / Plugin Audit Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: android, cipher, keystore, dex
|
||||
chains: weak_encryption, android_insecure_storage
|
||||
priority: 22
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# Android Cryptography Misuse Agent
|
||||
|
||||
Class: CWE-327
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: androidmanifest, activity, exported, intent
|
||||
chains: android_webview_deeplinks, binary_ipc_privilege_review
|
||||
priority: 26
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# Android Exported Components and Intent Handling Agent
|
||||
|
||||
Class: CWE-926
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: apk, strings.xml, android, dex
|
||||
chains: mobile_backend_endpoints, api_key_exposure
|
||||
priority: 28
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# Android Hardcoded Secrets and Keys Agent
|
||||
|
||||
Class: CWE-798
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: sharedpreferences, sqlite, android, apk
|
||||
chains: android_hardcoded_secrets, android_crypto_misuse
|
||||
priority: 26
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# Android Insecure Local Data Storage Agent
|
||||
|
||||
Class: CWE-312
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: androidmanifest, apk, android, .apk
|
||||
chains: android_exported_components, android_network_security, android_webview_deeplinks
|
||||
priority: 30
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# Android Manifest Audit Agent
|
||||
|
||||
Class: CWE-489
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: .so, jni, native, android
|
||||
chains: binary_triage_identify, binary_memory_safety_review
|
||||
priority: 24
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# Android Native Library Hardening Agent
|
||||
|
||||
Class: CWE-693
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: network_security_config, cleartext, android
|
||||
chains: mobile_backend_endpoints, cleartext_transmission
|
||||
priority: 24
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# Android Network Security and Certificate Validation Agent
|
||||
|
||||
Class: CWE-295
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: frida, android, hooking, runtime
|
||||
chains: android_insecure_storage, mobile_backend_endpoints
|
||||
priority: 20
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# Android Runtime Protections (Root, Debug, Pinning) Agent
|
||||
|
||||
Class: CWE-693
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: webview, deeplink, intent-filter, android
|
||||
chains: xss_dom, client_side_path_traversal
|
||||
priority: 24
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# Android WebView and Deep Link Handling Agent
|
||||
|
||||
Class: CWE-749
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: elf, mach-o, pe32, binary, import
|
||||
chains: binary_dangerous_functions, binary_input_parser_review, binary_ipc_privilege_review
|
||||
priority: 28
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native Binary Attack Surface Map Agent
|
||||
|
||||
Class: CWE-20
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
---
|
||||
triggers: license, activation, binary, serial
|
||||
priority: 18
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native Authentication, Licensing and Logic Flaw Review Agent
|
||||
|
||||
Class: CWE-287
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: binary, library, version, .so, .dll
|
||||
chains: cve_known_exploitation, vulnerable_dependency
|
||||
priority: 24
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native Binary Component and Version Review Agent
|
||||
|
||||
Class: CWE-1104
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: crash, fuzz, asan, binary
|
||||
chains: binary_poc_reproducer, binary_variant_hunt
|
||||
priority: 24
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native Fuzzing and Crash Triage Agent
|
||||
|
||||
Class: CWE-119
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: aes, rsa, cipher, binary
|
||||
chains: weak_encryption, ecb_pattern_leak
|
||||
priority: 20
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native Cryptography Review Agent
|
||||
|
||||
Class: CWE-327
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: strcpy, sprintf, memcpy, gets, binary
|
||||
chains: binary_memory_safety_review, binary_crash_triage_fuzz
|
||||
priority: 26
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native Binary Unsafe Function Review Agent
|
||||
|
||||
Class: CWE-120
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: ltrace, strace, binary, syscall
|
||||
chains: binary_memory_safety_review, binary_ipc_privilege_review
|
||||
priority: 20
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native Dynamic Behaviour Trace Agent
|
||||
|
||||
Class: CWE-1263
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: elf, mach-o, pe32, nx, relro, canary
|
||||
chains: binary_memory_safety_review
|
||||
priority: 24
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native Binary Hardening Audit Agent
|
||||
|
||||
Class: CWE-693
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: parser, decode, deserialize, binary
|
||||
chains: binary_crash_triage_fuzz, binary_memory_safety_review
|
||||
priority: 24
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native File and Protocol Parser Review Agent
|
||||
|
||||
Class: CWE-20
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: ipc, socket, pipe, binary, setuid
|
||||
chains: linux_priv_esc, windows_priv_esc
|
||||
priority: 22
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native Privilege Boundary and IPC Review Agent
|
||||
|
||||
Class: CWE-269
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: buffer, heap, stack, binary, overflow
|
||||
chains: binary_crash_triage_fuzz, binary_poc_reproducer
|
||||
priority: 26
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native Memory-Safety Vulnerability Review Agent
|
||||
|
||||
Class: CWE-787
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: crash, binary, repro
|
||||
chains: binary_variant_hunt
|
||||
priority: 22
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native Proof-of-Vulnerability Reproducer Agent
|
||||
|
||||
Class: CWE-787
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: strings, binary, elf, mach-o
|
||||
chains: api_key_exposure, binary_crypto_review
|
||||
priority: 24
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native Binary Secrets and Embedded Credentials Agent
|
||||
|
||||
Class: CWE-798
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: elf, mach-o, pe32, binary, .so, .dll
|
||||
chains: binary_attack_surface_map, binary_hardening_audit, binary_component_versions
|
||||
priority: 30
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native Binary Triage and Identification Agent
|
||||
|
||||
Class: CWE-1104
|
||||
|
||||
@@ -1,3 +1,9 @@
|
||||
---
|
||||
triggers: binary, patch, variant
|
||||
priority: 18
|
||||
max_rounds: 1
|
||||
modes: mobile, host, whitebox
|
||||
---
|
||||
# Native Variant Hunt Agent
|
||||
|
||||
Class: CWE-1120
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: mach-o, ipa, pie, ios
|
||||
chains: binary_hardening_audit, binary_triage_identify
|
||||
priority: 24
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# iOS Binary Protections and Encryption Agent
|
||||
|
||||
Class: CWE-693
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: entitlements, ipa, provisioning, ios
|
||||
chains: ios_binary_protections
|
||||
priority: 26
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# iOS Entitlements and Code Signing Agent
|
||||
|
||||
Class: CWE-250
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: ipa, ios, mach-o, strings
|
||||
chains: mobile_backend_endpoints, api_key_exposure
|
||||
priority: 28
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# iOS Hardcoded Secrets and Embedded Configuration Agent
|
||||
|
||||
Class: CWE-798
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: keychain, nsuserdefaults, ios, ipa
|
||||
chains: ios_hardcoded_secrets
|
||||
priority: 26
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# iOS Insecure Local Data Storage and Keychain Use Agent
|
||||
|
||||
Class: CWE-312
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: info.plist, ipa, ios, ats
|
||||
chains: ios_entitlements_signing, ios_url_schemes_universal_links
|
||||
priority: 30
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# iOS Info.plist and App Transport Security Audit Agent
|
||||
|
||||
Class: CWE-319
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: frida, ios, objection, cycript
|
||||
chains: ios_insecure_storage, mobile_backend_endpoints
|
||||
priority: 20
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# iOS Runtime Protections (Jailbreak, Pinning) Agent
|
||||
|
||||
Class: CWE-693
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: url scheme, universal link, ios
|
||||
chains: ios_webview_ipc, open_redirect
|
||||
priority: 24
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# iOS URL Schemes and Universal Links Agent
|
||||
|
||||
Class: CWE-939
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: wkwebview, uiwebview, ios, javascript bridge
|
||||
chains: xss_dom, client_side_path_traversal
|
||||
priority: 22
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# iOS WebView and Inter-App Communication Agent
|
||||
|
||||
Class: CWE-749
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: apk, ipa, endpoint, mobile
|
||||
chains: bola, bfla, api_bola_numeric_ids, jwt_manipulation
|
||||
priority: 28
|
||||
max_rounds: 2
|
||||
modes: mobile
|
||||
---
|
||||
# Mobile App Backend Endpoint Inventory Agent
|
||||
|
||||
Class: CWE-200
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: apk, ipa, mobsf, mobile
|
||||
chains: android_manifest_audit, ios_plist_ats_audit, mobile_third_party_sdks
|
||||
priority: 28
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# Mobile Automated Static Scan (MobSF) Agent
|
||||
|
||||
Class: CWE-1104
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: sdk, apk, ipa, gradle, podfile
|
||||
chains: vulnerable_dependency, cve_known_exploitation
|
||||
priority: 22
|
||||
max_rounds: 1
|
||||
modes: mobile
|
||||
---
|
||||
# Mobile Third-Party SDK and Dependency Review Agent
|
||||
|
||||
Class: CWE-1104
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: agent, tool, function call, mcp
|
||||
chains: mcp_unsafe_tool_execution, llm_improper_output_handling
|
||||
priority: 28
|
||||
max_rounds: 2
|
||||
modes: ai, web
|
||||
---
|
||||
# Excessive Agency Specialist Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -1,3 +1,10 @@
|
||||
---
|
||||
triggers: chatbot, assistant, guardrail, refusal
|
||||
chains: redteam_crescendo, redteam_many_shot, redteam_roleplay_persona
|
||||
priority: 26
|
||||
max_rounds: 2
|
||||
modes: ai, web
|
||||
---
|
||||
# LLM Jailbreak Specialist Agent
|
||||
|
||||
## User Prompt
|
||||
|
||||
@@ -152,6 +152,34 @@ pub fn load_catalog(base: &Path) -> SkillCatalog {
|
||||
|
||||
skills.sort_by(|a, b| b.meta.priority.cmp(&a.meta.priority).then(a.name.cmp(&b.name)));
|
||||
|
||||
// A few skills exist under the same name in two category directories, e.g.
|
||||
// llm_system_prompt_leak in both vulns/ and ai/. Both landed in `skills`,
|
||||
// so the router could pick the same skill twice, while `by_name` — built by
|
||||
// collect() — resolved to whichever came last and shadowed the other. That
|
||||
// left the copy carrying the frontmatter unreachable through `get()` even
|
||||
// though `chain_map` had been built from it.
|
||||
//
|
||||
// Keep the richer copy: the one that declares routing metadata, falling
|
||||
// back to the higher priority. `skills` is already sorted by descending
|
||||
// priority, so the first copy of a name wins ties.
|
||||
{
|
||||
let mut best: HashMap<String, usize> = HashMap::new();
|
||||
for (i, s) in skills.iter().enumerate() {
|
||||
let richer = |s: &Skill| (!s.meta.triggers.is_empty() || !s.meta.chains.is_empty()) as u8;
|
||||
match best.get(&s.name) {
|
||||
Some(&j) if richer(&skills[j]) >= richer(s) => {}
|
||||
_ => { best.insert(s.name.clone(), i); }
|
||||
}
|
||||
}
|
||||
let mut keep: Vec<usize> = best.into_values().collect();
|
||||
keep.sort_unstable();
|
||||
let mut kept = Vec::with_capacity(keep.len());
|
||||
for (i, s) in skills.into_iter().enumerate() {
|
||||
if keep.binary_search(&i).is_ok() { kept.push(s); }
|
||||
}
|
||||
skills = kept;
|
||||
}
|
||||
|
||||
let by_name: HashMap<String, usize> = skills.iter().enumerate()
|
||||
.map(|(i, s)| (s.name.clone(), i))
|
||||
.collect();
|
||||
@@ -1083,3 +1111,41 @@ mod mode_scoping_tests {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
#[cfg(test)]
|
||||
mod dedup_tests {
|
||||
use super::*;
|
||||
|
||||
fn repo_root() -> std::path::PathBuf {
|
||||
std::path::Path::new(env!("CARGO_MANIFEST_DIR"))
|
||||
.ancestors().nth(3).unwrap().to_path_buf()
|
||||
}
|
||||
|
||||
/// Three skills ship under the same name in two category directories.
|
||||
/// Both copies used to reach the catalogue, so the router could pick the
|
||||
/// same skill twice and `get()` resolved to whichever collect() kept.
|
||||
#[test]
|
||||
fn the_catalogue_holds_each_name_once() {
|
||||
let catalog = load_catalog(&repo_root());
|
||||
let mut seen: HashMap<&str, usize> = HashMap::new();
|
||||
for s in &catalog.skills {
|
||||
*seen.entry(s.name.as_str()).or_default() += 1;
|
||||
}
|
||||
let dupes: Vec<(&str, usize)> = seen.into_iter().filter(|(_, n)| *n > 1).collect();
|
||||
assert!(dupes.is_empty(), "duplicate names in the catalogue: {dupes:?}");
|
||||
}
|
||||
|
||||
/// And the copy kept must be the one carrying the routing metadata.
|
||||
#[test]
|
||||
fn dedup_keeps_the_copy_with_frontmatter() {
|
||||
let catalog = load_catalog(&repo_root());
|
||||
let s = catalog.get("llm_system_prompt_leak")
|
||||
.expect("llm_system_prompt_leak missing from the catalogue");
|
||||
assert!(
|
||||
!s.meta.triggers.is_empty(),
|
||||
"dedup kept the bare copy: category={} triggers={:?}",
|
||||
s.category, s.meta.triggers,
|
||||
);
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user