Skip to content

feat: add safe portal plugin routes - #293

Draft
TrueKrishna wants to merge 3 commits into
yc-software:mainfrom
TrueKrishna:agent/portal-plugin-routes
Draft

feat: add safe portal plugin routes#293
TrueKrishna wants to merge 3 commits into
yc-software:mainfrom
TrueKrishna:agent/portal-plugin-routes

Conversation

@TrueKrishna

@TrueKrishna TrueKrishna commented Aug 8, 2026

Copy link
Copy Markdown

Summary

  • add a validated portalRoutes deployment contract for session and signed-upstream plugins
  • derive private upstream addresses for Docker, Fly, and AWS instead of accepting operator-supplied routing JSON
  • proxy browser plugins with verified sessions and signed portal identity
  • proxy qm.edge.v1 machine traffic without a human session through a strict header allowlist

Security boundary

  • built-in and overlapping path prefixes are rejected
  • only private HTTP(S) origins are accepted at portal startup
  • PORTAL_PLUGIN_ROUTES is deployment-managed and cannot be overridden
  • signed machine routes drop cookies and all human/portal identity headers

Verification

  • npm --prefix cli test
  • npm --prefix cli run typecheck
  • npm --prefix cli run build
  • npm --prefix plugins/portal test (108 passed)
  • npm --prefix plugins/portal run typecheck

View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@TrueKrishna

Copy link
Copy Markdown
Author

Production deployment surfaced newly published advisories in the mandatory core-image npm audit. I added commit 50f8e59, which refreshes brace-expansion, fast-uri, Hono, and undici; the Pi tarball needed a new shrinkwrapped security.3 asset because its nested shrinkwrap intentionally ignores root overrides.

Verification: clean root npm ci, npm audit --omit=dev --audit-level=moderate (0 vulnerabilities), test/pi-dependency-security.test.ts (2/2), and npm run typecheck. Security.3 asset: https://github.com/TrueKrishna/pi/releases/tag/qm-pi-coding-agent-0.82.0-security.3

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