DeepSeek Harness

DeepSeek Harness in cybersecurity: real use cases

Agents are useful where work is repetitive, evidence-heavy and tool-mediated. They are dangerous where authority has to be human. Five security use cases, each with the control that keeps it honest.

The question is not whether the agent can do it

Given a shell, a browser and a set of security tools, a capable model can do a great deal of what a junior tester does in the first two days of an engagement. That is not the interesting question. The interesting question is which of those actions should require a human decision, and whether the runtime can enforce that decision rather than suggest it.

Three properties separate work that suits an agent from work that only looks like it does:

  • Repetition. The task has a stable shape and is performed many times: parsing scan output, correlating a CVE against an asset inventory, turning a traffic capture into an endpoint list. Agents do not get bored, and they do not skip the tenth item to finish early.
  • Evidence weight. The value is in the record, not the click. A triage note or a recon inventory is only useful if it is complete, timestamped and reproducible. A runtime that logs every tool call and result is a better fit than a chat window that forgets.
  • Tool mediation. The action goes through a known tool with a known interface. HTTP requests, Nmap invocations and OSINT lookups can be bounded, rate-limited and validated. A judgement call about whether a production outage is acceptable cannot.

Now invert the list. Work that requires authority — authorising a test, accepting risk, deciding that an exploit is proportionate, signing a report, notifying a regulator — is exactly where an agent must not be the decision-maker. Not because a model cannot produce a plausible answer, but because accountability cannot be delegated to a process that has no standing to accept it.

Security use cases by authority and evidence weight evidence weight — conversational → client deliverable human decision required authority required to act → Triage & enrichment read-only lookups Recon & inventory scoped, rate-limited Detection engineering drafts and mappings Web / API assessment bounded probing Reporting & hand-off draft; human signs high low agent acts operator acts
Authority, not difficulty, decides placement. Triage and detection work sit left of the gate because the agent can read and draft without asking. Web and API assessment sits right of it: the actions are technically easy for a model, which is precisely why an operator has to authorise them.

Difficulty and risk are different axes: a web assessment is easier for a model than a detection-rule review, yet its blast radius is higher.

Five use cases that hold up

1. Triage and enrichment

An alert arrives with an IP, a hostname and a hash. The agent's job is to gather context: resolve the address, check reputation and exposure sources, map the hash to known advisories, find the asset in the inventory, and write each observation into a structured record. This is repetition with a paper trail, which is the sweet spot.

What it must not do is act on the alert: close the ticket, suppress the rule, block the address at the perimeter or email the client. Those are operational decisions with consequences outside the record.

Control: read-only tools, a narrow credential set, and evidence capture on every lookup. The runtime's job is to make the reads cheap and the writes to production impossible — not to trust a system prompt that says "do not remediate".

2. Reconnaissance and asset inventory under written scope

Scope in, inventory out. The agent runs discovery and fingerprinting tools, records each host, port and service as a fact and an asset, deduplicates, and stops at the boundary of the authorised range. This is the clearest case for an agent in offensive work because it is high-volume, low-judgement and naturally structured.

What it must not do: expand scope because a discovered host "looks related", scan the internet, or raise rates to finish faster. The first exceeds the authorisation, the second turns a scoped test into indiscriminate scanning, and the third is how outages happen.

Control: scope as code with exclusions that win, per-call target validation, rate and request caps, and an audit entry for every refusal. A domain that matches a suffix is still checked per host; a CIDR exclusion that overlaps an in-scope range still refuses the range.

3. Web and API assessment assistance

The agent reads the application, selects the applicable OWASP WSTG tests, checks headers and cookie flags, drives a real browser through JavaScript-rendered and authenticated flows, discovers API endpoints from specifications and observed traffic, and probes one parameter at a time with bounded payloads. It is genuinely useful at the tedious edges of a manual assessment.

What it must not do: fire destructive payloads, brute-force credentials, attack a production dependency that was never in scope, or declare an exploit "confirmed" from an ambiguous response.

Control: bounded request budgets and rates, same-origin restrictions, a WSTG identifier attached to every finding, and a human who reviews anything labelled exploitation before it runs. The agent produces candidates and evidence; the tester owns the conclusion.

4. Detection engineering and purple-team mapping

Given a technique, a log source and a hypothesis, the agent can draft a detection rule, map it to MITRE ATT&CK, list the telemetry it needs, and write the test procedure that would validate it. It can also read an existing rule set and point out techniques with no coverage — a review task that humans consistently postpone.

What it must not do: deploy rules to production, claim coverage because a rule exists, or treat a technique mapping as proof that the behaviour would be detected.

Control: drafts only, a review and merge gate outside the agent, and citations from a maintained knowledge base rather than recalled technique ids. Coverage claims need test evidence, not a plausible paragraph.

5. Reporting and evidence hand-off

Findings, evidence, hashes, an audit trail and a template: the agent assembles the deliverable from what was recorded, not from what it remembers. It writes the narrative, applies CVSS and mappings already stored on each finding, and produces the formats the client asked for.

What it must not do: invent a finding, soften a severity without a reason, rewrite evidence, or mark a report final before the engagement is closed.

Control: generate from the store, keep evidence immutable and hashed, distinguish drafts from final deliverables, and require a named human to sign. The agent can write the report; it cannot be the author of record.

Control design: what actually constrains an agent

Every failed "AI security agent" story reduces to the same mistake: the constraint lived in the prompt. A system prompt is an instruction to a stochastic model, not a policy. It can be ignored, argued around, truncated by context, or overridden by a later message. Controls that survive contact with a real engagement are enforced in code, at the boundary where the action happens, and recorded where they cannot be edited afterwards.

The control stack around an agent action 1 · Authorisation written scope and Rules of Engagement, accepted by a named human 2 · Scope validation target resolved and checked before an approval exists; exclusions win 3 · Approval irreversible actions wait for an operator; no answer means deny 4 · Confined execution argv arrays, no shell interpolation, timeouts, sandboxed file effects 5 · Evidence and audit SHA-256 captures, append-only trail, report generated from the store human code human gate process storage each layer answers a different question; none of them is "the model was asked nicely"
Controls stack; they do not substitute for each other. Authorisation decides whether the work may exist at all, scope decides which targets, approval decides which actions, execution limits the damage, and evidence makes the whole chain reviewable afterwards.
ControlEnforced atFails how
Written authorisationHuman, before the first packetGated phases refuse to start without acceptance
ScopeEvery outward-facing call, in codeOut-of-scope target refused before an approval exists
ApprovalIrreversible action boundaryNo answer, denial or expiry returns a refusal
Execution confinementProcess spawn and file effectsBad argument rejected; timeout and output caps apply
Evidence integrityWrite-once vault with hashesA record cannot be overwritten; a hand-off is verifiable
AuditAppend-only logHistory cannot be rewritten by tool or report

Two details make the difference between a control and a gesture. First, order: the scope check must happen before the approval request, or an operator is asked to authorise a target they never agreed to test. Second, fail-closed behaviour: a missing answerer, an expired request or a cancelled call must return a denial, not proceed. DeepSeek Harness implements the approval seam this way — the outcome vocabulary is closed, and only allowed-once opens the gate.

It is worth being precise about what the harness itself guarantees. Its sandbox bounds filesystem effects, with a deliberate danger-full-access mode that bypasses confinement; it does not bound network reach or process visibility. So "the agent runs sandboxed" is not a security claim on its own. The boundary is the operating-system account, the container and the network policy, and the plugin's own scope logic on top.

Scope and Rules of Engagement drawer with the AI scope draft, the four scope fields, the applied discovery-expansion records and the engagement controls
Scope as an object, not a paragraph. Targets, CIDRs, domains and exclusions are separate fields; acceptance is a recorded operator action that unlocks gated phases, and the 1.3 drawer also shows the discoveries the agent proposed and the ones applied inside an authorized root, each with its source fact. The Rules of Engagement text is what the report later cites as authorisation.

One more property deserves attention: authority must be unavailable to the agent, not merely discouraged. If a tool exists that can accept authorisation, switch a security mode or resolve an approval, a sufficiently creative model will eventually be talked into calling it. The robust design keeps those operations outside the agent's tool set entirely and rejects them at the engine for any actor that is not the operator. That is what dsh-redteam does with its Rules of Engagement, mode switch and approval resolution — and it is the pattern to copy, whether or not you use that plugin.

Where it does not fit

Some security work should stay human or stay offline, and no amount of tooling changes that:

  • Unattended scanning of the internet. An agent that hunts for vulnerable hosts without a named target is not doing authorised testing; it is building a target list. Scope enforcement exists to make that refusal explicit.
  • Exploitation without authorisation. The technical capability is not the constraint. A model can write an exploit; it cannot accept the legal and operational responsibility for running one.
  • Destructive testing on production. Availability impact is a business decision, not a tool parameter. If a test can take a service down, a human decides whether and when.
  • Regulated decisions. Breach notification, disclosure timelines, risk acceptance and audit attestations have owners. An agent can prepare the evidence; it cannot be the accountable party.
  • Secret handling beyond the engagement. Credentials, personal data and client evidence need a retention policy. Automating collection without a deletion plan makes the exposure worse.

The practical test: can the action be bounded by a tool interface, and can its result be recorded as evidence? If either answer is no, the task needs a human for the whole action.

That is the frame I use when evaluating any agent runtime for security work, including DeepSeek Harness. The harness supplies the loop, the log, the approval seam and the extension model; the security properties come from the layer built on top. The dsh-redteam guide shows one implementation of that layer, with its phases, scope checks and hashed evidence — useful as a worked example even if you build your own.

Key takeaways

  • Favour agents for repetitive, evidence-heavy, tool-mediated work; keep authority with humans for decisions that carry accountability.
  • The five use cases that hold up are triage, scoped recon, web/API assessment assistance, detection engineering and reporting — each with a clearly stated "must not" and a technical control.
  • A prompt is not a control. Enforcement has to sit at the action boundary, in code, with a fail-closed default.
  • Order matters: validate scope before asking for approval, and make authority unavailable to the agent rather than discouraged.
  • Harness-level sandboxing bounds file effects only; network, process and legal boundaries remain the operator's responsibility.