MCPcopy Create free account
hub / github.com/openai/plugins / project_trust_level

Function project_trust_level

plugins/codex-security/scripts/config_preflight.py:235–248  ·  view source on GitHub ↗
(
    config_layers: list[tuple[Path, dict[str, Any]]], project_root: Path
)

Source from the content-addressed store, hash-verified

233
234
235def project_trust_level(
236 config_layers: list[tuple[Path, dict[str, Any]]], project_root: Path
237) -> str | None:
238 for _path, config in reversed(config_layers):
239 projects = config.get("projects")
240 if not isinstance(projects, dict):
241 continue
242 project = projects.get(str(project_root))
243 if not isinstance(project, dict):
244 continue
245 trust_level = project.get("trust_level")
246 if isinstance(trust_level, str):
247 return trust_level
248 return None
249
250
251def project_config_paths(project_root: Path, cwd: Path) -> list[Path]:

Callers 1

discover_config_pathsFunction · 0.85

Calls 1

getMethod · 0.45

Tested by

no test coverage detected