Skip to content

feat: restrict which skill sources Codex can load#21457

Open
viyatb-oai wants to merge 1 commit intocodex/viyatb/managed-artifact-exposurefrom
codex/viyatb/managed-skill-requirements
Open

feat: restrict which skill sources Codex can load#21457
viyatb-oai wants to merge 1 commit intocodex/viyatb/managed-artifact-exposurefrom
codex/viyatb/managed-skill-requirements

Conversation

@viyatb-oai
Copy link
Copy Markdown
Collaborator

@viyatb-oai viyatb-oai commented May 7, 2026

Why

Once managed requirements can describe approved skill sources, that policy needs to affect the actual skill roots Codex loads. Otherwise an enterprise admin can author a requirement that looks restrictive but still leaves user or repo-local skills effective at runtime.

What changed

  • Map each skill root to its managed source category: user, repo, system, admin, or plugin.
  • Filter discovered roots against skills.allowed_sources before they become effective.
  • Include managed source restrictions in the cwd cache key so a previously unrestricted load cannot be reused after policy tightens.

Example config.toml

With the managed requirements stack applied, an approved marketplace can still appear in user config.toml like this:

[features]
plugins = true

[marketplaces.approved-marketplace]
source_type = "git"
source = "https://github.com/example/approved-marketplace.git"

There is intentionally no user-writable allowed_sources key in config.toml; skill-source restrictions are enforced only from managed requirements.

Verification

  • Added regression coverage for managed source filtering in codex-rs/core-skills/src/manager_tests.rs.
  • Added regression coverage for cache separation when managed allowed_sources changes.

Stack

@viyatb-oai viyatb-oai force-pushed the codex/viyatb/managed-skill-requirements branch from 3213007 to 3b863e0 Compare May 7, 2026 02:07
@viyatb-oai viyatb-oai changed the base branch from codex/viyatb/managed-artifact-requirements to codex/viyatb/managed-artifact-exposure May 7, 2026 02:10
@viyatb-oai viyatb-oai force-pushed the codex/viyatb/managed-artifact-exposure branch from 58cde56 to 45c47d2 Compare May 7, 2026 02:20
@viyatb-oai viyatb-oai requested a review from a team as a code owner May 7, 2026 02:20
@viyatb-oai viyatb-oai force-pushed the codex/viyatb/managed-skill-requirements branch from 3b863e0 to 46d9b7f Compare May 7, 2026 02:20
@viyatb-oai viyatb-oai changed the title feat: enforce managed skill requirements feat: restrict which skill sources Codex can load May 7, 2026
Co-authored-by: Codex noreply@openai.com
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