b4fbd6fe9f
Deploy Site / deploy-vercel (push) Has been skipped
Deploy Site / deploy-docs (push) Has been skipped
Build Skills Index / build-index (push) Has been skipped
CI / Deny unrelated histories (push) Has been skipped
CI / Detect affected areas (push) Successful in 27m35s
CI / OSV scan (push) Failing after 4s
CI / Build&Test Docker image (push) Successful in 9s
CI / Supply-chain scan (push) Has been skipped
CI / Lint Docker scripts (push) Failing after 5m13s
CI / Check contributors (push) Failing after 12m8s
CI / Docs Site (push) Failing after 12m8s
CI / TypeScript (push) Failing after 12m8s
CI / Python lints (push) Failing after 12m9s
CI / Python tests (push) Failing after 12m9s
CI / Check uv.lock (push) Failing after 23m22s
CI / CI timing report (push) Has been cancelled
Build Skills Index / trigger-deploy (push) Has been cancelled
CI / All required checks pass (push) Has been cancelled
42 lines
1.7 KiB
Python
42 lines
1.7 KiB
Python
"""External secret source integrations.
|
|
|
|
A secret source is anything that can supply environment-variable-shaped
|
|
credentials at process startup, _after_ ~/.hermes/.env has loaded.
|
|
|
|
The contract every source implements is
|
|
:class:`agent.secret_sources.base.SecretSource`; the orchestrator that
|
|
runs the enabled sources (ordering, mapped-beats-bulk precedence,
|
|
first-claim-wins conflicts, ``override_existing`` semantics, provenance)
|
|
is :func:`agent.secret_sources.registry.apply_all`. Multiple sources
|
|
can be enabled at once — see the registry module docstring for the
|
|
precedence ladder. The atomic-write / 0600 / TTL disk-cache substrate
|
|
is shared across backends in ``agent.secret_sources._cache`` so the
|
|
security-sensitive bits live in exactly one place.
|
|
|
|
Currently bundled:
|
|
|
|
- ``bitwarden`` — Bitwarden Secrets Manager (`bws` CLI). See
|
|
``agent.secret_sources.bitwarden`` for the integration and
|
|
``hermes_cli.secrets_cli`` for the user-facing setup wizard.
|
|
- ``onepassword`` — 1Password ``op://`` secret references (`op` CLI).
|
|
See ``agent.secret_sources.onepassword`` for the integration and
|
|
``hermes_cli.onepassword_secrets_cli`` for the user-facing commands.
|
|
|
|
The bundled set is deliberately closed (policy mirrors memory
|
|
providers): new third-party secret managers ship as standalone plugin
|
|
repos that subclass ``SecretSource`` and register through
|
|
``PluginContext.register_secret_source()`` — they are NOT added to this
|
|
package. A generic ``command`` source is a possible future exception;
|
|
OS keystores (Keychain/DPAPI/libsecret) are under discussion.
|
|
"""
|
|
|
|
from agent.secret_sources.base import ( # noqa: F401
|
|
SECRET_SOURCE_API_VERSION,
|
|
ErrorKind,
|
|
FetchResult,
|
|
SecretSource,
|
|
is_valid_env_name,
|
|
run_secret_cli,
|
|
scrub_ansi,
|
|
)
|