OWASP LLM Security
БесплатноБез исполняемых скриптовНе проверенLLM-specific security controls, prompt injection prevention, OWASP LLM Top 10
от Hack23★ 15 звёзд на GitHubОб этом скилле
🧠 OWASP LLM Security Skill
🎯 Purpose
Enforce LLM-specific security controls aligned with OWASP LLM Top 10 2025.
Key Principle: "LLMs introduce unique security risks requiring specialized controls."
📚 Scope
- 🔓 Prompt Injection Prevention
- 💾 Insecure Output Handling
- 🏋️ Model Denial of Service
- �� Supply Chain Vulnerabilities
- 🔌 Insecure Plugin Design
- 📊 Excessive Agency
- 🛡️ Data Leakage Prevention
⚙️ Security Rules
MUST Requirements
owasp_llm_top_10_controls:
llm01_prompt_injection:
input_validation:
- sanitize_user_input: remove_injection_attempts
- prompt_templates: use_parameterized_prompts
- context_isolation: separate_user_system_contexts
detection:
- monitor_outputs: alert_on_suspicious_responses
- log_inputs: track_all_prompts_for_analysis
- anomaly_detection: flag_unusual_input_patterns
llm02_insecure_output_handling:
output_validation:
- sanitize_before_render: html_encode_llm_outputs
- validate_format: check_expected_output_structure
- xss_prevention: never_trust_llm_generated_html
secure_integration:
- escaped_rendering: use_safe_templating_engines
- csp_headers: content_security_policy_strict
llm03_training_data_poisoning:
data_quality:
- source_validation: verify_training_data_sources
- adversarial_testing: test_for_backdoor_triggers
- data_provenance: track_dataset_origins
monitoring:
- model_behavior: detect_unexpected_outputs
- regular_retraining: update_with_clean_datasets
llm04_model_denial_of_service:
rate_limiting:
- per_user_limits: 100_requests_per_hour
- cost_caps: maximum_tokens_per_request
- timeout_enforcement: 30_second_maximum_response_time
resource_management:
- queue_management: priority_queues_for_critical_users
- circuit_breakers: auto_disable_on_abuse_detection
llm05_supply_chain_vulnerabilities:
third_party_models:
- vendor_assessment: security_evaluation_before_use
- model_provenance: verify_official_sources_only
- sbom: software_bill_of_materials_for_ai_components
monitoring:
- dependency_scanning: check_for_vulnerable_libraries
- model_updates: track_security_patches_from_vendors
llm06_sensitive_info_disclosure:
data_protection:
- no_pii_training: never_train_on_personal_data
- output_filtering: redact_potential_secrets_in_responses
- context_limits: limit_context_window_to_reduce_leakage
testing:
- red_team: attempt_to_extract_training_data
- regression_tests: verify_no_memorization_of_secrets
llm07_insecure_plugin_design:
plugin_security:
- least_privilege: plugins_minimal_permissions_required
- input_validation: validate_all_plugin_inputs
- authentication: require_auth_for_plugin_execution
review_process:
- security_review: all_plugins_security_audited
- sandboxing: isolate_plugin_execution_environment
llm08_excessive_agency:
authorization:
- human_approval: require_approval_for_critical_actions
- scope_limits: restrict_llm_to_read_only_operations
- audit_trail: log_all_llm_initiated_actions
safeguards:
- action_validation: confirm_intended_action_before_execution
- rollback_capability: undo_mechanism_for_llm_actions
llm09_overreliance:
human_oversight:
- fact_checking: verify_llm_outputs_before_trust
- disclaimer: inform_users_llm_may_hallucinate
- critical_decisions: never_fully_automate_without_review
llm10_model_theft:
access_controls:
- api_authentication: require_strong_auth_for_model_access
- rate_limiting: prevent_model_extraction_via_queries
- watermarking: embed_watermarks_in_model_outputs
MUST NOT Prohibitions
prohibited_llm_practices:
- unvalidated_prompts: accepting_raw_user_input_to_llm
- trusting_outputs: using_llm_responses_without_validation
- no_rate_limits: allowing_unlimited_api_calls
- exposing_models: public_access_to_model_weights
- training_on_secrets: including_api_keys_in_training_data
- unmonitored_usage: no_logging_or_alerting_for_abuse
💡 Examples
Example 1: Prompt Injection Prevention
# Secure LLM Integration with Input Validation
import re
from typing import Optional
def sanitize_user_input(user_input: str) -> str:
"""Remove potential prompt injection attempts"""
# Remove system-like instructions
injection_patterns = [
r"ignore previous instructions",
r"disregard above",
r"you are now",
r"system:",
r"admin:",
]
cleaned = user_input
for pattern in injection_patterns:
cleaned = re.sub(pattern, "", cleaned, flags=re.IGNORECASE)
# Limit length to prevent token exhaustion
max_length = 500
cleaned = cleaned[:max_l
Установить OWASP LLM Security в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
FAQ
Что делает скилл OWASP LLM Security?
LLM-specific security controls, prompt injection prevention, OWASP LLM Top 10
Как установить скилл OWASP LLM Security?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл OWASP LLM Security запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic