[HLCC-ICE-000001][ZY-CONTRIB-20260723-001] feat: 以来光者贡献链启用冰朔第五域个人子频道

This commit is contained in:
光湖代码频道 · 铸渊 2026-07-24 10:39:10 +08:00
commit 5615453e4e
660 changed files with 122355 additions and 0 deletions

View file

@ -0,0 +1,14 @@
"use strict";
const assert = require("node:assert/strict");
const test = require("node:test");
const { execute, RESTORE_OWNER_PASSWORD_LOGIN } = require("./owner-access-broker");
test("owner-access executor exposes one bounded recovery action", async () => {
assert.match(RESTORE_OWNER_PASSWORD_LOGIN, /PasswordAuthentication yes/);
assert.match(RESTORE_OWNER_PASSWORD_LOGIN, /sshd -t/);
assert.match(RESTORE_OWNER_PASSWORD_LOGIN, /systemctl reload ssh/);
assert.doesNotMatch(RESTORE_OWNER_PASSWORD_LOGIN, /PermitRootLogin yes/);
assert.deepEqual(await execute({ target: "JD-FD-PRIMARY", action: "unknown" }), { ok: false, error: "action_not_registered" });
assert.deepEqual(await execute({ target: "JD-FD-PRIMARY", action: "restore-owner-password-login", cmd: "id" }), { ok: false, error: "arbitrary_command_forbidden" });
});