whylabs/whylogs-python

View on GitHub

Showing 3,918 of 3,918 total issues

subprocess call with shell=True seems safe, but may be changed in the future, consider rewriting without shell
Open

    subprocess.check_output("git ls-tree --full-tree --name-only -r HEAD", shell=True).decode("utf-8").splitlines()

Try, Except, Pass detected.
Open

    except:  # noqa

Try, Except, Pass detected.
Open

        except Exception:

subprocess call with shell=True identified, security issue.
Open

    subprocess.check_call(command, shell=True, executable="/bin/bash")

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert writer is not None

Consider possible security implications associated with subprocess module.
Open

import subprocess

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert api_key is not None

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

        assert self._api_client is not None

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert (
        filter.filter_function or filter.query_string
    ), f"must define at least a filter function or query string when specifying a segment filter: {filter}"

The input method in Python 2 will read from standard input, evaluate and run the resulting string as python source code. This is similar, though in many ways worse, then using eval. On Python 2, use raw_input instead, input is safe in Python 3.
Open

        default_dataset_id = input("[OPTIONAL] Enter a default dataset id to upload to: ").strip()

Audit url open for permitted schemes. Allowing use of file:/ or custom schemes is often unexpected.
Open

        resp = request.urlopen(req, timeout=3)

Starting a process with a partial executable path
Open

    subprocess.check_output("git ls-tree --full-tree --name-only -r HEAD", shell=True).decode("utf-8").splitlines()

Use of assert detected. The enclosed code will be removed when compiling to optimised byte code.
Open

    assert not (
        number_of_partitions > _MAX_SEGMENT_PARTITIONS
    ), f"Attempt to process {number_of_partitions} partitions is larger than the max of {_MAX_SEGMENT_PARTITIONS}, use a lower number of partitions"

The input method in Python 2 will read from standard input, evaluate and run the resulting string as python source code. This is similar, though in many ways worse, then using eval. On Python 2, use raw_input instead, input is safe in Python 3.
Open

            org_id = input("Enter your org id. You can find it at https://hub.whylabsapp.com/settings/access-tokens: ")

Try, Except, Pass detected.
Open

    except:  # noqa

Possible hardcoded password: '/'
Open

        if token == "/":

TODO found
Open

                    data = PreprocessedColumn.apply([metadata[name]])  # TODO: _process_scalar_value()?
Severity: Minor
Found in python/whylogs/extras/image_metric.py by fixme

TODO found
Open

            # TODO: make this mergeable?

TODO found
Open

        # TODO: I think it's OKAY if udf returns a dictionary

TODO found
Open

                        # TODO unify the Loggable and TrackData types?
Severity
Category
Status
Source
Language