Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/docs/privacy.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ For the `opa version` command, this feature can be enabled by specifying the
OPA checks the latest release version by querying the GitHub
API at `https://api.github.com`. The environment variable
`OPA_VERSION_CHECK_SERVICE_URL` can be used to configure an alternative service
URL.
URL. It can be set to `false` to disable version checking entirely.

Sample HTTP request from OPA to the GitHub API:

Expand Down
3 changes: 3 additions & 0 deletions internal/versioncheck/versioncheck.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ func New(opts Options) (Checker, error) {
if url == "" {
url = ExternalServiceURL
}
if url == "false" {
return nil, errors.New("version check is disabled with OPA_VERSION_CHECK_SERVICE_URL=false")
}

// Set a generic User-Agent to avoid sending version/platform information about the user's OPA instance.
// This ensures we only retrieve version information without transmitting any identifying data.
Expand Down
Loading