The official Go client for Elasticsearch
This report summarizes scanner evidence for elastic/go-elasticsearch, a Go project with 6,066 GitHub stars. SynthScan examined 987,113 lines of code across 6260 source files, recording 7647 pattern matches distributed across 7 syntactic categories. The legacy adjusted pattern signal is 7.8 (Moderate pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Can maintainers explain intent, assumptions, and trade-offs? 7618 finding(s).
Are imports declared and package/API names verified? 29 finding(s).
Are wrappers, guards, and repeated structures necessary? 0 finding(s).
Which changes need focused human review? 7647 finding(s).
Run additional scans to build a history of the legacy pattern signal. Score changes are not a measure of AI adoption or code quality.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 7647 distinct pattern matches across 7 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | elasticsearch.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | elasticsearch.go | 141 | // Interceptors is an array of functions that can mutate the *http.Request / *http.Response on each call to the http.Ro | COMMENT |
| LOW | elasticsearch.go | 221 | // | COMMENT |
| LOW | options.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | .pre-commit-config.yaml | 1 | # Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | elasticsearch_internal_test.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | doc.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | options_test.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | elasticsearch_example_test.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | elasticsearch_benchmark_test.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | AGENTS.md | 41 | // the Apache License, Version 2.0 (the "License"); you may | COMMENT |
| LOW | CLAUDE.md | 41 | // the Apache License, Version 2.0 (the "License"); you may | COMMENT |
| LOW | internal/cmd/binsize/typed/main.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | internal/cmd/binsize/client/main.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | internal/cmd/binsize/client/main.go | 21 | // (a method on *Client transitively pulling in the typedapi tree) shows | COMMENT |
| LOW | internal/cmd/binsize/base/main.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | internal/testing/containertest/testcontainers.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | internal/testing/e2e/bulk_indexer_integration_test.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | internal/testing/e2e/esapi_integration_test.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | internal/testing/e2e/base64_bulk_integration_test.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | internal/testing/e2e/elasticsearch_integration_test.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | internal/testing/e2e/json_reader_integration_test.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | internal/version/version.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.shutdown.put_node.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.xpack.security.saml_invalidate.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.xpack.ccr.get_auto_follow_pattern.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.snapshot.delete.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.xpack.slm.get_status.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.xpack.watcher.delete_watch.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.xpack.logstash.put_pipeline.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.indices.exists_template.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.xpack.ml.update_job.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.inference.put_jinaai.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | …api/api.xpack.security.create_cross_cluster_api_key.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.indices.explain_data_lifecycle.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.indices.refresh.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.inference.put_openai.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.connector.sync_job_check_in.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.inference.put_llama.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.xpack.security.saml_complete_logout.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.cat.allocation.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.indices.validate_query.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.indices.cancel_migrate_reindex.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.xpack.ml.delete_job.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.xpack.enrich.get_policy.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.xpack.security.get_service_credentials.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.xpack.indices.get_data_stream_settings.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.xpack.ml.set_upgrade_mode.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.synonyms.delete_synonym_rule.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.xpack.ml.get_memory_stats.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.cat.shards.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.inference.completion.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.exists_source.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.profiling.status.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.cluster.remote_info.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.indices.put_data_stream_options.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.synonyms.get_synonym_rule.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | ….search_application.post_behavioral_analytics_event.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.xpack.indices.delete_data_stream.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| LOW | esapi/api.simulate.ingest.go | 1 | // Licensed to Elasticsearch B.V. under one or more contributor | COMMENT |
| 7551 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL⚡ | _examples/bulk/benchmarks/runner/runner.go | 169 | r.config.Client.Indices.Delete.WithIgnoreUnavailable(true)) | CODE |
| CRITICAL⚡ | _examples/bulk/benchmarks/runner/runner.go | 172 | r.config.Client.Indices.Create.WithBody(strings.NewReader(r.indexSettings.String())), | CODE |
| CRITICAL⚡ | _examples/bulk/benchmarks/runner/runner.go | 173 | r.config.Client.Indices.Create.WithWaitForActiveShards("1")) | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | internal/testing/e2e/bulk_indexer_integration_test.go | 42 | body := `{"body":"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore | CODE |
| LOW | internal/testing/e2e/bulk_indexer_integration_test.go | 42 | body := `{"body":"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore | CODE |
| LOW | …tting-started_311c4b632a29b9ead63b02d01f10096b_test.go | 42 | // "name": "John Doe" | COMMENT |
| LOW | …tting-started_311c4b632a29b9ead63b02d01f10096b_test.go | 53 | "name": "John Doe" | CODE |
| LOW | typedapi/types/connectorconfigproperties.go | 131 | case "placeholder": | CODE |
| LOW | _examples/bulk/typed.go | 103 | Body: "Lorem ipsum dolor sit amet...", | CODE |
| LOW | _examples/bulk/typed.go | 103 | Body: "Lorem ipsum dolor sit amet...", | CODE |
| LOW | _examples/bulk/indexer.go | 157 | Body: "Lorem ipsum dolor sit amet...", | CODE |
| LOW | _examples/bulk/indexer.go | 157 | Body: "Lorem ipsum dolor sit amet...", | CODE |
| LOW | _examples/bulk/default.go | 144 | Body: "Lorem ipsum dolor sit amet...", | CODE |
| LOW | _examples/bulk/default.go | 144 | Body: "Lorem ipsum dolor sit amet...", | CODE |
| LOW | _examples/encoding/easyjson.go | 75 | Body: "Lorem ipsum dolor sit amet, consectetur adipisicing elit", | CODE |
| LOW | _examples/encoding/easyjson.go | 75 | Body: "Lorem ipsum dolor sit amet, consectetur adipisicing elit", | CODE |
| LOW | _examples/encoding/testdata/response_search.json | 25 | "body": "Lorem ipsum dolor sit amet, consectetur adipisicing elit", | CODE |
| LOW | _examples/encoding/testdata/response_search.json | 25 | "body": "Lorem ipsum dolor sit amet, consectetur adipisicing elit", | CODE |
| LOW | _examples/encoding/testdata/response_search.json | 41 | "body": "Lorem ipsum dolor sit amet, consectetur adipisicing elit", | CODE |
| LOW | _examples/encoding/testdata/response_search.json | 41 | "body": "Lorem ipsum dolor sit amet, consectetur adipisicing elit", | CODE |
| LOW | _examples/encoding/testdata/response_search.json | 57 | "body": "Lorem ipsum dolor sit amet, consectetur adipisicing elit", | CODE |
| LOW | _examples/encoding/testdata/response_search.json | 57 | "body": "Lorem ipsum dolor sit amet, consectetur adipisicing elit", | CODE |
| LOW | _examples/encoding/testdata/response_search.json | 73 | "body": "Lorem ipsum dolor sit amet, consectetur adipisicing elit", | CODE |
| LOW | _examples/encoding/testdata/response_search.json | 73 | "body": "Lorem ipsum dolor sit amet, consectetur adipisicing elit", | CODE |
| LOW | _examples/encoding/testdata/response_search.json | 89 | "body": "Lorem ipsum dolor sit amet, consectetur adipisicing elit", | CODE |
| LOW | _examples/encoding/testdata/response_search.json | 89 | "body": "Lorem ipsum dolor sit amet, consectetur adipisicing elit", | CODE |
| LOW | esutil/bulk_indexer_internal_test.go | 1703 | body := `{"body":"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore | CODE |
| LOW | esutil/bulk_indexer_internal_test.go | 1703 | body := `{"body":"Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | typedapi/rollup/rollupsearch/rollup_search.go | 24 | // utilize a different document structure than the original data. It rewrites | COMMENT |
| MEDIUM | typedapi/rollup/rollupsearch/rollup_search.go | 107 | // utilize a different document structure than the original data. It rewrites | COMMENT |
| MEDIUM | typedapi/connector/syncjobclaim/sync_job_claim.go | 28 | // supports the implementation of services that utilize the connector protocol | COMMENT |
| MEDIUM | typedapi/connector/syncjobclaim/sync_job_claim.go | 103 | // supports the implementation of services that utilize the connector protocol | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | …s-put-mapping_1da77e114459e0b77d78a3dcc8fae429_test.go | 40 | // # Create the two indices | COMMENT |
| MEDIUM | _examples/security/certificates-create.yml | 1 | # Create the certificates for the stack: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | docs/reference/typed-api/index.md | 20 | elasticsearch.WithAPIKey("your-api-key"), // <2> | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | _examples/interceptor/cmd/custom_observability/main.go | 29 | // All telemetry is exported to stdout for demonstration purposes. | COMMENT |