Skip to content

XUNIA realtime command center: local worker queue and live controls - #74

Open
sonoxo wants to merge 4 commits into
mainfrom
feat/xunia-realtime-free-runtime
Open

XUNIA realtime command center: local worker queue and live controls#74
sonoxo wants to merge 4 commits into
mainfrom
feat/xunia-realtime-free-runtime

Conversation

@sonoxo

@sonoxo sonoxo commented Sep 1, 2026

Copy link
Copy Markdown
Owner

Zyra realtime XUNIA control plane

Connects the Zyra Security Command Center to the free local GPT-Doug runtime.

Included

  • loopback-only runtime proxy by default
  • runtime health, jobs, job detail, cancel, retest, schedules and SSE relay endpoints
  • findings, remediation queue and local-alert APIs
  • finding resolve/retest controls
  • server-side revalidation of every security manifest before queueing
  • Run Now / schedule / cancel / job retest controls
  • one-second live dashboard refresh
  • worker, finding, remediation and alert summary counters
  • runtime online/offline state with free local start command
  • no paid backend required

All active testing remains gated by the existing XUNIA engagement authorization model and destructive actions remain disabled.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-01T17:35:50.342615Z dea117f PR opened
🔒 Security Review Completed 2026-09-01T17:44:03.743185Z dea117f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: dea117f67e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread server/xunia-security-routes.ts Outdated
message,
runtime: 'offline',
localOnly: true,
startCommand: 'python xunia_realtime_runtime.py',

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Ship the runtime referenced by the command center

The offline response directs operators to run python xunia_realtime_runtime.py, but a repository-wide git ls-tree -r search at this commit finds no runtime script or other implementation of /health, /v1/jobs, or /v1/schedules. Consequently, the default 127.0.0.1:8765 configuration always remains offline and every newly added run, cancel, retest, and scheduling control fails unless operators independently obtain an undocumented external service.

Useful? React with 👍 / 👎.

Comment on lines +184 to +185
const body = lastManifest || buildManifest();
const response = await apiRequest("POST", "/api/xunia/security/runtime/jobs", body);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Rebuild the manifest after changing modes

After building or running a PENTEST plan, changing the visible mode to ASSESS does not clear lastManifest, so Run Now submits the old PENTEST manifest here instead of the current form state. The server correctly validates that stale manifest as PENTEST, allowing safe-active checks to execute while the UI says ASSESS; rebuild the manifest for each run or invalidate it whenever mode changes.

Useful? React with 👍 / 👎.

Comment thread server/xunia-security-routes.ts Outdated
}
});

app.post('/api/xunia/security/runtime/jobs', requireAuth, async (req: Request, res: Response) => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Restrict active runtime operations by role

Because this execution endpoint uses only requireAuth, viewer and analyst accounts can submit real PENTEST/SIMULATE jobs and schedules, while the existing pentest execution routes in server/routes.ts restrict equivalent actions to owners and admins. Apply an appropriate requireRole guard to the new job, schedule, cancel, and retest endpoints so read-only users cannot invoke security tools against arbitrary targets.

Useful? React with 👍 / 👎.

Comment thread server/xunia-security-routes.ts Outdated
Comment on lines +107 to +109
app.get('/api/xunia/security/runtime/jobs', requireAuth, async (_req: Request, res: Response) => {
try {
await relayJson(res, await runtimeFetch('/v1/jobs'));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Isolate runtime jobs between organizations

In a deployment serving multiple organizations, this endpoint proxies the runtime's entire global job list without passing or filtering by req.user.organizationId; the job payload includes manifests, target values, and authorization references that the new UI renders. The detail, cancel, and retest endpoints likewise accept any discovered job ID, so authenticated users in one tenant can inspect or control another tenant's work; bind jobs to the requesting organization and enforce ownership on every runtime operation.

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant