mirror of
https://github.com/openai/codex.git
synced 2026-11-15 21:50:46 +00:00
Respect turn filesystem permissions during executor skill discovery (#59291)
## Why Direct executor skill discovery used unrestricted filesystem access, bypassing the turn's permission context. Cached catalogs also needed to account for changes in filesystem access within a turn. ## What changed - Bind selected capability roots to callback-scoped filesystem access through `AccessedSelectedCapabilityRoot`. - Pass accessors built with the turn's granted permissions into skill preparation and discovery, removing the executor skill provider's environment lookup and unrestricted accessor. - Include filesystem access keys in the direct discovery cache so permission changes trigger rediscovery. ## Testing Extend tests to verify that restricted discovery returns no skills when sandbox access is unavailable, restoring access restores discovery, and changing or restoring access invalidates the catalog cache. GitOrigin-RevId: 0f7aa7646f65923f65f0cfc0b387d94bd7f2db05
This commit is contained in:
committed by
copyberry
parent
db3c44414c
commit
007f668c34
@@ -36,7 +36,7 @@ struct Provider {
|
||||
}
|
||||
|
||||
impl SkillProvider for Provider {
|
||||
fn list(&self, _query: SkillListQuery) -> SkillProviderFuture<'_, SkillCatalog> {
|
||||
fn list<'a>(&'a self, _query: SkillListQuery<'a>) -> SkillProviderFuture<'a, SkillCatalog> {
|
||||
Box::pin(async move {
|
||||
self.lists.fetch_add(1, Ordering::SeqCst);
|
||||
let fail = self.fail_list.swap(false, Ordering::SeqCst);
|
||||
@@ -112,11 +112,10 @@ fn client() -> Arc<McpResourceClient> {
|
||||
))))
|
||||
}
|
||||
|
||||
fn query(client: Option<Arc<McpResourceClient>>) -> SkillListQuery {
|
||||
fn query(client: Option<Arc<McpResourceClient>>) -> SkillListQuery<'static> {
|
||||
SkillListQuery {
|
||||
turn_id: "turn".into(),
|
||||
executor_roots: Vec::new(),
|
||||
resolved_executor_roots: Vec::new(),
|
||||
host_snapshot: None,
|
||||
include_host_skills: false,
|
||||
include_bundled_skills: false,
|
||||
|
||||
Reference in New Issue
Block a user