Google Cloud Knowledge Catalog Tools and Samples
This report presents the forensic synthetic code analysis of GoogleCloudPlatform/knowledge-catalog, a HTML project with 8,181 GitHub stars. SynthScan v2.0 examined 36,009 lines of code across 259 source files, recording 116 pattern matches distributed across 11 syntactic categories. The overall adjusted score of 3.5 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).
Longitudinal tracking requires multiple scan runs. Once this repository is re-scanned after new commits land, this chart will visualise how the synthetic code signal evolves over time — enabling you to detect whether AI authorship is growing, stabilising, or being actively corrected by human engineers.
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 116 distinct pattern matches across 11 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 | okf/tests/test_viewer.py | 92 | def test_generate_visualization_writes_html(tmp_path: Path): | CODE |
| LOW | okf/tests/test_viewer.py | 108 | def test_index_md_is_not_a_concept(tmp_path: Path): | CODE |
| LOW | okf/tests/test_viewer.py | 124 | def test_cross_links_become_edges(tmp_path: Path): | CODE |
| LOW | okf/tests/test_viewer.py | 137 | def test_missing_link_targets_are_skipped(tmp_path: Path): | CODE |
| LOW | okf/tests/test_viewer.py | 158 | def test_node_colors_match_palette(tmp_path: Path): | CODE |
| LOW | okf/tests/test_viewer.py | 187 | def test_raises_when_bundle_missing(tmp_path: Path): | CODE |
| LOW | okf/tests/test_web_tools.py | 35 | def test_seed_fetch_succeeds_and_records_link_depth(): | CODE |
| LOW | okf/tests/test_web_tools.py | 52 | def test_allowed_path_prefix_rejects_off_path_urls(): | CODE |
| LOW | okf/tests/test_web_tools.py | 70 | def test_denied_path_substring_rejects(): | CODE |
| LOW | okf/tests/test_web_tools.py | 88 | def test_max_depth_caps_recursion(): | CODE |
| LOW | okf/tests/test_web_tools.py | 112 | def test_unregistered_url_rejected(): | CODE |
| LOW | okf/tests/test_web_fetcher.py | 20 | def test_fetch_and_parse_extracts_title_links_markdown(): | CODE |
| LOW | okf/tests/test_web_fetcher.py | 46 | def test_fetch_and_parse_rejects_non_html(): | STRING |
| LOW | okf/tests/test_web_fetcher.py | 53 | def test_fetch_and_parse_truncates_large_pages(): | STRING |
| LOW | okf/tests/test_web_fetcher.py | 64 | def test_fetch_and_parse_wraps_network_errors(): | STRING |
| LOW | okf/tests/test_index.py | 27 | def test_regenerate_groups_by_type_and_links_relative(tmp_path: Path): | CODE |
| LOW | okf/tests/test_index.py | 64 | def test_regenerate_skips_empty_directories(tmp_path: Path): | CODE |
| LOW | okf/tests/test_index.py | 74 | def test_regenerate_single_child_reuses_description(tmp_path: Path): | CODE |
| LOW | okf/tests/test_bigquery_source.py | 37 | def test_wildcard_sharded_tables_collapse_to_one_concept(client_cls): | CODE |
| LOW | okf/tests/test_bigquery_source.py | 81 | def test_sample_rows_uses_list_rows_for_table(client_cls): | CODE |
| LOW | okf/tests/test_bigquery_source.py | 103 | def test_sample_rows_falls_back_to_query_for_view(client_cls): | CODE |
| LOW | okf/tests/test_bigquery_source.py | 130 | def test_read_concept_returns_schema_and_partitioning(client_cls): | CODE |
| LOW | okf/tests/test_document.py | 16 | def test_roundtrip_preserves_frontmatter_and_body(): | CODE |
| LOW⚡ | okf/tests/test_document.py | 41 | def test_parse_no_frontmatter_treats_all_as_body(): | CODE |
| LOW⚡ | okf/tests/test_document.py | 48 | def test_unterminated_frontmatter_raises(): | CODE |
| LOW⚡ | okf/tests/test_document.py | 54 | def test_validate_rejects_missing_type(): | CODE |
| LOW⚡ | okf/tests/test_document.py | 61 | def test_validate_accepts_type_only(): | CODE |
| LOW⚡ | okf/tests/test_document.py | 66 | def test_normalize_verified_treats_bare_mapping_as_list(): | CODE |
| LOW | okf/tests/test_bundle_tools.py | 49 | def test_write_succeeds_when_no_existing_doc(tmp_path): | CODE |
| LOW | okf/tests/test_bundle_tools.py | 61 | def test_generated_is_auto_filled(tmp_path): | CODE |
| LOW | okf/tests/test_bundle_tools.py | 75 | def test_generated_by_and_at_are_preserved_when_supplied(tmp_path): | CODE |
| LOW | okf/tests/test_bundle_tools.py | 91 | def test_web_pass_rejects_schema_shrinkage(tmp_path): | CODE |
| LOW | okf/tests/test_bundle_tools.py | 112 | def test_web_pass_rejects_sources_shrinkage(tmp_path): | CODE |
| LOW | okf/tests/test_bundle_tools.py | 129 | def test_web_pass_allows_augmentation_with_new_section(tmp_path): | CODE |
| LOW | okf/tests/test_bundle_tools.py | 149 | def test_bq_pass_can_shrink_schema_when_no_web_state(tmp_path): | CODE |
| LOW | okf/tests/test_bundle_tools.py | 166 | def test_web_pass_skips_guard_for_non_bigquery_table_types(tmp_path): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | samples/discovery/tools.py | 4 | CODE | |
| LOW | samples/enrichment/src/enrichment/enrich.py | 8 | CODE | |
| LOW | …mples/enrichment/src/enrichment/documentation/agent.py | 10 | CODE | |
| LOW | samples/enrichment/src/enrichment/metadata/snapshot.py | 6 | CODE | |
| LOW | okf/tests/test_viewer.py | 1 | CODE | |
| LOW | okf/tests/test_web_tools.py | 1 | CODE | |
| LOW | okf/tests/test_web_fetcher.py | 1 | CODE | |
| LOW | okf/tests/test_index.py | 1 | CODE | |
| LOW | okf/tests/test_bigquery_source.py | 1 | CODE | |
| LOW | okf/tests/test_document.py | 1 | CODE | |
| LOW | okf/tests/test_bundle_tools.py | 1 | CODE | |
| LOW | okf/bundles/acme_retail/attesters/sql_equality.py | 20 | CODE | |
| LOW | okf/src/reference_agent/runner.py | 1 | CODE | |
| LOW | okf/src/reference_agent/cli.py | 1 | CODE | |
| LOW | okf/src/reference_agent/agent.py | 1 | CODE | |
| LOW | okf/src/reference_agent/tools/web_tools.py | 1 | CODE | |
| LOW | okf/src/reference_agent/tools/bundle_tools.py | 1 | CODE | |
| LOW | okf/src/reference_agent/tools/context.py | 1 | CODE | |
| LOW | okf/src/reference_agent/tools/source_tools.py | 1 | CODE | |
| LOW | okf/src/reference_agent/web/fetcher.py | 1 | CODE | |
| LOW | okf/src/reference_agent/bundle/index.py | 1 | CODE | |
| LOW | okf/src/reference_agent/bundle/paths.py | 1 | CODE | |
| LOW | okf/src/reference_agent/bundle/__init__.py | 1 | CODE | |
| LOW | okf/src/reference_agent/bundle/__init__.py | 1 | CODE | |
| LOW | okf/src/reference_agent/bundle/__init__.py | 2 | CODE | |
| LOW | okf/src/reference_agent/bundle/__init__.py | 3 | CODE | |
| LOW | okf/src/reference_agent/bundle/__init__.py | 3 | CODE | |
| LOW | okf/src/reference_agent/bundle/synthesizer.py | 1 | CODE | |
| LOW | okf/src/reference_agent/bundle/document.py | 1 | CODE | |
| LOW | okf/src/reference_agent/viewer/__init__.py | 1 | CODE | |
| LOW | okf/src/reference_agent/viewer/generator.py | 1 | CODE | |
| LOW | okf/src/reference_agent/sources/bigquery.py | 1 | CODE | |
| LOW | okf/src/reference_agent/sources/__init__.py | 1 | CODE | |
| LOW | okf/src/reference_agent/sources/__init__.py | 1 | CODE | |
| LOW | okf/src/reference_agent/sources/base.py | 1 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | samples/discovery/tools.py | 67 | except Exception as e: # pylint: disable=broad-except | CODE |
| LOW | samples/enrichment/src/tools/fileskb/main.py | 99 | except Exception: | CODE |
| MEDIUM | samples/enrichment/src/enrichment/enrich.py | 54 | print(f'Error: {args.dir} does not exist or is not a directory.') | CODE |
| MEDIUM | samples/enrichment/src/enrichment/enrich.py | 65 | print(f'Error: {args.config_dir} does not exist or is not a directory.') | CODE |
| LOW | samples/enrichment/src/enrichment/enrich.py | 82 | except Exception as e: | CODE |
| LOW | …les/enrichment/src/enrichment/documentation/sources.py | 63 | except Exception as e: | CODE |
| LOW | okf/src/reference_agent/runner.py | 78 | except Exception: | CODE |
| LOW | okf/src/reference_agent/tools/bundle_tools.py | 146 | except Exception: | CODE |
| LOW | okf/src/reference_agent/tools/source_tools.py | 59 | except Exception as e: | CODE |
| LOW | okf/src/reference_agent/web/fetcher.py | 69 | except Exception as e: | CODE |
| LOW | okf/src/reference_agent/bundle/index.py | 17 | except Exception: | CODE |
| LOW | okf/src/reference_agent/bundle/synthesizer.py | 48 | except Exception as exc: | STRING |
| LOW | okf/src/reference_agent/sources/bigquery.py | 191 | except Exception: | CODE |
| LOW | okf/src/reference_agent/sources/bigquery.py | 207 | except Exception: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | samples/enrichment/sample/docs/lipsum.md | 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliq | CODE |
| LOW⚡ | samples/enrichment/sample/docs/lipsum.md | 1 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliq | CODE |
| LOW⚡ | samples/enrichment/sample/docs/lipsum.md | 3 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliq | CODE |
| LOW⚡ | samples/enrichment/sample/docs/lipsum.md | 3 | Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliq | CODE |
| LOW⚡ | samples/enrichment/sample/docs/lipsum.md | 5 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint oc | CODE |
| LOW⚡ | samples/enrichment/sample/docs/lipsum.md | 5 | Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint oc | CODE |
| LOW | toolbox/mdcode/demo/kb/setup.ts | 36 | content: '# Placeholder Content\n\nLorem ipsum dolor met', | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | samples/discovery/SKILL.md | 42 | ## Step 1: Understand the query | COMMENT |
| LOW | samples/discovery/SKILL.md | 49 | ## Step 2: Semantic Decomposition & Generating Variations | COMMENT |
| LOW | samples/discovery/SKILL.md | 60 | ## Step 3: Call Knowledge Catalog Search Tools (Batching) | COMMENT |
| LOW | samples/discovery/SKILL.md | 68 | ## Step 3: Call Knowledge Catalog Search | COMMENT |
| LOW | samples/discovery/SKILL.md | 79 | ## Step 4: Merge Search Results | COMMENT |
| LOW | samples/discovery/SKILL.md | 84 | ## Step 5: Identify the best Results | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | okf/bundles/ga4/viz.html | 229 | window.BUNDLE = {"nodes": [{"data": {"id": "datasets/ga4_obfuscated_sample_ecommerce", "label": "GA4 Obfuscated Sample E | CODE |
| MEDIUM | okf/bundles/ga4/viz.html | 229 | window.BUNDLE = {"nodes": [{"data": {"id": "datasets/ga4_obfuscated_sample_ecommerce", "label": "GA4 Obfuscated Sample E | CODE |
| MEDIUM | okf/bundles/stackoverflow/viz.html | 229 | window.BUNDLE = {"nodes": [{"data": {"id": "datasets/stackoverflow", "label": "Stack Overflow Public Dataset", "type": " | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | okf/tests/test_bundle_tools.py | 23 | def _set_ctx(tmp_path: Path) -> None: | CODE |
| LOW | okf/src/reference_agent/tools/context.py | 32 | def set_context(source: Source, bundle_root: Path, model: str = "") -> None: | CODE |
| LOW | okf/src/reference_agent/bundle/__init__.py | 5 | __all__ = [ | CODE |
| LOW | okf/src/reference_agent/viewer/__init__.py | 3 | __all__ = ["generate_visualization"] | CODE |
| LOW | okf/src/reference_agent/sources/__init__.py | 3 | __all__ = ["ConceptRef", "Source"] | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | samples/enrichment/src/tools/fileskb/main.py | 62 | CODE | |
| LOW | …mples/enrichment/src/enrichment/documentation/agent.py | 45 | CODE | |
| LOW | okf/src/reference_agent/runner.py | 82 | CODE | |
| LOW | okf/src/reference_agent/bundle/index.py | 49 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | okf/samples/crypto_bitcoin/seeds.txt | 1 | # Seed URLs for the Bitcoin public BigQuery dataset | COMMENT |
| LOW | okf/samples/ga4_merch_store/seeds.txt | 1 | # Seed URLs for the GA4 Google Merchandise Store anchor dataset | COMMENT |
| LOW | okf/samples/stackoverflow/seeds.txt | 1 | # Seed URLs for the Stack Overflow public BigQuery dataset | COMMENT |
| LOW | okf/src/reference_agent/viewer/static/viz.css | 161 | #detail-backlinks { margin-top: 18px; } | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …mples/enrichment/src/enrichment/documentation/agent.py | 45 | async def run_task(runner: InMemoryRunner, prompt: str): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | okf/src/reference_agent/runner.py | 161 | CODE |