Collects versioned evidence documents and extracted text
epack install collector documents
Adds to epack.yaml, resolves dependencies, downloads binary.
Run all configured collectors and build a pack:
epack collect
Runs all collectors in epack.yaml and outputs an evidence pack.
Or add manually to epack.yaml:
collectors:
documents:
source: https://github.com/locktivity/epack-collector-documents
Then run epack install to lock and sync.
The Documents collector adds your Locktivity evidence documents to evidence
packs, so your policies and reports travel with the rest of your evidence.
You manage documents in Locktivity: upload them, or connect a source like
GitHub or Google Drive. When a pipeline runs, this collector adds the
documents you selected for that pipeline to the pack.
Each run adds a folder per document under artifacts/documents/<id>/,
plus one index:
artifacts/documents.document-index.json): every
document with its name, source, and version, pointing to that document's
files.Each file is verified against its recorded checksum before it is packed.
artifacts/
documents.document-index.json # the index
documents.collector-result.json # what was left out and why
documents/
doc_4f2a9c/
acme-soc2-2025.pdf # the document, ready to open
text.json # extracted text with citations
metadata.json # extracted details with citations
doc_7b3e1f/
access-policy.pdf # rendered from the linked source
access-policy.md # the original source file
text.json
Field-level schemas for the index and text artifacts live in
schema/.
Each entry in the index describes one document:
| Field | What It Tells You |
|---|---|
name, source, version_number |
Which document this is, where it lives, and which version shipped. |
document_type |
What kind of document Locktivity recognized, such as a SOC 2 report or a penetration test. |
file, source_file, text, metadata |
Where each of the document's files landed in the pack, with a digest for each downloaded file. source_file is set when the shipped file is a rendering of a linked source. |
warnings |
Anything incomplete: a document with no file yet, or text not extracted yet. |
captured_at, run_key, digest (top level) |
When the document set was captured, the run it belongs to, and the integrity hash of the whole set. |
A field that does not apply is null rather than missing: file for a
document with no file yet, source_file for a document that is not a
rendering, version_number when no version was identified. Missing file
fields mean the collector left the document out (see below).
The run fails only when its configuration is invalid, Locktivity rejects its
credentials, or the snapshot cannot be taken. A document whose files cannot be
downloaded or fail verification is left out while the rest are included: its
entry stays in the index with its name and source but without its file
fields, and artifacts/documents.collector-result.json lists a gap for each
of its files and fields, with a code such as vendor_error or
invalid_response. The result also records the calls the collector made.
Which documents a pipeline carries is decided in Locktivity, on the pipeline's
Documents collector: all of your documents, or a chosen subset. The collector
follows that selection, and there's nothing to configure here.
On a Locktivity-managed pipeline, a short-lived token is issued automatically
for each run, so no long-lived secret is stored in your CI settings. In your
own CI, the collector exchanges an API application's client credentials for a
short-lived token on each run.
See Configuration for setup instructions.
When you add the Documents collector to a pipeline in Locktivity, the pipeline
generates the collector configuration. At runtime, the pipeline credential
provides a token for the collector:
credential_sets:
locktivity_documents: "<credential-set-id>"
collectors:
documents:
source: locktivity/epack-collector-documents@^0.1
credentials:
- locktivity_documents
For a pipeline you run yourself, configure the collector with an API
application's client id and client secret. The collector uses them to request an
access token for the run.
collectors:
documents:
source: locktivity/epack-collector-documents@^0.1
config:
pipeline_id: "<pipeline-id>"
secrets:
- LOCKTIVITY_CLIENT_ID
- LOCKTIVITY_CLIENT_SECRET
- LOCKTIVITY_RUN_KEY
- GITHUB_RUN_ID
- GITHUB_RUN_ATTEMPT
Only variables listed under secrets reach the collector.
Run identity groups retries of the same run so they produce the identical set
of documents; without it, every invocation includes the latest documents as a
fresh set.
export LOCKTIVITY_RUN_KEY="$YOUR_CI_RUN_ID"
In GitHub Actions, skip this step: keep GITHUB_RUN_ID and
GITHUB_RUN_ATTEMPT in the secrets list and the collector uses them.
| Option | Required | Description |
|---|---|---|
pipeline_id |
In your own CI | Which pipeline's document selection to include. On a Locktivity-managed pipeline the token already identifies the pipeline, so this is omitted; with client credentials it is required, and Locktivity fills it in when it generates the configuration. |
run_key |
No | Groups retries of the same run. On a Locktivity-managed pipeline this comes from the workflow run's verified identity automatically; in your own CI, export LOCKTIVITY_RUN_KEY per run instead. Set this option directly only for one-off runs outside any CI. |
insecure_endpoint |
No | Advanced HTTPS endpoint override for the documents API. The insecure_ name is an explicit acknowledgement that API traffic is redirected away from the default endpoint. |
insecure_auth_endpoint |
No | Advanced HTTPS endpoint override for the client-credentials token exchange. Use only a trusted endpoint; the collector sends LOCKTIVITY_CLIENT_SECRET there. |
Endpoint overrides redirect API traffic away from the default Locktivity
service. Use them only with endpoints you control or explicitly trust.
Custom endpoint URLs must not include userinfo, query strings, or fragments.
Plain HTTP endpoint overrides are always rejected.
collectors:
documents:
source: locktivity/epack-collector-documents@^0.1
config:
pipeline_id: "<pipeline-id>"
insecure_endpoint: "https://api.example.com"
insecure_auth_endpoint: "https://app.example.com"
secrets:
- LOCKTIVITY_CLIENT_ID
- LOCKTIVITY_CLIENT_SECRET
| Variable | Description |
|---|---|
LOCKTIVITY_DOCUMENTS_TOKEN |
Short-lived token issued per run on managed pipelines. You never set this yourself. |
LOCKTIVITY_CLIENT_ID |
API application client id, for your own CI. |
LOCKTIVITY_CLIENT_SECRET |
API application client secret, for your own CI. |
LOCKTIVITY_RUN_KEY |
Per-run identity exported by your CI, so retries stay identical. |
GITHUB_RUN_ID, GITHUB_RUN_ATTEMPT |
GitHub Actions run identity, used automatically when listed under secrets. |
| Exit | Code | When |
|---|---|---|
| 0 | The run collected, even if some documents were left out | |
| 1 | invalid_response |
Locktivity's answer to the token or snapshot request was not what the collector expects |
| 1 | too_large |
The snapshot from Locktivity is over the collector's 32 MB limit |
| 2 | config_invalid |
No credentials, no pipeline_id with client credentials, an endpoint override that is not HTTPS, an epack too old for file artifacts, a pipeline without the Documents collector, or an account without the Documents feature or the pipeline |
| 3 | auth_failed |
Locktivity rejected the token or the client credentials |
| 3 | permission_denied |
The credential lacks the Collect documents permission |
| 4 | rate_limited, vendor_error, timeout |
Locktivity or its token endpoint could not be reached or kept failing |
Your epack is older than v0.2.0. Upgrade it.
Locktivity rejected the token or the client credentials (auth_failed), or
the credential lacks the snapshot permission (permission_denied). Both exit
with code 3. On a managed pipeline, check the pipeline's Documents credential
in Locktivity. In your own CI, check LOCKTIVITY_CLIENT_ID and
LOCKTIVITY_CLIENT_SECRET and the application's Collect documents
permission. Missing credentials are a configuration error instead, with exit
code 2.
The pipeline in Locktivity doesn't have the Documents collector enabled. Add
it in the pipeline's collectors step.
A downloaded document didn't match what Locktivity recorded. The collector
leaves that document out of the pack, records an invalid_response gap for it
in artifacts/documents.collector-result.json, and includes the rest. Re-run,
and contact support if it persists rather than bypassing the check.
A document that has no file uploaded yet doesn't fail the run: it's listed in
artifacts/documents.document-index.json with file set to null and a
warning, and named in the run summary. Upload a file for it in Locktivity and
the next run includes it.
A document whose files could not be downloaded is listed without its file
fields, and artifacts/documents.collector-result.json has a gap for each
with the reason, such as vendor_error when the download kept failing. A
file over 100 MB is left out with a too_large gap, since a pack holds at
most 100 MB per file.
When you add the Documents collector to a pipeline, Locktivity generates the
workflow and epack.yaml. The generated collector section looks like:
stream: myorg/production
credential_sets:
locktivity_documents: "credset_9f8e7d"
collectors:
documents:
source: locktivity/epack-collector-documents@^0.1
credentials:
- locktivity_documents
That's all that's needed: the pipeline run includes the documents you selected
for it, authenticated with a short-lived token issued for the run.
Outside GitHub Actions, the collector authenticates with an API application's
client credentials and names its pipeline explicitly. Locktivity generates
this configuration for CLI pipelines:
stream: myorg/production
collectors:
documents:
source: locktivity/epack-collector-documents@^0.1
config:
pipeline_id: "pl_9f8e7d"
secrets:
- LOCKTIVITY_CLIENT_ID
- LOCKTIVITY_CLIENT_SECRET
- LOCKTIVITY_RUN_KEY
- GITHUB_RUN_ID
- GITHUB_RUN_ATTEMPT
Then run:
export LOCKTIVITY_CLIENT_ID="..."
export LOCKTIVITY_CLIENT_SECRET="..."
export LOCKTIVITY_RUN_KEY="$YOUR_CI_RUN_ID"
epack collect
The application needs the Collect documents permission. See
Configuration for setup instructions and what each
variable does.
The index at artifacts/documents.document-index.json:
{
"snapshot_id": "snap_1a2b3c",
"pipeline_id": "pl_9f8e7d",
"run_key": "gha-1234-1",
"captured_at": "2026-07-08T12:00:00Z",
"digest": "sha256:...",
"documents": [
{
"document_id": "doc_4f2a9c",
"name": "Acme SOC 2 Type II 2025",
"source": "upload",
"version_number": 3,
"document_type": "evidencepack/soc2-report@v1",
"file": {
"path": "artifacts/documents/doc_4f2a9c/acme-soc2-2025.pdf",
"digest": "sha256:...",
"content_type": "application/pdf",
"byte_size": 1048576
},
"source_file": null,
"text": {
"path": "artifacts/documents/doc_4f2a9c/text.json",
"digest": "sha256:..."
},
"metadata": {
"path": "artifacts/documents/doc_4f2a9c/metadata.json"
},
"warnings": []
}
]
}
# List the documents in a pack
unzip -l evidence-*.epack | grep documents
# See each document's name, type, and where its files landed
unzip -p evidence-*.epack artifacts/documents.document-index.json | jq '.documents[] | {name, document_type, file: .file.path, text: .text.path}'
# Read a document's extracted details (auditor, dates, and where each was found)
unzip -p evidence-*.epack artifacts/documents/<id>/metadata.json | jq
Full Changelog: https://github.com/locktivity/epack-collector-documents/compare/v0.2.0...v0.2.1
Full Changelog: https://github.com/locktivity/epack-collector-documents/compare/v0.1.1...v0.2.0
157 fields. No test account checks this collector yet.
Every field this collector can write, each tagged with the lowest level that collects it. Each level includes everything in the level before it.
No fields match these filters.
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it.
Timestamp when Locktivity captured the snapshot.
Server-provided digest of the captured snapshot manifest.
Pipeline whose document selection was captured.
Stable run identity used to make retries repeatable.
Locktivity snapshot identifier for this captured document set.
Stable document identifier from Locktivity.
Typed metadata schema Locktivity recognized for this document.
Human-readable document name.
Where the document came from, such as an upload or connected source.
Locktivity document version number.
Document-specific warnings, such as a selected document with no file yet.
Server-provided byte size for the staged document file.
Server-provided content type for the staged document file.
SHA-256 digest of the staged artifact bytes.
Pack-local path to the staged document file, in the run's folder. That is artifacts/documents/ unless the run is configured under another name.
Pack-local path to the typed metadata artifact, in the run's folder. That is artifacts/documents/ unless the run is configured under another name.
Server-provided byte size for the staged document file.
Server-provided content type for the staged document file.
SHA-256 digest of the staged artifact bytes.
Pack-local path to the staged document file, in the run's folder. That is artifacts/documents/ unless the run is configured under another name.
SHA-256 digest of the staged artifact bytes.
Pack-local path to the extracted text artifact, in the run's folder. That is artifacts/documents/ unless the run is configured under another name.
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it. Its schema isn't published yet, so only the checked fields are listed.
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it. Its schema isn't published yet, so only the checked fields are listed.
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it. Its schema isn't published yet, so only the checked fields are listed.
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it. Its schema isn't published yet, so only the checked fields are listed.
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it. Its schema isn't published yet, so only the checked fields are listed.
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it. Its schema isn't published yet, so only the checked fields are listed.
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it. Its schema isn't published yet, so only the checked fields are listed.
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it. Its schema isn't published yet, so only the checked fields are listed.
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it. Its schema isn't published yet, so only the checked fields are listed.
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it. Its schema isn't published yet, so only the checked fields are listed.
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it. Its schema isn't published yet, so only the checked fields are listed.
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it. Its schema isn't published yet, so only the checked fields are listed.
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it.
Document identifier when included by the text extraction service.
Stable chunk index within the extracted text artifact.
One-based page number when the source document has pages.
One-based row number when the source document is a spreadsheet.
Sheet name when the source document is a spreadsheet.
Extracted text for this chunk.
The status of each run, and any value it couldn't read and why.
Number of findings left out after the first 100.
The artifact's path in the pack.
JSON pointer to the value.
The artifact's schema.
The artifact's path in the pack.
JSON pointer to the value.
The artifact's schema.
Number of requests sent, including retries. Present at the audit and internal levels only.
Number of times the collector made the call, not counting retries. Present at the audit and internal levels only.
The Deprecation header from the vendor's most recent response that carried one.
The codes of the operation's failed attempts, without their counts.
Number of failed attempts per code. Present at the audit and internal levels only.
The operation's name, such as okta.users.list.
The permission the call needs, in the vendor's terms. The collector declares it with Operation.Permission. A permission_denied gap from the call records it as its missing_permission.
True when a request for the operation was a retry.
Number of requests that were retries. Present at the audit and internal levels only.
The HTTP status codes, or DNS response codes for a lookup, that the operation's responses had, without their counts.
Number of responses per HTTP status code, or per DNS response code for a lookup. Present at the audit and internal levels only.
The Sunset header from the vendor's most recent response that carried one.
Number of the rows left out whose attempt failed or was a retry. Present wherever the rows are; 0 means every failed or retried request has a row.
Which attempt the request was: 1 for the first, higher for a retry.
The call's number in the run, counting from 1 in the order calls start. Every attempt of one call has the same number.
How long the request took, in milliseconds.
The code for a request that failed. Absent when it succeeded.
The request's host, the name a DNS lookup queried, or the host dialed.
The HTTP method, DNS and the record type looked up, such as DNS TXT, or DIAL.
The operation the request belongs to.
Names of the request's query parameters. Their values are not recorded.
DNS lookups only: the response code. A lookup that got no response has none.
The vendor's request ID from the response headers, when it sent one.
HTTP requests only.
When the attempt was sent, in milliseconds after the run's started_at.
The response's HTTP status code. Absent when no response arrived.
The step the call was made in. Absent for a call made outside every step.
The vendor's own error code from a failed response, such as E0000047. Never the vendor's message. Absent for collectors that do not read one.
On a retry, how long the SDK waited before sending it: the Retry-After value, the rate limit reset, or its own backoff. Absent on a first attempt and on a retry sent at once.
Number of request rows left out.
schema, schema_unusable, population, nulls, rollups, ratios, guidance, levels, or targets.
What the check found.
The artifact the finding is about. A schema_unusable finding has none.
JSON pointer to the value the finding is about.
What happens if the customer picks the option, including its cost and what stays Not collected.
What happens if the customer picks the option, including its cost and what stays Not collected.
Each kind the collector could write that the key left out. Each has a not_shared gap.
The kinds of evidence the collect config key listed, such as cloud-posture.
Each kind the key listed that the run never wrote, such as a misspelled one.
The source commit the collector was built from. Absent when the build set none.
The collector's name, as its spec declares it.
The collector's version, such as v0.3.0. Absent when the build set none.
The artifact's path in the pack.
JSON pointer to the value.
The artifact's schema.
The artifact's path in the pack.
JSON pointer to the value.
The artifact's schema.
The artifact's path in the pack.
JSON pointer to the value.
The artifact's schema.
The artifact's path in the pack.
JSON pointer to the value.
The artifact's schema.
The number of that call, matching the call on its request rows. A partial gap names the first failed call among those it counts. Present at the audit and internal levels only.
Why the value was left out: auth_failed, permission_denied, config_invalid, not_licensed, unsupported, not_read, rate_limited, vendor_error, timeout, invalid_response, too_large, internal, or not_shared. unsupported means the vendor does not report the value. too_large means the vendor holds more than the collector reads. not_shared means the customer left it out of this pack with the collect config key.
Present at the audit and internal levels only.
The one instruction that fixes collection. It uses fixed wording plus permission, plan, and region names. A gap has at most one of fix, no_action, and choice.
For a permission_denied gap, the permission to grant, in the vendor's own terms, such as okta.logs.read.
True when nothing needs changing now. It does not clear the gap.
The operation whose failed call left the value out. Absent when no call's error caused the gap, such as for a feature the plan lacks.
Who can act on the code: customer, nobody for an expected gap such as a feature the plan lacks, vendor, vendor_or_runner, or publisher.
The artifact the value belongs in. Absent when the run wrote no such artifact, in which case schema names it.
JSON pointer to the value within the artifact. Items are addressed by array index.
The schema of the artifact the value belongs in, when the run wrote no such artifact.
The account, tenant, or region affected. Present at the audit and internal levels only.
The file and line in the collector's own source that recorded the gap, relative to its module root, such as internal/collector/system_log.go:155.
not_collected when the collector could not read the value. partial when a rollup was left out because some of the items it covers could not be read, or when a list or object holds only the items that could be.
For a partial gap, the number of items that could not be read. Present at the audit and internal levels only.
The vendor's own error code, when its response included one.
The collector's message to the operator about the gap, redacted. Present at the audit and internal levels only.
The artifact's path in the pack.
JSON pointer to the value.
The artifact's schema.
Its calls in the step. Present at the audit and internal levels only.
The operation.
For a partial run, the code of the first gap other than a not_shared, unsupported, or not_read one, saying why its value was left out.
For a partial run, who can act on that code.
collected when the run read every value its level collects, or partial when it left values out. gaps lists each one. A not_shared or unsupported gap does not make a run partial.
True when SSL_CERT_FILE or SSL_CERT_DIR was set for the run.
When the run finished, in RFC 3339 UTC.
The level the run collected at, at every level. A reader uses it to tell a value the level left out from one the collector could not read. Absent from results of older SDKs.
True when a proxy variable such as HTTPS_PROXY was set for the run.
The run ID the runner passed in EPACK_RUN_ID. Absent when it passed none.
When the run started, in RFC 3339 UTC.
How the collector proved its identity, such as private_key_jwt for OAuth 2.0 client credentials with a signed key assertion or api_token for an API token.
Present at the audit and internal levels only.
The kind of principal, such as service_app, service_principal, or user.
The identity system, such as okta or microsoft-entra.
Present when the collector can show that its credential could only read.
The scopes the collector asked for. A scope here and missing from scopes was not granted.
The permissions the sign-in carried.
The tenant, account, or organization signed in to. Present at the audit and internal levels only.
True when an attempt in the step failed: one with an error code or a status of 400 or more.
The calls those requests belong to. Present at the audit and internal levels only.
When the step ended, in milliseconds after the run's started_at. A step still open when the collector emitted ended then. Present at the audit and internal levels only.
The attempts that failed: those with an error code or a status of 400 or more. Present at the audit and internal levels only.
The step's name, such as people. Step names are part of the collector's contract, like operation names.
The requests sent in the step, including rows left out of calls.requests. Present at the audit and internal levels only.
The requests that were retries. Present at the audit and internal levels only.
When the step started, in milliseconds after the run's started_at. Present at the audit and internal levels only.
The step's title, such as People and sign-in methods.
config_list when a person listed the targets in the config, discovery when the collector found every one its credential can see, discovery_filtered when the config narrowed what it found, granted when the credential was given only some, so others may exist, granted_filtered when the config also narrowed those, and collector when the collector picked them itself, such as a default region.
True when every target was reached and has no gap that makes the run partial, at every level. Absent when at is.
The config key that listed or narrowed the targets.
How many targets the artifact holds. Present at the audit and internal levels only.
What the targets are. A container the run signed in to or was configured for, or a resource it assessed in it.
A pointer inside each target to the name people know it by, to show beside its name, or alone when the run's level leaves the name out.
Pointers inside each target whose values, joined with a colon, name it. Absent when a target is itself its name.
A pointer inside each target to a boolean that is false when the target did not answer.
How many distinct values the run read that the vocabulary lacks.
The first 50 of those values, sorted. Present at the audit and internal levels only.
The vocabulary's name, such as okta.event_types.
The one instruction that fixes collection. A warning has at most one of fix, no_action, and choice.
The collector's message about what happened. Present at the audit and internal levels only.
The permission to grant, in the vendor's own terms.
True when nothing needs changing now.
The account, tenant, or region affected. Present at the audit and internal levels only.