cyberark/cyberark-conjur-cli

View on GitHub

Showing 10 of 10 total issues

Function _get_account_info_if_not_exist has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

def _get_account_info_if_not_exist(self):
"""
Method to fetch the account from the user
"""
if self.conjurrc_data.conjur_account is None:
Severity: Minor
Found in conjur/controller/init_controller.py - About 1 hr to fix

Function _run_command_flow has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
Open

def _run_command_flow(self, args, resource):
ssl_verification_meta_data = get_ssl_verification_meta_data_from_conjurrc(args.ssl_verify)
conjurrc_data = ConjurrcData.load_from_file()
client = Client(ssl_verification_mode=ssl_verification_meta_data.mode,
connection_info=conjurrc_data.get_client_connection_info(),
Severity: Minor
Found in conjur/cli.py - About 1 hr to fix

Function handle_init_logic has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

def handle_init_logic(
Severity: Major
Found in conjur/cli_actions.py - About 1 hr to fix

    Function __init__ has 6 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    def __init__(self, conjur_url: str = None, account: str = None, cert_file: str = None,
    Severity: Minor
    Found in conjur/data_object/conjurrc_data.py - About 45 mins to fix

      Function run has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
      Open

      def run(self):
      """
      Main entrypoint for the class invocation from both CLI, Package, and
      test sources. Parses CLI args and invokes the appropriate client command.
      """
      Severity: Minor
      Found in conjur/cli.py - About 45 mins to fix

      Function validate_init_action_ssl_verification_input has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      def validate_init_action_ssl_verification_input(ca_path, is_self_signed, ssl_verify):
      """
      Validate the input related to ssl verification for the init action
      """
      use_ca_bundle = False
      Severity: Minor
      Found in conjur/util/init_utils.py - About 35 mins to fix

      Function handle_init_logic has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      def handle_init_logic(
      url: str = None, account: str = None,
      authn_type: str = None, service_id: str = None,
      cert: str = None, force: bool = None,
      ssl_verify=None, is_self_signed: bool = False,
      Severity: Minor
      Found in conjur/cli_actions.py - About 35 mins to fix

      Function is_exists has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
      Open

      def is_exists(self, conjur_url: str) -> bool:
      if not os.path.exists(DEFAULT_NETRC_FILE) or os.path.getsize(DEFAULT_NETRC_FILE) == 0:
      return False
       
      netrc_auth = ""
      Severity: Minor
      Found in conjur/logic/credential_provider/file_credentials_provider.py - About 35 mins to fix

      Function parse_args has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

      def parse_args(self, args: list = None, namespace: str = None, resource: str = None) -> list:
      args, arg_flags = self.parse_known_args(args, namespace)
       
      resource = args.resource if args else None
      if arg_flags:
      Severity: Minor
      Found in conjur/wrapper/argparse_wrapper.py - About 25 mins to fix

      Function __repr__ has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
      Open

      def __repr__(self) -> str:
      result = []
      # pylint: disable=multiple-statements
      if self.kind: result.append(f"'kind': '{self.kind}'")
      if self.limit: result.append(f"'limit': '{self.limit}'")
      Severity: Minor
      Found in conjur/data_object/list_data.py - About 25 mins to fix
      Severity
      Category
      Status
      Source
      Language