Set up a personal VPN in the cloud
This report presents the forensic synthetic code analysis of trailofbits/algo, a Python project with 30,311 GitHub stars. SynthScan v2.0 examined 20,133 lines of code across 220 source files, recording 230 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 16.1 places this repository in the Moderate AI signal 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 230 distinct pattern matches across 13 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 | CLAUDE.md | 348 | def test_regression_openssl_inline_comments(): | CODE |
| LOW | tests/test_package_preinstall.py | 27 | def test_preinstall_disabled_by_default(self): | STRING |
| LOW | tests/test_package_preinstall.py | 53 | def test_preinstall_disabled_explicitly(self): | CODE |
| LOW | tests/test_cloud_init_template.py | 28 | def create_expected_cloud_init(): | CODE |
| LOW | tests/test_cloud_init_template.py | 192 | def test_indentation_consistency(self): | CODE |
| LOW | tests/validate_jinja2_templates.py | 34 | def check_inline_comments_in_expressions(template_content: str, template_path: Path) -> list[str]: | CODE |
| LOW | tests/validate_jinja2_templates.py | 69 | def check_undefined_variables(template_path: Path) -> list[str]: | CODE |
| LOW | tests/validate_jinja2_templates.py | 180 | def check_common_antipatterns(template_path: Path) -> list[str]: | CODE |
| LOW | tests/unit/test_comprehensive_boolean_scan.py | 98 | def test_no_string_true_false_in_set_fact(self): | CODE |
| LOW | tests/unit/test_comprehensive_boolean_scan.py | 113 | def test_no_bare_false_in_jinja_else(self): | CODE |
| LOW | tests/unit/test_comprehensive_boolean_scan.py | 129 | def test_when_conditions_use_booleans(self): | CODE |
| LOW | tests/unit/test_comprehensive_boolean_scan.py | 163 | def test_template_files_boolean_usage(self): | CODE |
| LOW | tests/unit/test_comprehensive_boolean_scan.py | 189 | def test_all_when_conditions_would_work(self): | CODE |
| LOW | tests/unit/test_comprehensive_boolean_scan.py | 218 | def test_no_other_problematic_patterns(self): | CODE |
| LOW | tests/unit/test_comprehensive_boolean_scan.py | 267 | def test_verify_our_fixes_are_correct(self): | CODE |
| LOW | tests/unit/test_comprehensive_boolean_scan.py | 289 | def test_templates_handle_booleans_correctly(self): | CODE |
| LOW | tests/unit/test_lightsail_boto3_fix.py | 42 | def test_lightsail_region_facts_imports(self): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 41 | def test_destroy_playbook_syntax(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 51 | def test_destroy_playbook_has_rescue(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 59 | def test_destroy_playbook_has_confirmation(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 66 | def test_all_provider_destroy_files_exist(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 73 | def test_all_provider_destroy_files_valid_yaml(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 82 | def test_provider_destroy_uses_absent_state(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 99 | def test_lightsail_destroy_uses_cloudformation(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 107 | def test_gce_destroy_cleans_subsidiary_resources(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 116 | def test_vultr_destroy_cleans_firewall_group(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 123 | def test_openstack_destroy_cleans_security_group(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 130 | def test_cloudstack_destroy_cleans_security_group(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 137 | def test_subsidiary_cleanup_is_best_effort(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 152 | def test_linode_uses_label_not_name(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 159 | def test_azure_deletes_resource_group(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 167 | def test_algo_script_has_destroy_command(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 175 | def test_algo_script_destroy_requires_ip(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 182 | def test_server_yml_stores_algo_region(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 189 | def test_destroy_playbook_validates_region_for_required_providers(): | CODE |
| LOW⚡ | tests/unit/test_destroy.py | 197 | def test_destroy_playbook_loads_server_config(): | CODE |
| LOW | tests/unit/test_destroy.py | 25 | def test_destroy_playbook_exists(): | CODE |
| LOW | tests/unit/test_destroy.py | 30 | def test_destroy_playbook_valid_yaml(): | CODE |
| LOW | tests/unit/test_cloud_provider_configs.py | 48 | def test_no_deprecated_instance_types(): | CODE |
| LOW | tests/unit/test_cloud_provider_configs.py | 60 | def test_required_fields_present(): | CODE |
| LOW | tests/unit/test_strongswan_templates.py | 50 | def get_strongswan_test_variables(scenario="default"): | CODE |
| LOW | tests/unit/test_strongswan_templates.py | 102 | def test_strongswan_templates(): | CODE |
| LOW | tests/unit/test_strongswan_templates.py | 178 | def test_openssl_template_constraints(): | CODE |
| LOW | tests/unit/test_strongswan_templates.py | 223 | def test_mobileconfig_template(): | CODE |
| LOW | tests/unit/test_yaml_jinja2_expressions.py | 258 | def test_regression_openssl_inline_comments(): | CODE |
| LOW | tests/unit/test_yaml_jinja2_expressions.py | 301 | def test_edge_cases_inline_comments(): | CODE |
| LOW | tests/unit/test_yaml_jinja2_expressions.py | 364 | def test_yaml_files_no_inline_comments(): | CODE |
| LOW | tests/unit/test_yaml_jinja2_expressions.py | 387 | def test_openssl_file_specifically(): | CODE |
| LOW | tests/unit/test_iptables_rules.py | 118 | def test_alternative_ingress_snat(): | CODE |
| LOW | tests/unit/test_iptables_rules.py | 148 | def test_ipsec_forward_rule_has_policy_match(): | CODE |
| LOW | tests/unit/test_iptables_rules.py | 171 | def test_wireguard_forward_rule_no_policy_match(): | CODE |
| LOW | tests/unit/test_iptables_rules.py | 197 | def test_output_interface_in_nat_rules(): | CODE |
| LOW | tests/unit/test_iptables_rules.py | 225 | def test_dns_firewall_restricted_to_vpn(): | CODE |
| LOW | tests/unit/test_user_management.py | 42 | def test_server_selection_format(): | STRING |
| LOW | tests/unit/test_user_management.py | 71 | def test_ssh_key_preservation(): | CODE |
| LOW | tests/unit/test_user_management.py | 98 | def test_ca_password_handling(): | CODE |
| LOW | tests/unit/test_user_management.py | 127 | def test_user_config_generation(): | CODE |
| LOW | tests/unit/test_user_management.py | 149 | def test_duplicate_user_handling(): | CODE |
| LOW | tests/unit/test_basic_sanity.py | 19 | def test_pyproject_file_exists(): | CODE |
| LOW | tests/unit/test_basic_sanity.py | 77 | def test_cloud_init_header_format(): | CODE |
| 39 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | config.cfg | 3 | # ============================================ | COMMENT |
| MEDIUM⚡ | config.cfg | 5 | # ============================================ | COMMENT |
| MEDIUM⚡ | config.cfg | 10 | # ============================================ | COMMENT |
| MEDIUM | server.yml | 48 | # ============================================================ | COMMENT |
| MEDIUM | server.yml | 52 | # ============================================================ | COMMENT |
| MEDIUM | tests/test-wireguard-real-async.yml | 3 | # ================================================== | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 5 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 12 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 46 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 48 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 85 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 87 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 151 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 153 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 193 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 195 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 228 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 230 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 387 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 389 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 556 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 558 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 600 | # ============================================================================= | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 602 | # ============================================================================= | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | config.cfg | 162 | # Set use_existing_eip to "true" if you want to use a pre-allocated Elastic IP | COMMENT |
| LOW | tests/validate_jinja2_templates.py | 57 | # Check if it's likely a comment (has text after it) | COMMENT |
| LOW | tests/unit/test_comprehensive_boolean_scan.py | 150 | # Check if it's a simple condition (good) or comparing to string (bad) | COMMENT |
| LOW | tests/unit/test_comprehensive_boolean_scan.py | 210 | # Check if it's using one of our boolean variables | COMMENT |
| LOW | tests/unit/test_comprehensive_boolean_scan.py | 258 | # Check if it's a known safe pattern | COMMENT |
| LOW | tests/unit/test_strongswan_templates.py | 206 | # Check if the # is within {{ }} | COMMENT |
| LOW | tests/unit/test_yaml_jinja2_expressions.py | 78 | # Check if the # is within a list or dict literal | COMMENT |
| LOW | tests/unit/test_yaml_jinja2_expressions.py | 95 | # Check if it's escaped | COMMENT |
| LOW | tests/unit/test_yaml_jinja2_expressions.py | 140 | # Check if the # is within a list or dict literal | COMMENT |
| LOW | tests/unit/test_template_rendering.py | 170 | # Check if main.yml defines these | COMMENT |
| LOW | tests/unit/test_template_rendering.py | 225 | # Check if the expected endpoint format is in the output | COMMENT |
| LOW | tests/unit/test_template_rendering.py | 317 | # Check if we have Jinja2 available | COMMENT |
| LOW | tests/unit/test_docker_localhost_deployment.py | 90 | # Check if Dockerfile exists | COMMENT |
| LOW | tests/unit/test_openssl_compatibility.py | 288 | # Check if this looks like a client cert vs server cert | COMMENT |
| LOW | tests/integration/ansible-service-wrapper.py | 32 | # Check if it's a known service | COMMENT |
| LOW | tests/integration/mock_modules/apt.py | 65 | # Check if we need to install anything | COMMENT |
| LOW | tests/integration/mock_modules/apt.py | 82 | # Check if we need to remove anything | COMMENT |
| LOW | tests/e2e/test-vpn-connectivity.sh | 501 | # Check if IPsec service is running on host | COMMENT |
| LOW | roles/strongswan/handlers/main.yml | 13 | # Check if StrongSwan is actually running | COMMENT |
| LOW | roles/common/tasks/ubuntu.yml | 21 | # Check if kernel was updated (most critical reboot reason) | COMMENT |
| LOW | scripts/track-test-effectiveness.py | 92 | # Check if PR was merged (indicating it fixed a real issue) | COMMENT |
| LOW | .github/workflows/integration-tests.yml | 200 | # Check if interface has peers | COMMENT |
| LOW | .github/workflows/test-effectiveness.yml | 44 | # Check if we need to create an issue | COMMENT |
| LOW | .github/workflows/test-effectiveness.yml | 46 | # Check if issue already exists | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/test_cloud_init_template.py | 253 | except Exception as e: | CODE |
| LOW | tests/validate_jinja2_templates.py | 113 | except Exception: | CODE |
| LOW | tests/validate_jinja2_templates.py | 141 | except Exception: | CODE |
| LOW | tests/validate_jinja2_templates.py | 174 | except Exception as e: | CODE |
| LOW | tests/validate_jinja2_templates.py | 204 | except Exception: | CODE |
| LOW | tests/unit/test_lightsail_boto3_fix.py | 61 | except Exception as e: | CODE |
| LOW | tests/unit/test_lightsail_boto3_fix.py | 92 | except Exception: | CODE |
| LOW | tests/unit/test_strongswan_templates.py | 164 | except Exception as e: | CODE |
| LOW | tests/unit/test_strongswan_templates.py | 218 | except Exception as e: | CODE |
| LOW | tests/unit/test_strongswan_templates.py | 298 | except Exception as e: | CODE |
| LOW | tests/unit/test_yaml_jinja2_expressions.py | 152 | except Exception as e: | CODE |
| LOW | tests/unit/test_yaml_jinja2_expressions.py | 251 | except Exception as e: | CODE |
| LOW | tests/unit/test_user_management.py | 196 | except Exception as e: | STRING |
| LOW | tests/unit/test_basic_sanity.py | 117 | except Exception as e: | CODE |
| LOW | tests/unit/test_generated_configs.py | 380 | except Exception as e: | STRING |
| LOW | tests/unit/test_template_rendering.py | 87 | except Exception as e: | CODE |
| LOW | tests/unit/test_template_rendering.py | 146 | except Exception as e: | CODE |
| LOW | tests/unit/test_template_rendering.py | 235 | except Exception as e: | CODE |
| LOW | tests/unit/test_template_rendering.py | 309 | except Exception as e: | CODE |
| LOW | tests/unit/test_template_rendering.py | 340 | except Exception as e: | CODE |
| LOW | tests/unit/test_config_validation.py | 144 | except Exception as e: | CODE |
| LOW | tests/unit/test_wireguard_key_generation.py | 63 | except Exception: | CODE |
| LOW | tests/unit/test_wireguard_key_generation.py | 122 | except Exception as e: | CODE |
| LOW | tests/unit/test_wireguard_key_generation.py | 179 | except Exception as e: | CODE |
| LOW | tests/unit/test_wireguard_key_generation.py | 341 | except Exception as e: | CODE |
| LOW | tests/unit/test_scaleway_fix.py | 128 | except Exception as e: | CODE |
| LOW | tests/unit/test_docker_localhost_deployment.py | 162 | except Exception as e: | CODE |
| LOW | tests/unit/test_openssl_compatibility.py | 568 | except Exception as e: | CODE |
| LOW | tests/unit/test_double_templating.py | 78 | except Exception: | CODE |
| LOW | tests/integration/mock_modules/command.py | 65 | except Exception as e: | CODE |
| LOW | tests/integration/mock_modules/shell.py | 60 | except Exception as e: | CODE |
| LOW | library/x25519_pubkey.py | 87 | except Exception as e: | CODE |
| LOW | library/x25519_pubkey.py | 120 | except Exception as e: | CODE |
| MEDIUM | scripts/track-test-effectiveness.py | 19 | print(f"Error fetching {endpoint}: {result.stderr}") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/conftest.py | 98 | CODE | |
| LOW | tests/test_cloud_init_template.py | 192 | CODE | |
| LOW | tests/validate_jinja2_templates.py | 34 | CODE | |
| LOW | tests/unit/test_comprehensive_boolean_scan.py | 129 | CODE | |
| LOW | tests/unit/test_comprehensive_boolean_scan.py | 218 | CODE | |
| LOW | tests/unit/test_lightsail_boto3_fix.py | 64 | CODE | |
| LOW | tests/unit/test_strongswan_templates.py | 102 | CODE | |
| LOW | tests/unit/test_strongswan_templates.py | 178 | CODE | |
| LOW | tests/unit/test_yaml_jinja2_expressions.py | 68 | CODE | |
| LOW | tests/unit/test_yaml_jinja2_expressions.py | 209 | CODE | |
| LOW | tests/unit/test_yaml_jinja2_expressions.py | 301 | CODE | |
| LOW | tests/unit/test_generated_configs.py | 21 | CODE | |
| LOW | tests/unit/test_generated_configs.py | 96 | CODE | |
| LOW | tests/unit/test_generated_configs.py | 172 | CODE | |
| LOW | tests/unit/test_generated_configs.py | 298 | CODE | |
| LOW | tests/unit/test_template_rendering.py | 29 | CODE | |
| LOW | tests/unit/test_template_rendering.py | 187 | CODE | |
| LOW | tests/unit/test_template_rendering.py | 247 | CODE | |
| LOW | tests/unit/test_wireguard_key_generation.py | 70 | CODE | |
| LOW | tests/integration/mock_modules/command.py | 9 | CODE | |
| LOW | tests/integration/mock_modules/apt.py | 9 | CODE | |
| LOW | library/scaleway_compute.py | 560 | CODE | |
| LOW | library/scaleway_compute.py | 589 | CODE | |
| LOW | library/x25519_pubkey.py | 32 | CODE | |
| LOW | scripts/track-test-effectiveness.py | 24 | CODE | |
| LOW | scripts/track-test-effectiveness.py | 85 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/test_package_preinstall.py | 11 | # Create a simplified test template with just the packages section | COMMENT |
| MEDIUM | tests/test-local-config.sh | 13 | # Create a minimal test configuration | COMMENT |
| MEDIUM | tests/unit/test_wireguard_key_generation.py | 233 | # Create a WireGuard config using our keys | COMMENT |
| MEDIUM | tests/unit/test_docker_localhost_deployment.py | 23 | # Create a test WireGuard config | COMMENT |
| MEDIUM | tests/e2e/test-vpn-connectivity.sh | 462 | # Create a minimal strongswan.conf | COMMENT |
| MEDIUM | .github/workflows/integration-tests.yml | 286 | # Create a minimal valid config | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | tests/unit/test_strongswan_templates.py | 237 | CODE | |
| MEDIUM | tests/unit/test_strongswan_templates.py | 256 | CODE | |
| MEDIUM | tests/unit/test_strongswan_templates.py | 257 | CODE | |
| MEDIUM | tests/unit/test_strongswan_templates.py | 302 | CODE | |
| MEDIUM | tests/unit/test_strongswan_templates.py | 305 | CODE | |
| MEDIUM | tests/unit/test_strongswan_templates.py | 306 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit/test_strongswan_templates.py | 30 | # Simple mock - just return True for now | COMMENT |
| MEDIUM | tests/unit/test_yaml_jinja2_expressions.py | 162 | """Get a comprehensive set of test variables for expression validation.""" | STRING |
| MEDIUM | tests/unit/test_template_rendering.py | 43 | """Get a comprehensive set of test variables for template rendering""" | STRING |
| MEDIUM | roles/dns/tasks/ubuntu.yml | 119 | # Additional hardening on top of comprehensive AppArmor | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | tests/test_cloud_init_template.py | 74 | - sudo apt-get remove -y --purge sshguard || true | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | config.cfg | 1 | --- | COMMENT |
| LOW | tests/integration/mock-apparmor_status.sh | 1 | #!/bin/bash | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tests/unit/test_template_rendering.py | 319 | CODE | |
| LOW | library/lightsail_region_facts.py | 58 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | roles/common/tasks/aip/main.yml | 9 | file: "{{ algo_provider if algo_provider in aip_supported_providers else 'placeholder' }}.yml" | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | library/scaleway_compute.py | 294 | def perform_action(compute_api, server, action): | STRING |