Specification and documentation for the Universal Commerce Protocol (UCP)
This report summarizes scanner evidence for Universal-Commerce-Protocol/ucp, a Python project with 3,413 GitHub stars. SynthScan examined 62,512 lines of code across 272 source files, recording 191 pattern matches distributed across 14 syntactic categories. The legacy adjusted pattern signal is 5.6 (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? 91 finding(s).
Are imports declared and package/API names verified? 37 finding(s).
Are wrappers, guards, and repeated structures necessary? 90 finding(s).
Which changes need focused human review? 191 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 191 distinct pattern matches across 14 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 |
|---|---|---|---|---|
| MEDIUM | main.py | 1801 | # ------------------------------------------ | COMMENT |
| MEDIUM | scripts/validate_examples.py | 120 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 122 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 144 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 146 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 189 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 191 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 294 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 296 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 435 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 437 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 508 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 510 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 533 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 535 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 642 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 644 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 710 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 712 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 815 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 817 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 846 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 848 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 1110 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/validate_examples.py | 1112 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/test_check_links.py | 38 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/test_check_links.py | 40 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_check_links.py | 62 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_check_links.py | 64 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_check_links.py | 108 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_check_links.py | 110 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_check_links.py | 295 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_check_links.py | 297 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/test_validate_examples.py | 39 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/test_validate_examples.py | 41 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/test_validate_examples.py | 166 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/test_validate_examples.py | 168 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 67 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 69 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 235 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 237 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 316 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 318 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 446 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 448 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 695 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 697 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/test_schema_tables.py | 25 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/test_schema_tables.py | 27 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/test_schema_tables.py | 79 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | scripts/test_schema_tables.py | 81 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_schema_tables.py | 168 | # ----------------------------------------------------------- | COMMENT |
| MEDIUM | scripts/test_schema_tables.py | 170 | # ----------------------------------------------------------- | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | source/schemas/common/types/card_credential.json | 50 | "Jane Doe" | CODE |
| LOW | source/schemas/common/types/pan_credential.json | 40 | "Jane Doe" | CODE |
| LOW | …rce/schemas/common/types/network_token_credential.json | 41 | "Jane Doe" | CODE |
| LOW | source/handlers/tokenization/openapi.json | 46 | "name": "Jane Doe" | CODE |
| LOW | source/handlers/tokenization/openapi.json | 66 | "name": "Jane Doe" | CODE |
| LOW | source/handlers/tokenization/openapi.json | 85 | "name": "Jane Doe" | CODE |
| LOW | source/handlers/tokenization/openapi.json | 201 | "name": "Jane Doe" | CODE |
| LOW | source/handlers/tokenization/openapi.json | 214 | "name": "Jane Doe" | CODE |
| LOW | docs/specification/shopping/playground.md | 573 | "street_address": "123 Main Street", | CODE |
| LOW | docs/specification/shopping/playground.md | 974 | req.fulfillment.methods = [{ type: 'shipping', destinations: [{ id: "addr_1", street_address: "123 Main St", | CODE |
| LOW | docs/specification/shopping/playground.md | 1001 | destinations: [{ id: "addr_1", street_address: "123 Main St", address_locality: "Tech City", address_country | CODE |
| LOW | docs/specification/shopping/order/mcp.md | 172 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/order/index.md | 244 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/order/index.md | 258 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/order/rest.md | 145 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/checkout/mcp.md | 193 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/checkout/mcp.md | 283 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/checkout/mcp.md | 542 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/checkout/a2a.md | 388 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/checkout/rest.md | 407 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/checkout/rest.md | 517 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/checkout/rest.md | 613 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/checkout/rest.md | 716 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/checkout/rest.md | 806 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/checkout/rest.md | 918 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/checkout/rest.md | 1078 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/checkout/rest.md | 1236 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/extensions/fulfillment.md | 176 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/extensions/fulfillment.md | 283 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/extensions/fulfillment.md | 298 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/extensions/fulfillment.md | 336 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/extensions/fulfillment.md | 874 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/shopping/extensions/fulfillment.md | 946 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/payment/extensions/ap2-mandates.md | 386 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/overview/index.md | 1908 | "street_address": "123 Main Street", | CODE |
| LOW | docs/specification/lodging/booking/mcp.md | 670 | "street_address": "123 Main St", | CODE |
| LOW | docs/specification/lodging/booking/rest.md | 807 | "street_address": "123 Main St", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | hooks.py | 314 | def _root_pages_asset_link_rewrite(markdown, base_path): | CODE |
| LOW | main.py | 69 | def _validate_common_namespace_exclusivity() -> None: | CODE |
| LOW | main.py | 908 | def _render_table_from_schema( | CODE |
| LOW | main.py | 1520 | def auto_generate_schema_reference( | CODE |
| LOW | scripts/validate_examples.py | 365 | def lower_ellipsis_to_sentinels(content: str) -> str: | CODE |
| LOW | scripts/validate_examples.py | 763 | def validate_payload_with_schema( | CODE |
| LOW | scripts/test_check_links.py | 152 | def test_off_site_links_are_skipped() -> None: | CODE |
| LOW | scripts/test_check_links.py | 166 | def test_on_site_links_resolve() -> None: | CODE |
| LOW | scripts/test_check_links.py | 180 | def test_on_site_failures_are_reported() -> None: | CODE |
| LOW | scripts/test_check_links.py | 194 | def test_raw_markdown_names_its_own_reason() -> None: | CODE |
| LOW | scripts/test_check_links.py | 211 | def test_exit_code_signals_failure() -> None: | CODE |
| LOW | scripts/test_check_links.py | 239 | def test_linkignore_suppresses_but_not_raw_markdown() -> None: | CODE |
| LOW | scripts/test_check_links.py | 269 | def test_docs_mode_spec_ignores_documentation_links() -> None: | CODE |
| LOW⚡ | scripts/test_validate_examples.py | 171 | def test_parse_example_keeps_sentinels() -> None: | CODE |
| LOW | scripts/test_validate_examples.py | 185 | def test_strip_ellipsis_records_paths() -> None: | CODE |
| LOW | scripts/test_validate_examples.py | 201 | def test_string_ellipsis_in_array() -> None: | CODE |
| LOW | scripts/test_validate_examples.py | 212 | def test_array_ellipsis_paths_use_stripped_indices() -> None: | CODE |
| LOW | scripts/test_validate_examples.py | 425 | def test_missing_binary_says_how_to_install() -> None: | CODE |
| LOW | scripts/test_validate_examples.py | 531 | def test_process_block_integration() -> None: | CODE |
| LOW | scripts/test_validate_examples.py | 663 | def test_resolve_schema_cache_key() -> None: | CODE |
| LOW⚡ | scripts/test_schema_tables.py | 84 | def test_ucp_ref_links_reference_section(macros: dict) -> None: | CODE |
| LOW | scripts/test_schema_tables.py | 97 | def test_bundled_ucp_def_links_reference_section(macros: dict) -> None: | CODE |
| LOW | scripts/test_schema_tables.py | 113 | def test_ucp_def_without_anchor_is_named(macros: dict) -> None: | CODE |
| LOW | scripts/test_schema_tables.py | 126 | def test_composed_field_links_referenced_type(macros: dict) -> None: | CODE |
| LOW | scripts/test_schema_tables.py | 139 | def test_bundled_composed_field_uses_shared_type(macros: dict) -> None: | CODE |
| LOW | scripts/test_schema_tables.py | 155 | def test_method_tables_name_ucp_field(macros: dict) -> None: | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | hooks.py | 45 | CODE | |
| LOW | hooks.py | 146 | CODE | |
| LOW | hooks.py | 337 | CODE | |
| LOW | hooks.py | 175 | CODE | |
| LOW | main.py | 69 | CODE | |
| LOW | main.py | 124 | CODE | |
| LOW | main.py | 215 | CODE | |
| LOW | main.py | 271 | CODE | |
| LOW | main.py | 400 | CODE | |
| LOW | main.py | 491 | CODE | |
| LOW | main.py | 682 | CODE | |
| LOW | main.py | 836 | CODE | |
| LOW | main.py | 908 | CODE | |
| LOW | main.py | 1240 | CODE | |
| LOW | main.py | 1520 | CODE | |
| LOW | main.py | 1643 | CODE | |
| LOW | main.py | 1701 | CODE | |
| LOW | main.py | 1927 | CODE | |
| LOW | scripts/validate_examples.py | 194 | CODE | |
| LOW | scripts/validate_examples.py | 323 | CODE | |
| LOW | scripts/validate_examples.py | 395 | CODE | |
| LOW | scripts/validate_examples.py | 577 | CODE | |
| LOW | scripts/validate_examples.py | 1115 | CODE | |
| LOW | scripts/check_links.py | 72 | CODE | |
| LOW | scripts/super_linter_local.py | 34 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | hooks.py | 456 | # Step 1: Resolve relative $ref to absolute URLs | COMMENT |
| LOW⚡ | hooks.py | 459 | # Step 2: Inject versions for versioned entities and transport artifacts | COMMENT |
| LOW⚡ | hooks.py | 463 | # Step 3: Rewrite URLs to include version | COMMENT |
| LOW | docs/specification/payment/template.md | 245 | #### Step 1: Discover Handler | COMMENT |
| LOW | docs/specification/payment/extensions/ap2-mandates.md | 275 | ### Step 1: Checkout Creation & Signing | COMMENT |
| LOW | docs/specification/payment/extensions/ap2-mandates.md | 338 | ### Step 2: User Consent & Mandate Generation | COMMENT |
| LOW | docs/specification/payment/extensions/ap2-mandates.md | 365 | ### Step 3: Submission (`complete_checkout`) | COMMENT |
| LOW | …ayment/examples/processor-tokenizer-payment-handler.md | 193 | #### Step 1: Discover Handler | COMMENT |
| LOW | …ayment/examples/processor-tokenizer-payment-handler.md | 221 | #### Step 2: Collect Sensitive Data | COMMENT |
| LOW | …ayment/examples/processor-tokenizer-payment-handler.md | 227 | #### Step 3: Tokenize Data | COMMENT |
| LOW | …ayment/examples/processor-tokenizer-payment-handler.md | 243 | ### Step 4: Complete Checkout | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | docs/specification/payment/extensions/ap2-mandates.md | 152 | > [AP2 #268](https://github.com/google-agentic-commerce/AP2/issues/268) | CODE |
| MEDIUM | docs/specification/payment/extensions/ap2-mandates.md | 152 | > [AP2 #268](https://github.com/google-agentic-commerce/AP2/issues/268) | CODE |
| MEDIUM | scripts/validate_examples.py | 1032 | # 8. Load scaffold and merge | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 505 | # E2E: a fully-elided get_product response validates via the scaffold | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 596 | # Complete examples validate without a scaffold. Scaffolds are only required | COMMENT |
| MEDIUM | scripts/test_validate_examples.py | 613 | # normal target/scaffold validation. | COMMENT |
| MEDIUM | scripts/scaffolds/shopping_order_response.json | 8 | "permalink_url": "https://example.com/orders/scaffold", | CODE |
| MEDIUM | scripts/scaffolds/lodging_booking_response.json | 87 | "continue_url": "https://example.com/booking-sessions/scaffold", | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | main.py | 475 | # types directory, so we just pass the filename | COMMENT |
| LOW | main.py | 1994 | # If ref not resolved, just use name | COMMENT |
| LOW | main.py | 596 | else: # Internal ref like #/$defs/context: just use fragment | CODE |
| MEDIUM⚡ | scripts/test_check_links.py | 39 | # Test harness (minimal, no deps) | COMMENT |
| MEDIUM⚡ | scripts/test_validate_examples.py | 40 | # Test harness (minimal, no deps) | COMMENT |
| MEDIUM⚡ | scripts/test_schema_tables.py | 26 | # Test harness (minimal, no deps) | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | scripts/test_check_links.py | 0 | run all tests and report. exit 0 on pass, 1 on failure. | STRING |
| HIGH | scripts/test_validate_examples.py | 0 | run all tests and report. exit 0 on pass, 1 on failure. | STRING |
| HIGH | scripts/test_schema_tables.py | 0 | run all tests and report. exit 0 on pass, 1 on failure. | STRING |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | hooks.py | 1 | # Copyright 2026 UCP Authors | COMMENT |
| LOW | mkdocs.yml | 1 | --- | COMMENT |
| LOW | .pre-commit-config.yaml | 21 | # (.github/workflows/docs.yml). | COMMENT |
| LOW | main.py | 1 | # Copyright 2026 UCP Authors | COMMENT |
| LOW | .github/workflows/release-setup.yml | 1 | --- | COMMENT |
| LOW | .github/workflows/linter.yaml | 1 | # Copyright 2026 Google LLC | COMMENT |
| LOW | .github/workflows/docs.yml | 1 | --- | COMMENT |
| LOW | .github/workflows/conventional-commits.yml | 1 | # Copyright 2026 Google LLC | COMMENT |
| LOW | .github/workflows/spellcheck.yaml | 1 | # Copyright 2026 Google LLC | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | scripts/check_links.py | 92 | except Exception as e: | CODE |
| LOW | scripts/check_links.py | 123 | except Exception: | CODE |
| LOW | scripts/check_links.py | 140 | except Exception: | CODE |
| LOW | scripts/check_links.py | 145 | except Exception as e: | CODE |
| MEDIUM | scripts/super_linter_local.py | 60 | print(f"Error: {workflow_path} not found.") | CODE |
| MEDIUM | scripts/super_linter_local.py | 78 | print("Error: Could not find 'Lint Code Base' step in workflow.") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW⚡ | hooks.py | 456 | # Step 1: Resolve relative $ref to absolute URLs | COMMENT |
| LOW⚡ | hooks.py | 459 | # Step 2: Inject versions for versioned entities and transport artifacts | COMMENT |
| LOW⚡ | hooks.py | 463 | # Step 3: Rewrite URLs to include version | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | main.py | 1099 | except (json.JSONDecodeError, OSError): | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | main.py | 481 | # Check if any property has ucp_request annotation | COMMENT |
| LOW | main.py | 549 | # Check if this reference comes from the core UCP schema | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | hooks.py | 326 | CODE |