MCPcopy
hub / github.com/opentrace/opentrace / _write_secure

Function _write_secure

agent/src/opentrace_agent/cli/credentials.py:202–205  ·  view source on GitHub ↗

Write JSON to *path* and lock down permissions (unencrypted).

(path: Path, data: dict[str, Any])

Source from the content-addressed store, hash-verified

200
201
202def _write_secure(path: Path, data: dict[str, Any]) -> None:
203 """Write JSON to *path* and lock down permissions (unencrypted)."""
204 path.write_text(json.dumps(data, indent=2), encoding="utf-8")
205 _secure_path(path)
206
207
208def _read_json(path: Path) -> dict[str, Any] | None:

Callers 1

save_clientFunction · 0.85

Calls 1

_secure_pathFunction · 0.85

Tested by

no test coverage detected