Works with the AI Agents you already use

    Claude CodeClaude CodeCursorCursorCodex CLICodex CLIDeepSeekDeepSeekMuseMuse+22 more

    Dify Config Security Audit

    by CashonlyTian

    1

    Scores 10 checks 0–100 with grade + score-card PNG.

    $7.20

    Secure checkout via Stripe

    Money-back guarantee

    Converts to your local currency at checkout

    Security scanned
    Dify Config Security Audit

    Dify Config Security Audit

    Example session with this skill installed

    Run a security audit on my local Dify install directory reference/demo-project (Acme Dify Demo, Dify 1.14.1) and generate a score-card PNG for my team.

    • Read your context and instructions
    • Compiled the dify config security
    • Generated the document

    I have completed the security audit for the Dify installation "Acme Dify Demo" (Dify 1.14.1) in reference/demo-project.

    Dify Config Security Audit Results

    Score: 7/100 — Grade F — Risk: CRITICAL — 45 findings

    CheckScore / 10Key findings
    patched_version7Dify 1.14.1 is exposed to 7 verified November 2026 flaws, including CVE-2026-41948 (CVSS 9.4). Upgrade to 1.20.0.
    secret_key_and_init_password2SECRET_KEY is the published pre-1.15.0 default; INIT_PASSWORD is unset — whoever opens /install first becomes workspace owner.
    literal_secrets7DB_PASSWORD and REDIS_PASSWORD are both the default "difyai123456"; sandbox and plugin-daemon keys are shared.
    open_registration2INIT_PASSWORD unset with no setup record — first-install takeover is open.
    network_exposure4Ports 80, 443 and 5003 published on 0.0.0.0 with plain HTTP and no TLS reverse proxy.
    cors_and_info_endpoints2CONSOLE_CORS_ALLOW_ORIGINS is *; no telemetry review note.
    sandbox_and_plugin_daemon5Hard-coded sandbox credentials (CVE-2026-123135); SANDBOX_API_KEY and CODE_EXECUTION_API_KEY are shared.
    storage_and_database5Weaviate anonymous access is on; Postgres (5432) and Redis (6379) published on 0.0.0.0; no backup.
    container_hardening8Containers run as root with :latest images and no resource limits.
    file_hygiene_and_backups3.env is world-readable; no backup present.

    Clean demo

    The clean install in reference/demo-project-clean (Dify 1.20.0) scores

    100/100, grade A, risk LOW, 0 findings — no false positives.

    The visual score-card has been generated: scan-2026-11-30.png (1024x1024).

    Next steps

    • Upgrade to Dify 1.20.0 or later to resolve the November 2026 CVEs.
    • Rotate every literal and default secret and set a strong INIT_PASSWORD.
    • Bind ports to 127.0.0.1 behind a TLS reverse proxy and turn off Weaviate anonymous access.
    • Run the scan again after fixing your .env to verify the new score.

    scan-2026-11-30.png

    PDF · document

    Generated

    Example file from a real run - the skill writes it into your workspace.

    Connects securely to your tools. The creator never sees your data.

    About this skill

    Dify Config Security Audit

    Audit a self-hosted Dify install BEFORE it goes live — plugin-daemon traversal (CVE-2026-41948, CVSS 9.4), unauth SSRF, stored XSS, leaked SECRET_KEY, difyai123456 defaults, open registration, exposed 5003, Docker hardening. Scores 10 checks 0–100 with grade + score-card PNG.

    Audit a self-hosted Dify install directory (a version.txt, a .env, a docker-compose.yml, a docker-compose.override.yaml, a plugins.txt, a backups.txt, a reverse-proxy.txt, a setup.txt, a telemetry.txt and a volumes/ data directory) BEFORE it goes live — the version against the verified November 2026 flaw table (CVE-2026-41948 unauthenticated Plugin Daemon internal API exposure via path traversal in the console icon proxy, CVSS 9.4; CVE-2026-105762 unauthenticated SSRF via /console/api/remote-files/upload, CVSS 8.3; CVE-2026-21866 stored XSS via Mermaid securityLevel: loose; CVE-2026-58141 SSRF via the Squid proxy config, CVSS 7.6; CVE-2026-105761 authenticated cross-app MCP server manipulation, CVSS 7.1; CVE-2026-61461 SQL injection in the MyScale vector store backend, CVSS 8.8; CVE-2026-123135 hard-coded credentials in the Sandbox Run Handler, CVSS 6.3; CVE-2025-32795 privilege escalation — standard users can edit app name / description / icon; CVE-2025-63387 unauthenticated GET /console/api/system-features returns system feature / config info, CVSS 4.3, scored LOW — the maintainer says by design / non-sensitive; CVE-2026-18266 OAuth redirect open redirect — all fixed in 1.20.0), the published pre-1.15.0 SECRET_KEY (starting "sk-9f73s3lj"), an unset INIT_PASSWORD (whoever opens /install first becomes workspace owner), literal / default secrets in .env / compose (DB_PASSWORD and REDIS_PASSWORD both "difyai123456" by default, sandbox and plugin-daemon keys shared between services), ports 80 / 443 / 5003 published on 0.0.0.0 with plain HTTP and no TLS reverse proxy, CONSOLE_CORS_ALLOW_ORIGINS *, Weaviate anonymous access on, Postgres / Redis published on 0.0.0.0, a :latest image, a container running as root / privileged / with the Docker socket mounted, or a world-readable .env with no backup. Scores 10 checks 0-100 with grade, risk level and a shareable 1024x1024 score-card PNG (English + Chinese). The scan is local only: config files are parsed as text, plugin files are read as text and never imported, and secret values are never printed in full anywhere — findings name the key and the kind only.

    The 10 checks (10 points each)

    1. patched_version — the installed version is fully patched: version.txt (or a version line in .env, or the compose image tag as a fallback) is 1.20.0 or later. Fully patched scores 10, 1.19.0 scores 8, 1.16.0–1.18.0 scores 5, 1.15.0 scores 3, 1.13.0–1.14.1 scores 1, older / unpatched scores 0, a missing version scores 5 (cannot verify — partial). One finding per CVE the version is exposed to.
    2. secret_key_and_init_password — SECRET_KEY is not the published pre-1.15.0 default (it starts "sk-9f73s3lj", public in GitHub history), not a weak value and not short (under 32 characters); an empty / missing SECRET_KEY passes only on 1.15.0 or later, where Dify auto-generates a persistent key. INIT_PASSWORD is set, so whoever opens /install first cannot become workspace owner. A ${VAR} reference passes for either value. Score 10 minus weighted findings, floor 0.
    3. literal_secrets — no literal secrets in .env / docker-compose.yml: the database password, the Redis password, PLUGIN_DAEMON_KEY, PLUGIN_DIFY_INNER_API_KEY, SANDBOX_API_KEY, CODE_EXECUTION_API_KEY, the Weaviate API key, S3 / MinIO keys and model provider API keys. The publicly-known default "difyai123456" is high; a placeholder / weak value (changeme, password, secret, under 8 characters for a key) is medium; any other literal value is high. A base64-looking value is still a literal secret. ${VAR} references are NOT flagged; secret values are never printed in full anywhere. SECRET_KEY and INIT_PASSWORD are check 2's job, so they are not counted here. Score 10 minus weighted findings, floor 0.
    4. open_registration — the first-install takeover is closed: INIT_PASSWORD is set, or a setup.txt note records that the admin account already exists (and /install is closed). INIT_PASSWORD unset with no setup record is high, and the missing setup record itself is medium. Score 10 minus weighted findings, floor 0.
    5. network_exposure — no service in docker-compose publishes port 80, 443 or 5003 on 0.0.0.0 (a bare 80:80 entry binds all interfaces too) — each such publication is high; no TLS reverse proxy documented (no reverse-proxy.txt note) is medium. The nginx service in compose is the front door, not evidence of TLS. Docker-published ports skip ufw. Score 10 minus weighted findings, floor 0.
    6. cors_and_info_endpoints — CONSOLE_CORS_ALLOW_ORIGINS is a single trusted console origin, never * (.env.example sets * explicitly, so the docs' fallback to CONSOLE_WEB_URL never applies) — * is high, unset is medium; a telemetry.txt note records that the API's anonymous install event + daily heartbeat to otel.dify.ai (and Weaviate's own telemetry) have been reviewed — no note is low. Score 10 minus weighted findings, floor 0.
    7. sandbox_and_plugin_daemon — the version is past 1.18.0 (the CVE-2026-123135 hard-coded sandbox credentials, up to 1.18.0) is high; SANDBOX_API_KEY and CODE_EXECUTION_API_KEY are different values (shared keys are high); PLUGIN_DAEMON_KEY and PLUGIN_DIFY_INNER_API_KEY are different values (shared keys are medium); DIFY_AGENT_LOCAL_SANDBOX_AUTH_TOKEN is set (required since 1.18.0 — missing is medium, only judged on 1.18.0 or later); plugins.txt lists no plugin from an untrusted source (a git URL, an http(s) URL, a file: URL or a filesystem path) — high each — and no .ifpkg package import with no trusted source recorded — medium. Score 10 minus weighted findings, floor 0.
    8. storage_and_database — WEAVIATE_AUTHENTICATION_ANONYMOUS_ACCESS_ENABLED is not true (high); WEAVIATE_API_KEY matches WEAVIATE_AUTHENTICATION_APIKEY_ALLOWED_KEYS (a missing list or a literal mismatch is medium); the CELERY_BROKER_URL password matches REDIS_PASSWORD (a literal mismatch is high); Postgres (5432) and Redis (6379) are not published on 0.0.0.0 in docker-compose (high each); and a backup exists (no backups.txt note, no backups/ directory, no *.bak marker is medium when a volumes/ or data/ directory exists — the backup finding is also check 10's job). Score 10 minus weighted findings, floor 0.
    9. container_hardening — no image tagged :latest / :main / untagged is medium; no container running as root (no user:) is medium; privileged: true is critical and a dangerous cap_add (SYS_ADMIN / NET_ADMIN / ALL) is high; a Docker socket mount is high; a host / or /etc mount is high; no healthcheck, no restart policy and no resource limits are low each. Findings are aggregated per kind across services (one finding per kind, naming the services). Score 10 minus weighted findings, floor 0.
    10. file_hygiene_and_backups — .env / a TLS key with any group / other permission bit (mode & 0o077, i.e. anything looser than 0600) is high each; a volumes/ or data/ directory that is world-writable is medium; no backup present (no backups.txt note, no backups/ directory, no *.bak marker) is medium when a volumes/ or data/ directory exists; a missing version.txt is low — and only fires when check 1 also scored partial, so the same gap is not double-penalised. Score 10 minus weighted findings, floor 0.

    How to run

    # 1. Copy the whole install directory as-is (keep the file names
    #    and the file modes exactly as deployed): version.txt,
    #    .env, docker-compose.yml, docker-compose.override.yaml,
    #    plugins.txt, backups.txt, reverse-proxy.txt, setup.txt,
    #    telemetry.txt, volumes/.
    # 2. Write the meta JSON (see reference/example_input.json):
    #    {"date": "2026-11-30", "project": "Acme Dify Demo",
    #     "language": "en", "accent": "#155EEF",
    #     "brand": "Dify Config Security Audit",
    #     "path": "reference/demo-project"}
    # 3. Run the scan:
    python3 scripts/run.py --input <meta.json> --path <dir> --output <outdir>
    # 4. Verify the demo card and both demo projects:
    python3 scripts/verify.py --input reference/demo-en.json --image out/demo-en/scan-2026-11-30.png
    

    Demo results (all run, not invented)

    • Unsafe demo (reference/demo-project, "Acme Dify Demo", version 1.14.1): 7/100, grade F, risk CRITICAL, 45 findings — 7 patched version, 2 SECRET_KEY and INIT_PASSWORD, 7 literal secrets, 2 open registration, 4 network exposure, 2 CORS and info endpoints, 5 sandbox and plugin daemon, 5 storage and database, 8 container hardening, 3 file hygiene and backups.
    • Clean demo (reference/demo-project-clean, version 1.20.0): 100/100, grade A, risk LOW, 0 findings.
    • Empty-directory sanity: 100/100, all checks n/a.
    • scripts/verify.py PASS (incl. the version ladder: 0.6.11 / 1.11.0 score 0, 1.13.0 / 1.14.1 score 1, 1.15.0 scores 3, 1.16.0 / 1.18.0 score 5, 1.19.0 scores 8, 1.20.0 / 1.21.0 score 10, missing version scores 5; exposed-flaw counts 1.14.1 → 7, 1.15.0 → 5, 1.11.0 → 9, 1.19.0 → 2, 1.20.0 → 0; no demo secret value in any finding or report; .env byte-identical after a scan; no scanner script executes code; no curl|sh pipe in any fixture .py file).
    • Two corrections made during verification (see reference/notes.md): the clean compose passes SECRET_KEY through as ${DIFY_SECRET_KEY}, so the SECRET_KEY-missing edge cases strip that passthrough to test a genuinely missing key; the CELERY_BROKER_URL password-mismatch edge case sets REDIS_PASSWORD to a literal too, because a ${VAR} password cannot be compared against a literal.

    Files

    • SKILL.md — the skill (inputs, the 10 checks, steps, safety rules).
    • scripts/scan.py — the scanner (pure Python, no network).
    • scripts/render.py — the 1024x1024 score-card renderer (Pillow).
    • scripts/run.py — the CLI (--input, --path, --output).
    • scripts/verify.py — the verifier (card layout, demo scores, secret masking, empty-directory sanity, read-only scan check, no-code-execution AST check, edge cases).
    • scripts/make_logo.py — makes logo.png (512x512).
    • scripts/make_demo.py — builds the two demo install directories (build-time only, excluded from the zip).
    • reference/patterns.md — what each check looks for.
    • reference/notes.md — verified facts, corrections, known limits.
    • reference/demo-project/ — deliberately unsafe install directory (all values fake, all hosts .test).
    • reference/demo-project-clean/ — clean install directory (scores 100/100, no false positives).

    Find more skills like this on the Claude Skills Marketplace, the Codex Skills Marketplace and the Gemini Skills Marketplace, or browse Claude Skills for LLM Ops.

    Scans local config files only. Does not perform network-based probing or live API testing. Does not audit agent-level secret leaks inside the Dify UI.

    How to use

    1. 1

      Connect your agent to the Agensi MCP

      Copy the prompt and paste it into Claude, ChatGPT, Cursor or any agent that supports MCP. It sets up the connection for you. Manual setup

    2. 2

      Sign in to Agensi

      Your agent shows a sign-in link. Sign in and click Allow.

    3. 3

      Ask for what you need

      Your agent loads this skill and uses it on your task. It always asks before buying a skill.

    Reviews

    No reviews yet

    Be one of the first to try it. Every listed skill goes through the trust checks below.

    Security scanned

    Checked by our 8-point scan before listing

    Fresh listing

    Recently published to Agensi

    Money-back guarantee

    Doesn't do what its page promises? You get your money back.

    Trust & safety

    Security scan

    Security scan passed 1 day ago

    Software
    Python 3Pillow

    Permissions

    Terminal / Shell
    Read Files
    Write Files
    Environment Variables
    Listed1 day ago

    What's inside

    Frequently Asked Questions

    This skill identifies high-risk vulnerabilities specific to self-hosted Dify, such as unrotated 'difyai123456' database passwords, exposed containers running as root, and versions susceptible to CVSS 9.4 path traversal flaws.

    No, the agent uses a non-intrusive Python-based parser to analyze your configuration files and environment variables locally without ever executing the Dify containers or modifying your setup.

    This skill is designed for Dify installations managed via Docker Compose and requires access to your local installation directory, including the .env and docker-compose.yml files.

    You will receive the AI agent skill, a pre-configured Python scanner for local parsing, a template for the 100-point security scorecard, and access to a verified CVE database updated through late 2024.

    The skill includes a dedicated version-check module that compares your version.txt against known flaws like the authenticated MCP server manipulation bug, ensuring you aren't running a compromised build.

    The audit generates a comprehensive scan-report.md file detailing prioritized fixes and a visual PNG scorecard that grades your deployment's readiness across 10 security categories.

    New in LLM Ops