Ip2region is an offline IP-to-Region localization library and IP data management framework with both IPv4 and IPv6 supports, 10-microsecond level query efficiency, xdb search client for many programming languages
This report summarizes scanner evidence for lionsoul2014/ip2region, a Go project with 19,804 GitHub stars. SynthScan examined 33,324 lines of code across 271 source files, recording 81 pattern matches distributed across 5 syntactic categories. The legacy adjusted pattern signal is 2.4 (Low 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.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 64 finding(s).
Are imports declared and package/API names verified? 0 finding(s).
Are wrappers, guards, and repeated structures necessary? 43 finding(s).
Which changes need focused human review? 81 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
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 81 distinct pattern matches across 5 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 | binding/python/ip2region/__init__.py | 1 | # Copyright 2022 The Ip2Region Authors. All rights reserved. | COMMENT |
| LOW | binding/golang/xdb/util.go | 41 | } | COMMENT |
| LOW | binding/rust/example/src/cmd.rs | 1 | use clap::{Parser, Subcommand, ValueEnum}; | COMMENT |
| LOW | binding/lua_c/xdb_searcher.c | 1 | // Copyright 2022 The Ip2Region Authors. All rights reserved. | COMMENT |
| LOW | binding/nginx/src/ngx_http_ip2region_module.h | 1 | /* | COMMENT |
| LOW | binding/cpp/src/base.h | 1 | #ifndef BASE_H | COMMENT |
| LOW | binding/csharp/IP2Region.Net/XDB/XdbVersion.cs | 1 | // Copyright 2025 The Ip2Region Authors. All rights reserved. | COMMENT |
| LOW | binding/csharp/IP2Region.Net/XDB/XdbVersion.cs | 21 | /// 获得/设置 缓存策略 | COMMENT |
| LOW | binding/csharp/IP2Region.Net/XDB/CachePolicy.cs | 1 | // Copyright 2025 The Ip2Region Authors. All rights reserved. | COMMENT |
| LOW | …P2Region.Net/Extensions/ServiceCollectionExtensions.cs | 1 | // Copyright 2025 The Ip2Region Authors. All rights reserved. | COMMENT |
| LOW | binding/csharp/IP2Region.Net/Abstractions/ISearcher.cs | 1 | // Copyright 2025 The Ip2Region Authors. All rights reserved. | COMMENT |
| LOW | binding/csharp/IP2Region.Net/Abstractions/ISearcher.cs | 21 | /// <returns></returns> | COMMENT |
| LOW | binding/c/xdb_api.h | 1 | // Copyright 2022 The Ip2Region Authors. All rights reserved. | COMMENT |
| LOW | binding/c/xdb_api.h | 21 | # define XDB_PUBLIC(type) extern __declspec(dllexport) type | COMMENT |
| LOW | binding/c/xdb_api.h | 41 | #define xdb_malloc( _bytes ) malloc( _bytes ) | COMMENT |
| LOW | binding/c/xdb_util.c | 1 | // Copyright 2022 The Ip2Region Authors. All rights reserved. | COMMENT |
| LOW | binding/c/xdb_util.c | 501 | XDB_PUBLIC(long long) xdb_ftell(FILE *handle) { | COMMENT |
| LOW | maker/python/xdb/maker.py | 1 | # Copyright 2022 The Ip2Region Authors. All rights reserved. | COMMENT |
| LOW | maker/python/xdb/maker.py | 21 | # -- 4bytes: generate unix timestamp (version) | COMMENT |
| LOW | maker/python/xdb/maker.py | 41 | # | first index block ptr | last index block ptr | | COMMENT |
| LOW | maker/python/xdb/__init__.py | 1 | # Copyright 2022 The Ip2Region Authors. All rights reserved. | COMMENT |
| LOW | maker/python/xdb/segment.py | 21 | return "{}|{}|{}".format( | COMMENT |
| LOW | maker/golang/xdb/maker.go | 1 | // Copyright 2022 The Ip2Region Authors. All rights reserved. | COMMENT |
| LOW | maker/golang/xdb/maker.go | 21 | // -- 2bytes: ip version number (4/6 since IPv6 supporting) | COMMENT |
| LOW | maker/golang/xdb/maker.go | 41 | // data entry structure: | COMMENT |
| LOW | maker/golang/xdb/editor.go | 201 | return e.PutSegment(seg, cb) | COMMENT |
| LOW | maker/golang/xdb/segment.go | 141 | // if eip < s.EndIP { | COMMENT |
| LOW | …va/src/main/java/org/lionsoul/ip2region/xdb/Maker.java | 1 | // Copyright 2022 The Ip2Region Authors. All rights reserved. | COMMENT |
| LOW | …va/src/main/java/org/lionsoul/ip2region/xdb/Maker.java | 21 | // -- 4bytes: index block end ptr | COMMENT |
| LOW | …va/src/main/java/org/lionsoul/ip2region/xdb/Maker.java | 41 | // | COMMENT |
| LOW | maker/csharp/IP2RegionMaker/XDB/Maker.cs | 1 | // Copyright 2022 The Ip2Region Authors. All rights reserved. | COMMENT |
| LOW | maker/csharp/IP2RegionMaker/XDB/Maker.cs | 21 | // -- 4bytes: index block end ptr | COMMENT |
| LOW | maker/csharp/IP2RegionMaker/XDB/Maker.cs | 41 | // | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | binding/python/ip2region/util.py | 235 | def load_vector_index_from_file(db_file: str) -> bytes: | CODE |
| LOW | scripts/ci/tests/test_workflows.py | 43 | def test_third_party_actions_are_pinned(path: Path) -> None: | CODE |
| LOW | scripts/ci/tests/test_workflows.py | 54 | def test_setup_handles_every_toolchain() -> None: | CODE |
| LOW | scripts/ci/tests/test_plan.py | 28 | def test_depends_on_triggers_component(repo: Path) -> None: | CODE |
| LOW | scripts/ci/tests/test_plan.py | 60 | def test_hosted_target_uses_host_runner(repo: Path) -> None: | CODE |
| LOW | scripts/ci/tests/test_plan.py | 91 | def test_no_base_commit_selects_everything(repo: Path, since: str) -> None: | CODE |
| LOW | scripts/ci/tests/test_plan.py | 95 | def test_changed_files_since_commit(repo: Path) -> None: | CODE |
| LOW | scripts/ci/tests/test_run.py | 17 | def test_runs_steps_of_requested_phases_in_order(tmp_path: Path) -> None: | CODE |
| LOW | scripts/ci/tests/test_run.py | 56 | def test_rejects_unsupported_target(tmp_path: Path, target: str) -> None: | CODE |
| LOW | scripts/ci/tests/test_run.py | 107 | def test_resolves_relative_executable(tmp_path: Path) -> None: | CODE |
| LOW | scripts/ci/tests/test_cangjie.py | 53 | def test_installs_and_reuses_sdk( | CODE |
| LOW | scripts/ci/tests/test_cangjie.py | 65 | def test_rejects_digest_mismatch(tmp_path: Path) -> None: | CODE |
| LOW | scripts/ci/tests/test_cangjie.py | 74 | def test_pins_every_official_build() -> None: | CODE |
| LOW | scripts/ci/tests/test_config.py | 10 | def test_repository_components_are_valid() -> None: | CODE |
| LOW | scripts/ci/tests/test_config.py | 17 | def test_loads_components_in_path_order(repo: Path) -> None: | CODE |
| LOW | scripts/ci/tests/test_config.py | 31 | def test_reports_every_missing_config(repo: Path, write: Writer) -> None: | CODE |
| LOW⚡ | scripts/ci/tests/test_config.py | 44 | def test_rejects_config_in_skipped_directory(repo: Path, write: Writer) -> None: | CODE |
| LOW⚡ | scripts/ci/tests/test_config.py | 51 | def test_rejects_unknown_keys(repo: Path, write: Writer) -> None: | CODE |
| LOW⚡ | scripts/ci/tests/test_config.py | 58 | def test_rejects_step_platform_outside_component( | CODE |
| LOW | scripts/ci/tests/test_config.py | 140 | def test_rejects_bad_target_settings( | STRING |
| LOW | scripts/ci/tests/test_config.py | 165 | def test_rejects_working_directory_outside_component( | STRING |
| LOW | scripts/ci/tests/test_config.py | 185 | def test_rejects_missing_dependency(repo: Path, write: Writer) -> None: | STRING |
| LOW | scripts/ci/tests/test_xdb.py | 23 | def test_ignores_creation_time(tmp_path: Path, expected: Path) -> None: | CODE |
| LOW | scripts/ci/tests/test_xdb.py | 29 | def test_reports_first_difference(tmp_path: Path, expected: Path) -> None: | CODE |
| LOW | scripts/ci/tests/test_data.py | 15 | def test_sync_rebuilds_every_xdb_and_warns_about_stale_ones( | CODE |
| LOW | scripts/ci/src/ip2region_ci/config.py | 71 | def _working_directory_inside_component(self) -> Self: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | binding/python/README.md | 75 | except Exception as e: | CODE |
| LOW | binding/python/README.md | 86 | except Exception as e: | CODE |
| LOW | binding/python/README.md | 106 | except Exception as e: | CODE |
| LOW | binding/python/README.md | 113 | except Exception as e: | CODE |
| LOW | binding/python/README.md | 124 | except Exception as e: | CODE |
| LOW | binding/python/README.md | 144 | except Exception as e: | CODE |
| LOW | binding/python/README.md | 161 | except Exception as e: | CODE |
| LOW | binding/python/README_zh.md | 66 | except Exception as e: | CODE |
| LOW | binding/python/README_zh.md | 77 | except Exception as e: | CODE |
| LOW | binding/python/README_zh.md | 96 | except Exception as e: | CODE |
| LOW | binding/python/README_zh.md | 103 | except Exception as e: | CODE |
| LOW | binding/python/README_zh.md | 114 | except Exception as e: | CODE |
| LOW | binding/python/README_zh.md | 133 | except Exception as e: | CODE |
| LOW | binding/python/README_zh.md | 150 | except Exception as e: | CODE |
| LOW | binding/python/search_test.py | 53 | except Exception as e: | CODE |
| LOW | binding/python/search_test.py | 75 | except Exception as e: | CODE |
| LOW | binding/python/search_test.py | 81 | except Exception as e: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | binding/python/bench_test.py | 48 | CODE | |
| LOW | scripts/ci/src/ip2region_ci/config.py | 180 | CODE | |
| LOW | scripts/ci/src/ip2region_ci/cangjie.py | 61 | CODE | |
| LOW | maker/python/main.py | 30 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | binding/python/ip2region/util.py | 258 | # Verify if the current Searcher could be used to search the specified xdb file. | COMMENT |