Collects endpoint compliance posture from Bitdefender GravityZone
epack install collector bitdefender
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:
bitdefender:
source: https://github.com/locktivity/epack-collector-bitdefender
Then run epack install to lock and sync.
Gathers endpoint compliance posture from Bitdefender GravityZone Control Center.
evidencepack/endpoint-posture@v1
format (see Endpoint posture below)See docs/levels.md for exactly what's included at each collection level, and
how this collector defines "compliant" (GravityZone's Network API has no single native
compliance-percentage field).
GravityZone offers the following through its Public API, and the collector does not read them.
vuln-scanning file.access-posture file.getApiKeyDetails. A rejected key fails the run with auth_failed (exit code 3).getEndpointsList (Network API, version 1.1) for every endpoint under the
company or parent_group_id, subgroups included, with each agent's update state, to
build the endpoint inventory and compute the compliance percentagegetNetworkInventoryItems. The collector finds the Active Directory folder with it
(Network API, version 1.1) and lists the endpoints below it. With parent_group_id set, it lists the
endpoints below that group instead. An endpoint both lists hold counts once.getManagedEndpointDetails (Network API) once per computer
with the agent, for its protection modules, license, and signature stateinternal, it also calls getQuarantineItemsList once for the whole company
(Quarantine API), grouping results by computer client-sideartifacts/bitdefender.details.json and artifacts/bitdefender.endpoint-posture.json,
with a collector result artifact (artifacts/bitdefender.collector-result.json) that
records each value left out and whyartifacts/bitdefender.endpoint-posture.json follows the evidencepack/endpoint-posture@v1
schema, with provider: bitdefender. collect lists it as endpoint-posture. GravityZone
is antivirus and EDR software, so the file holds only what GravityZone reports.
fleet.device_count counts the computers (machineType 1). scope.observed_device_count
counts every endpoint of every machine type, so the two can differ.
fleet.managed_device_count counts the computers with the agent (isManaged).protection.antimalware_installed_pct is the share of computers with the antimalware
module on.protection.antimalware_healthy_pct is the share with the antimalware module on, an
active license, and current signatures. An out-of-date agent does not count against it.
The detailed file's compliance percentage covers that.protection.edr_installed_pct is the share with the EDR sensor module on.getManagedEndpointDetails lists the modules installed on a computer, so a module its
modules object leaves out counts as not installed. A computer whose modules has no
antimalware counts as not installed and not healthy, and one with no edrSensor counts
as not installed.These values have an unsupported gap in the collector result, which does not make a run
partial:
| Value | Why it is left out |
|---|---|
fleet.mdm_enrolled_pct and mdm_enrolled_device_count |
GravityZone does not enroll computers in MDM |
hardening.firewall_enabled_pct |
GravityZone reports only its own firewall module, so a computer that uses the operating system's firewall would read as off |
hardening.screen_lock_compliant_pct |
GravityZone's API does not report a screen lock setting |
patching |
GravityZone does not report whether an operating system still gets security updates |
protection.edr_healthy_pct |
GravityZone does not report whether the EDR sensor is running and reporting |
compliance.compliant_pct |
GravityZone's API has no compliance verdict for a computer. The collector's compliance rule is in the detailed file |
hardening.disk_encryption_pct has a not_read gap, which does not make a run partial
either. GravityZone's Endpoint Encryption Status report gives each volume's encryption
status. The report comes from the Reports API, which this collector does not call.
getManagedEndpointDetails reports only whether the encryption module is on. The
availability reason for disk encryption is not_read as well.
A computer whose getManagedEndpointDetails call failed has no reading. The protection
percentages are then left out with the call's code. When the answer has no agent license
or signature state, or sends a module as null, the computer's reading for each percentage
that needs it is unknown. Those percentages are left out with a partial gap that counts
the computers, and metric_coverage counts them as unknown.
When an endpoint list or the Active Directory folder could not be read in full, the fleet
and protection values are left out. A page of getEndpointsList or
getNetworkInventoryItems without hasMoreRecords does not say whether more pages
follow, so it fails the read with invalid_response. scope.discovery_complete is false
for a list longer than the collector reads, and null with the call's gap when a call
failed.
At the audit level, the file adds the counts behind each percentage in metric_coverage
and one row per computer in devices, up to 20,000 rows. A row has the computer's name,
OS, management state, last sync with Control Center, protection readings, and modules.
GravityZone gives the last sync without a time zone, and the collector reads it as UTC.
See Configuration for setup instructions.
The collector uses a GravityZone API key over HTTP Basic auth (API key as username, empty
password), per GravityZone's Public API
convention.
collectors:
bitdefender:
source: locktivity/epack-collector-bitdefender@^0.1
config:
base_url: https://cloud.gravityzone.bitdefender.com/api
level: audit
secrets:
- BITDEFENDER_API_KEY
BITDEFENDER_API_KEY| Deployment | base_url |
|---|---|
| Global/US cloud | https://cloud.gravityzone.bitdefender.com/api |
| EU cloud | https://cloudgz.gravityzone.bitdefender.com/api |
| On-premises | Your Control Center's own API URL |
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
base_url |
string | Yes | - | GravityZone Control Center API base URL, starting with https:// |
parent_group_id |
string | No | company root | Scope collection to one network group (and descendants) instead of the whole company |
level |
string | No | trust |
Collection level: trust, audit, or internal |
collect |
list | No | every kind | Kinds of evidence to collect: details for artifacts/bitdefender.details.json, endpoint-posture for artifacts/bitdefender.endpoint-posture.json |
| Name | Required | Description |
|---|---|---|
BITDEFENDER_API_KEY |
Yes | GravityZone API key, used as the HTTP Basic auth username |
Each API key is scoped to specific APIs at creation time. Grant only what the configured
level needs. A missing API leaves just that surface out, with a permission_denied gap in
artifacts/bitdefender.collector-result.json and an entry under
diagnostics.permission_errors, so you can grant incrementally.
| Surface | Gating API | Calls | Needed for |
|---|---|---|---|
| Compliance %, endpoint inventory | Network | getEndpointsList, getNetworkInventoryItems |
trust / audit / internal |
Endpoint posture (endpoint-posture) |
Network | getManagedEndpointDetails |
trust / audit / internal |
| Per-endpoint policy + enabled modules | Network | getManagedEndpointDetails |
internal |
| Quarantine inventory | Quarantine | getQuarantineItemsList |
internal |
trust and audit only ever need the Network API. The collector reads the computers in
the Active Directory folder with getNetworkInventoryItems. In the collector result, a
gap's missing_permission is network or quarantine. These are the API names
getApiKeyDetails lists in the key's enabledApis.
"base_url is required"
Set base_url in your config — see Region / on-premises base URLs
above.
"base_url must be an https URL"
The API key travels in every request, so base_url must start with https:// and name a
host.
"authentication required"
Provide BITDEFENDER_API_KEY as a secret.
Exit code 3 with auth_failed
GravityZone rejected the API key: HTTP 401, or an authorization error from
getApiKeyDetails, the first call, which needs no API enabled on the key. Check that the
key is current and copied whole.
"parent_group_id ... is not a group GravityZone can find" (exit code 2)
GravityZone answered that the group does not exist or the key's user cannot see it. Copy
the group ID from Control Center again, or remove parent_group_id to collect the whole
company.
GravityZone JSON-RPC error -32001 ("Authorization error")
The API key isn't scoped to the API the call needed. Add that API to the key under
My Account > API keys in Control Center (see
Required GravityZone APIs above). The collector leaves the
values that call feeds out, with a permission_denied gap and a permission_errors
diagnostic entry, rather than failing the whole run.
scope.discovery_complete is false or null in artifacts/bitdefender.endpoint-posture.json
The collector could not read getEndpointsList or the Active Directory folder in full. It
is false when a list holds more than the 50,000 endpoints the collector reads. It is null
when a call failed, and the collector result has that call's code. The fleet counts and
protection percentages are left out, and so are the detailed file's computer count and
compliance values.
GravityZone JSON-RPC error -32003 / HTTP 429 ("Too many requests")
GravityZone rate-limits API keys to a fixed number of requests per second. The collector
retries each call up to five times, whether the error comes with HTTP 429 or HTTP 200,
waiting as long as GravityZone's Retry-After header asks, up to 60 seconds. If
GravityZone is still throttling, the values that call feeds are left out with a
rate_limited gap. The collector calls getManagedEndpointDetails once per computer with
the agent at every level, so a very large fleet can hit it. If you hit it consistently, consider
narrowing parent_group_id, or set collect: [details] at trust or audit to skip
those calls.
GravityZone JSON-RPC error -32000 ("Server error")
GravityZone failed while answering. The collector retries the call up to five times, as it
does an HTTP 5xx response. If the error persists, the values that call feeds are left out
with a vendor_error gap.
Full Changelog: https://github.com/locktivity/epack-collector-bitdefender/compare/v0.2.1...v0.2.2
Full Changelog: https://github.com/locktivity/epack-collector-bitdefender/compare/v0.2.0...v0.2.1
Full Changelog: https://github.com/locktivity/epack-collector-bitdefender/compare/v0.1.0...v0.2.0
Full Changelog: https://github.com/locktivity/epack-collector-bitdefender/compare/v0.1.0...v0.2.0
224 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.
The values Foundational Controls and other profiles read.
When the collector read the provider, as an ISO 8601 timestamp.
The provider's organization identifier
The device management or endpoint security product the readings come from.
Version of this schema, always 1.0.0.
The primary user's sign-in name.
The provider's identifier for the device's primary user.
A sentence that explains the reason, such as which vendor API reports the metric.
The metric this entry explains, named as in metric_coverage, such as hardening.screen_lock_compliant_pct.
unsupported when the vendor never reports the metric, and not_read when the vendor reports it but the collector does not read it
The baseline the collector checks devices against when the basis is baseline_evaluation.
The version of that compliance baseline.
Where the compliance verdict comes from: provider_reported when the provider decides it, or baseline_evaluation when the collector checks each device against the named baseline.
Percentage of devices where the provider's or a baseline's compliance verdict passes, out of the devices whose reading passed or failed. Devices that are unknown or not applicable are left out. At the audit level, metric_coverage["compliance.compliant_pct"] counts the devices by outcome
When the reading behind this result was taken.
The device's result for this control: pass, fail, unknown when there is no usable reading, or not_applicable when the control does not apply to the device.
When the provider first recorded the device.
The provider's identifier for the device.
The device's hostname, as the provider reports it.
When the device last reported to the provider.
Whether the provider manages the device: managed, unmanaged, retired, or unknown when the provider does not say.
The device's operating system family.
The operating system's name, as the provider reports it.
The operating system's version, as the provider reports it.
The control the finding is about.
The provider's identifier for this finding.
When the issue was first recorded.
When the issue was last seen.
The provider's code for why the control failed on this device.
When the issue was resolved. Absent while it is open.
Whether the issue is still open or has been resolved, or unknown when the provider does not say.
Devices in scope, as scope describes them. The fleet percentages count these, and each device row's in_scope says whether it is one of them.
Devices in scope by operating system family
Whether the fleet has any devices in scope. When false, the percentages have no devices to count
Devices in scope that the provider manages
Devices in scope with affirmative evidence of MDM enrollment
Percentage of devices in scope with affirmative evidence of MDM enrollment. Null when there are no devices
Percentage of devices where every volume is encrypted at rest, out of the devices whose reading passed or failed. Devices that are unknown or not applicable are left out. At the audit level, metric_coverage["hardening.disk_encryption_pct"] counts the devices by outcome
Percentage of devices where the host firewall is on, out of the devices whose reading passed or failed. Devices that are unknown or not applicable are left out. At the audit level, metric_coverage["hardening.firewall_enabled_pct"] counts the devices by outcome
Percentage of devices where the screen lock setting meets policy, out of the devices whose reading passed or failed. Devices that are unknown or not applicable are left out. At the audit level, metric_coverage["hardening.screen_lock_compliant_pct"] counts the devices by outcome
The provider's identifier for the local account.
The local account's username on the device.
The named OS baseline that os_baseline_compliant_pct checks devices against.
The version of that OS baseline.
Percentage of devices where the operating system meets the named baseline, out of the devices whose reading passed or failed. Devices that are unknown or not applicable are left out. At the audit level, metric_coverage["patching.os_baseline_compliant_pct"] counts the devices by outcome
Percentage of devices where the operating system version still gets security updates, out of the devices whose reading passed or failed. Devices that are unknown or not applicable are left out. At the audit level, metric_coverage["patching.os_supported_pct"] counts the devices by outcome
Devices whose operating system version no longer gets security updates
Percentage of devices where anti-malware is installed, running, and current, out of the devices whose reading passed or failed. Devices that are unknown or not applicable are left out. At the audit level, metric_coverage["protection.antimalware_healthy_pct"] counts the devices by outcome
Percentage of devices where anti-malware is installed, out of the devices whose reading passed or failed. Devices that are unknown or not applicable are left out. At the audit level, metric_coverage["protection.antimalware_installed_pct"] counts the devices by outcome
Percentage of devices where an EDR agent is installed, running, and reporting, out of the devices whose reading passed or failed. Devices that are unknown or not applicable are left out. At the audit level, metric_coverage["protection.edr_healthy_pct"] counts the devices by outcome
Percentage of devices where an EDR agent is installed, out of the devices whose reading passed or failed. Devices that are unknown or not applicable are left out. At the audit level, metric_coverage["protection.edr_installed_pct"] counts the devices by outcome
The kind of protection the module provides.
When the module's state was last reported.
A fixed name for the scope, such as managed_devices
Whether every device the provider lists was read. When false or null, fleet totals and percentages are left out. Null when the collector could not tell
How recently a device must have reported to count
Devices observed within max_observation_age_seconds
Everything this collector reads, grouped by area. Each field lists the lowest level that collects it.
Collection level this artifact was produced at. Levels are cumulative: audit is a superset of trust, internal of audit.
Percentage of computers in scope that are compliant, rounded to two decimal places
Computers in scope that are compliant
Computers in scope that are not compliant
Whether the computer is compliant; null when GravityZone left out a field the answer needs
Date of the last successful scan
Name of the last successful scan
True when the computer has the GravityZone agent (isManaged)
Endpoint name
Operating system version
True when the assigned policy has reached the computer (policy.applied). Absent when GravityZone reports no policy, as for a computer without the agent.
True when the agent is missing one or more updates (productOutdated). Absent when GravityZone does not report it, as for a computer without the agent.
True when rows past the 20,000 cap were dropped
Rows dropped by the cap
True when the assigned policy has reached the computer
Protection modules GravityZone reports as enabled on the computer, empty for a computer without the agent
GravityZone's raw action status code
Name of the computer the item was quarantined on
When the item was quarantined (quarantinedOn)
Base name of the quarantined file
SHA-256 of the quarantined file's full path, which is never emitted
Quarantined items across the whole company and every machine type, including items on endpoints outside the run's scope
True when rows past the 20,000 cap were dropped
Rows dropped by the cap
Endpoints GravityZone reports with machineType 1 (a physical or virtual computer), with or without the GravityZone agent, under parent_group_id or the whole company. It includes the computers in the Active Directory folder, each endpoint ID once
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.