The Prometheus monitoring system and time series database.
This report presents the forensic synthetic code analysis of prometheus/prometheus, a Go project with 65,194 GitHub stars. SynthScan v2.0 examined 484,212 lines of code across 1503 source files, recording 1124 pattern matches distributed across 12 syntactic categories. The overall adjusted score of 2.4 places this repository in the Likely human-written band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 1124 distinct pattern matches across 12 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. 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 diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | cmd/prometheus/reload_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/prometheus/main_upgrade_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/prometheus/scrape_failure_log_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/prometheus/upload_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/prometheus/query_log_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/prometheus/features_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/prometheus/main_unix_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/prometheus/main.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/prometheus/main_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/rules_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/query.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/backfill_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/unittest.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/metrics.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/analyze_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/metrics_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/rules.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/unittest_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/sd_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/tsdb_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/archive.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/debug.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/backfill.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/tsdb_posix_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/analyze.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/tsdb.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/sd.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/main.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | cmd/promtool/main_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | tracing/tracing_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | tracing/tracing.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | documentation/examples/prometheus-marathon.yml | 21 | # in their app definitions. Example using a port mapping (container or bridge networking): | COMMENT |
| LOW | documentation/examples/prometheus-kubernetes.yml | 1 | # A scrape configuration for running Prometheus on a Kubernetes cluster. | COMMENT |
| LOW | documentation/examples/prometheus-kubernetes.yml | 61 | action: keep | COMMENT |
| LOW | documentation/examples/prometheus-kubernetes.yml | 101 | # retrieve those metrics. | COMMENT |
| LOW | documentation/examples/prometheus-kubernetes.yml | 121 | COMMENT | |
| LOW | documentation/examples/prometheus-kubernetes.yml | 161 | # regex: true | COMMENT |
| LOW | documentation/examples/prometheus-kubernetes.yml | 261 | COMMENT | |
| LOW | documentation/examples/prometheus-kubernetes.yml | 281 | # - source_labels: [__meta_kubernetes_pod_annotation_example_io_metric_path] | COMMENT |
| LOW | documentation/examples/prometheus-dockerswarm.yml | 21 | - source_labels: [__meta_dockerswarm_node_address] | COMMENT |
| LOW | documentation/examples/prometheus-eureka.yml | 21 | # eureka: | COMMENT |
| LOW | documentation/examples/prometheus-eureka.yml | 41 | # Example relabel to customize metric path based on application | COMMENT |
| LOW | documentation/examples/prometheus-eureka.yml | 61 | # | COMMENT |
| LOW | documentation/examples/prometheus-nomad.yml | 1 | # An example scrape configuration for running Prometheus with | COMMENT |
| LOW | …cumentation/examples/custom-sd/adapter/adapter_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | documentation/examples/custom-sd/adapter/adapter.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | documentation/examples/custom-sd/adapter-usage/main.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | …xamples/remote_storage/example_write_adapter/server.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | …examples/remote_storage/remote_storage_adapter/main.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | …mote_storage/remote_storage_adapter/influxdb/client.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | …storage/remote_storage_adapter/influxdb/client_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | …orage/remote_storage_adapter/opentsdb/tagvalue_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | …mote_storage/remote_storage_adapter/opentsdb/client.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | …te_storage/remote_storage_adapter/opentsdb/tagvalue.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | …te_storage/remote_storage_adapter/opentsdb/tagvalue.go | 21 | ) | COMMENT |
| LOW | …te_storage/remote_storage_adapter/opentsdb/tagvalue.go | 41 | // - If ':' is encountered, it is replaced by '_.'. | COMMENT |
| LOW | …storage/remote_storage_adapter/opentsdb/client_test.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | …mote_storage/remote_storage_adapter/graphite/escape.go | 1 | // Copyright The Prometheus Authors | COMMENT |
| LOW | …mote_storage/remote_storage_adapter/graphite/escape.go | 41 | // in filenames, so we also need to use only valid filename characters. | COMMENT |
| LOW | …mote_storage/remote_storage_adapter/graphite/escape.go | 61 | // way in Graphite. | COMMENT |
| 999 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | cmd/prometheus/scrape_failure_log_test.go | 56 | // Step 1: Set up an initial Prometheus configuration that globally | COMMENT |
| LOW | cmd/prometheus/scrape_failure_log_test.go | 99 | // Step 2: Update the Prometheus configuration to remove the scrape failure | COMMENT |
| LOW | cmd/prometheus/scrape_failure_log_test.go | 133 | // Step 3: Re-add the scrape failure log file setting, but this time under | COMMENT |
| LOW⚡ | tsdb/head_append_v2_test.go | 4887 | // Step 1: Establish a series with histogram data | COMMENT |
| LOW⚡ | tsdb/head_append_v2_test.go | 4893 | // Step 2: Add a float staleness marker | COMMENT |
| LOW⚡ | tsdb/head_test.go | 7974 | // Step 1: Establish a series with histogram data | COMMENT |
| LOW⚡ | tsdb/head_test.go | 7980 | // Step 2: Add a float staleness marker | COMMENT |
| LOW | tsdb/head_test.go | 8928 | // Step 1: Create a batch of series and make them stale. | COMMENT |
| LOW | tsdb/head_test.go | 8940 | // Step 2: Truncate stale series. This removes them from the Head and | COMMENT |
| LOW | tsdb/head_test.go | 8952 | // Step 3: Add new series AFTER the truncation. In the WAL, these series | COMMENT |
| LOW | tsdb/head_test.go | 8965 | // Step 4: Close and re-open the Head to trigger WAL replay. | COMMENT |
| LOW | tsdb/chunks/head_chunks.go | 837 | // NOTE: This method needs to be called at least once after creating ChunkDiskMapper | COMMENT |
| LOW | config/config.go | 395 | // NOTE: This method should not be used outside of this package. Use Load or LoadFile instead. | COMMENT |
| LOW | docs/configuration/configuration.md | 263 | # WARNING: The "NoTranslation" setting has significant known risks and limitations (see https://prometheus.io/docs/p | COMMENT |
| LOW | promql/parser/lex.go | 792 | // NOTE: This function as well as the helper function digitVal() and associated | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | tsdb/ooo_head_read.go | 517 | ir.ch.head.metrics.seriesNotFound.Inc() | CODE |
| CRITICAL | tsdb/ooo_head_read.go | 530 | getOOOSeriesChunks(s, ir.ch.head.opts.UseXOR2FloatEncoding(), ir.ch.head.opts.EnableHistogramSTEncoding.Load(), ir.ch.m | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | cmd/prometheus/scrape_failure_log_test.go | 56 | // Step 1: Set up an initial Prometheus configuration that globally | COMMENT |
| LOW | cmd/prometheus/scrape_failure_log_test.go | 99 | // Step 2: Update the Prometheus configuration to remove the scrape failure | COMMENT |
| LOW | cmd/prometheus/scrape_failure_log_test.go | 133 | // Step 3: Re-add the scrape failure log file setting, but this time under | COMMENT |
| LOW⚡ | tsdb/head_append_v2_test.go | 4887 | // Step 1: Establish a series with histogram data | COMMENT |
| LOW⚡ | tsdb/head_append_v2_test.go | 4893 | // Step 2: Add a float staleness marker | COMMENT |
| LOW⚡ | tsdb/head_test.go | 7974 | // Step 1: Establish a series with histogram data | COMMENT |
| LOW⚡ | tsdb/head_test.go | 7980 | // Step 2: Add a float staleness marker | COMMENT |
| LOW | tsdb/head_test.go | 8928 | // Step 1: Create a batch of series and make them stale. | COMMENT |
| LOW | tsdb/head_test.go | 8940 | // Step 2: Truncate stale series. This removes them from the Head and | COMMENT |
| LOW | tsdb/head_test.go | 8952 | // Step 3: Add new series AFTER the truncation. In the WAL, these series | COMMENT |
| LOW | tsdb/head_test.go | 8965 | // Step 4: Close and re-open the Head to trigger WAL replay. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | prompb/io/prometheus/client/decoder.go | 33 | // We leverage the fact those two don't collide. | COMMENT |
| MEDIUM | tsdb/fileutil/direct_io_force.go | 14 | // This allows seamless testing of the Direct I/O writer across all tsdb tests. | COMMENT |
| MEDIUM | web/api/v1/search_test.go | 1099 | // No line should decode as a success trailer. This is robust to a | COMMENT |
| MEDIUM | scrape/st_synthesis.go | 47 | // to leverage native DetectReset and Sub methods. | COMMENT |
| MEDIUM | promql/functions.go | 580 | // extrapolationThreshold below. Essentially, we are assuming a more or | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | documentation/examples/prometheus-dockerswarm.yml | 10 | # Create a job for Docker daemons. | COMMENT |
| MEDIUM | documentation/examples/prometheus-dockerswarm.yml | 25 | # Create a job for Docker Swarm containers. | COMMENT |
| MEDIUM | documentation/examples/prometheus-docker.yml | 9 | # Create a job for Docker daemon. | COMMENT |
| MEDIUM | documentation/examples/prometheus-docker.yml | 18 | # Create a job for Docker Swarm containers. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | util/annotations/annotations_test.go | 47 | warnings, infos := annos.AsStrings("lorem ipsum dolor sit amet", 0, 0) | CODE |
| LOW | util/annotations/annotations_test.go | 47 | warnings, infos := annos.AsStrings("lorem ipsum dolor sit amet", 0, 0) | CODE |
| LOW | web/ui/react-app/src/pages/graph/GraphControls.test.tsx | 95 | expect(timeInput.prop('placeholder')).toEqual('End time'); | CODE |
| LOW | web/ui/react-app/src/pages/graph/GraphControls.test.tsx | 119 | expect(input.prop('placeholder')).toEqual('Res. (s)'); | CODE |
| LOW | web/ui/react-app/src/pages/graph/Panel.test.tsx | 76 | expect(timeInput.prop('placeholder')).toEqual('Evaluation time'); | CODE |
| LOW | web/ui/react-app/src/pages/graph/TimeInput.test.tsx | 58 | expect(input.prop('placeholder')).toEqual(timeInputProps.placeholder); | CODE |
| LOW | web/ui/mantine-ui/src/promql/ast.ts | 12 | placeholder = "placeholder", | CODE |
| LOW | discovery/oci/oci_test.go | 199 | "CreatedBy": "user@example.com", | CODE |
| LOW | discovery/oci/oci_test.go | 212 | require.Equal(t, model.LabelValue("user@example.com"), labels[ociLabelDefinedTagPrefix+"Oracle_Tags_CreatedBy"]) | CODE |
| LOW | discovery/consul/consul_test.go | 272 | Token: "fake-token", | CODE |
| LOW | discovery/consul/consul_test.go | 367 | config.Token = "fake-token" | CODE |
| LOW | discovery/consul/consul_test.go | 588 | Token: "fake-token", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | cmd/prometheus/main.go | 1240 | // Don't forget to release the reloadReady channel so that waiting blocks can exit normally. | COMMENT |
| MEDIUM | documentation/examples/prometheus-eureka.yml | 19 | # If you are using SpringBoot, you can add metadata using eureka.instance.metadataMap like this: | COMMENT |
| LOW | .github/ISSUE_TEMPLATE/bug_report.yml | 52 | description: Insert relevant configuration here. Don't forget to remove secrets. | CODE |
| LOW | .github/ISSUE_TEMPLATE/bug_report.yml | 68 | description: Insert relevant configuration here. Don't forget to remove secrets. | CODE |
| MEDIUM | model/textparse/benchmark_test.go | 42 | // For local iteration, feel free to adjust cases/comment out code etc. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | web/ui/react-app/src/pages/graph/HistogramHelpers.ts | 5 | export function calculateDefaultExpBucketWidth( | CODE |
| LOW | …/ui/mantine-ui/src/pages/AlertmanagerDiscoveryPage.tsx | 12 | export default function AlertmanagerDiscoveryPage() { | CODE |
| LOW | web/ui/mantine-ui/src/pages/query/HistogramHelpers.ts | 3 | export function calculateDefaultExpBucketWidth( | CODE |
| LOW | web/ui/module/codemirror-promql/src/complete/hybrid.ts | 151 | function getMetricNameInVectorSelector(tree: SyntaxNode, state: EditorState): string { | CODE |
| LOW | web/ui/module/codemirror-promql/src/complete/hybrid.ts | 188 | function isAfterClosedFunctionCallBody(state: EditorState, node: SyntaxNode, pos: number): boolean { | CODE |
| LOW | web/ui/module/codemirror-promql/src/complete/hybrid.ts | 215 | export function computeEndCompletePosition(state: EditorState, node: SyntaxNode, pos: number): number { | CODE |
| LOW | web/ui/module/codemirror-promql/src/complete/hybrid.ts | 259 | function computeStartCompleteLabelPositionInLabelMatcherOrInGroupingLabel(node: SyntaxNode, pos: number): number { | CODE |
| LOW | web/ui/module/codemirror-promql/src/complete/hybrid.ts | 277 | export function computeStartCompletePosition(state: EditorState, node: SyntaxNode, pos: number): number { | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | web/api/v1/openapi_test.go | 184 | // TODO: Add test to verify all routes from api.go Register() are covered in OpenAPI spec. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | web/api/testhelpers/request.go | 30 | // Example usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/sync_repo_files.sh | 348 | # Check if a PR is already opened for the branch from the prombot fork. | COMMENT |