Leo-Ayh-Oday/dsh-orcana--packages-dsh-orcana-linux ↗★ 0
@orcana/dsh-orcana-linux
dsh-orcana Linux edition — native hardening layers (resource limits, egress policy, execution evidence) as a DSH plugin over the official sandbox contract
安装
此插件尚未提供可验证的 bundle,或兼容性检查未通过。请先阅读仓库说明。 阅读完整 README ↗
说明文档
阅读完整 README ↗@orcana/dsh-orcana-linux
dsh-orcana Linux edition — native hardening layers as a DeepSeek Harness plugin, over the official sandbox contract (no fork required).
- Resource limits —
memoryBytes/pidsMax/cpuQuotaUsenforced as aprlimitargv prefix on Linux (--asRLIMIT_AS memory approximation,--nprocPER-UID task cap;cpuQuotaUshas no rlimit equivalent and degrades visibly). - Egress policy —
network: 'none'denies all network:--unshare-netinjected into a bwrap argv (fresh netns, no routes),(deny network*)appended to a Seatbelt profile. - Execution evidence — every confinement is recorded in an audit ledger (
ctx.hardening.ledger): layers applied, degradations, mechanism. Degradation is never silent.
Install
npm i @orcana/dsh-orcana-linux
# or via a DSH profile bundle:
# pnpm --filter @orcana/dsh-orcana-linux-bundle ...
Load the plugin after the harness registered its sandbox provider (the
apply.inject = ['sandbox'] declaration enforces the ordering):
import { Context } from '@deepseek-ai/cordis'
import { apply as hardening } from '@orcana/dsh-orcana-linux'
// in your harness bootstrap, after ctx.plugin(LocalSandboxProvider, {...}):
ctx.plugin(hardening, {
resourceLimits: { memoryBytes: 1 * 1024 * 1024 * 1024, pidsMax: 64 },
network: 'none',
})
Configuration
| Field | Type | Meaning |
|---|---|---|
resourceLimits.memoryBytes | number | prlimit --as bytes (address-space approximation) |
resourceLimits.pidsMax | number | prlimit --nproc live-task cap (PER-UID — caps every process of the calling user) |
resourceLimits.cpuQuotaUs |