Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion codex-rs/core/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3207,7 +3207,6 @@ impl Config {
effective_permission_selection.profiles.as_ref(),
default_permissions,
builtin_workspace_write_settings,
resolved_cwd.as_path(),
&mut startup_warnings,
)?;
let mut configured_workspace_roots = compile_permission_profile_workspace_roots(
Expand Down
11 changes: 2 additions & 9 deletions codex-rs/core/src/config/permissions.rs
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,6 @@ pub(crate) fn network_proxy_config_for_profile_selection(
pub(crate) fn compile_permission_profile(
permissions: &PermissionsToml,
profile_name: &str,
policy_cwd: &Path,
startup_warnings: &mut Vec<String>,
) -> io::Result<(FileSystemSandboxPolicy, NetworkSandboxPolicy)> {
let profile = resolve_permission_profile(permissions, profile_name)?;
Expand Down Expand Up @@ -383,7 +382,6 @@ pub(crate) fn compile_permission_profile(
.extend(compile_filesystem_permission(
path,
permission,
policy_cwd,
startup_warnings,
)?);
}
Expand Down Expand Up @@ -412,7 +410,6 @@ pub(crate) fn compile_permission_profile_selection(
permissions: Option<&PermissionsToml>,
profile_name: &str,
workspace_write: Option<&SandboxWorkspaceWrite>,
policy_cwd: &Path,
startup_warnings: &mut Vec<String>,
) -> io::Result<(FileSystemSandboxPolicy, NetworkSandboxPolicy)> {
if let Some(permission_profile) = builtin_permission_profile(profile_name, workspace_write) {
Expand All @@ -426,7 +423,7 @@ pub(crate) fn compile_permission_profile_selection(
"default_permissions requires a `[permissions]` table",
)
})?;
compile_permission_profile(permissions, profile_name, policy_cwd, startup_warnings)
compile_permission_profile(permissions, profile_name, startup_warnings)
}

pub(crate) fn compile_permission_profile_workspace_roots(
Expand Down Expand Up @@ -524,7 +521,6 @@ fn compile_network_sandbox_policy(
fn compile_filesystem_permission(
path: &str,
permission: &FilesystemPermissionToml,
policy_cwd: &Path,
startup_warnings: &mut Vec<String>,
) -> io::Result<Vec<FileSystemSandboxEntry>> {
let mut entries = Vec::new();
Expand All @@ -548,9 +544,7 @@ fn compile_filesystem_permission(
// exact-path parser so existing path semantics stay intact.
let entry = FileSystemSandboxEntry {
path: FileSystemPath::GlobPattern {
pattern: compile_scoped_filesystem_pattern(
path, subpath, *access, policy_cwd,
)?,
pattern: compile_scoped_filesystem_pattern(path, subpath, *access)?,
},
access: *access,
};
Expand Down Expand Up @@ -643,7 +637,6 @@ fn compile_scoped_filesystem_pattern(
path: &str,
subpath: &str,
access: FileSystemAccessMode,
_policy_cwd: &Path,
) -> io::Result<String> {
// Pattern entries currently mean deny-read only. Supporting broader access
// modes here would imply glob-based read/write allow semantics that the
Expand Down
2 changes: 0 additions & 2 deletions codex-rs/core/src/config/permissions_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,6 @@ fn glob_scan_max_depth_must_be_positive() {

#[test]
fn read_write_trailing_glob_suffix_compiles_as_subpath() -> std::io::Result<()> {
let cwd = TempDir::new()?;
let mut startup_warnings = Vec::new();
let (file_system_policy, _) = compile_permission_profile(
&PermissionsToml {
Expand All @@ -568,7 +567,6 @@ fn read_write_trailing_glob_suffix_compiles_as_subpath() -> std::io::Result<()>
)]),
},
"workspace",
cwd.path(),
&mut startup_warnings,
)?;

Expand Down
Loading