Repository Analysis

ansible/ansible

Ansible is a radically simple IT automation platform that makes your applications and systems easier to deploy and maintain. Automate everything from code deployment to network configuration to cloud management, in a language that approaches plain English, using SSH, with no agents to install on remote systems. https://docs.ansible.com.

22.0 Moderate AI signal View on GitHub
22.0
Adjusted Score
22.0
Raw Score
100%
Time Factor
2026-05-29
Last Push
68,714
Stars
Python
Language
383,433
Lines of Code
4444
Files
5812
Pattern Hits
2026-05-31
Scan Date

Score History

Severity Breakdown

CRITICAL 7HIGH 489MEDIUM 413LOW 4903

Pattern Findings

5812 matches across 16 categories. Click a row to expand file-level details.

Hyper-Verbose Identifiers1670 hits · 1662 pts
SeverityFileLineSnippet
LOWpackaging/release.py808def get_latest_setuptools_version() -> Version:
LOWpackaging/release.py816def set_setuptools_upper_bound(requested_version: Version) -> None:
LOWpackaging/release.py840def create_reproducible_sdist(original_path: pathlib.Path, output_path: pathlib.Path, mtime: int) -> None:
LOWpackaging/release.py855def create_reproducible_tar_info(original: tarfile.TarInfo, mtime: int) -> tarfile.TarInfo:
LOWpackaging/release.py915def get_release_artifact_details(repository: str, version: Version, validate: bool) -> list[ReleaseArtifact]:
LOWpackaging/release.py929def describe_release_artifact(version: Version, item: dict[str, t.Any], validate: bool) -> ReleaseArtifact:
LOWpackaging/release.py985def create_template_environment() -> jinja2.Environment:
LOWpackaging/release.py995def create_github_release_notes(upstream: Remote, repository: str, version: Version, validate: bool) -> str:
LOWpackaging/cli-doc/build.py177def populate_subparser_actions(parser: argparse.ArgumentParser, shared_option_names: tuple[str, ...], actions: dict[str,
LOW…st/integration/targets/ansible-test-container/runme.py130def get_container_completion_entries() -> dict[str, dict[str, str]]:
LOW…st/integration/targets/ansible-test-container/runme.py402def prepare_prime_podman_storage() -> list[str]:
LOW…st/integration/targets/ansible-test-container/runme.py893 def configure_unprivileged_user(cls) -> None:
LOW…ts/inventory_cache/plugins/inventory/exercise_cache.py103 def test_update_cache_if_changed(self):
LOW…ts/module_utils/library/test_heuristic_log_sanitize.py11def heuristic_log_sanitize_spy(*args, **kwargs):
LOW…egration/targets/dnf/filter_plugins/dnf_module_list.py29def get_first_single_version_module(stdout):
LOW…filter_plugins/override_formerly_core_masked_filter.py4def override_formerly_core_masked_filter(*args, **kwargs):
LOW…ons/test_plugins/override_formerly_core_masked_test.py4def override_formerly_core_masked_test(value, *args, **kwargs):
LOWtest/sanity/code-smell/update-bundled.py57def get_files_with_bundled_metadata(paths):
LOWtest/sanity/code-smell/update-bundled.py105def get_latest_applicable_version(pypi_data, constraints=None):
LOWtest/units/conftest.py58# def prevent_collection_loader_leak(request: pytest.FixtureRequest):
LOWtest/units/controller_only_conftest.py21def _zap_vault_secrets_context() -> t.Generator[None]:
LOWtest/units/controller_only_conftest.py34def _empty_vault_secrets_context(_zap_vault_secrets_context) -> t.Generator[None]:
LOWtest/units/controller_only_conftest.py52def _ignore_untrusted_template(mocker: MockerFixture) -> t.Generator[None]:
LOWtest/units/_internal/test_event_formatting.py12def test_traceback_formatting() -> None:
LOWtest/units/_internal/_encryption/test_crypt.py12 def test_unsupported_platform(self, mocker: MockerFixture) -> None:
LOWtest/units/_internal/_encryption/test_crypt.py35 def test_library_with_no_crypt_methods(self, mocker: MockerFixture) -> None:
LOWtest/units/_internal/_encryption/test_crypt.py50 def test_library_with_no_crypt_r_or_crypt_gensalt_rn(self, mocker: MockerFixture) -> None:
LOWtest/units/_internal/_encryption/test_crypt.py99 def test_crypt_result_failure(self, mocker: MockerFixture) -> None:
LOWtest/units/_internal/_encryption/test_crypt.py107 def test_crypt_gensalt_called_with_no_impl(self, mocker: MockerFixture) -> None:
LOWtest/units/_internal/_encryption/test_crypt.py125 def test_crypt_gensalt_fail_errno(self, mocker: MockerFixture) -> None:
LOWtest/units/_internal/_encryption/test_crypt.py133 def test_crypt_gensalt_result_none(self, mocker: MockerFixture) -> None:
LOWtest/units/_internal/_encryption/test_crypt.py141 def test_crypt_gensalt_result_failure(self, mocker: MockerFixture) -> None:
LOWtest/units/_internal/_errors/test_alarm_timeout.py30def test_alarm_timeout_success(timeout: int | None) -> None:
LOWtest/units/_internal/_errors/test_alarm_timeout.py41def test_alarm_timeout_timeout() -> None:
LOWtest/units/_internal/_errors/test_alarm_timeout.py61def test_alarm_timeout_bad_values(timeout: t.Any, expected_error_type: type[Exception], expected_error_pattern: str) ->
LOWtest/units/_internal/_errors/test_alarm_timeout.py72def test_alarm_timeout_bad_state() -> None:
LOWtest/units/_internal/_errors/test_alarm_timeout.py118def test_alarm_timeout_escape_broad_exception():
LOWtest/units/_internal/_errors/test_error_utils.py57def test_exception_result_contribution(exceptions: t.Sequence[BaseException], expected: dict[str, t.Any]) -> None:
LOWtest/units/_internal/_errors/test_task_timeout.py8def test_task_timeout_result_contribution() -> None:
LOWtest/units/_internal/_ansiballz/test_builder.py7def test_debugger_source_mapping() -> None:
LOWtest/units/_internal/templating/test_common_.py17def get_dunder_methods_to_intercept() -> list[str]:
LOWtest/units/_internal/templating/test_common_.py67def test_jinja_undefined_shape():
LOWtest/units/_internal/templating/test_common_.py96def test_getattr_attribute_error(marker: Marker) -> None:
LOWtest/units/_internal/templating/test_utils.py22def test_marker_getattr_dunder(marker: Marker) -> None:
LOWtest/units/_internal/templating/conftest.py22def get_concrete_marker_types() -> list[type[Marker]]:
LOWtest/units/_internal/templating/test_lazy_containers.py514def test_list_adapter_equality(value: str, expected: list) -> None:
LOWtest/units/_internal/templating/test_lazy_containers.py521def test_list_adapter_source_propagation(value: t.Any) -> None:
LOWtest/units/_internal/templating/test_lazy_containers.py528def test_lazy_containers_to_yaml(value: t.Any) -> None:
LOWtest/units/_internal/templating/test_lazy_containers.py533def test_lazy_containers_to_json(value: t.Any) -> None:
LOWtest/units/_internal/templating/test_lazy_containers.py760 def call_filter_with_native_args_kwargs() -> t.Any:
LOWtest/units/_internal/templating/test_lazy_containers.py763 def call_test_with_native_args_kwargs() -> t.Any:
LOWtest/units/_internal/templating/test_lazy_containers.py766 def args_and_kwargs_are_non_templating_lazy(value: t.Any, arg, *, kwarg) -> bool:
LOWtest/units/_internal/templating/test_lazy_containers.py94def test_container_comparison(container_type: type) -> None:
LOWtest/units/_internal/templating/test_lazy_containers.py155def test_dict_get_with_default(template_context) -> None:
LOWtest/units/_internal/templating/test_lazy_containers.py260def test_dict_items_and_values() -> None:
LOWtest/units/_internal/templating/test_lazy_containers.py281def test_lazy_list_adapter_operators(template, variables, expected) -> None:
LOWtest/units/_internal/templating/test_lazy_containers.py376def test_lazy_container_operators(expression: str, expected_value: t.Any, expected_type: type) -> None:
LOWtest/units/_internal/templating/test_lazy_containers.py587def test_lazy_mutation_persistence(expression: str) -> None:
LOWtest/units/_internal/templating/test_lazy_containers.py618def test_lazy_mutation_cross_plugin_dirty_container(expr: str, new_value: t.Any, some_var: t.Any, expected_value: t.Any)
LOWtest/units/_internal/templating/test_lazy_containers.py661def test_undefined_in_jinja_constant_container():
1610 more matches not shown…
Unused Imports1672 hits · 1652 pts
SeverityFileLineSnippet
LOWpackaging/release.py5
LOWpackaging/cli-doc/build.py5
LOW.azure-pipelines/scripts/combine-coverage.py10
LOW.azure-pipelines/scripts/publish-codecov.py8
LOW.azure-pipelines/scripts/time-command.py4
LOW…lookup-option-name/lookup_plugins/non_terms_posargs.py1
LOW…lback-dispatch/callback_plugins/oops_always_enabled.py1
LOW…/callback-dispatch/callback_plugins/v1_only_methods.py1
LOW…ck-dispatch/callback_plugins/legacy_warning_display.py1
LOW…llback-dispatch/callback_plugins/missing_base_class.py1
LOW…integration/targets/callback-dispatch/library/noisy.py1
LOW…s/module-serialization-profiles/library/echo_modern.py1
LOW…s/module-serialization-profiles/library/echo_legacy.py1
LOW…ule-serialization-profiles/library/echo_unspecified.py1
LOWtest/integration/targets/pause/test-pause.py3
LOW…tion/targets/module_no_log/library/module_that_logs.py2
LOW…argets/module_no_log/library/module_that_has_secret.py2
LOW…ult_pickle_error/action_plugins/result_pickle_error.py5
LOW…ns/ns/col/plugins/doc_fragments/return_doc_fragment.py3
LOW…llections/ns/col/plugins/lookup/import_order_lookup.py3
LOW…llections/ns/col/plugins/modules/option_name_casing.py4
LOW…tions/ns/col/plugins/modules/check_mode_attribute_6.py4
LOW…ble_collections/ns/col/plugins/modules/import_order.py4
LOW…tions/ns/col/plugins/modules/check_mode_attribute_2.py4
LOW…/ns/col/plugins/modules/valid_argument_spec_context.py4
LOW…tions/ns/col/plugins/modules/check_mode_attribute_3.py4
LOW…_collections/ns/col/plugins/modules/_not_deprecated.py4
LOW…/ansible_collections/ns/col/plugins/modules/sidecar.py3
LOW…le_collections/ns/col/plugins/modules/wrong_aliases.py4
LOW…_collections/ns/col/plugins/modules/semantic_markup.py4
LOW…ins/modules/invalid_argument_spec_incorrect_context.py4
LOW…tions/ns/col/plugins/modules/check_mode_attribute_7.py4
LOW…col/plugins/modules/invalid_argument_spec_extra_key.py4
LOW…lections/ns/col/plugins/modules/invalid_yaml_syntax.py4
LOW…collections/ns/col/plugins/modules/return_fragments.py4
LOW…s/ns/col/plugins/modules/return_fragments_not_exist.py4
LOW…ections/ns/col/plugins/modules/invalid_choice_value.py4
LOW…tions/ns/col/plugins/modules/check_mode_attribute_4.py4
LOW…ions/ns/col/plugins/modules/doc_fragments_not_exist.py4
LOW…tions/ns/col/plugins/modules/check_mode_attribute_5.py4
LOW…ible_collections/ns/col/plugins/modules/no_callable.py4
LOW…tions/ns/col/plugins/modules/check_mode_attribute_1.py4
LOW…rgets/module_utils_common.respawn/library/respawnme.py6
LOW…ble_collections/my_ns/my_col/plugins/test/test_test.py1
LOW…/my_col/plugins/lookup/lookup_no_future_boilerplate.py3
LOW…collections/my_ns/my_col/plugins/lookup/lookup_name.py1
LOW…collections/my_ns/my_col/plugins/filter/test_filter.py1
LOWtest/integration/targets/no_log/library/module.py6
LOW…on/targets/no_log/action_plugins/action_sets_no_log.py1
LOW…odule_precedence/roles_with_extension/foo/library/a.py2
LOW…le_precedence/roles_with_extension/foo/library/ping.py22
LOW…s/module_precedence/multiple_roles/foo/library/ping.py22
LOW…s/module_precedence/multiple_roles/bar/library/ping.py22
LOW…tion/targets/module_precedence/lib_with_extension/a.py2
LOW…n/targets/module_precedence/lib_with_extension/ping.py22
LOWtest/integration/targets/infra/library/test.py4
LOW…ble_collections/ns/col/plugins/module_utils/my_util.py1
LOW…on/ansible_collections/ns/col/plugins/modules/hello.py4
LOW…tegration/targets/task-args/action_plugins/echo_raw.py1
LOW…t/integration/targets/task-args/action_plugins/echo.py1
1612 more matches not shown…
Cross-File Repetition318 hits · 1590 pts
SeverityFileLineSnippet
HIGH…le_precedence/roles_with_extension/foo/library/ping.py0--- module: ping version_added: historical short_description: try to connect to host, verify a usable python and return
HIGH…s/module_precedence/multiple_roles/foo/library/ping.py0--- module: ping version_added: historical short_description: try to connect to host, verify a usable python and return
HIGH…s/module_precedence/multiple_roles/bar/library/ping.py0--- module: ping version_added: historical short_description: try to connect to host, verify a usable python and return
HIGH…n/targets/module_precedence/lib_with_extension/ping.py0--- module: ping version_added: historical short_description: try to connect to host, verify a usable python and return
HIGH…le_precedence/roles_with_extension/foo/library/ping.py0# test we can logon to 'webservers' and execute python with json lib. ansible webservers -m ping
HIGH…s/module_precedence/multiple_roles/foo/library/ping.py0# test we can logon to 'webservers' and execute python with json lib. ansible webservers -m ping
HIGH…s/module_precedence/multiple_roles/bar/library/ping.py0# test we can logon to 'webservers' and execute python with json lib. ansible webservers -m ping
HIGH…n/targets/module_precedence/lib_with_extension/ping.py0# test we can logon to 'webservers' and execute python with json lib. ansible webservers -m ping
HIGH…on/ansible_collections/ns/col/plugins/modules/hello.py0module: hello short_description: hello test module description: hello test module. options: name: description: name to s
HIGH…er/ansible_collections/ns/col/plugins/modules/hello.py0module: hello short_description: hello test module description: hello test module. options: name: description: name to s
HIGH…ts/ansible_collections/ns/col/plugins/modules/hello.py0module: hello short_description: hello test module description: hello test module. options: name: description: name to s
HIGHtest/integration/targets/config/lookup_plugins/bogus.py0_list: description: basically the same as you fed in type: list elements: raw
HIGH…on/targets/config/lookup_plugins/casting_individual.py0_list: description: basically the same as you fed in type: list elements: raw
HIGHtest/integration/targets/config/lookup_plugins/types.py0_list: description: basically the same as you fed in type: list elements: raw
HIGH…t/integration/targets/config/lookup_plugins/casting.py0_list: description: basically the same as you fed in type: list elements: raw
HIGH…egration/targets/lookup_config/lookup_plugins/bogus.py0_list: description: basically the same as you fed in type: list elements: raw
HIGHlib/ansible/plugins/lookup/list.py0_list: description: basically the same as you fed in type: list elements: raw
HIGH…st/integration/targets/ansible-test-container/runme.py0return true if the bootstrapper can be used, otherwise false.
HIGH…st/integration/targets/ansible-test-container/runme.py0return true if the bootstrapper can be used, otherwise false.
HIGH…st/integration/targets/ansible-test-container/runme.py0return true if the bootstrapper can be used, otherwise false.
HIGH…st/integration/targets/ansible-test-container/runme.py0return true if the bootstrapper can be used, otherwise false.
HIGH…gration/targets/module_defaults/library/legacy_ping.py0ping: description: value provided with the data parameter. returned: success type: str sample: pong
HIGH…le_collections/testns/testcoll/plugins/modules/ping.py0ping: description: value provided with the data parameter. returned: success type: str sample: pong
HIGH…ntegration/targets/windows-minimal/library/win_ping.py0ping: description: value provided with the data parameter. returned: success type: str sample: pong
HIGH…upport/windows-integration/plugins/modules/win_ping.py0ping: description: value provided with the data parameter. returned: success type: str sample: pong
HIGH…ollections/ansible/windows/plugins/modules/win_ping.py0ping: description: value provided with the data parameter. returned: success type: str sample: pong
HIGH…ntegration/targets/windows-minimal/library/win_ping.py0--- module: win_ping version_added: "1.7" short_description: a windows version of the classic ping module description: -
HIGH…upport/windows-integration/plugins/modules/win_ping.py0--- module: win_ping version_added: "1.7" short_description: a windows version of the classic ping module description: -
HIGH…ollections/ansible/windows/plugins/modules/win_ping.py0--- module: win_ping version_added: "1.7" short_description: a windows version of the classic ping module description: -
HIGH…ntegration/targets/windows-minimal/library/win_ping.py0# test connectivity to a windows host # ansible winserver -m win_ping - name: example from an ansible playbook win_ping:
HIGH…upport/windows-integration/plugins/modules/win_ping.py0# test connectivity to a windows host # ansible winserver -m win_ping - name: example from an ansible playbook win_ping:
HIGH…ollections/ansible/windows/plugins/modules/win_ping.py0# test connectivity to a windows host # ansible winserver -m win_ping - name: example from an ansible playbook win_ping:
HIGHtest/units/cli/test_galaxy.py0collections: - namespace.name roles: - namespace.name
HIGHtest/units/cli/test_galaxy.py0collections: - namespace.name roles: - namespace.name
HIGHtest/units/cli/test_galaxy.py0collections: - namespace.name roles: - namespace.name
HIGHtest/units/cli/test_galaxy.py0collections: - namespace.name roles: - namespace.name
HIGHtest/units/module_utils/basic/test_argument_spec.py0fail because one of a required_together pair of parameters has a default and the other was not specified
HIGHtest/units/module_utils/basic/test_argument_spec.py0fail because one of a required_together pair of parameters has a default and the other was not specified
HIGHtest/units/module_utils/basic/test_argument_spec.py0fail because one of a required_together pair of parameters has a default and the other was not specified
HIGH…units/module_utils/basic/test_set_mode_if_different.py0some platforms have lchmod (*bsd) others do not (linux)
HIGH…units/module_utils/basic/test_set_mode_if_different.py0some platforms have lchmod (*bsd) others do not (linux)
HIGH…units/module_utils/basic/test_set_mode_if_different.py0some platforms have lchmod (*bsd) others do not (linux)
HIGH…support/windows-integration/plugins/action/win_copy.py0this is a closure (function utilizing variables from it's parent function's scope) so that we only need one copy of all
HIGH…collections/ansible/windows/plugins/action/win_copy.py0this is a closure (function utilizing variables from it's parent function's scope) so that we only need one copy of all
HIGHlib/ansible/plugins/action/copy.py0this is a closure (function utilizing variables from it's parent function's scope) so that we only need one copy of all
HIGHtest/lib/ansible_test/_internal/bootstrap.py0the variables to template in the bootstrapping script.
HIGHtest/lib/ansible_test/_internal/bootstrap.py0the variables to template in the bootstrapping script.
HIGHtest/lib/ansible_test/_internal/bootstrap.py0the variables to template in the bootstrapping script.
HIGHtest/lib/ansible_test/_internal/host_profiles.py0deprovision the host after delegation has completed.
HIGHtest/lib/ansible_test/_internal/host_profiles.py0deprovision the host after delegation has completed.
HIGHtest/lib/ansible_test/_internal/host_profiles.py0deprovision the host after delegation has completed.
HIGHtest/lib/ansible_test/_internal/host_profiles.py0deprovision the host after delegation has completed.
HIGHtest/lib/ansible_test/_internal/host_profiles.py0wait for the instance to be ready. executed before delegation for the controller and after delegation for targets.
HIGHtest/lib/ansible_test/_internal/host_profiles.py0wait for the instance to be ready. executed before delegation for the controller and after delegation for targets.
HIGHtest/lib/ansible_test/_internal/host_profiles.py0wait for the instance to be ready. executed before delegation for the controller and after delegation for targets.
HIGHtest/lib/ansible_test/_internal/host_profiles.py0wait for the instance to be ready. executed before delegation for the controller and after delegation for targets.
HIGHtest/lib/ansible_test/_internal/host_profiles.py0wait for the instance to be ready. executed before delegation for the controller and after delegation for targets.
HIGHtest/lib/ansible_test/_internal/host_profiles.py0perform in-band configuration. executed before delegation for the controller and after delegation for targets.
HIGHtest/lib/ansible_test/_internal/host_profiles.py0perform in-band configuration. executed before delegation for the controller and after delegation for targets.
HIGHtest/lib/ansible_test/_internal/host_profiles.py0perform in-band configuration. executed before delegation for the controller and after delegation for targets.
258 more matches not shown…
Self-Referential Comments325 hits · 952 pts
SeverityFileLineSnippet
MEDIUMtest/integration/targets/win_script/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/blockinfile/tasks/main.yml4# This file is part of Ansible
MEDIUM…/targets/old_style_modules_posix/library/helloworld.sh2# This file is part of Ansible
MEDIUM…le_precedence/roles_with_extension/foo/library/ping.py7# This file is part of Ansible
MEDIUM…s/module_precedence/multiple_roles/foo/library/ping.py7# This file is part of Ansible
MEDIUM…s/module_precedence/multiple_roles/bar/library/ping.py7# This file is part of Ansible
MEDIUM…n/targets/module_precedence/lib_with_extension/ping.py7# This file is part of Ansible
MEDIUMtest/integration/targets/ping/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/async_fail/tasks/main.yml4# This file is part of Ansible
MEDIUM…ntegration/targets/async_fail/action_plugins/normal.py3# This file is part of Ansible
MEDIUMtest/integration/targets/changed_when/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/file/tasks/selinux_tests.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/file/tasks/main.yml4# This file is part of Ansible
MEDIUM…n/targets/hash/roles/test_hash_behaviour/vars/main.yml4# This file is part of Ansible
MEDIUM…/targets/hash/roles/test_hash_behaviour/tasks/main.yml4# This file is part of Ansible
MEDIUM…n/targets/hash/roles/test_hash_behaviour/meta/main.yml4# This file is part of Ansible
MEDIUM…rgets/hash/roles/test_hash_behaviour/defaults/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/win_raw/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/group_by/create_groups.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/group_by/test_group_by.yml4# This file is part of Ansible
MEDIUM…integration/targets/group_by/test_group_by_skipped.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/assemble/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/assemble/meta/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/systemd/tasks/main.yml4# This file is part of Ansible
MEDIUM…argets/check_mode/roles/test_check_mode/tasks/main.yml4# This file is part of Ansible
MEDIUM…argets/check_mode/roles/test_always_run/tasks/main.yml4# This file is part of Ansible
MEDIUM…targets/check_mode/roles/test_always_run/meta/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/async/tasks/main.yml4# This file is part of Ansible
MEDIUM…ts/var_blending/roles/test_var_blending/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/template/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/template/tasks/main.yml422# Create a template using a child template, to ensure that variables
MEDIUM…on/targets/includes/roles/test_includes/tasks/main.yml4# This file is part of Ansible
MEDIUM…ion/targets/shell-plugins/action_plugins/test_shell.py1# This file is part of Ansible
MEDIUM…tegration/targets/user/tasks/test_create_user_home.yml43# Create a new user account with a path that has parent directories that do not exist
MEDIUMtest/integration/targets/loop-until/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/add_host/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/script/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/ignore_errors/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/special_vars/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/pip/tasks/pip.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/fetch/runme.sh30# Create a non-root user account and configure SSH access for that account
MEDIUMtest/integration/targets/failed_when/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/stat/tasks/main.yml4# This file is part of Ansible
MEDIUM…ude_import/playbook/sub_playbook/library/helloworld.py2# This file is part of Ansible
MEDIUMtest/integration/targets/find/tasks/main.yml4# This file is part of Ansible
MEDIUM…targets/parsing/roles/test_good_parsing/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/iptables/tasks/main.yml4# This file is part of Ansible
MEDIUM…ntegration/targets/iptables/tasks/chain_management.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/service/meta/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/windows-minimal/tasks/main.yml4# This file is part of Ansible
MEDIUM…gets/collections/custom_vars_plugins/v1_vars_plugin.py3# This file is part of Ansible
MEDIUM…gets/collections/custom_vars_plugins/v2_vars_plugin.py3# This file is part of Ansible
MEDIUM…ollections/testns/testcoll/plugins/vars/custom_vars.py3# This file is part of Ansible
MEDIUM…ons/testns/content_adj/plugins/vars/custom_adj_vars.py3# This file is part of Ansible
MEDIUMtest/integration/targets/uri/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/apt_key/tasks/main.yml4# This file is part of Ansible
MEDIUMtest/integration/targets/raw/tasks/main.yml4# This file is part of Ansible
MEDIUM…ndlers/roles/test_handlers_include_role/tasks/main.yml1# This file is part of Ansible
MEDIUM…on/targets/handlers/roles/test_handlers/tasks/main.yml4# This file is part of Ansible
MEDIUM…rgets/handlers/roles/test_handlers_meta/tasks/main.yml4# This file is part of Ansible
265 more matches not shown…
Cross-Language Confusion169 hits · 781 pts
SeverityFileLineSnippet
HIGH…st/integration/targets/ansible-test-container/runme.py1132 lines = run_command('sh', '-c', '. /etc/os-release && echo $ID && echo $VERSION_ID', capture=True).stdout.splitl
HIGHtest/units/_internal/templating/test_templar.py1082 assert TemplateEngine(variables=dict(something=TRUST.tag("{{ nope }}"))).template(TRUST.tag("{{ (something is eq
HIGHtest/units/_internal/_yaml/test_dumper.py66 ({1, 2, 3}, "!!set {1: null, 2: null, 3: null}\n"),
HIGHtest/units/module_utils/basic/test_selinux.py35 # selinux unavailable, should return false
HIGHtest/units/module_utils/basic/test_selinux.py58 # selinux unavailable, should return false
HIGHtest/units/module_utils/basic/test_selinux.py61 # selinux disabled, should return false
HIGHtest/units/module_utils/facts/other/test_ohai.py6396 "SOCK_MAXBUF": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6397 "_POSIX_ASYNC_IO": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6400 "_POSIX_PRIO_IO": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6401 "_POSIX_SYNC_IO": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6463 "_POSIX_PII": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6464 "_POSIX_PII_INTERNET": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6465 "_POSIX_PII_INTERNET_DGRAM": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6466 "_POSIX_PII_INTERNET_STREAM": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6467 "_POSIX_PII_OSI": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6468 "_POSIX_PII_OSI_CLTS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6469 "_POSIX_PII_OSI_COTS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6470 "_POSIX_PII_OSI_M": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6471 "_POSIX_PII_SOCKET": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6472 "_POSIX_PII_XTI": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6473 "_POSIX_POLL": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6478 "_POSIX_SELECT": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6490 "_POSIX_THREAD_ROBUST_PRIO_INHERIT": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6491 "_POSIX_THREAD_ROBUST_PRIO_PROTECT": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6495 "TIMER_MAX": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6498 "_T_IOV_MAX": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6530 "POSIX2_FORT_DEV": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6531 "POSIX2_FORT_RUN": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6537 "POSIX2_UPE": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6542 "LFS_CFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6543 "LFS_LDFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6544 "LFS_LIBS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6545 "LFS_LINTFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6547 "LFS64_LDFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6548 "LFS64_LIBS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6552 "_XBS5_ILP32_OFF32": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6553 "XBS5_ILP32_OFF32_CFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6554 "XBS5_ILP32_OFF32_LDFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6555 "XBS5_ILP32_OFF32_LIBS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6556 "XBS5_ILP32_OFF32_LINTFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6557 "_XBS5_ILP32_OFFBIG": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6558 "XBS5_ILP32_OFFBIG_CFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6559 "XBS5_ILP32_OFFBIG_LDFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6560 "XBS5_ILP32_OFFBIG_LIBS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6561 "XBS5_ILP32_OFFBIG_LINTFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6565 "XBS5_LP64_OFF64_LIBS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6566 "XBS5_LP64_OFF64_LINTFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6567 "_XBS5_LPBIG_OFFBIG": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6568 "XBS5_LPBIG_OFFBIG_CFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6569 "XBS5_LPBIG_OFFBIG_LDFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6570 "XBS5_LPBIG_OFFBIG_LIBS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6571 "XBS5_LPBIG_OFFBIG_LINTFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6572 "_POSIX_V6_ILP32_OFF32": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6573 "POSIX_V6_ILP32_OFF32_CFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6574 "POSIX_V6_ILP32_OFF32_LDFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6575 "POSIX_V6_ILP32_OFF32_LIBS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6576 "POSIX_V6_ILP32_OFF32_LINTFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6579 "_POSIX_V6_ILP32_OFFBIG": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6580 "POSIX_V6_ILP32_OFFBIG_CFLAGS": null,
HIGHtest/units/module_utils/facts/other/test_ohai.py6581 "POSIX_V6_ILP32_OFFBIG_LDFLAGS": null,
109 more matches not shown…
Deep Nesting609 hits · 573 pts
SeverityFileLineSnippet
LOWpackaging/release.py743
LOWpackaging/release.py840
LOWpackaging/release.py198
LOWpackaging/cli-doc/build.py177
LOW…rel_plugin_loading/subdir/inventory_plugins/notyaml.py114
LOWtest/integration/targets/ansible-test/venv-pythons.py14
LOW…st/integration/targets/ansible-test-container/runme.py44
LOW…st/integration/targets/ansible-test-container/runme.py140
LOW…st/integration/targets/ansible-test-container/runme.py250
LOW…st/integration/targets/ansible-test-container/runme.py495
LOW…egration/targets/gathering_facts/library/file_utils.py11
LOW…ntegration/targets/playbook_output_validator/filter.py13
LOW…targets/var_precedence/ansible-var-precedence-check.py414
LOWtest/integration/targets/uri/files/testserver.py12
LOWtest/sanity/code-smell/no-unwanted-characters.py9
LOWtest/sanity/code-smell/test-constraints.py9
LOWtest/sanity/code-smell/boilerplate.py7
LOWtest/sanity/code-smell/update-bundled.py105
LOWtest/sanity/code-smell/no-s3.py12
LOWtest/units/_internal/templating/test_common_.py152
LOWtest/units/_internal/templating/conftest.py28
LOWtest/units/_internal/templating/test_lazy_containers.py376
LOWtest/units/_internal/templating/test_lazy_containers.py403
LOWtest/units/playbook/role/test_include_role.py157
LOWtest/units/playbook/role/test_include_role.py203
LOW…nits/utils/collection_loader/test_collection_loader.py237
LOWtest/units/cli/test_galaxy.py655
LOWtest/units/inventory/test_data.py73
LOWtest/units/parsing/yaml/test_loader.py285
LOW…support/windows-integration/plugins/action/win_copy.py25
LOW…support/windows-integration/plugins/action/win_copy.py77
LOW…support/windows-integration/plugins/action/win_copy.py328
LOW…collections/ansible/windows/plugins/action/win_copy.py25
LOW…collections/ansible/windows/plugins/action/win_copy.py77
LOW…collections/ansible/windows/plugins/action/win_copy.py328
LOWtest/lib/ansible_test/_internal/host_profiles.py755
LOWtest/lib/ansible_test/_internal/host_profiles.py922
LOWtest/lib/ansible_test/_internal/host_profiles.py1163
LOWtest/lib/ansible_test/_internal/host_profiles.py1251
LOWtest/lib/ansible_test/_internal/completion.py329
LOWtest/lib/ansible_test/_internal/util.py318
LOWtest/lib/ansible_test/_internal/util.py1092
LOWtest/lib/ansible_test/_internal/containers.py449
LOWtest/lib/ansible_test/_internal/containers.py592
LOWtest/lib/ansible_test/_internal/coverage_util.py164
LOWtest/lib/ansible_test/_internal/http.py41
LOWtest/lib/ansible_test/_internal/docker_util.py596
LOWtest/lib/ansible_test/_internal/docker_util.py657
LOWtest/lib/ansible_test/_internal/diff.py196
LOWtest/lib/ansible_test/_internal/target.py90
LOWtest/lib/ansible_test/_internal/target.py307
LOWtest/lib/ansible_test/_internal/target.py490
LOWtest/lib/ansible_test/_internal/target.py515
LOWtest/lib/ansible_test/_internal/ssh.py106
LOWtest/lib/ansible_test/_internal/python_requirements.py258
LOWtest/lib/ansible_test/_internal/delegation.py139
LOWtest/lib/ansible_test/_internal/delegation.py334
LOWtest/lib/ansible_test/_internal/provisioning.py101
LOWtest/lib/ansible_test/_internal/data.py256
LOWtest/lib/ansible_test/_internal/core_ci.py414
549 more matches not shown…
Excessive Try-Catch Wrapping462 hits · 470 pts
SeverityFileLineSnippet
LOWtest/integration/targets/pause/test-pause.py21except Exception:
LOW…rel_plugin_loading/subdir/inventory_plugins/notyaml.py96 except Exception as e:
LOW…st/integration/targets/ansible-test-container/runme.py541 except Exception:
LOW…ventory/inventory_plugins/constructed_with_hostvars.py50 except Exception as ex:
LOW…egration/targets/module_tracebacks/library/ansibull.py39 except Exception as ex:
LOW…ts/inventory_cache/plugins/inventory/exercise_cache.py76 except Exception as e:
LOW…targets/var_precedence/ansible-var-precedence-check.py531 except Exception as e:
LOWtest/sanity/code-smell/boilerplate.py43 except Exception: # pylint: disable=broad-except
LOWtest/sanity/code-smell/ansible-requirements.py10 except Exception as ex: # pylint: disable=broad-except
MEDIUMtest/sanity/code-smell/ansible-requirements.py6def read_file(path):
LOWtest/units/_internal/templating/conftest.py43 except Exception as ex:
LOWtest/units/_internal/templating/conftest.py47 except Exception as ex2:
LOWtest/units/_internal/templating/test_lazy_containers.py426 except Exception as ex:
LOWtest/units/_internal/templating/test_templar.py878 except Exception:
LOWtest/units/mock/error_helper.py14 except Exception as ex:
LOWtest/units/utils/test_serialization_profiles.py176 except Exception as ex:
LOWtest/units/utils/test_serialization_profiles.py182 except Exception as ex:
LOW…nits/utils/collection_loader/test_collection_loader.py299 except Exception as phe:
LOWtest/units/utils/display/test_warning.py25 except Exception as ex:
LOWtest/units/module_utils/datatag/test_datatag.py303 except Exception as ex:
LOW…/module_utils/common/warnings/test_error_as_warning.py17 except Exception as ex:
LOW…/module_utils/common/warnings/test_error_as_warning.py30 except Exception as ex:
MEDIUM…/module_utils/common/warnings/test_error_as_warning.py14def test_error_as_warning() -> None:
LOWtest/units/parsing/utils/test_addresses.py81 except Exception:
LOWtest/units/parsing/utils/test_addresses.py94 except Exception:
LOWtest/units/parsing/yaml/test_loader.py193 except Exception as e:
LOW…support/windows-integration/plugins/action/win_copy.py226 except Exception as err:
LOW…support/windows-integration/plugins/action/win_copy.py295 except Exception as e:
LOW…support/windows-integration/plugins/action/win_copy.py373 except Exception as err:
LOW…collections/ansible/windows/plugins/action/win_copy.py226 except Exception as err:
LOW…collections/ansible/windows/plugins/action/win_copy.py295 except Exception as e:
LOW…collections/ansible/windows/plugins/action/win_copy.py373 except Exception as err:
LOW…ctions/ansible/windows/plugins/plugin_utils/_reboot.py150 except Exception as e:
LOW…ctions/ansible/windows/plugins/plugin_utils/_reboot.py271 except Exception as e:
LOW…ctions/ansible/windows/plugins/plugin_utils/_reboot.py363 except Exception:
LOW…ctions/ansible/windows/plugins/plugin_utils/_reboot.py398 except Exception as e:
LOW…ctions/ansible/windows/plugins/plugin_utils/_reboot.py566 except Exception:
MEDIUM…ctions/ansible/windows/plugins/plugin_utils/_reboot.py545def _wrap_conn_err(func, *args, **kwargs):
LOWtest/lib/ansible_test/_internal/content_config.py96 except Exception as ex: # pylint: disable=broad-except
LOWtest/lib/ansible_test/_internal/content_config.py102 except Exception as ex: # pylint: disable=broad-except
LOWtest/lib/ansible_test/_internal/util.py611 except Exception as ex: # pylint: disable=broad-except
LOWtest/lib/ansible_test/_internal/containers.py647 except Exception:
LOWtest/lib/ansible_test/_internal/coverage_util.py135 except Exception as ex:
LOWtest/lib/ansible_test/_internal/debugging.py98 except Exception as ex:
LOWtest/lib/ansible_test/_internal/http.py79 except Exception as ex: # pylint: disable=broad-exception-caught
LOWtest/lib/ansible_test/_internal/diff.py131 except Exception as ex:
LOWtest/lib/ansible_test/_internal/target.py44 except Exception as ex: # pylint: disable=locally-disabled, broad-except
LOWtest/lib/ansible_test/_internal/ssh.py96 except Exception: # pylint: disable=broad-except
LOWtest/lib/ansible_test/_internal/provisioning.py223 except Exception as ex: # pylint: disable=broad-except
LOW…/lib/ansible_test/_internal/cli/argparsing/__init__.py197 except Exception: # pylint: disable=broad-except
LOW…/lib/ansible_test/_internal/cli/argparsing/__init__.py229 except Exception: # pylint: disable=broad-except
LOW…nsible_test/_internal/commands/integration/__init__.py593 except Exception as ex:
LOW…nsible_test/_internal/commands/integration/cloud/cs.py137 except Exception: # pylint: disable=broad-except
LOW…t/lib/ansible_test/_util/target/setup/probe_cgroups.py22 except Exception as ex: # pylint: disable=broad-except
LOW…st/lib/ansible_test/_util/target/setup/requirements.py87 except Exception as ex:
LOW…ib/ansible_test/_util/target/sanity/import/importer.py110 except Exception as ex:
LOW…sible_test/_util/controller/tools/collection_detail.py53 except Exception as ex: # pylint: disable=broad-except
LOW…sible_test/_util/controller/tools/collection_detail.py74 except Exception as ex: # pylint: disable=broad-except
LOW…sible_test/_util/controller/tools/collection_detail.py86 except Exception as ex: # pylint: disable=broad-except
MEDIUM…oller/sanity/validate-modules/validate_modules/main.py151def _ensure_default_entry(self, path):
402 more matches not shown…
Over-Commented Block427 hits · 424 pts
SeverityFileLineSnippet
LOWrequirements.txt1# Note: this requirements.txt file is used to specify what dependencies are
LOWtest/integration/targets/win_script/tasks/main.yml1# test code for the script module when using winrm connection
LOW…t/integration/targets/hosts_field/test_hosts_field.yml1---
LOWtest/integration/targets/connection_ssh/runme.sh1#!/usr/bin/env bash
LOWtest/integration/targets/blockinfile/tasks/main.yml1# Test code for the blockinfile module.
LOW…/targets/old_style_modules_posix/library/helloworld.sh1#!/bin/sh
LOWtest/integration/targets/module_precedence/runme.sh21
LOWtest/integration/targets/module_precedence/runme.sh41# returns 'a.ini', then this test is pointless anyway because there's no chance
LOW…le_precedence/roles_with_extension/foo/library/ping.py1#!/usr/bin/python
LOW…s/module_precedence/multiple_roles/foo/library/ping.py1#!/usr/bin/python
LOW…s/module_precedence/multiple_roles/bar/library/ping.py1#!/usr/bin/python
LOW…n/targets/module_precedence/lib_with_extension/ping.py1#!/usr/bin/python
LOWtest/integration/targets/ping/tasks/main.yml1# test code for the ping module
LOWtest/integration/targets/collection/setup.sh1#!/usr/bin/env bash
LOWtest/integration/targets/conditionals/play.yml421
LOW…ation/targets/conditionals/output_validation_tests.yml81# Convert these to tests that assert a broken conditional error.
LOWtest/integration/targets/async_fail/tasks/main.yml1# test code for the async keyword failing in the middle of output
LOW…ntegration/targets/async_fail/action_plugins/normal.py1# (c) 2012, Michael DeHaan <michael.dehaan@gmail.com>
LOWtest/integration/targets/changed_when/tasks/main.yml1# test code for the changed_when parameter
LOWtest/integration/targets/command_shell/tasks/main.yml321 - shell_result0.cmd == remote_tmp_dir_test + '/test.sh'
LOWtest/integration/targets/loop_control/label.yml21# that:
LOW…t/integration/targets/win_async_wrapper/tasks/main.yml41
LOW…t/integration/targets/win_async_wrapper/tasks/main.yml81#- name: ensure that watchdog and module procs have exited
LOW…t/integration/targets/win_async_wrapper/tasks/main.yml221 - >-
LOW…t/integration/targets/win_async_wrapper/tasks/main.yml241#
LOW…t/integration/targets/win_async_wrapper/tasks/main.yml261# - proclist.stdout.strip() == ""
LOW…ration/targets/ansible-inventory/tasks/toml_output.yml1- block:
LOWtest/integration/targets/file/tasks/selinux_tests.yml1# Test code for the file module - selinux subtasks.
LOWtest/integration/targets/file/tasks/main.yml1# Test code for the file module.
LOW…n/targets/hash/roles/test_hash_behaviour/vars/main.yml1# test code for the hash variable behavior
LOW…/targets/hash/roles/test_hash_behaviour/tasks/main.yml1# test code for the hash variable behaviour
LOW…n/targets/hash/roles/test_hash_behaviour/meta/main.yml1# test code for the hash variable behavior
LOW…rgets/hash/roles/test_hash_behaviour/defaults/main.yml1# test code for the hash variable behavior
LOWtest/integration/targets/win_raw/tasks/main.yml1# test code for the raw module when using winrm connection
LOWtest/integration/targets/win_raw/tasks/main.yml141#- name: check raw with job result
LOWtest/integration/targets/group_by/create_groups.yml1# test code for the group_by module
LOWtest/integration/targets/group_by/test_group_by.yml1# test code for the group_by module
LOW…integration/targets/group_by/test_group_by_skipped.yml1# test code for the group_by module
LOWtest/integration/targets/callback_default/runme.sh1#!/usr/bin/env bash
LOWtest/integration/targets/assemble/tasks/main.yml1# test code for the assemble module
LOWtest/integration/targets/assemble/meta/main.yml1# test code for the assemble module
LOWtest/integration/targets/systemd/tasks/main.yml1# Test code for the systemd module.
LOW…ration/targets/builtin_vars_prompt/test-vars_prompt.py41
LOW…argets/check_mode/roles/test_check_mode/tasks/main.yml1# test code for the template module
LOW…argets/check_mode/roles/test_always_run/tasks/main.yml1# test code for the check_mode: no option
LOW…targets/check_mode/roles/test_always_run/meta/main.yml1# test code for the check_mode: no option
LOWtest/integration/targets/async/tasks/main.yml1# test code for the async keyword
LOW…ts/var_blending/roles/test_var_blending/tasks/main.yml1# test code
LOWtest/integration/targets/template/tasks/main.yml1# test code for the template module
LOW…on/targets/includes/roles/test_includes/tasks/main.yml1# test code for the ping module
LOWtest/integration/targets/ansible-vault/faux-editor.py1#!/usr/bin/env python
LOWtest/integration/targets/ansible-vault/runme.sh421
LOW…t/integration/targets/ansible-vault/password-script.py1#!/usr/bin/env python
LOW…ble-vault/roles/test_vault_embedded_ids/tasks/main.yml21 that:
LOWtest/integration/targets/loop-until/tasks/main.yml1# Test code for integration of until and loop options
LOWtest/integration/targets/assert/tasks/main.yml241# DTFIX-FUTURE: restore tests for `quiet` arg with a custom callback or output validation test
LOWtest/integration/targets/add_host/tasks/main.yml1# test code for the add_host action
LOWtest/integration/targets/script/tasks/main.yml1# Test code for the script module and action_plugin.
LOW…n/targets/ignore_errors/test_invalid_ignore_errors.yml21
LOWtest/integration/targets/ignore_errors/tasks/main.yml1# test code
367 more matches not shown…
AI Slop Vocabulary50 hits · 80 pts
SeverityFileLineSnippet
LOW…rgets/module_utils_common.respawn/library/respawnme.py20 # just return info about what interpreter we're currently running under
LOWtest/integration/targets/cli/setup.yml38 # on some platforms, as does sudo/sudoers. On Fedora, we can just add
LOWtest/integration/targets/assert/tasks/main.yml37# from here on, just use `assert` to validate behavior
LOW…egration/targets/prepare_http_tests/tasks/kerberos.yml50# apk isn't available on ansible-core so just call command
MEDIUM…tion/targets/ansible-galaxy-collection/tasks/build.yml142# Additional comprehensive tests for FILES.json sorting robustness
LOW…on/targets/subversion/roles/subversion/tasks/setup.yml100# On Red Hat based OS', we can't use apachectl to start up own instance, just use the raw httpd
LOWtest/integration/targets/debug/args_templating.yml84# of dynamic variable selection for `var` (eg ternary), but you could also just use `msg`.
LOWtest/units/plugins/action/test_action.py390 # Step 1: On windows, we just return remote_paths
MEDIUMtest/units/utils/test_serialization_profiles.py69 Deprecated: Deprecated(msg='x'), # DTFIX5: we need more exhaustive testing of the values supported by this tag to e
MEDIUMtest/units/module_utils/basic/test_atomic_move.py138 """Failure to stat an existing file in order to copy permissions propagates the error (unless EPERM)"""
LOWtest/units/module_utils/datatag/test_datatag.py335 # just return the entire row as "value"
MEDIUMtest/units/module_utils/datatag/test_datatag.py696 # This test creates a generator to source items from the value to facilitate optimized creation of collections w
LOWtest/units/executor/test_play_iterator.py414 # assert with an empty task list, or if we're in a failed state, we simply return the state as-is
LOWtest/units/parsing/vault/test_vault_editor.py223 # FIXME: update to just set self._secrets or just a new vault secret id
LOW…_util/controller/sanity/code-smell/runtime-metadata.py141 # just return None to indicate "we don't know".
LOWhacking/backport/backport_of_line_adder.py111 # Otherwise, no '#### SUMMARY' line, so just add it at the bottom
LOWlib/ansible/_internal/_wrapt.py561 # method to call. In this case we simply return self.
LOWlib/ansible/_internal/_wrapt.py615 # and if the wrapper is not to be executed, then simply return
LOWlib/ansible/_internal/_wrapt.py683 # the wrapper is not to be executed, then simply return the bound
LOWlib/ansible/_internal/_templating/_jinja_bits.py528 # was embedded in a plugin, or a plugin is otherwise responsible for losing the origin and/or trust. We can't just
MEDIUMlib/ansible/_internal/_templating/_jinja_bits.py628 template_obj._python_source_temp_path = ctx.python_source_temp_path # facilitate deletion of the temp f
MEDIUMlib/ansible/_internal/_templating/_jinja_bits.py711 template_obj._python_source_temp_path = ctx.python_source_temp_path # facilitate deletion of the temp f
LOWlib/ansible/_internal/_json/__init__.py197 # supported scalar type that requires no special handling, just return as-is
LOWlib/ansible/_internal/_json/_legacy_encoder.py26 return o.value # if not emitting unsafe markers, bypass custom unsafe serialization and just return the raw
LOWlib/ansible/_internal/_powershell/_clixml.py80 # Any errors and we just add the original CLIXML header and
MEDIUMlib/ansible/_internal/_yaml/_constructor.py65 # This is done before checking for duplicates to leverage existing error checking on the input node.
LOWlib/ansible/playbook/collectionsearch.py44 if not ds: # don't return an empty collection list, just return None
LOWlib/ansible/playbook/role/__init__.py270 # reset collections list; roles do not inherit collections from parents, just use the defaults
MEDIUMlib/ansible/plugins/loader.py666 # but if the unqualified name is used in conjunction with the collections keyword, only
MEDIUMlib/ansible/plugins/loader.py790 # FIXME: need this right now so we can still load shipped PS module_utils- come up with a more robust solution
MEDIUMlib/ansible/plugins/loader.py863 """Search library and various *_plugins paths in order to find the file.
LOWlib/ansible/plugins/connection/winrm.py214 # This was added in pywinrm 0.5.0, we just use our no-op exception for
LOWlib/ansible/plugins/inventory/host_list.py22 # just use localhost
LOWlib/ansible/plugins/inventory/ini.py200 # group, in that case we simply pass so that the logic below to process pending
LOWlib/ansible/plugins/inventory/ini.py380 # Likely a string that literal_eval does not like. We will then just set it.
LOWlib/ansible/plugins/callback/__init__.py159 # FUTURE: this code is jacked for 2.x- it should just use the type names and always assume 2.0+ for normal cases
MEDIUMlib/ansible/cli/__init__.py174 # Initialize plugin loader after parse, so that the init code can utilize parsed arguments
LOWlib/ansible/cli/vault.py364 # if no --names are provided, just use the args without a name.
MEDIUMlib/ansible/cli/arguments/option_helpers.py423 """Add options for commands that utilize inventory"""
LOWlib/ansible/galaxy/collection/__init__.py1356 # Dealing with a normal file, just add it by name.
MEDIUMlib/ansible/inventory/host.py31from . import helpers # this is left as a module import to facilitate easier unit test patching
MEDIUMlib/ansible/inventory/group.py18from . import helpers # this is left as a module import to facilitate easier unit test patching
MEDIUMlib/ansible/inventory/data.py32from . import helpers # this is left as a module import to facilitate easier unit test patching
LOWlib/ansible/module_utils/_internal/_datatag/__init__.py175 # if no tags to apply, just return what we got
LOWlib/ansible/executor/play_iterator.py598 # if we've failed at all, or if the task list is empty, just return the current state
LOWlib/ansible/executor/task_executor.py445 # if this task is a TaskInclude, we just return now with a success code so the
LOWlib/ansible/executor/task_executor.py456 # if this task is a IncludeRole, we just return now with a success code so the main thread can expand the task l
LOWlib/ansible/executor/task_executor.py469 # just use normal host vars
LOWlib/ansible/parsing/utils/addresses.py124 # Note that we can't just use ipaddress.ip_address() because we also have to
LOWlib/ansible/modules/deb822_repository.py361 # Not a file, nor a URL, just pass it through
Decorative Section Separators33 hits · 77 pts
SeverityFileLineSnippet
MEDIUMtest/integration/targets/conditionals/play.yml256 #-----------------------------------------------------------------------
MEDIUMtest/integration/targets/dnf/tasks/repo.yml25 # ============================================================================
MEDIUMtest/integration/targets/dnf/tasks/repo.yml53 # ============================================================================
MEDIUMtest/integration/targets/dnf/tasks/repo.yml71 # ============================================================================
MEDIUMtest/integration/targets/dnf/tasks/repo.yml92 # ============================================================================
MEDIUMtest/integration/targets/dnf/tasks/repo.yml113 # ============================================================================
MEDIUMtest/integration/targets/dnf/tasks/repo.yml137 # ============================================================================
MEDIUMtest/integration/targets/dnf/tasks/repo.yml165 # ============================================================================
MEDIUMtest/integration/targets/dnf/tasks/repo.yml187 # ============================================================================
MEDIUMtest/integration/targets/dnf/tasks/repo.yml204 # ============================================================================
MEDIUMtest/integration/targets/dnf/tasks/repo.yml226 # ============================================================================
MEDIUMtest/integration/targets/dnf/tasks/repo.yml243 # ============================================================================
MEDIUMlib/ansible/playbook/task.py68 # =================================================================================
MEDIUMlib/ansible/playbook/role_include.py45 # =================================================================================
MEDIUMlib/ansible/playbook/play.py60 # =================================================================================
MEDIUMlib/ansible/playbook/play.py91 # =================================================================================
MEDIUMlib/ansible/modules/systemd_service.py339# ===========================================
MEDIUMlib/ansible/modules/service.py228 # ===========================================
MEDIUMlib/ansible/modules/service.py243 # ===========================================
MEDIUMlib/ansible/modules/service.py1517# ===========================================
MEDIUMlib/ansible/modules/user.py1429# ===========================================
MEDIUMlib/ansible/modules/git.py1219# ===========================================
MEDIUMlib/ansible/modules/wait_for.py342# ===========================================
MEDIUMlib/ansible/modules/systemd.py339# ===========================================
MEDIUMlib/ansible/modules/group.py278# ===========================================
MEDIUMlib/ansible/modules/group.py303# ===========================================
MEDIUMlib/ansible/modules/group.py336# ===========================================
MEDIUMlib/ansible/modules/group.py387# ===========================================
MEDIUMlib/ansible/modules/group.py450# ===========================================
MEDIUMlib/ansible/modules/group.py575# ===========================================
MEDIUMlib/ansible/modules/group.py629# ===========================================
MEDIUMlib/ansible/modules/get_url.py383# ==============================================================
MEDIUMlib/ansible/modules/get_url.py503# ==============================================================
Hallucination Indicators7 hits · 65 pts
SeverityFileLineSnippet
CRITICAL…llections/testns/testcoll/plugins/module_utils/base.py11 return "thingtocall in base called " + ansible_collections.testns.testcoll.plugins.module_utils.secondary.thingtocal
CRITICAL…s/testcoll/plugins/modules/uses_leaf_mu_flat_import.py11 mu_result = ansible_collections.testns.testcoll.plugins.module_utils.leaf.thingtocall()
CRITICALtest/units/utils/test_helpers.py10from ansible.utils.helpers import pct_to_int, object_to_dict, deduplicate_list
CRITICALtest/units/module_utils/basic/test_run_command.py216 assert rc_am._subprocess.Popen.return_value.stdin.getvalue() == b'hello world\n'
CRITICALlib/ansible/inventory/manager.py41from ansible.utils.helpers import deduplicate_list
CRITICALlib/ansible/module_utils/common/arg_spec.py48 <ansible.module_utils.common.arg_spec.ArgumentSpecValidator.validate()>`
CRITICALlib/ansible/executor/playbook_executor.py30from ansible.utils.helpers import pct_to_int
Redundant / Tautological Comments40 hits · 53 pts
SeverityFileLineSnippet
LOWtest/integration/targets/connection_ssh/runme.sh7 # Check if our sshpass supports -P
LOWtest/integration/targets/callback_default/runme.sh215# Check if UNREACHABLE is available in stderr
LOWtest/integration/targets/filter_core/runme.sh20# Check if libxcrypt was installed by looking for the handler output
LOW…support/windows-integration/plugins/action/win_copy.py173 # Check if the source ends with a "/" so that we know which directory
LOW…collections/ansible/windows/plugins/action/win_copy.py173 # Check if the source ends with a "/" so that we know which directory
LOW…t/lib/ansible_test/_internal/commands/sanity/pylint.py285 # Set PYLINTHOME to prevent pylint from checking for an obsolete directory, which can result in a test failure d
LOWlib/ansible/_internal/_ansiballz/_wrapper.py217 # Set pythonpath to the debug dir
LOWlib/ansible/playbook/base.py321 # Check if the group has already been resolved and cached
LOWlib/ansible/plugins/connection/psrp.py680 # Check if there's a command on the current pipeline that still needs to be closed.
LOWlib/ansible/plugins/connection/ssh.py901 # Check if ControlPersist is enabled and add a ControlPath if one hasn't
LOWlib/ansible/plugins/action/__init__.py779 # Check if we are an admin/root user. If we are and got here, it means
LOWlib/ansible/plugins/action/copy.py167 # Check if the source ends with a "/" so that we know which directory
LOWlib/ansible/cli/arguments/option_helpers.py240 # Check if the .git is a file. If it is a file, it means that we are in a submodule structure.
LOWlib/ansible/inventory/manager.py395 # Check if pattern already computed
LOWlib/ansible/inventory/manager.py685 # Check if host in inventory, add if not
LOWlib/ansible/module_utils/basic.py1024 # Check if there are illegal characters in the user list
LOWlib/ansible/module_utils/basic.py1032 # Check if there are illegal characters in the permissions
LOWlib/ansible/module_utils/facts/system/python.py24 # Check if we have SSLContext support
LOWlib/ansible/module_utils/facts/system/pkg_mgr.py84 # Check if '/usr/bin/apt' is APT-RPM or an ordinary (dpkg-based) APT.
LOWlib/ansible/module_utils/facts/system/pkg_mgr.py131 # Check if /usr/bin/apt-get is ordinary (dpkg-based) APT or APT-RPM
LOWlib/ansible/module_utils/facts/virtual/sunos.py25 # Check if it's a zone
LOWlib/ansible/module_utils/facts/virtual/sunos.py36 # Check if it's a branded zone (i.e. Solaris 8/9 zone)
LOWlib/ansible/executor/task_executor.py951 # Check if the module has specified an action handler
LOWlib/ansible/parsing/dataloader.py106 # Check if the file has been cached and use the cached data if available
LOWlib/ansible/modules/service.py421 # Add line to the list.
LOWlib/ansible/modules/service.py766 # Check if we're already in the correct state
LOWlib/ansible/modules/service.py780 # Check if we're already in the correct state
LOWlib/ansible/modules/service.py1474 # Check if service name is a subsystem of a group subsystem
LOWlib/ansible/modules/git.py835 # Check if the .git is a file. If it is a file, it means that the repository is in external directory respective to
LOWlib/ansible/modules/uri.py729 # Write the file out if requested
LOWlib/ansible/modules/rpm_key.py185 # Check if it's a new format packet (bit 6 set)
LOWlib/ansible/modules/rpm_key.py299 # Check if it's a V4 key (first byte of body should be 0x04)
LOWlib/ansible/modules/rpm_key.py332 # Check if it's a V6 key (first byte of body should be 0x06)
LOWlib/ansible/modules/apt.py915 # Check if package is installable
LOWlib/ansible/modules/apt.py1256 # Check if the cache is valid
LOWlib/ansible/modules/apt.py522 # Check if the available version matches the requested version
LOWlib/ansible/modules/apt.py600 # Check if the installed version already matches the requested version
LOWlib/ansible/modules/apt.py608 # Check if a better version is available
LOWlib/ansible/modules/iptables.py885 # Check if wait option is supported
LOWlib/ansible/modules/iptables.py943 # Check if target is up to date
Slop Phrases7 hits · 16 pts
SeverityFileLineSnippet
MEDIUM…facts/system/distribution/test_distribution_version.py18# to generate the testcase data, you can use the script gen_distribution_version_testcase.py in hacking/tests
MEDIUM…port/windows-integration/plugins/modules/win_reboot.py109# Additionally, you can add a delay before running the next task
LOWlib/ansible/playbook/play_context.py273 # in the event that we were using local before make sure to reset the
MEDIUMlib/ansible/plugins/lookup/nested.py30# As with the case of 'with_items' above, you can use previously defined variables.:
LOWlib/ansible/module_utils/basic.py176# this matters, make sure to check for strings before checking for sequencetype
LOWlib/ansible/parsing/dataloader.py298 # not told if role, but detect if it is a role and if so make sure you get correct base path
MEDIUMlib/ansible/modules/meta.py25 or, if available for your specific inventory datasource (for example P(amazon.aws.aws_ec2#inventory)), you can
Verbosity Indicators9 hits · 14 pts
SeverityFileLineSnippet
LOWtest/units/plugins/action/test_action.py390 # Step 1: On windows, we just return remote_paths
LOWtest/units/plugins/action/test_action.py398 # Step 2: We're /not/ becoming an unprivileged user
LOWtest/units/plugins/action/test_action.py425 # Step 3: we are becoming unprivileged
LOWtest/units/plugins/action/test_action.py534 # Step 4: world-readable tmpdir
LOWlib/ansible/plugins/action/__init__.py696 # Step 1: Are we on windows?
LOWlib/ansible/plugins/action/__init__.py703 # Step 2: If we're not becoming an unprivileged user, we are roughly
LOWlib/ansible/plugins/action/__init__.py858 # Step 4: World-readable temp directory
LOWlib/ansible/utils/vars.py241 The purpose of this function is to be used to validate any variables created in
LOWlib/ansible/modules/rpm_key.py416 # If the key is a url, we need to check if it's present to be idempotent,
Overly Generic Function Names12 hits · 12 pts
SeverityFileLineSnippet
LOW…mpat-six/ansible_collections/ns/col/do-not-check-me.py6def do_stuff():
LOW…ansible_collections/ns/col/plugins/modules/check-me.py6def do_stuff():
LOW…xception/ansible_collections/ns/col/do-not-check-me.py6def do_stuff():
LOW…ansible_collections/ns/col/plugins/modules/check-me.py6def do_stuff():
LOW…targets/ansible-test-sanity-pylint/deprecated_thing.py11def do_stuff() -> None:
LOW…nsible_collections/ns/col/plugins/lookup/deprecated.py55 def my_method(self) -> None:
LOW…nsible_collections/ns/col/plugins/lookup/deprecated.py65def do_stuff() -> None:
LOW…ctions/ns/col/plugins/module_utils/deprecated_utils.py17def do_stuff() -> None:
LOW…-urlopen/ansible_collections/ns/col/do-not-check-me.py6def do_stuff():
LOW…ansible_collections/ns/col/plugins/modules/check-me.py6def do_stuff():
LOWtest/units/module_utils/_internal/test_deprecator.py28def do_stuff():
LOWlib/ansible/utils/jsonrpc.py23 def handle_request(self, request):
Docstring Block Structure2 hits · 10 pts
SeverityFileLineSnippet
HIGHlib/ansible/module_utils/distro/_distro.py680 The initialization method of this class gathers information from the available data sources, and stores
HIGHlib/ansible/modules/pip.py9 --- module: pip short_description: Manages Python library dependencies description: - "Manage Python library depen