Collection Security
How epack protects the machine that runs collectors and the credentials they use.
Collecting evidence means downloading and running collector binaries with access to your credentials. This page covers the checks epack makes before and during a run. What a reviewer can establish from a finished pack is covered in the Security Model.
Two Editions, Different Security Profiles
epack comes in two editions with different security profiles:
- No subprocess execution
- No binary downloads
- No network requests (except Sigstore)
- Read/write local files only
- Ideal for verification pipelines
- Downloads collector binaries
- Executes collectors as subprocesses
- Manages credentials via environment
- Requires lockfile verification
- Use
--frozenmode in CI
epack-core for verification-only workflows.
Use the full edition only when automated collection is required.
Collector Security
The full edition downloads and executes collector binaries, which requires careful security controls.
Binary verification
- Collectors are downloaded from GitHub releases
- SHA-256 digest is recorded in lockfile
- Digest is verified before execution
- Signer identity is verified via Sigstore
Environment isolation
- Only explicitly listed secrets are passed to collectors
- An entry marked optional is passed through only when set, and the run never requires it
- Reserved environment prefixes are blocked (
EPACK_,LD_, etc.) - Collectors cannot access other environment variables
File artifact containment
- Each collector gets a private staging directory for file artifacts
- File artifact paths must be relative and stay beneath that staging directory
- Symlinks and non-regular files are rejected before bytes enter the pack
- Staged file bytes count toward artifact and pack size limits
Lockfile security
The lockfile (epack.lock.yaml) provides reproducible builds by pinning
exact versions, platform-specific binary digests, and signer identities. Each locked
collector, tool, and remote also records a verification status:
verified when its signature bundle was checked at lock time, or
skipped for external binaries that have no bundle to verify.
--frozen mode in CI/CD to ensure
lockfile verification. This prevents unexpected changes to collector binaries.
Configurations from a Remote
epack remote clone and epack run <name> fetch a project a remote wrote: its
epack.yaml, hooks, and lockfile. That makes the remote an author of what runs on your machine, so
epack holds a fetched configuration to these rules:
- Files are written only inside the folder you named, never into
.epack/collectors/,.epack/remotes/, or.git/ - Every binary the lockfile names is downloaded through the registry and checked against its recorded Sigstore identity before it runs
- A hook script that still matches the delivered template never runs, so a fetched configuration cannot run shell on your machine
- Files you edited are never overwritten without
--force - After a fetch that changed something, epack prints each collector, tool, and remote it will run with its publisher and version, and the environment variables it reads. A variable counts as set when the environment or your keychain holds it for that configuration
- Collectors, tools, and remote adapters may come only from publishers you trust. A publisher is the GitHub owner of a component's source repository
- A run by name checks the revision it fetched before installing anything. Trust in a new publisher is offered only for that revision, never for an earlier one the run falls back to
- A job with no folder signs in for its configuration only through an adapter from a publisher it trusts, checked before the adapter is installed or run
In a terminal, epack asks once for each new publisher and records your answer in ~/.epack/config.yaml.
Signing in to a remote with epack remote login trusts its adapter's publisher. Without a terminal,
the run stops before any download unless EPACK_TRUSTED_PUBLISHERS or --trust-publisher
names the publisher, and --yes never widens trust. A run by name runs the newest earlier revision
that needs no new publisher instead, when the remote has one. Folders without a fetch record, such as a
committed repository, are not affected.
The collectors, tools, and secrets a remote names remain your trust decision. Treat admin access on a remote you sign in to accordingly.
Secret Management
Configuration
Secrets and managed credentials are specified in epack.yaml by reference only.
Values come from environment variables or from the Locktivity-managed broker, which resolves short-lived env bundles at runtime.
credential_sets: github_repo: credset_abc123 collectors: github: source: locktivity/epack-collector-github@^0.2.0 credentials: - github_repo # Broker resolves a short-lived GITHUB_TOKEN # Or for manual setups: # secrets: # - GITHUB_TOKEN
Secret protection
- Redaction: Collector and adapter output in error messages has every passed secret value replaced, then secret-looking patterns redacted. Values shorter than six characters are not matched
- Process isolation: On Unix, collectors and adapters run in their own process group, and a timeout kills the group, so nothing a collector started outlives the run with its environment
- Secret scanning: The
buildcommand warns about potential secrets in artifacts - Minimal exposure: Only listed secrets or resolved credential bundles are passed to components
- OIDC isolation: Raw GitHub OIDC request variables are blocked from explicit pass-through to untrusted components
Stored secrets
On a laptop, epack secret set keeps a listed variable in the operating system keychain, scoped to
one configuration on one remote. A run reads the environment first and the keychain second; CI never reads the
keychain. What the keychain protects is encryption at rest and isolation from other user accounts, not
isolation from code running as the same user: on every platform a same-user process can read what epack
stored, as it can read an exported variable.
Each stored secret is approved for the components that read it, as they were when it was stored, with a digest
of each reader's entry in epack.yaml. A revision that changes a reader's entry, or adds a reader,
is shown and must be approved in epack secret approve or epack secret setup before
the value is used again. epack run and epack run --check never prompt and stop with
the command instead. Storing or approving one secret never approves another. The keychain is consulted only
after the publisher trust gate, and the lookup behind a fetch summary never prompts.
What epack records about stored secrets, names, readers, and times but never values, lives in
~/.epack/secrets.yaml, readable only by the user. Values set in the environment stay outside the
approval guarantee; the check shows them with the source env.
See Also
- Security Model: what verification establishes about a pack
- Run Collectors: configuring and running collectors
- Automate in CI/CD: running collection with
--frozen