Add Claude access setup, onedir build and native packages
- scripts/setup_claude_access.py: narrow envbao-claude policy/token and an exec_only claude.toml; optional merge of Claude Code settings - [security] exec_only refuses plain export mode and --no-redact - PyInstaller onedir build (~0.06s start-up vs ~1.4s onefile) - macOS .pkg, Debian/Ubuntu/Raspberry Pi OS .deb (pure-Python builder), tarball + scripts/install.sh; release pipeline updated - docs: claude-access, install matrix, releasing, usage, security Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
08bacbc5a8
commit
952fa2ce63
22 files changed
+1110
-44
No files matched your search
@@ -159,7 +159,11 @@ def run(args: argparse.Namespace) -> int:
|
||||
_check(config, client)
|
||||
return EXIT_OK
|
||||
|
||||
if config.exec_only and args.command != "exec" and not args.check:
|
||||
raise ConfigError("this configuration only permits 'envbao exec' (security.exec_only)")
|
||||
if args.command == "exec":
|
||||
if config.exec_only and args.no_redact:
|
||||
raise ConfigError("--no-redact is not permitted (security.exec_only)")
|
||||
argv = args.argv[1:] if args.argv[:1] == ["--"] else args.argv
|
||||
queries = select_queries(config, args.query)
|
||||
secrets = fetch_secrets(client, config, queries)
|
||||
|
||||
+12
-2
@@ -35,7 +35,7 @@ _SERVER_KEYS = {
|
||||
"timeout",
|
||||
"allow_insecure_http",
|
||||
}
|
||||
_SECURITY_KEYS = {"allow_protected"}
|
||||
_SECURITY_KEYS = {"allow_protected", "exec_only"}
|
||||
_TOP_KEYS = {"server", "security", "query"}
|
||||
_QUERY_COMMON_KEYS = {"engine", "name", "keys", "prefix", "rename", "on_missing"}
|
||||
_NAME_RE = re.compile(r"[A-Za-z0-9][A-Za-z0-9._-]*\Z")
|
||||
@@ -83,6 +83,7 @@ class Config:
|
||||
server: ServerConfig
|
||||
queries: tuple[Query, ...]
|
||||
allow_protected: frozenset[str] = frozenset()
|
||||
exec_only: bool = False
|
||||
|
||||
|
||||
def resolve_config_path(explicit: str | None) -> Path:
|
||||
@@ -227,7 +228,16 @@ def parse_config(data: Mapping[str, Any]) -> Config:
|
||||
_reject_unknown(security, _SECURITY_KEYS, "[security]")
|
||||
allow_protected = _get_str_list(security, "allow_protected", "security") or []
|
||||
|
||||
return Config(server=server, queries=queries, allow_protected=frozenset(allow_protected))
|
||||
exec_only = security.get("exec_only", False)
|
||||
if not isinstance(exec_only, bool):
|
||||
raise ConfigError("security.exec_only must be a boolean")
|
||||
|
||||
return Config(
|
||||
server=server,
|
||||
queries=queries,
|
||||
allow_protected=frozenset(allow_protected),
|
||||
exec_only=exec_only,
|
||||
)
|
||||
|
||||
|
||||
def load_config(path: Path) -> Config:
|
||||
|
||||
Reference in new issue
Block a user