Skip to main content

Environment variables

The server reads every setting from the environment, or from a .env file in its working directory. Variables that are already set in the environment take precedence over the file. The agents read the same way, with the VOP_ variables below.

Server: addresses and TLS​

VariableDefaultDescription
HTTP_ADDR:8080Listen address.
TLS_CERT_FILE, TLS_KEY_FILEServe HTTPS when both are set.
PUBLIC_URLAddress of the UI, for example https://vop.example.com. Required with OIDC or SAML.

Server: Redis​

VariableDefaultDescription
REDIS_ADDRlocalhost:6379Redis address.
REDIS_PASSWORDRedis password.
REDIS_DB0Redis database number.

Server: storage​

VariableDefaultDescription
STORAGE_BACKENDs3s3 or local.
STORAGE_DIR./data/storageDirectory for the local backend.

Server: S3​

Used when STORAGE_BACKEND is s3.

VariableDefaultDescription
S3_ENDPOINTlocalhost:9000S3 endpoint, without a scheme.
S3_ACCESS_KEY, S3_SECRET_KEYRequired.
S3_BUCKETvulnerability-operatorCreated at start when missing.
S3_REGIONus-east-1Region.
S3_USE_SSLfalseUse HTTPS to the endpoint.
S3_PATH_STYLEtruePath-style addressing, as MinIO needs.

Server: database​

VariableDefaultDescription
DB_DRIVERsqlitesqlite, mysql, postgres or mssql.
DB_NAMEDatabase name; for SQLite the file path.
DB_HOST, DB_PORTDatabase host and port.
DB_USER, DB_PASSWORDDatabase credentials.
DB_SSLMODETLS mode of the driver, for example require for PostgreSQL.
DB_TIMEZONEUTCTime zone of the connection.
DB_MAX_OPEN_CONNS50Open connections of the pool.
DB_MAX_IDLE_CONNS10Idle connections of the pool.
DB_CONN_MAX_LIFETIME_MINUTES5Lifetime of a connection.
EXECUTE_MIGRATIONStrueRun the migrations on start.

Server: roles and workers​

VariableDefaultDescription
VOP_ROLEallall: API and workers in one process. api: HTTP only, queues the work. worker: jobs and scheduler only, no HTTP.
WORKER_CONCURRENCY2Jobs one process runs at once.
SCAN_WORKERS4Assets matched in parallel.

Server: vulnerability data​

VariableDefaultDescription
GRYPE_DB_DIR./data/grypeLocal Grype database directory.
GRYPE_DB_UPDATEtruefalse only reads the local database.
RELEASE_MANIFEST_URLthe project's release bucketAddress of releases.json for managed agent updates. Empty turns them off.

Server: sign-in​

VariableDefaultDescription
INITIAL_ADMIN_EMAILadmin@localhostFirst administrator, created when the database has no users.
INITIAL_ADMIN_PASSWORDgeneratedIts password. A generated one is written to the log.
AUTH_PASSWORD_LOGINtruefalse: sign-in only through a provider. Needs OIDC or SAML.
SESSION_TTL12hLifetime of a web session.

Server: OpenID Connect​

VariableDefaultDescription
OIDC_ISSUER_URLThe provider. Setting it enables OIDC.
OIDC_CLIENT_ID, OIDC_CLIENT_SECRETThe client registration.
OIDC_NAMESSOLabel of the sign-in button.
OIDC_SCOPESopenid,email,profileScopes requested.
OIDC_GROUPS_CLAIMgroupsClaim with the group list.
OIDC_GROUP_MAPPINGSJSON list that maps groups to roles and scope. See Users, roles and scopes.
OIDC_ADMIN_GROUPSComma-separated groups whose members become administrators. Kept for compatibility.
OIDC_ALLOW_UNVERIFIED_EMAILfalseAccept sign-ins whose e-mail address is not verified.

Server: SAML​

VariableDefaultDescription
SAML_METADATA_URL or SAML_METADATA_FILEIdentity provider metadata. Either enables SAML.
SAML_NAMESAMLLabel of the sign-in button.
SAML_ENTITY_ID<PUBLIC_URL>/api/v1/auth/saml/metadataService provider entity ID.
SAML_EMAIL_ATTRIBUTEemailAttribute with the e-mail address.
SAML_NAME_ATTRIBUTEdisplayNameAttribute with the name.
SAML_GROUPS_ATTRIBUTEgroupsAttribute with the groups.
SAML_GROUP_MAPPINGSThe same mapping as OIDC_GROUP_MAPPINGS.
SAML_ADMIN_GROUPSComma-separated groups whose members become administrators. Kept for compatibility.
SAML_SP_CERT_FILE, SAML_SP_KEY_FILEPEM certificate and key that sign the sign-in requests.

Server: limits and retention​

VariableDefaultDescription
AGENT_OFFLINE_AFTER5mSilence after which an agent is offline.
ALERT_DIGEST_INTERVAL0Bundle finding and software alerts into one message per channel per interval, for example 4h. 0 sends each alert at once.
MAX_SBOM_MB128Largest SBOM upload.
REPORT_MAX_ROWS10000Row limit of PDF reports and exports.
RETENTION_DAYS90Age after which scan history and alert logs are deleted.
LOG_LEVELINFOERROR, WARN, INFO or DEBUG.

Agents​

VariableDescription
VOP_SERVER_URLServer address, as the serverUrl of the configuration file.
VOP_AGENT_KEYAgent key, as the agentKey of the configuration file.
VOP_HEARTBEAT_INTERVALHeartbeat interval, 60s by default.
VOP_INVENTORY_INTERVALInventory interval, 6h by default.
VOP_SCAN_PATHSComma-separated extra directories to catalog.
VOP_FIM_PATHSComma-separated files and directories of the file integrity scan. Empty turns it off.
VOP_FIM_INTERVALFile integrity scan interval, 1h by default.
VOP_PACKAGE_HOOKSfalse turns the Linux package-manager hooks off.
VOP_MANAGED_UPDATESfalse turns the agent's self-update off.

See Agent configuration for the configuration file and its keys.