dsh-infinite-gen-4: a DeepSeek Harness prompt-injection plugin for red-team benchmarking
DeepSeek v4.1 flash network security red-team tool (Infinite Gen 4) - jailbreak prompts and a test suite for DeepSeek. Stars welcome; contributions to improve the project are appreciated.
At a glance
- What is it?
- The repository ships a Cordis-architecture plugin that injects two ordered system-prompt slots into DeepSeek Harness, plus a deterministic regression suite that scores refusal behaviour at the start of a response. It is a controlled-lab instrument, not a general-purpose tool.
- Who is it for?
- This article describes the historical generation 4 plugin. As checked on 2026-11-08, its former repository URL redirects to the generation 5 project, whose functionality and installation differ.
- Can I use it commercially?
- Check first. The repository uses a licence we do not classify automatically, so read its LICENSE file before any commercial use.
- Is it still maintained?
- Yes. The repository last received commits 4 days ago.
- What is it written in?
- Mainly JavaScript, according to GitHub's language statistics.
Answers come from the project's GitHub data, last synced on November 15, 2026, and from our analysis. They are not legal advice.
Star history
- Minglink/dsh-infinite-gen-44,301 ★ · +2,439
| Repository | 2026-09-21 | 2026-11-15 |
|---|---|---|
| Minglink/dsh-infinite-gen-4 | 1.9k | 4.3k |
2,439 Stars in the last 55 days, measured from the daily GitHub snapshot. Compare with other projects
Editorial analysis
What dsh-infinite-gen-4 actually injects, and who the README addresses
This article describes the historical generation 4 plugin for DeepSeek Harness. As checked on 2026-11-08, the former repository URL redirects to the generation 5 project, which describes a different reverse-engineering workbench. The historical features and file names below should therefore be verified against a specific generation 4 revision, not assumed to describe the current repository.
Generation 4 was described as injecting prompt text into Harness sessions and displaying session state. Its stated audience was researchers evaluating refusal behaviour and prompt-injection handling in controlled, authorized environments.
The dual-layer kernel: two ordered injection slots and a single switch
The mechanism is stated precisely in the README. The plugin registers two injection slots: infinite-gen-4:global-system-prompt at Order 100 and infinite-gen-4:dual-layer-reinforce at Order 200. The index.js file exposes a DUAL_LAYER_INJECTION flag; setting it to false collapses the behaviour to a single-segment injection, which the README calls behaviourally equivalent.
The prompt bodies live in prompts/ as three Markdown files: infinite-gen-3.md (the earlier generation), infinite-gen-4.md (described as the general kernel carrying the output contract, refusal handling, and slot definitions), and infinite-gen-4.1-flash.md (described as the reinforcement mirror layer for V4.1, covering a trainer lane, shallow reasoning, and metadata extraction). The README's comparison table claims the fourth generation targets V4.1, V4-Pro, and Flash, uses a native zero-tool-surface design to avoid tool-call decision noise during reasoning, and forces a first-token output contract.
Two things are worth flagging. First, the claim that a single-segment injection is equivalent to the dual-layer path is an assertion in the README, not something the repository's test files appear to prove; the verify scripts target prompt content, not injection topology. Second, the zero-tool-surface design is presented as a speed and cleanliness win, but it also means the plugin cannot call tools to repair a malformed response. That is a deliberate trade-off, and it should be read as one.
Installing the historical version requires a verified revision
The historical generation 4 README described a `dsh://` installation link and platform scripts. Its link downloaded a moving master-branch archive rather than an immutable revision; the former repository now redirects to generation 5, so the old link should not be used as a pinned generation 4 installer.
For a historical evaluation, first locate the exact generation 4 source revision, inspect the installer and requested permissions, and follow the verification instructions from that revision in an authorized environment. The current generation 5 project has its own installation instructions and different capabilities.
The regression suite is the part that ages best
The scripts directory contains scorer.mjs, described as a start-window refusal scorer, plus verify_prompt.mjs, verify_prompt_gen4.mjs, and verify_prompt_gen41.mjs. The README states that the fourth-generation script runs 103 strict assertions over the prompt files. The tests directory holds bilingual case banks: prompt-bank.jsonl, prompt-bank-gen4.jsonl, prompt-bank-gen41.jsonl, and v4pro-benchmark.jsonl.
This layout is the project's most defensible design choice. Prompt text drifts silently; an assertion file that fails when a kernel file changes turns that drift into a visible event. package.json wires two npm scripts to it: harness:check runs node --check on index.js and client.js, and verify runs verify_prompt_gen4.mjs. The README does not state what happens when an assertion fails, and it does not document a rollback procedure for a bad prompt edit. If you adopt this, treat the verify script as a pre-commit gate you run yourself, because nothing in the repository appears to run it for you.
Where dsh-infinite-gen-4 is the wrong tool
The README's disclaimer is unusually blunt, and it defines the tool's boundary rather than decorating it. It states that running the project against targets without written authorization, against public internet systems, or against production is forbidden, and that testing must stay inside local synthetic fixtures, authorized ranges, and controlled labs. It also states that the licence terminates automatically and irrevocably for anyone using the project for illegal or malicious activity.
That framing rules out several obvious uses. It is not a scanner: it has no network probe, no payload delivery, and no target enumeration, so it cannot assess a live system. It is not a model-safety evaluation service: the assertions check whether prompt files match expected text, not whether a model behaves safely. And it is DeepSeek-Harness-specific. The package.json dsh block declares client platform web and a Cordis patch file, so the injection slots only exist inside that host. Running the prompt files by hand in another client discards the ordering, the status bar, and the assertion suite at once.
Comparing it with hand-written prompt files in a plain client
The realistic alternative is not another product; it is a folder of prompt text pasted into whatever client you already use. The difference is structural. A hand-managed prompt has no ordering guarantee, no version stamp tied to a package.json, and no assertion suite that fails when someone edits a line. It also has no distribution path: you copy text, you lose track of which revision produced which result.
This plugin trades that looseness for coupling. You get two ordered slots, a DUAL_LAYER_INJECTION switch, a declared version (0.4.0), a dsh:// install URI, and a scorer that reads the opening window of a response. In exchange you accept a host dependency, a permission request for system prompt injection, and a maintenance surface that includes three kernel files and four case banks. If your work is a one-off experiment, the plain-text approach is cheaper. If you need to compare results across weeks and cite the exact prompt revision, the assertion suite is the reason to use this instead.
Maintenance, versioning, and what MIT does and does not cover
The last push to the repository was on 2026-09-14, two days before this writing, and the repository is not archived. The README's own version marker is v0.4.0, matching package.json and the dsh block inside it. The repository has no published GitHub releases, so distribution is by repository zip and the install scripts, not by tagged artifacts.
Upgrade cost is mostly prompt review. The three kernel files are the substance of the project; a version bump that changes a kernel file changes the tool's behaviour, and the verify scripts are the only automated check on that. The install scripts (install.ps1, install.bat, install.sh, and the matching uninstall scripts) register and remove the dsh:// protocol handler, so uninstalling is documented as a script rather than a manual cleanup.
The licence is MIT, which permits commercial use, modification, and redistribution with the copyright notice retained. It also disclaims warranty. What MIT does not do is resolve the compliance question the README raises: the disclaimer asserts that misuse terminates the grant, which is a project-level statement rather than a standard MIT clause, and the README also notes the project has no affiliation with or endorsement from DeepSeek. If you plan to use this inside an organization, have someone who is not the author read both documents together.
Editorial conclusion
This article describes the historical generation 4 plugin. As checked on 2026-11-08, its former repository URL redirects to the generation 5 project, whose functionality and installation differ. Do not treat the current master archive as a pinned generation 4 artifact; verify the exact source revision and its terms before evaluating it in an authorized lab. Do not adopt it if you want a standalone scanner, a hosted service, or anything that touches systems you do not own in writing; the README's disclaimer limits use to local synthetic fixtures and authorized ranges, and terminates the licence on misuse. If a historical revision is available, inspect its permissions and verify scripts at that exact revision. For the current project, consult its own release and installation instructions.
Frequently asked questions
How do I install dsh-infinite-gen-4?
The former repository URL now redirects to the distinct generation 5 project. The old generation 4 deep link downloaded a moving master-branch archive, so it is not a reliable way to install version 0.4.0. If evaluating the historical plugin, first locate and inspect an exact generation 4 revision; use the current project documentation for generation 5.
What does the DUAL_LAYER_INJECTION flag in dsh-infinite-gen-4 do?
It controls whether the plugin injects both ordered slots, infinite-gen-4:global-system-prompt at Order 100 and infinite-gen-4:dual-layer-reinforce at Order 200, or a single segment. The README states that setting it to false produces behaviour it calls equivalent.
Does dsh-infinite-gen-4 include tests I can run myself?
Yes. package.json defines verify and verify:gen4, both running node scripts/verify_prompt_gen4.mjs, which the README describes as 103 strict assertions over the fourth-generation prompt files. harness:check separately runs node --check on index.js and client.js.
Official sources
Add this badge to your README
If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.
[](https://hysenlabs.com/projects/minglink-dsh-infinite-gen-4)Star history chart for your README
[](https://hysenlabs.com/projects/minglink-dsh-infinite-gen-4)Was this useful?