04-security SKILL.md skillC

04-security from skillmds/skillmd is an agent skill: a SKILL.md folder an AI agent loads when a task calls for it.

Install it, pinned
mdr add skillmds/skillmd/04-security@v1.0.0

Pins v1.0.0 in mdr.lock. Pin the fingerprint instead.

Audit grade
C, 15 of 17 checks passed
Kind
SKILL.md skill
Repository
skillmds/skillmd
Path
plugins/cloud-devops/skills/04-security/SKILL.md
Versions recorded
1
Latest version
v1.0.0, committed Sep 19, 2026
Size
17,536 bytes
Repository stars
250
License
MIT

Dify 安全实践和部署运维完整指南,涵盖SSRF防护、代码沙箱、Docker/Kubernetes部署、监控告警和故障恢复.

Collected from public GitHub. Every version is saved exactly as it was and never changes. Install it at an exact version with the mdr tool, and every file is checked before it reaches your agent. The main file is checked against the SHA-256 fingerprint recorded here, and the others against the fingerprints GitHub keeps for its source commit. The automatic checks below grade the latest version, and the same checks always give the same file the same grade.

What the file says

# Dify 安全和部署 SKILL

## 概述

本 SKILL 提供 Dify 平台的安全实践和部署运维完整指南,帮助开发者和运维人员构建安全、稳定、高性能的生产环境。

### 触发场景

使用本 SKILL 当你需要:

- 🚀 **部署 Dify 到生产环境** (Docker/Kubernetes)
- 🔒 **配置安全防护机制** (SSRF、沙箱、加密)
- 🔧 **解决部署问题** (容器启动失败、网络配置、性能瓶颈)
- 📊 **优化生产环境** (监控告警、高可用、故障恢复)
- ✅ **进行安全审计** 和配置验证

### 核心能力

- **安全防护**: SSRF 防护、代码沙箱、数据加密、权限管理
- **Docker 部署**: 快速部署、生产配置、网络架构、资源优化
- **Kubernetes 部署**: 高可用架构、自动扩展、Helm 部署
- **监控告警**: OpenTelemetry、Sentry、日志聚合、性能监控
- **故障恢复**: 问题诊断、恢复流程、备份策略

---

## 快速开始

### 最小部署配置

```bash
# 1. 克隆仓库
git clone https://github.com/langgenius/dify.git
cd dify/docker

# 2. 复制环境变量
cp .env.example .env

# 3. 修改关键安全配置
# 编辑 .env 文件:
SECRET_KEY=$(openssl rand -base64 42)
DB_PASSWORD=your-strong-password
REDIS_PASSWORD=your-redis-password
SANDBOX_API_KEY=$(openssl rand -base64 32)

# 4. 启动服务
docker compose up -d

# 5. 验证部署
docker compose ps
curl http://localhost/health
```

### 安全检查清单

#### 部署前检查

- [ ] **SECRET_KEY** 已更改为强密钥 (使用 `openssl rand -base64 42`)
- [ ] **数据库密码** 已修改默认值
- [ ] **Redis 密码** 已设置
- [ ] **SSRF Proxy** 已配置并阻止内网访问
- [ ] **Sandbox 沙箱** 已启用网络代理
- [ ] **HTTPS/TLS** 证书已配置 (生产环境)
- [ ] **API Key 管理** 机制已启用
- [ ] **文件上传限制** 已设置 (UPLOAD_FILE_SIZE_LIMIT)
…

Read the whole file at its exact version.

How to install

The exact contents, by fingerprint
mdr add skillmds/skillmd/04-security@sha256:50a746e5fc378acd

The line at the top of this page pins the label v1.0.0, which is what most people want. This one pins the sha256 fingerprint of the contents instead, so it survives a label being moved. Either way the exact version is written to mdr.lock, and mdr install downloads and checks those contents again, so it installs them exactly or stops with an error.

Badge

mdr badge

[![mdr](https://markdownregistry.com/badge/art_wyoxaeg6zinxy5td.svg)](https://markdownregistry.com/a/art_wyoxaeg6zinxy5td)

3 badge image fetches in 30 days. What the badge shows.

Versions

The registry has recorded 1 version of this file, committed on Sep 19, 2026.

versioncommittedcommitsizeaudit
v1.0.0 latest2026-09-19 fecc0d5 17,536 BC view

Audit of the latest version

C  15 of 17 checks passed. Fixed automatic checks with no AI involved, so the same checks give the same answer every run.
  • fail: Frontmatter declares a name
  • fail: No link to a raw IP address (matched: http://127.0.0.1)
  • pass: Frontmatter block present
  • pass: Frontmatter declares a description
  • pass: Size between 200 bytes and 200 KB (17536 bytes)
  • pass: No zero-width or bidi control characters
  • pass: No instruction hidden inside an HTML comment
  • pass: No link to an exfiltration or paste host
  • pass: No credential-shaped string
  • pass: No instruction to send local credentials anywhere
  • pass: No text hidden with inline styles
  • pass: No prompt-injection phrasing
  • pass: No curl or wget piped into a shell
  • pass: No recursive delete of root, home or parent
  • pass: No instruction to read or print local credentials
  • pass: No base64 blob over 200 characters
  • pass: No script tag

Starting a new one? Use a template for SKILL.md on mdpantry, which passes every one of these checks and says what to change in it.

Source

GitHub

skillmds/skillmd · 250 stars · license MIT · pushed 2026-10-20 · branch main

API

GET https://markdownregistry.com/api/v1/artifacts/art_wyoxaeg6zinxy5td
GET https://markdownregistry.com/api/v1/resolve?ref=skillmds/skillmd/04-security
GET https://markdownregistry.com/api/v1/blob/50a746e5fc378acdbdee173a98f117a7fb488f933530c11371eeb5c3fd1afc49

Your AI assistant does the legwork. You hear about the deals worth your word. Hand yours the standing instructions at modelranch.com and it joins the network that reads files like this one.

Guides: the SKILL.md format and its required fields · what to check before you install a skill · how to pin a skill to an exact version · where to find agent skills · keeping a team on the same skills · which agent file does what.

More from skillmds/skillmd

hello-world SKILL.md skill
skillmds/skillmd · examples/skills/hello-world/SKILL.md · Greet the user warmly and demonstrate the minimal shape of a valid Agent Skill.
git:20260825.90a5e4f · audit A · 250 stars
ads-math SKILL.md skill
skillmds/skillmd · plugins/agents-mcp/skills/ads-math/SKILL.md · Calculate and model paid-media CPA, CPL, CPC, CPM, ROAS, MER, break-even targets, contribution margin, LTV:CAC…
git:20260919.fecc0d5 · audit A · 250 stars
AGENTS.md@plugins/agents-mcp/skills/agent-recall AGENTS.md file
skillmds/skillmd · plugins/agents-mcp/skills/agent-recall/AGENTS.md
git:20260919.fecc0d5 · audit A · 250 stars
agent-recall SKILL.md skill
skillmds/skillmd · plugins/agents-mcp/skills/agent-recall/SKILL.md · Persistent compounding memory for AI agents. 5 default MCP tools: session_start, session_end, remember, recall, check…
v3.4.30 · audit A · 250 stars
aihot SKILL.md skill
skillmds/skillmd · plugins/agents-mcp/skills/aihot/SKILL.md · 查询 AI HOT 的中文 AI 资讯、精选、当前热点和日报。当用户问今天或最近的 AI 新闻、AI 圈动态、大模型或产品发布、OpenAI/Anthropic/Google 最近发布、AI 论文、AI 日报、AI HOT…
git:20260919.fecc0d5 · audit A · 250 stars
CLAUDE.md@plugins/agents-mcp/skills/b0 CLAUDE.md file
skillmds/skillmd · plugins/agents-mcp/skills/b0/CLAUDE.md
git:20260919.fecc0d5 · audit A · 250 stars
b0 SKILL.md skill
skillmds/skillmd · plugins/agents-mcp/skills/b0/SKILL.md · Delegate tasks to AI agents via Box0. Use when the user asks to review code, check security, run tests, compare tools…
git:20260919.fecc0d5 · audit A · 250 stars
bioqc-mcp SKILL.md skill
skillmds/skillmd · plugins/agents-mcp/skills/bioqc-mcp/SKILL.md · Automated sequencing quality control and advanced visualization wrapping FastQC, MultiQC, and custom chart generation…
v0.1.0 · audit A · 250 stars
BMW-design-analysis SKILL.md skill
skillmds/skillmd · plugins/agents-mcp/skills/bmw-design-analysis/SKILL.md · BMW's corporate site — distinct from BMW M's motorsport-bombastic variant, this is a measured and settled…
alpha · audit A · 250 stars
civitai-mcp-ultimate SKILL.md skill
skillmds/skillmd · plugins/agents-mcp/skills/civitai-mcp-ultimate/SKILL.md · Ultimate MCP server for Civitai — search models, browse top images with prompts, download LoRAs/Checkpoints, analyze…
git:20260919.fecc0d5 · audit A · 250 stars
claw-orchestrator SKILL.md skill
skillmds/skillmd · plugins/agents-mcp/skills/claw-orchestrator/SKILL.md · Manage persistent coding sessions across Claude Code, Codex, Antigravity (agy), Cursor, and OpenCode engines. Use when…
git:20260919.fecc0d5 · audit A · 250 stars
cli-anything-hermes SKILL.md skill
skillmds/skillmd · plugins/agents-mcp/skills/cli-anything-hermes/SKILL.md · Use when the user wants Hermes Agent to build, refine, test, or validate a CLI-Anything harness for a GUI application…
git:20260919.fecc0d5 · audit A · 250 stars

Every file in skillmds/skillmd

Browse by kind, by grade C, or by owner.