Skip to content

Add subscription intelligence bridge and ChatGPT MCP app#80

Merged
Techris93 merged 1 commit into
mainfrom
codex/intelligence-bridge-mcp
Jul 22, 2026
Merged

Add subscription intelligence bridge and ChatGPT MCP app#80
Techris93 merged 1 commit into
mainfrom
codex/intelligence-bridge-mcp

Conversation

@Techris93

Copy link
Copy Markdown
Owner

Summary

  • add a versioned minimized intelligence contract and durable Core job queue
  • add a local Codex bridge that uses the operator's existing ChatGPT login without persisting ChatGPT credentials
  • add a stateless OAuth-protected, read-only MCP server for a SecOpsAI ChatGPT app
  • add scoped Core API credentials, launchd/systemd controls, Render Blueprint service, docs, and CI gates

Security boundary

  • fixed allowlisted actions; no arbitrary prompt or shell endpoint
  • raw telemetry, package artifacts, credentials, MAC addresses, and private keys excluded from model context
  • MCP tools are read-only and scope-checked
  • production MCP startup fails closed without established OAuth/JWKS configuration
  • publication, disclosure, sandbox submission, finding closure, and scan control remain unavailable to both integrations

Verification

  • Core full suite: 382 passed, 14 warnings, 4 subtests
  • final intelligence/Core API suite: 18 passed
  • real subscription-backed local bridge smoke job: succeeded
  • MCP protocol tests: 6 passed
  • npm audit: 0 vulnerabilities
  • MkDocs strict build: passed

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploying secopsai with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3aeb34c
Status: ✅  Deploy successful!
Preview URL: https://6b184dc2.secopsai.pages.dev
Branch Preview URL: https://codex-intelligence-bridge-mc.secopsai.pages.dev

View logs

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jul 22, 2026

Copy link
Copy Markdown

Deploying website with  Cloudflare Pages  Cloudflare Pages

Latest commit: 3aeb34c
Status: ✅  Deploy successful!
Preview URL: https://c929af77.website-bks.pages.dev
Branch Preview URL: https://codex-intelligence-bridge-mc.website-bks.pages.dev

View logs

@Techris93
Techris93 force-pushed the codex/intelligence-bridge-mcp branch from 4999b2f to 3aeb34c Compare July 22, 2026 12:01

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

Copy link
Copy Markdown

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: 4999b2f470

ℹ️ 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".

} catch (error) {
const authError = error instanceof AuthenticationError ? error : new AuthenticationError("Access token verification failed");
response.setHeader("WWW-Authenticate", authenticationChallenge(config, authError));
return json(response, 401, { error: authError.code, error_description: authError.message, request_id: requestId });

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Add CORS headers before returning auth challenges

When ChatGPT calls /mcp from https://chatgpt.com with a missing or expired access token, this 401 is returned before setCorsHeaders() runs, so the browser blocks the response and hides the WWW-Authenticate challenge that the client needs to discover OAuth metadata or re-authenticate. Apply the allowed-origin headers on the MCP path before the authentication failure path as well.

Useful? React with 👍 / 👎.

Comment thread secopsai/core_api.py
inputs = dict(job.get("input") or {})
if job.get("target_id"):
inputs.setdefault("target_id", job["target_id"])
bridge_request = prepare_bridge_request(job["action"], inputs, db_path=resolved.db_path)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Fail or requeue jobs when context preparation fails

If a queued bridge job references a mistyped or deleted target finding/case, claim_intelligence_job() has already marked it running before this context preparation can raise ValueError. The endpoint then returns 422 to the remote bridge without calling the fail/requeue path, leaving the job stuck until stale recovery and causing the remote bridge poll to error instead of recording a failed job; validate/build the context before claiming or explicitly fail/requeue the claimed job on this exception.

Useful? React with 👍 / 👎.

@Techris93
Techris93 merged commit ea5ec9c into main Jul 22, 2026
16 checks passed
@Techris93
Techris93 deleted the codex/intelligence-bridge-mcp branch July 22, 2026 12:03
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