feat(test): support scoped Firstleg read-only receiver evidence

This commit is contained in:
2026-10-03 21:24:00 +08:00
parent 18b39b4378
commit 3987562890
2 changed files with 15 additions and 1 deletions
+1 -1
View File
@@ -130,7 +130,7 @@ const base64Expression = value => '['+Buffer.from(value).toString('base64').matc
// Credentials stay in the executor's memory. No deploy, SQL mutation, or arbitrary SQL entry point.
export function buildEvidenceRemoteScript(service, sql, agent) {
assertReadOnlySql(sql)
if (!['order','lastleg'].includes(service) || !/^[A-Za-z0-9_.-]{1,128}$/.test(agent)) throw Error('Invalid TEST evidence target')
if (!['order','firstleg','lastleg'].includes(service) || !/^[A-Za-z0-9_.-]{1,128}$/.test(agent)) throw Error('Invalid TEST evidence target')
const prefix=service.toUpperCase(),container=`firstleg-test-${service}`
const python = `import json,os,subprocess,urllib.parse,base64,re
try: