Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/trailofbits/algo
/ functions
Functions
215 in github.com/trailofbits/algo
⨍
Functions
215
◇
Types & classes
9
↓ 1 callers
Function
wait_action
(module, rest, ip, action_id, timeout=10)
library/digital_ocean_floating_ip.py:133
Method
__init__
(self, resp, info)
library/digital_ocean_floating_ip.py:111
Method
__init__
(self, content)
tests/unit/test_strongswan_templates.py:263
Method
__init__
(self, params)
tests/unit/test_wireguard_key_generation.py:79
Function
absent_strategy
(compute_api, wished_server)
library/scaleway_compute.py:346
Function
check_command_available
Check if a command is available on the system
tests/unit/test_generated_configs.py:12
Function
check_undefined_variables
Parse template and extract all undefined variables. This helps identify what variables need to be provided.
tests/validate_jinja2_templates.py:69
Function
get_test_config
Get test configuration with optional overrides
tests/fixtures/__init__.py:15
Function
load_yaml_file
Load and parse a YAML file
tests/unit/test_scaleway_fix.py:17
Function
mock_b64decode
Mock base64 decoding
tests/unit/test_strongswan_templates.py:43
Function
mock_b64encode
Mock base64 encoding
tests/unit/test_strongswan_templates.py:34
Function
mock_bool
Mock the bool filter
tests/unit/test_strongswan_templates.py:23
Function
mock_bool
Mock the bool filter
tests/unit/test_template_rendering.py:24
Function
mock_lookup
Mock the lookup function
tests/unit/test_template_rendering.py:29
Function
mock_to_uuid
Mock the to_uuid filter
tests/unit/test_strongswan_templates.py:18
Function
mock_to_uuid
Mock the to_uuid filter
tests/unit/test_template_rendering.py:19
Function
mock_version
Mock the version comparison filter
tests/unit/test_strongswan_templates.py:28
Function
present_strategy
(compute_api, wished_server)
library/scaleway_compute.py:317
Function
restart_strategy
(compute_api, wished_server)
library/scaleway_compute.py:477
Function
running_strategy
(compute_api, wished_server)
library/scaleway_compute.py:382
Method
setUp
Set up test fixtures.
tests/test_package_preinstall.py:9
Method
setUp
Set up test fixtures.
tests/unit/test_lightsail_boto3_fix.py:21
Method
status_code
(self)
library/digital_ocean_floating_ip.py:129
Function
stop_strategy
(compute_api, wished_server)
library/scaleway_compute.py:424
Method
tearDown
Clean up patches.
tests/unit/test_lightsail_boto3_fix.py:37
Method
test_algo_variables_boolean_fallbacks
Ensure algo_* variables produce booleans in their fallback cases.
tests/unit/test_boolean_variables.py:41
Method
test_all_when_conditions_would_work
Test that all when: conditions in the codebase would work with boolean types.
tests/unit/test_comprehensive_boolean_scan.py:188
Function
test_alternative_ingress_snat
Test that alternative ingress IP uses SNAT instead of MASQUERADE.
tests/unit/test_iptables_rules.py:108
Method
test_ansible_12_conditional_compatibility
Test that our fixes work with Ansible 12's strict type checking. This simulates what Ansible 12 will do with our variables.
tests/unit/test_boolean_variables.py:75
Function
test_ansible_syntax
Check that main playbook has valid syntax
tests/unit/test_basic_sanity.py:46
Function
test_aws_instance_types
Test AWS EC2 instance type naming
tests/unit/test_cloud_provider_configs.py:48
Function
test_base64_key_format
Test that keys are in valid base64 format
tests/unit/test_config_validation.py:44
Method
test_boolean_filter_on_strings
Test that the bool filter correctly converts string values.
tests/unit/test_boolean_variables.py:57
Function
test_both_vpns_nat_rules_ipv4
Test NAT rules when both VPN types are enabled.
tests/unit/test_iptables_rules.py:76
Function
test_ca_certificate
Test CA certificate - uses real certs if available, else validates config (Issue #75, #153)
tests/unit/test_openssl_compatibility.py:168
Function
test_ca_password_handling
Test CA password validation and handling
tests/unit/test_user_management.py:98
Function
test_certificate_chain
Test certificate chain - uses real certs if available, else validates config
tests/unit/test_openssl_compatibility.py:524
Function
test_client_certificates
Test client certificates - uses real certs if available, else validates config (Issue #75, #153)
tests/unit/test_openssl_compatibility.py:374
Function
test_cloud_init_header_format
Check that cloud-init header is exactly '#cloud-config' without space
tests/unit/test_basic_sanity.py:77
Method
test_conditional_uses_of_variables
Check that when: conditions using these variables will work with booleans.
tests/unit/test_ansible_12_boolean_fix.py:91
Function
test_config_file_valid
Check that config.cfg is valid YAML
tests/unit/test_basic_sanity.py:33
Function
test_critical_templates
Test that critical templates render with test data
tests/unit/test_template_rendering.py:101
Function
test_digitalocean_instance_types
Test DigitalOcean droplet size naming
tests/unit/test_cloud_provider_configs.py:35
Function
test_dns_config_syntax
Test dnsmasq configuration syntax
tests/unit/test_generated_configs.py:298
Function
test_dns_firewall_restricted_to_vpn
Test that DNS access is restricted to VPN clients only.
tests/unit/test_iptables_rules.py:215
Function
test_docker_algo_image
Test that the Algo Docker image can be built
tests/unit/test_docker_localhost_deployment.py:88
Function
test_dockerfile_exists
Check that Dockerfile exists and is not empty
tests/unit/test_basic_sanity.py:65
Function
test_duplicate_user_handling
Test handling of duplicate usernames
tests/unit/test_user_management.py:149
Function
test_edge_cases_inline_comments
Test various edge cases for inline comment detection. Ensures we correctly handle hashes in strings, escaped hashes, and various comment patt
tests/unit/test_yaml_jinja2_expressions.py:301
Method
test_get_aws_connection_info_called_without_boto3
Test that get_aws_connection_info is called without boto3 parameter.
tests/unit/test_lightsail_boto3_fix.py:62
Function
test_hetzner_server_types
Test Hetzner server type configurations (issue #14730)
tests/unit/test_cloud_provider_configs.py:11
Method
test_input_yml_algo_variables_not_string_boolean
Verify algo_* variables in input.yml don't produce string 'false'.
tests/unit/test_ansible_12_boolean_fix.py:31
Function
test_ip_address_format
Test IP address and CIDR notation validation
tests/unit/test_config_validation.py:60
Function
test_ipsec_forward_rule_has_policy_match
Test that IPsec FORWARD rules still use policy matching (this is correct).
tests/unit/test_iptables_rules.py:138
Function
test_ipsec_nat_rules_ipv4
Test that IPsec traffic gets proper NAT rules without policy matching.
tests/unit/test_iptables_rules.py:50
Function
test_iptables_rules_syntax
Test iptables rules syntax
tests/unit/test_generated_configs.py:230
Method
test_ipv6_support_not_string_boolean
Verify ipv6_support in facts.yml doesn't produce string 'true'/'false'.
tests/unit/test_ansible_12_boolean_fix.py:14
Method
test_ipv6_support_produces_boolean
Ensure ipv6_support produces boolean, not string 'true'/'false'.
tests/unit/test_boolean_variables.py:20
Function
test_key_consistency
Test that the same private key always produces the same public key
tests/unit/test_wireguard_key_generation.py:272
Method
test_lightsail_region_facts_imports
Test that lightsail_region_facts can be imported.
tests/unit/test_lightsail_boto3_fix.py:42
Function
test_localhost_deployment_requirements
Test that localhost deployment requirements are met
tests/unit/test_docker_localhost_deployment.py:119
Function
test_mobile_config_xml
Test that mobile config files would be valid XML
tests/unit/test_config_validation.py:75
Function
test_mobileconfig_template
Test the mobileconfig template with various scenarios.
tests/unit/test_strongswan_templates.py:223
Method
test_no_bare_false_in_jinja_else
Check for bare 'false' after else in Jinja expressions.
tests/unit/test_comprehensive_boolean_scan.py:113
Method
test_no_bare_true_false_in_templates
Scan for any remaining bare 'true'/'false' in Jinja2 expressions.
tests/unit/test_ansible_12_boolean_fix.py:66
Method
test_no_boto3_parameter_in_source
Verify that boto3 parameter is not present in the source code.
tests/unit/test_lightsail_boto3_fix.py:112
Method
test_no_other_problematic_patterns
Look for patterns that would cause Ansible 12 boolean type issues in Algo code.
tests/unit/test_comprehensive_boolean_scan.py:217
Method
test_no_string_true_false_in_set_fact
Scan all YAML files for set_fact with string 'true'/'false'.
tests/unit/test_comprehensive_boolean_scan.py:98
Function
test_openssl_file_specifically
Specifically test the OpenSSL file that had the original bug.
tests/unit/test_yaml_jinja2_expressions.py:387
Function
test_openssl_template_constraints
Test the OpenSSL task template that had the inline comment issue.
tests/unit/test_strongswan_templates.py:178
Function
test_output_interface_in_nat_rules
Test that output interface is specified in NAT rules.
tests/unit/test_iptables_rules.py:187
Method
test_package_count
Test that the correct number of packages are included.
tests/test_package_preinstall.py:64
Function
test_pkcs12_files
Test PKCS#12 files - uses real files if available, else validates config (Issue #14755, #14718)
tests/unit/test_openssl_compatibility.py:449
Function
test_port_ranges
Test that configured ports are in valid ranges
tests/unit/test_config_validation.py:113
Method
test_preinstall_disabled_by_default
Test that package pre-installation is disabled by default.
tests/test_package_preinstall.py:27
Method
test_preinstall_disabled_explicitly
Test that package pre-installation is disabled when set to false.
tests/test_package_preinstall.py:53
Method
test_preinstall_enabled
Test that package pre-installation works when enabled.
tests/test_package_preinstall.py:38
Function
test_pyproject_file_exists
Check that pyproject.toml exists and has dependencies
tests/unit/test_basic_sanity.py:19
Function
test_python_version
Ensure we're running on Python 3.11+
tests/unit/test_basic_sanity.py:13
Method
test_regression_issue_14822
Regression test for issue #14822. Ensures that the deprecated boto3 parameter is not used.
tests/unit/test_lightsail_boto3_fix.py:131
Method
test_regression_no_string_booleans
Regression test: ensure we never produce string literals 'true' or 'false'. This is what breaks Ansible 12.0.0.
tests/unit/test_boolean_variables.py:98
Function
test_regression_openssl_inline_comments
Regression test for the specific OpenSSL inline comment bug that was reported. Tests that we correctly detect inline comments in the exact pa
tests/unit/test_yaml_jinja2_expressions.py:258
Function
test_scaleway_config_has_valid_settings
Test that config.cfg has valid Scaleway settings
tests/unit/test_scaleway_fix.py:77
Function
test_scaleway_main_uses_project_parameter
Test that main.yml uses 'project' instead of deprecated 'organization' parameter
tests/unit/test_scaleway_fix.py:23
Function
test_scaleway_marketplace_api_usage
Test that the role correctly uses Scaleway Marketplace API
tests/unit/test_scaleway_fix.py:94
Function
test_scaleway_prompts_collect_org_id
Test that prompts.yml collects organization/project ID from user
tests/unit/test_scaleway_fix.py:52
Function
test_server_certificates
Test server certificates - uses real certs if available, else validates config
tests/unit/test_openssl_compatibility.py:267
Function
test_server_selection_format
Test server selection string parsing (issue #14727)
tests/unit/test_user_management.py:42
Function
test_shellcheck
Run shellcheck on shell scripts
tests/unit/test_basic_sanity.py:54
Function
test_ssh_config_syntax
Test SSH tunnel configuration syntax
tests/unit/test_generated_configs.py:172
Function
test_ssh_key_preservation
Test that SSH keys aren't regenerated unnecessarily
tests/unit/test_user_management.py:71
Function
test_strongswan_config_validation
Test that StrongSwan configs can be validated
tests/unit/test_docker_localhost_deployment.py:52
Function
test_strongswan_ipsec_conf
Test StrongSwan ipsec.conf syntax
tests/unit/test_generated_configs.py:96
Function
test_strongswan_templates
Test all StrongSwan templates with various configurations.
tests/unit/test_strongswan_templates.py:102
Function
test_template_conditionals
Test templates with different conditional states
tests/unit/test_template_rendering.py:245
Method
test_template_files_boolean_usage
Check Jinja2 template files for boolean usage.
tests/unit/test_comprehensive_boolean_scan.py:162
Function
test_template_syntax
Test that all templates have valid Jinja2 syntax
tests/unit/test_template_rendering.py:56
Method
test_templates_handle_booleans_correctly
Test that template files handle boolean variables correctly.
tests/unit/test_comprehensive_boolean_scan.py:289
Function
test_user_config_generation
Test that user configs would be generated correctly
tests/unit/test_user_management.py:127
Function
test_user_list_parsing
Test that user lists in config.cfg are parsed correctly
tests/unit/test_user_management.py:15
← previous
next →
101–200 of 215, ranked by callers