Skip to content

[WRONG BRANCH] feat(skills,security,credentials): Phases 20.57–20.59 skill, security, and credential control planes - #4728

Draft
paopaonyapi-creator wants to merge 2 commits into
lidge-jun:mainfrom
paopaonyapi-creator:claude/admiring-noyce-5310e9
Draft

paopaonyapi-creator wants to merge 2 commits into
lidge-jun:mainfrom
paopaonyapi-creator:claude/admiring-noyce-5310e9

Conversation

@paopaonyapi-creator

@paopaonyapi-creator paopaonyapi-creator commented Sep 15, 2026

Copy link
Copy Markdown

Summary

Adds three opt-in control planes on top of the existing OpenCodeX runtime. Frozen GUI NAV is unchanged: Skills, Security, and Credentials are hash-routable (#skills, #security, #credentials) only.

  • Phase 20.57 — Universal Agent Skill Control Plane. Local skill registry, marketplace-shaped inventory, static scanning, cross-agent deploy, remote sync, and drift governance. Skills are not auto-executed on import.
  • Phase 20.58 — Authorized Security Agent Control Plane. Scope-first authorization, policy engine, human-approval gate, fixture recon, evidence hashing, and audit. Default-deny execution. R3 blocked. Feature flag SECURITY_RUNTIME_ENABLED (default off). No live offensive tooling.
  • Phase 20.59 — Provider Access / Credential Runtime. AES-256-GCM vault, fixture health/quota, OAuth session gateway (local.invalid + PKCE, CSRF state check), policy-governed short-lived leases, circuit breaker, and an additive 9Router candidate hook. Feature flag CREDENTIAL_RUNTIME_ENABLED (default off). List/detail APIs never return plaintext secrets. No live provider health, quota, or OAuth network calls on the default path. Does not implement account registration, CAPTCHA/Turnstile/Cloudflare bypass, credential stuffing, or unauthorized session acquisition.

Persistence is bun:sqlite under $OPENCODEX_HOME (skills / security.sqlite / credentials.sqlite). Management routes are declared in src/server/management/route-registry.ts. CLI: ocx skills, ocx security, ocx credentials (alias creds).

Verification

  • bun x tsc --noEmit (root)
  • bun x tsc -b --pretty false (gui)
  • GUI oxlint (including Skills / Security / Credentials pages)
  • bun test tests/credentials tests/security tests/cli/cli-registry.test.ts tests/server/management-route-registry.test.ts ./gui/tests/sidebar-rows.test.ts ./gui/tests/claude-desktop-locale.test.ts — pass
  • Hash-routing tests (tests/gui/routing-intelligence-ui.test.ts and related) — pass
  • bun scripts/file-size-ratchet.ts
  • bun scripts/structure-ssot.ts / bun run structure:index
  • bun scripts/privacy-scan.ts
  • bun run skill:surface:check
  • Locale key sets identical across en/de/fr/ja/ko/ru/tr/zh/zh-TW

GUI: pages render under #skills, #security, and #credentials. Sidebar NAV still has the ten frozen rows only (dashboard, codex-set, providers, models, subagents, logs, usage, storage, remote, integrations). No live dashboard screenshot in this description; reviewer can open those hashes locally with the corresponding feature flags.

Checklist

  • Scope stays focused and avoids unrelated cleanup.
  • Docs or release notes were updated when needed. (structure/security-control.md, structure/credential-runtime.md, structure/manifest.json, regenerated structure/INDEX.md)
  • Security-sensitive changes were reviewed for secrets, auth, and unsafe defaults. (flags default off; vault fail-closed without CREDENTIAL_MASTER_KEY; secrets redacted from list APIs, audit, and GUI; mutating credential/security APIs refuse when the flag is off)

🤖 Generated with Claude Code

Review readiness checklist

This PR stays in draft until every box below is ticked. Tick all four boxes once the requirements are met:

  • All CI tests are green on my local testing.

  • I pushed my PR to the latest dev commit.

  • I resolved all correct Codex and CodeRabbit findings.

  • My PR is ready for review.

Summary by CodeRabbit

  • New Features
    • Added Skills, Security, and Credentials workspaces with tabbed navigation, dashboards, tables, actions, and audit views.
    • Added CLI commands for managing skills, security operations, and provider credentials.
    • Added management APIs for skill lifecycle, authorized security workflows, and credential access, health, leasing, and approvals.
    • Added skill marketplace, scanning, deployment, drift detection, rollback, and remote-agent support.
    • Added encrypted credential management with validation, health monitoring, policy controls, and approval workflows.
  • Localization
    • Added translations for all new interfaces across supported languages.
  • Documentation
    • Documented the new skills, security, and credential capabilities.

AD PAO and others added 2 commits September 15, 2026 18:07
- Add canonical AgentSkill manifest, types, and persistence layer using bun:sqlite
- Implement deterministic static instruction scanner with 20+ security rules
- Implement risk assessment model with hard escalations and policy engine
- Implement review and approval workflow with content-bound hash integrity
- Add Agent Adapter SDK with Codex, Claude Code, OpenCode, and Universal adapters
- Add safe scope and path resolver preventing path traversal and symlink escapes
- Implement transactional deployment engine with pre-deployment snapshots, staging, atomic replacement, and post-write verification
- Implement drift detection and 3-way conflict resolution engine
- Implement skills.sh marketplace connector with offline fallback catalog
- Add restricted SSH transport with strict host-key pinning and secret broker refs
- Integrate Phase 20.56 capability factory bridge for generated skills
- Add agent self-service constrained tools
- Expose complete REST management API endpoints and route registry declarations
- Add ocx/pao skill CLI surface with subcommands and machine-readable output
- Build visual Skill marketplace, registry, editor, and deployment matrix GUI
- Add unit, integration, and security test suites covering all seed demos

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…credential runtime

Add the authorized security-agent control plane (scope, policy, human-approval, fixture recon, evidence) and the provider access / credential runtime (AES-256-GCM vault, fixture health, OAuth gateway, policy-governed leases). Both are feature-flagged off by default, hash-routable in the GUI without changing frozen NAV, and never return plaintext secrets on list APIs.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@github-actions github-actions Bot added the intake: hygiene-blocked Deterministic PR hygiene checks failed label Sep 15, 2026
@github-actions

Copy link
Copy Markdown
Contributor

⚠️ Deterministic hygiene checks failed.

  • unsponsored_surface — This changes an authentication, workflow, release-automation, or dependency surface. MAINTAINERS.md requires security review for these; ask a maintainer to apply maintainer-sponsored once they have reviewed it. Paths: src/server/management-api.ts.

@github-actions github-actions Bot added the enhancement New feature or request label Sep 15, 2026
@github-actions github-actions Bot changed the title feat(skills,security,credentials): Phases 20.57–20.59 skill, security, and credential control planes [WRONG BRANCH] feat(skills,security,credentials): Phases 20.57–20.59 skill, security, and credential control planes Sep 15, 2026
@coderabbitai

coderabbitai Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

⏳ DRAFT

  • wrong target branch (main); retarget to dev. UI screenshot required. hygiene: unsponsored_surface.

What to do

  • Retarget this PR to dev — all contributions go to dev.
  • Add a screenshot of the UI change to the PR description.
  • Fix unsponsored_surface — This changes an authentication, workflow, release-automation, or dependency surface. MAINTAINERS.md requires security review for these; ask a maintainer to apply maintainer-sponsored once they have reviewed it. Paths: src/server/management-api.ts.
  • Tick all four boxes in the PR description once you're done (currently 0/4).

Review readiness checklist

  • ⬜ All CI tests are green on my local testing.
  • ⬜ I pushed my PR to the latest dev commit.
  • ⬜ I resolved all correct Codex and CodeRabbit findings.
  • ⬜ My PR is ready for review.

0/4 boxes ticked.

Its title has been prefixed with [WRONG BRANCH].
This pull request was already a draft. Its draft status will be preserved after every issue above is resolved.
@paopaonyapi-creator Tick the boxes once your local CI is green, your branch is on the latest dev commit, and every correct Codex and CodeRabbit finding is resolved.

@github-actions
github-actions Bot marked this pull request as draft September 15, 2026 19:24
@lidge-jun

Copy link
Copy Markdown
Owner

리뷰 · 우선순위 52 / 80

이 PR은 OpenCodeX 런타임 위에 스킬 제어면(Phase 20.57), 보안 에이전트 제어면(20.58), 자격증명/볼트 런타임(20.59) 세 덩어리를 한 번에 올리는 초안입니다. GUI 사이드바의 고정 NAV 10칸은 그대로 두고, #skills / #security / #credentials 해시로만 새 페이지를 엽니다. 보안·자격증명 쪽은 플래그 기본값이 꺼져 있고, 스킬은 가져오기만으로 자동 실행하지 않는다고 본문에 적혀 있습니다. CLI는 ocx skills, ocx security, ocx credentials이고, 관리 API는 src/server/management/route-registry.ts에 경로를 추가하는 방식입니다.

지금 dev 끝(HEAD 45cfb04e9, package 2.57.0)이 하는 일과는 결이 많이 다릅니다. 최근 합쳐진 것은 응답 User-Agent 보존(#4702), 커스텀 모델 capability 적용(#4697), 라우팅 fence 일괄 새로고침 보호(#4695), 그리고 그 앞의 godfile 분할과 워크플로 예산(#4546)입니다. 이 PR은 타깃이 main이라 제목에 [WRONG BRANCH]가 붙어 있고, 추가만 약 2만 1천 줄·파일이 100개를 넘습니다. CI는 enforce-targethygiene(unsponsored_surface, 경로 src/server/management-api.ts)가 이미 실패했고, 게이트가 draft와 체크리스트 0/4로 막아 둔 상태입니다. 제품 아이디어로서의 무게는 있어도, 지금 dev에 올릴 준비는 되어 있지 않습니다.

자격증명 면은 이미 있는 oauth-account-routes, api-key-rotation, provider keychain 옆에 두 번째 비밀 저장소를 만듭니다. src/routing/credential-candidates.ts는 “기존 라우팅이 권위이고 후보는 덧붙이기”라고 쓰지만, 플래그를 켜면 lease·회로 차단·라우팅 후보가 생겨 운영 경로가 갈라집니다. 볼트 봉투는 AES-256-GCM이라 형태는 익숙하지만, 마스터키를 패스프레이즈의 SHA-256 한 번으로만 뽑습니다. 적당한 키 유도 함수와 salt가 없고, 환경변수·상수 이름에 PAO_ / pao.가 섞여 OpenCodeX 공개 표면 이름과도 어긋납니다.

보안 면은 fixture 정찰, 기본 거부, R3 차단, 막힌 행동 목록을 넣어 “라이브 공격 도구 없음”을 분명히 합니다. 그래도 관리 API·DB·캠페인·승인 게이트가 통째로 생기고, bug_bounty / ctf 같은 환경 문자열이 기본 capability에 들어 있습니다. 플래그가 꺼져 있어도 코드·문서·지원 비용이 생기므로, 메인테이너 보안 리뷰(maintainer-sponsored) 없이 ready로 올리면 안 됩니다. 스킬 면은 마켓플레이스·배포·드리프트·원격까지 한 PR에 다 들어 있고, src/skills/db.tssrc/security/db.ts가 이미 1000줄대입니다. 지금 dev가 큰 파일을 쪼개는 방향인데, 임계값(2000줄) 아래라도 새 큰 파일을 또 만드는 셈입니다.

플래그 기본 off, NAV 동결, 해시 라우팅, 목록 API에서 평문 비밀 비노출 같은 안전장치는 읽힙니다. 하지만 잘못된 타깃 브랜치, 세 phase 일괄 상륙, 기존 자격증명/OAuth 면과의 겹침, unsponsored 인증 표면, 그리고 현재 dev 우선순위와 안 맞는 크기 때문에 지금 merge 후보가 아닙니다. draft를 유지한 채 쪼개고 dev로 다시 겨냥하는 쪽이 맞습니다.

baseRefName - 타깃이 main이다. 기여는 dev로 가야 하고 게이트가 이미 잘못된 브랜치로 draft 처리했다
추가량 약 21807줄 / 파일 약 114개 - 스킬·보안·자격증명 세 phase를 한 PR에 넣었다. 리뷰와 되돌리기가 사실상 어렵다
src/security/db.ts · src/skills/db.ts (각 약 1000줄) - 새 저장소 큰 파일이다. 현재 dev의 분할 방향과 바로 충돌한다
src/credentials/vault.ts 의 deriveKey - 마스터키를 SHA-256 한 번으로만 만든다. 패스프레이즈면 키 유도 함수와 salt가 없다
src/credentials 와 기존 oauth-account-routes / api-key-rotation - 비밀·OAuth·헬스 경로가 이중화된다
src/server/management-api.ts - hygiene unsponsored_surface. 보안 리뷰 후 maintainer-sponsored가 필요하다
상수·환경변수 PAO_* / pao.credential - OpenCodeX 공개 이름과 어긋난 실험 브랜드가 그대로 보인다
gui 페이지·i18n·CSS 대량 추가 - UI 스크린샷 게이트도 아직 비어 있다

메인테이너의 판단이 필요한 지점

  • 스킬 마켓플레이스·배포면을 제품 로드맵에 넣을지, 기존 skill surface 수준으로만 둘지
  • 보안 에이전트 제어면을 OpenCodeX 본제품에 둘지 (플래그여도 표면과 지원 비용이 생긴다)
  • 자격증명 볼트/lease를 기존 provider·OAuth·API-key 면과 합칠지, 별도 실험으로 뺄지
  • 세 phase를 한 브랜치로 받을지, 표면별로 쪼개 받을지

너의 추천
draft 유지. main이 아니라 dev로 타깃을 바꾸고, 가능하면 스킬 / 보안 / 자격증명을 각각 작은 PR로 쪼개라. 보안·자격증명 면은 maintainer-sponsored 없이 ready로 올리지 마라. 지금 형태(약 2만 줄·잘못된 브랜치·hygiene 실패)로는 merge하지 말고, 위 조건 전에는 체크리스트를 열지 말라고 안내하는 편이 맞다. 당장 dev 용량이 없으면 실험으로 닫고 초청 이슈로 다시 받는 것도 합리적이다.

이 댓글은 grok-bot이 작성했습니다

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

Labels

enhancement New feature or request intake: hygiene-blocked Deterministic PR hygiene checks failed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants