mirage
strukto-ai
The World's First Unified Virtual Filesystem For AI Agents
PROJECT TOPICS
INSTALL REFERENCE
dsh plugin --profile web add github:onlyqzq/dsh-riskproof
该命令指向仓库当前默认分支;尚无绑定当前 commit 的完整验证结果。
PROJECT README
Provenance-aware execution security for DeepSeek Harness.
Track where tool inputs came from. Detect risky cross-tool data flows. Stop sensitive side effects before execution.
Most tool-permission plugins answer one question: is this tool allowed?
RiskProof answers a different one:
Where did the data in this tool call come from, what did it flow through, and where is it about to go?
A single tool call is usually safe. The composition is not.
web_fetch ← UNTRUSTED_WEB
│
database_query ← CUSTOMER_DATA
│
send_email ← external destination
│
RiskProof → DENY (evidence-backed, before the side effect)
| Permission rules | RiskProof |
|---|---|
| Is this tool allowed? | Where did this data come from? |
| Single call | Cross-tool flow |
| Tool name | Provenance + taint |
| Static rule | Stateful attack chain |
| Permission decision | Evidence-backed execution decision |
RiskProof is a layer over the DSH Tool Runtime, not another Agent Runtime. It never re-implements tool dispatch, approval, or lifecycle — it observes and decides.
# add the plugin to a DSH profile
dsh plugin --profile <profile> add dsh-riskproof
Minimal cordis.patch.yml (the schema defaults are already safe):
- insert:
- id: riskproof
name: dsh-riskproof
Then use DSH normally. RiskProof silently tracks security context and only asks or blocks when a risky cross-tool flow appears.
To tune it:
- insert:
- id: riskproof
name: dsh-riskproof
config:
mode: enforce # enforce | observe
policy:
sensitiveExternalAction: deny
untrustedPrivateAccess: ask
classification:
overrides:
gmail_send: [EXTERNAL_ACTION]
company_db: [PRIVATE_ACCESS]
See docs/configuration.md for the full reference.
sequenceDiagram
participant A as Agent
participant T as DSH ToolRuntime
participant R as RiskProof
A->>T: web_fetch(url)
T->>R: tools/pre-execute
R-->>T: allow (EXTERNAL_INGESTION recorded)
T-->>A: untrusted content
A->>T: database_query(sql)
T->>R: tools/pre-execute
R-->>T: allow (PRIVATE_ACCESS recorded, CUSTOMER_DATA tagged)
T-->>A: CUST-8842 balance 125000
A->>T: send_email(to=external, body=CUST-8842…)
T->>R: tools/pre-execute
R-->>T: DENY — ingestion + private access + sensitive data + external action
T-->>A: Error: <reason>
The same flow is reproduced as a deterministic regression test in tests/security/attack-chain.test.ts.
Try it locally with no model or profile — a real DSH ToolRuntime pipeline with three mock tools:
npm run demo
See demo/README.md.
Know where tool inputs came from. RiskProof maps arguments back to the tool results that produced them.
Carry security labels — UNTRUSTED_WEB, CUSTOMER_DATA, PII, SECRET, … — across tool calls, additively.
Identify the EXTERNAL_INGESTION → PRIVATE_ACCESS → EXTERNAL_ACTION pattern that single-tool checks miss.
Block or ask before the side effect runs, through the native tools/pre-execute gate.
Generate structured, privacy-preserving security evidence for every decision.
RiskProof hooks the native DSH tool pipeline:
tools/pre-execute
│ capability classification
│ argument provenance mapping
│ taint analysis
│ toolchain state (EIT → PAT → NAT)
│ deterministic policy evaluation
▼
allow / ask / deny (monotonic with other plugins)
│
tools/result
│ update ContextTracker
│ update Toolchain state
▼ record execution evidence
See docs/architecture.md.
RiskProof protects supported observable tool-call flows through DSH:
tools/pre-execute / tools/result pathsRiskProof does not replace:
See docs/security-model.md for the complete threat model and known limitations.
tools/pre-execute, tools/result)Issues, rule submissions, tool-capability mappings, and false-positive reports are welcome. See CONTRIBUTING.md.
Please report vulnerabilities privately. See SECURITY.md.
CLASSIFICATION EVIDENCE
系统优先读取 GitHub Topics,再与站内分类词典和词根规则比对。当前命中: agent-security、tool-security。