From faa759fb665b7baba31a9dd8eb28f7824fe71fd0 Mon Sep 17 00:00:00 2001 From: macworkers Date: Mon, 4 May 2026 12:39:27 -0700 Subject: [PATCH 1/3] fix(prompts): mirror user language in reasoning and reply (#588) All system prompts were English-only, causing DeepSeek V4 to reason and respond in English even when users wrote in Chinese or other languages. Add a Language Mirror section to base.md and base.txt that instructs the model to detect the user's primary language and use it for both reasoning (thinking tokens) and the final reply. --- crates/tui/src/prompts/base.md | 4 ++++ crates/tui/src/prompts/base.txt | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/crates/tui/src/prompts/base.md b/crates/tui/src/prompts/base.md index 8c4d13ec..d3982af3 100644 --- a/crates/tui/src/prompts/base.md +++ b/crates/tui/src/prompts/base.md @@ -1,5 +1,9 @@ You are DeepSeek TUI. You're already running inside it — don't try to launch a `deepseek` or `deepseek-tui` binary. +## Language Mirror + +Detect the user's primary language from their message and respond in that same language — both in your reasoning (thinking tokens) and final reply. Do not default to English for non-English inputs. + ## Preamble Rhythm When starting work on a user request, open with a short, momentum-building line that names the action you're taking. Keep it reserved — state what you're doing, not how you feel about it. diff --git a/crates/tui/src/prompts/base.txt b/crates/tui/src/prompts/base.txt index 5741a3af..6a108917 100644 --- a/crates/tui/src/prompts/base.txt +++ b/crates/tui/src/prompts/base.txt @@ -1,5 +1,9 @@ You are DeepSeek TUI. You're already running inside it — don't try to launch a `deepseek` or `deepseek-tui` binary. +## Language Mirror + +Detect the user's primary language from their message and respond in that same language — both in your reasoning (thinking tokens) and final reply. Do not default to English for non-English inputs. + ## Decomposition Philosophy You are a "managed genius" — you excel at individual tasks, but your superpower is decomposing complex work. **Always decompose before you act.** A few minutes spent planning saves many minutes of thrashing. From 3cff07057056e17ced03d22b8099130f4a38220d Mon Sep 17 00:00:00 2001 From: macworkers Date: Mon, 4 May 2026 13:12:52 -0700 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20remove=20base.txt=20change=20?= =?UTF-8?q?=E2=80=94=20file=20is=20not=20loaded=20by=20runtime?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit base.txt is not referenced via include_str! in prompts.rs. Only base.md is loaded (BASE_PROMPT). Remove the redundant change to base.txt as noted by Gemini Code Assist review. --- crates/tui/src/prompts/base.txt | 4 ---- 1 file changed, 4 deletions(-) diff --git a/crates/tui/src/prompts/base.txt b/crates/tui/src/prompts/base.txt index 6a108917..5741a3af 100644 --- a/crates/tui/src/prompts/base.txt +++ b/crates/tui/src/prompts/base.txt @@ -1,9 +1,5 @@ You are DeepSeek TUI. You're already running inside it — don't try to launch a `deepseek` or `deepseek-tui` binary. -## Language Mirror - -Detect the user's primary language from their message and respond in that same language — both in your reasoning (thinking tokens) and final reply. Do not default to English for non-English inputs. - ## Decomposition Philosophy You are a "managed genius" — you excel at individual tasks, but your superpower is decomposing complex work. **Always decompose before you act.** A few minutes spent planning saves many minutes of thrashing. From 5321f42254ef06faeb7c7194618d198ee01c5f0c Mon Sep 17 00:00:00 2001 From: macworkers Date: Mon, 4 May 2026 15:57:04 -0700 Subject: [PATCH 3/3] docs: add SECURITY.md with vulnerability reporting policy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Implemented using `deepseek exec --model deepseek-v4-flash`. 🐋 --- SECURITY.md | 69 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 SECURITY.md diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..f5388083 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,69 @@ +# Security Policy + +DeepSeek TUI is a coding agent with direct access to file operations, shell execution, and the network. Security disclosures are taken seriously. + +## Supported Versions + +Only the latest stable release receives security patches. No backports to older versions. + +| Version | Supported | +|---|---| +| latest stable | :white_check_mark: | +| < latest | :x: | + +Check the [releases page](https://github.com/Hmbown/DeepSeek-TUI/releases) for the current version. + +## Reporting a Vulnerability + +**Do not open a public GitHub issue for security vulnerabilities.** + +Report privately via one of: + +- **Email**: [hmbown.dev@gmail.com](mailto:hmbown.dev@gmail.com) — include `[SECURITY]` in the subject line +- **GitHub private advisory**: [github.com/Hmbown/DeepSeek-TUI/security/advisories/new](https://github.com/Hmbown/DeepSeek-TUI/security/advisories/new) + +Include in your report: + +- A description of the vulnerability and the impact if exploited +- Steps to reproduce or a proof of concept +- Affected versions and configuration details +- Any suggested mitigation (optional) + +## Response Timeline + +| Phase | Target | +|---|---| +| Acknowledgment | Within 48 hours of receipt | +| Assessment | Within 5 days — triage severity, scope, and fix approach | +| Patch (critical) | Within 14 days from assessment | +| Patch (moderate/low) | Next feature release or per-maintainer timeline | +| Disclosure | After patch is shipped and users have had time to update | + +You will receive status updates at each phase. If the timeline slips, we will communicate the reason and the revised estimate. + +## Scope + +### In scope (what counts) + +- Remote code execution through crafted prompts or model responses +- Sandbox escape — breaking out of the YOLO-mode workspace boundary or shell `cwd` confinement +- Credential leak — exfiltration of API keys, tokens, or environment secrets +- Arbitrary file read/write outside the intended workspace (`PathEscape` bypass) +- SSRF via `fetch_url` or `web_search` against internal network endpoints +- Unauthorised MCP server access or tool invocation + +### Out of scope + +- Social engineering of the maintainer or contributors +- Denial of service / rate-limit exhaustion against the DeepSeek API +- Vulnerabilities in third-party dependencies (report to the upstream project) +- Attacks requiring physical access to the victim's machine +- Theoretical ML-model injection attacks not demonstrated in the DeepSeek TUI context + +If you are unsure whether a bug is in scope, report it anyway. We will triage and respond. + +## Hall of Fame + +We maintain a hall of fame for reporters who submit verified security vulnerabilities. To be credited, include your preferred name / handle in the report. + +*No entries yet — be the first.*