Repository Analysis

trailofbits/algo

Set up a personal VPN in the cloud

16.1 Moderate AI signal View on GitHub

Analysis Overview

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).

16.1
Adjusted Score
16.1
Raw Score
100%
Time Factor
2026-07-08
Last Push
30.3K
Stars
Python
Language
20.1K
Lines of Code
220
Files
230
Pattern Hits
2026-07-14
Scan Date
0.00
HC Hit Rate

What These Metrics Mean

Adjusted Score
Primary synthetic code indicator. Raw score normalised per 1,000 lines of code and multiplied by the temporal discount factor. This is the definitive comparative metric — use it to rank repositories by AI authorship density.
Raw Score
The unmodified sum of all severity-weighted, context-multiplied pattern match scores before temporal discounting. Reflects the absolute signal strength independent of when the repository was last active.
Time Factor
The temporal discount multiplier (0–100%) applied to the raw score. Repositories last updated before ChatGPT's launch (Nov 2022) receive a 5% factor. Full signal is only assigned to repositories active in the post-adoption era (Jan 2024+).
Pattern Hits
Total count of individual pattern matches across all files and categories. A high hit count with a low score may indicate a very large codebase with isolated AI snippets; a low count with a high score indicates dense, concentrated AI signatures.
HC Hit Rate
High+Critical pattern hits per file, averaged across the repository. This orthogonal signal catches repositories where a few files are densely packed with high-severity AI tells — a strong indicator even when the normalised score appears moderate due to codebase size.
Lines of Code / Files
Total lines and files analysed. The scanner examines 94 file extensions. These denominators are used to normalise the score, enabling fair comparison between repositories of vastly different sizes.

Score History

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.

Severity Breakdown

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.

CRITICAL 0HIGH 1MEDIUM 40LOW 189

Directory Score Breakdown

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.

Pattern Findings

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.

Hyper-Verbose Identifiers99 hits · 104 pts
SeverityFileLineSnippetContext
LOWCLAUDE.md348def test_regression_openssl_inline_comments():CODE
LOWtests/test_package_preinstall.py27 def test_preinstall_disabled_by_default(self):STRING
LOWtests/test_package_preinstall.py53 def test_preinstall_disabled_explicitly(self):CODE
LOWtests/test_cloud_init_template.py28def create_expected_cloud_init():CODE
LOWtests/test_cloud_init_template.py192 def test_indentation_consistency(self):CODE
LOWtests/validate_jinja2_templates.py34def check_inline_comments_in_expressions(template_content: str, template_path: Path) -> list[str]:CODE
LOWtests/validate_jinja2_templates.py69def check_undefined_variables(template_path: Path) -> list[str]:CODE
LOWtests/validate_jinja2_templates.py180def check_common_antipatterns(template_path: Path) -> list[str]:CODE
LOWtests/unit/test_comprehensive_boolean_scan.py98 def test_no_string_true_false_in_set_fact(self):CODE
LOWtests/unit/test_comprehensive_boolean_scan.py113 def test_no_bare_false_in_jinja_else(self):CODE
LOWtests/unit/test_comprehensive_boolean_scan.py129 def test_when_conditions_use_booleans(self):CODE
LOWtests/unit/test_comprehensive_boolean_scan.py163 def test_template_files_boolean_usage(self):CODE
LOWtests/unit/test_comprehensive_boolean_scan.py189 def test_all_when_conditions_would_work(self):CODE
LOWtests/unit/test_comprehensive_boolean_scan.py218 def test_no_other_problematic_patterns(self):CODE
LOWtests/unit/test_comprehensive_boolean_scan.py267 def test_verify_our_fixes_are_correct(self):CODE
LOWtests/unit/test_comprehensive_boolean_scan.py289 def test_templates_handle_booleans_correctly(self):CODE
LOWtests/unit/test_lightsail_boto3_fix.py42 def test_lightsail_region_facts_imports(self):CODE
LOWtests/unit/test_destroy.py41def test_destroy_playbook_syntax():CODE
LOWtests/unit/test_destroy.py51def test_destroy_playbook_has_rescue():CODE
LOWtests/unit/test_destroy.py59def test_destroy_playbook_has_confirmation():CODE
LOWtests/unit/test_destroy.py66def test_all_provider_destroy_files_exist():CODE
LOWtests/unit/test_destroy.py73def test_all_provider_destroy_files_valid_yaml():CODE
LOWtests/unit/test_destroy.py82def test_provider_destroy_uses_absent_state():CODE
LOWtests/unit/test_destroy.py99def test_lightsail_destroy_uses_cloudformation():CODE
LOWtests/unit/test_destroy.py107def test_gce_destroy_cleans_subsidiary_resources():CODE
LOWtests/unit/test_destroy.py116def test_vultr_destroy_cleans_firewall_group():CODE
LOWtests/unit/test_destroy.py123def test_openstack_destroy_cleans_security_group():CODE
LOWtests/unit/test_destroy.py130def test_cloudstack_destroy_cleans_security_group():CODE
LOWtests/unit/test_destroy.py137def test_subsidiary_cleanup_is_best_effort():CODE
LOWtests/unit/test_destroy.py152def test_linode_uses_label_not_name():CODE
LOWtests/unit/test_destroy.py159def test_azure_deletes_resource_group():CODE
LOWtests/unit/test_destroy.py167def test_algo_script_has_destroy_command():CODE
LOWtests/unit/test_destroy.py175def test_algo_script_destroy_requires_ip():CODE
LOWtests/unit/test_destroy.py182def test_server_yml_stores_algo_region():CODE
LOWtests/unit/test_destroy.py189def test_destroy_playbook_validates_region_for_required_providers():CODE
LOWtests/unit/test_destroy.py197def test_destroy_playbook_loads_server_config():CODE
LOWtests/unit/test_destroy.py25def test_destroy_playbook_exists():CODE
LOWtests/unit/test_destroy.py30def test_destroy_playbook_valid_yaml():CODE
LOWtests/unit/test_cloud_provider_configs.py48def test_no_deprecated_instance_types():CODE
LOWtests/unit/test_cloud_provider_configs.py60def test_required_fields_present():CODE
LOWtests/unit/test_strongswan_templates.py50def get_strongswan_test_variables(scenario="default"):CODE
LOWtests/unit/test_strongswan_templates.py102def test_strongswan_templates():CODE
LOWtests/unit/test_strongswan_templates.py178def test_openssl_template_constraints():CODE
LOWtests/unit/test_strongswan_templates.py223def test_mobileconfig_template():CODE
LOWtests/unit/test_yaml_jinja2_expressions.py258def test_regression_openssl_inline_comments():CODE
LOWtests/unit/test_yaml_jinja2_expressions.py301def test_edge_cases_inline_comments():CODE
LOWtests/unit/test_yaml_jinja2_expressions.py364def test_yaml_files_no_inline_comments():CODE
LOWtests/unit/test_yaml_jinja2_expressions.py387def test_openssl_file_specifically():CODE
LOWtests/unit/test_iptables_rules.py118def test_alternative_ingress_snat():CODE
LOWtests/unit/test_iptables_rules.py148def test_ipsec_forward_rule_has_policy_match():CODE
LOWtests/unit/test_iptables_rules.py171def test_wireguard_forward_rule_no_policy_match():CODE
LOWtests/unit/test_iptables_rules.py197def test_output_interface_in_nat_rules():CODE
LOWtests/unit/test_iptables_rules.py225def test_dns_firewall_restricted_to_vpn():CODE
LOWtests/unit/test_user_management.py42def test_server_selection_format():STRING
LOWtests/unit/test_user_management.py71def test_ssh_key_preservation():CODE
LOWtests/unit/test_user_management.py98def test_ca_password_handling():CODE
LOWtests/unit/test_user_management.py127def test_user_config_generation():CODE
LOWtests/unit/test_user_management.py149def test_duplicate_user_handling():CODE
LOWtests/unit/test_basic_sanity.py19def test_pyproject_file_exists():CODE
LOWtests/unit/test_basic_sanity.py77def test_cloud_init_header_format():CODE
39 more matches not shown…
Decorative Section Separators24 hits · 76 pts
SeverityFileLineSnippetContext
MEDIUMconfig.cfg3# ============================================COMMENT
MEDIUMconfig.cfg5# ============================================COMMENT
MEDIUMconfig.cfg10# ============================================COMMENT
MEDIUMserver.yml48 # ============================================================COMMENT
MEDIUMserver.yml52 # ============================================================COMMENT
MEDIUMtests/test-wireguard-real-async.yml3# ==================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh5# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh12# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh46# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh48# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh85# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh87# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh151# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh153# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh193# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh195# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh228# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh230# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh387# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh389# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh556# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh558# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh600# =============================================================================COMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh602# =============================================================================COMMENT
Redundant / Tautological Comments24 hits · 36 pts
SeverityFileLineSnippetContext
LOWconfig.cfg162 # Set use_existing_eip to "true" if you want to use a pre-allocated Elastic IPCOMMENT
LOWtests/validate_jinja2_templates.py57 # Check if it's likely a comment (has text after it)COMMENT
LOWtests/unit/test_comprehensive_boolean_scan.py150 # Check if it's a simple condition (good) or comparing to string (bad)COMMENT
LOWtests/unit/test_comprehensive_boolean_scan.py210 # Check if it's using one of our boolean variablesCOMMENT
LOWtests/unit/test_comprehensive_boolean_scan.py258 # Check if it's a known safe patternCOMMENT
LOWtests/unit/test_strongswan_templates.py206 # Check if the # is within {{ }}COMMENT
LOWtests/unit/test_yaml_jinja2_expressions.py78 # Check if the # is within a list or dict literalCOMMENT
LOWtests/unit/test_yaml_jinja2_expressions.py95 # Check if it's escapedCOMMENT
LOWtests/unit/test_yaml_jinja2_expressions.py140 # Check if the # is within a list or dict literalCOMMENT
LOWtests/unit/test_template_rendering.py170 # Check if main.yml defines theseCOMMENT
LOWtests/unit/test_template_rendering.py225 # Check if the expected endpoint format is in the outputCOMMENT
LOWtests/unit/test_template_rendering.py317 # Check if we have Jinja2 availableCOMMENT
LOWtests/unit/test_docker_localhost_deployment.py90 # Check if Dockerfile existsCOMMENT
LOWtests/unit/test_openssl_compatibility.py288 # Check if this looks like a client cert vs server certCOMMENT
LOWtests/integration/ansible-service-wrapper.py32# Check if it's a known serviceCOMMENT
LOWtests/integration/mock_modules/apt.py65 # Check if we need to install anythingCOMMENT
LOWtests/integration/mock_modules/apt.py82 # Check if we need to remove anythingCOMMENT
LOWtests/e2e/test-vpn-connectivity.sh501 # Check if IPsec service is running on hostCOMMENT
LOWroles/strongswan/handlers/main.yml13 # Check if StrongSwan is actually runningCOMMENT
LOWroles/common/tasks/ubuntu.yml21 # Check if kernel was updated (most critical reboot reason)COMMENT
LOWscripts/track-test-effectiveness.py92 # Check if PR was merged (indicating it fixed a real issue)COMMENT
LOW.github/workflows/integration-tests.yml200 # Check if interface has peersCOMMENT
LOW.github/workflows/test-effectiveness.yml44 # Check if we need to create an issueCOMMENT
LOW.github/workflows/test-effectiveness.yml46 # Check if issue already existsCOMMENT
Excessive Try-Catch Wrapping34 hits · 34 pts
SeverityFileLineSnippetContext
LOWtests/test_cloud_init_template.py253 except Exception as e:CODE
LOWtests/validate_jinja2_templates.py113 except Exception:CODE
LOWtests/validate_jinja2_templates.py141 except Exception:CODE
LOWtests/validate_jinja2_templates.py174 except Exception as e:CODE
LOWtests/validate_jinja2_templates.py204 except Exception:CODE
LOWtests/unit/test_lightsail_boto3_fix.py61 except Exception as e:CODE
LOWtests/unit/test_lightsail_boto3_fix.py92 except Exception:CODE
LOWtests/unit/test_strongswan_templates.py164 except Exception as e:CODE
LOWtests/unit/test_strongswan_templates.py218 except Exception as e:CODE
LOWtests/unit/test_strongswan_templates.py298 except Exception as e:CODE
LOWtests/unit/test_yaml_jinja2_expressions.py152 except Exception as e:CODE
LOWtests/unit/test_yaml_jinja2_expressions.py251 except Exception as e:CODE
LOWtests/unit/test_user_management.py196 except Exception as e:STRING
LOWtests/unit/test_basic_sanity.py117 except Exception as e:CODE
LOWtests/unit/test_generated_configs.py380 except Exception as e:STRING
LOWtests/unit/test_template_rendering.py87 except Exception as e:CODE
LOWtests/unit/test_template_rendering.py146 except Exception as e:CODE
LOWtests/unit/test_template_rendering.py235 except Exception as e:CODE
LOWtests/unit/test_template_rendering.py309 except Exception as e:CODE
LOWtests/unit/test_template_rendering.py340 except Exception as e:CODE
LOWtests/unit/test_config_validation.py144 except Exception as e:CODE
LOWtests/unit/test_wireguard_key_generation.py63 except Exception:CODE
LOWtests/unit/test_wireguard_key_generation.py122 except Exception as e:CODE
LOWtests/unit/test_wireguard_key_generation.py179 except Exception as e:CODE
LOWtests/unit/test_wireguard_key_generation.py341 except Exception as e:CODE
LOWtests/unit/test_scaleway_fix.py128 except Exception as e:CODE
LOWtests/unit/test_docker_localhost_deployment.py162 except Exception as e:CODE
LOWtests/unit/test_openssl_compatibility.py568 except Exception as e:CODE
LOWtests/unit/test_double_templating.py78 except Exception:CODE
LOWtests/integration/mock_modules/command.py65 except Exception as e:CODE
LOWtests/integration/mock_modules/shell.py60 except Exception as e:CODE
LOWlibrary/x25519_pubkey.py87 except Exception as e:CODE
LOWlibrary/x25519_pubkey.py120 except Exception as e:CODE
MEDIUMscripts/track-test-effectiveness.py19 print(f"Error fetching {endpoint}: {result.stderr}")CODE
Deep Nesting26 hits · 26 pts
SeverityFileLineSnippetContext
LOWtests/conftest.py98CODE
LOWtests/test_cloud_init_template.py192CODE
LOWtests/validate_jinja2_templates.py34CODE
LOWtests/unit/test_comprehensive_boolean_scan.py129CODE
LOWtests/unit/test_comprehensive_boolean_scan.py218CODE
LOWtests/unit/test_lightsail_boto3_fix.py64CODE
LOWtests/unit/test_strongswan_templates.py102CODE
LOWtests/unit/test_strongswan_templates.py178CODE
LOWtests/unit/test_yaml_jinja2_expressions.py68CODE
LOWtests/unit/test_yaml_jinja2_expressions.py209CODE
LOWtests/unit/test_yaml_jinja2_expressions.py301CODE
LOWtests/unit/test_generated_configs.py21CODE
LOWtests/unit/test_generated_configs.py96CODE
LOWtests/unit/test_generated_configs.py172CODE
LOWtests/unit/test_generated_configs.py298CODE
LOWtests/unit/test_template_rendering.py29CODE
LOWtests/unit/test_template_rendering.py187CODE
LOWtests/unit/test_template_rendering.py247CODE
LOWtests/unit/test_wireguard_key_generation.py70CODE
LOWtests/integration/mock_modules/command.py9CODE
LOWtests/integration/mock_modules/apt.py9CODE
LOWlibrary/scaleway_compute.py560CODE
LOWlibrary/scaleway_compute.py589CODE
LOWlibrary/x25519_pubkey.py32CODE
LOWscripts/track-test-effectiveness.py24CODE
LOWscripts/track-test-effectiveness.py85CODE
Self-Referential Comments6 hits · 18 pts
SeverityFileLineSnippetContext
MEDIUMtests/test_package_preinstall.py11 # Create a simplified test template with just the packages sectionCOMMENT
MEDIUMtests/test-local-config.sh13# Create a minimal test configurationCOMMENT
MEDIUMtests/unit/test_wireguard_key_generation.py233 # Create a WireGuard config using our keysCOMMENT
MEDIUMtests/unit/test_docker_localhost_deployment.py23 # Create a test WireGuard configCOMMENT
MEDIUMtests/e2e/test-vpn-connectivity.sh462 # Create a minimal strongswan.confCOMMENT
MEDIUM.github/workflows/integration-tests.yml286 # Create a minimal valid configCOMMENT
Dead Code6 hits · 12 pts
SeverityFileLineSnippetContext
MEDIUMtests/unit/test_strongswan_templates.py237CODE
MEDIUMtests/unit/test_strongswan_templates.py256CODE
MEDIUMtests/unit/test_strongswan_templates.py257CODE
MEDIUMtests/unit/test_strongswan_templates.py302CODE
MEDIUMtests/unit/test_strongswan_templates.py305CODE
MEDIUMtests/unit/test_strongswan_templates.py306CODE
AI Slop Vocabulary4 hits · 6 pts
SeverityFileLineSnippetContext
LOWtests/unit/test_strongswan_templates.py30 # Simple mock - just return True for nowCOMMENT
MEDIUMtests/unit/test_yaml_jinja2_expressions.py162 """Get a comprehensive set of test variables for expression validation."""STRING
MEDIUMtests/unit/test_template_rendering.py43 """Get a comprehensive set of test variables for template rendering"""STRING
MEDIUMroles/dns/tasks/ubuntu.yml119 # Additional hardening on top of comprehensive AppArmorCOMMENT
Cross-Language Confusion1 hit · 5 pts
SeverityFileLineSnippetContext
HIGHtests/test_cloud_init_template.py74 - sudo apt-get remove -y --purge sshguard || trueCODE
Over-Commented Block2 hits · 2 pts
SeverityFileLineSnippetContext
LOWconfig.cfg1---COMMENT
LOWtests/integration/mock-apparmor_status.sh1#!/bin/bashCOMMENT
Unused Imports2 hits · 2 pts
SeverityFileLineSnippetContext
LOWtests/unit/test_template_rendering.py319CODE
LOWlibrary/lightsail_region_facts.py58CODE
Fake / Example Data1 hit · 1 pts
SeverityFileLineSnippetContext
LOWroles/common/tasks/aip/main.yml9 file: "{{ algo_provider if algo_provider in aip_supported_providers else 'placeholder' }}.yml"CODE
Overly Generic Function Names1 hit · 0 pts
SeverityFileLineSnippetContext
LOWlibrary/scaleway_compute.py294def perform_action(compute_api, server, action):STRING