feat: add asynchronous Unraid jobs
This commit is contained in:
1 parent
b4b83c2797
commit
88643de738
9 files changed
+165
-11
No files matched your search
@@ -38,6 +38,15 @@ describe("secure tool configuration", () => {
|
||||
expect(cfg.enabledTools).toContain("unraid_files_inventory");
|
||||
expect(cfg.enabledTools).not.toContain("unraid_system_shell");
|
||||
});
|
||||
|
||||
test("an enabled critical shell also exposes bounded asynchronous jobs", () => {
|
||||
const cfg = parseConfig(
|
||||
"MUA_API_KEY=test\nMUA_ENABLED_TOOLS=unraid_system_shell\n",
|
||||
);
|
||||
expect(cfg.enabledTools).toContain("unraid_system_job_start");
|
||||
expect(cfg.enabledTools).toContain("unraid_system_job_status");
|
||||
expect(cfg.enabledTools).toContain("unraid_system_job_cleanup");
|
||||
});
|
||||
});
|
||||
|
||||
describe("secret handling", () => {
|
||||
@@ -55,6 +64,9 @@ describe("secret handling", () => {
|
||||
describe("risk classification", () => {
|
||||
test("classifies root shell and container changes as critical", () => {
|
||||
expect(getToolRisk("unraid_system_shell")).toBe("critical");
|
||||
expect(getToolRisk("unraid_system_job_start")).toBe("critical");
|
||||
expect(getToolRisk("unraid_system_job_cleanup")).toBe("critical");
|
||||
expect(getToolRisk("unraid_system_job_status")).toBe("read");
|
||||
expect(getToolRisk("unraid_docker_modify")).toBe("critical");
|
||||
expect(getToolRisk("unraid_docker_update_verified_batch")).toBe("critical");
|
||||
expect(getToolRisk("unraid_docker_restart")).toBe("write");
|
||||
|
||||
Reference in new issue
Block a user