1.1.73: adapt DSH 0.2.1-rc.2, Apache-2.0, lab-only default-deny.

This commit is contained in:
叫我小杨同学 committed 2026-10-23 11:50:42 +08:00
1 parent 8df4406a7c
commit 1ea067189c
114 files changed
+21198 -5183

No files matched your search

+4 -3
View File
@@ -8,7 +8,7 @@
*/
import { existsSync, readFileSync } from 'node:fs'
import { join } from 'node:path'
import { isChildAgentContext, isRedteamSession } from '../identity.js'
import { isRedteamSession } from '../identity.js'
import { redteamRoot } from './platform-config.js'
const ROLE_TAG = /^[ \t]*redteamRole:[ \t]*(recon|assess|vuln-scan|exploit|internal)[ \t]*$/im
@@ -50,8 +50,9 @@ function remember(agent, role) {
}
function isRedteamChild(session, agent) {
const wrapped = { session, agent: agent ? { ...agent, session } : { session } }
return isChildAgentContext(wrapped) && isRedteamSession(wrapped)
const header = session?.header
if (header?.origin !== 'subagent' && !((header?.delegationDepth ?? 0) > 0)) return false
return isRedteamSession({ session, agent: agent ? { ...agent, session } : { session } })
}
export function noteClaimedMessage(payload) {