fix(sandbox): evidence-gate runner failures (round 1)

This commit is contained in:
Hypatia May
2026-08-03 17:31:08 +08:00
parent 6a3caea277
commit 6343d8f6e6
51 changed files with 805 additions and 140 deletions
@@ -0,0 +1,26 @@
import type { ConfinedArgv, SandboxPolicy } from '@deepseek-ai/dsh-sandbox'
import { SandboxProvider } from '@deepseek-ai/dsh-sandbox'
const NOTICE = 'landlock-run: partial enforcement (older Landlock ABI)'
/** Snapshot-only provider that reproduces an older-ABI Landlock launch. */
export default class PartialLandlockSandboxProvider extends SandboxProvider {
confine(argv: readonly string[], _policy: SandboxPolicy): ConfinedArgv {
return {
argv: [
'bash',
'-c',
`printf '%s\\n' '${NOTICE}' >&2; exec "$@"`,
'partial-landlock-run',
...argv,
],
enforcement: 'partial',
denialSignatures: ['permission denied'],
runnerFailureRules: [{
allowedExitCodes: [125],
fatalSignatures: ['landlock-run: '],
informationalLines: [NOTICE],
}],
}
}
}