williamfzc/stagesepx

View on GitHub

Showing 212 of 220 total issues

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

        assert len(result) > 0, "video seems to only contain one stage"

Severity: Info
Found in stagesepx/classifier/base.py by bandit

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

        assert os.path.isfile(path), f"video {path} not existed"
Severity: Info
Found in stagesepx/video.py by bandit

Consider possible security implications associated with pickle module.
Open

import pickle
Severity: Info
Found in stagesepx/classifier/svm.py by bandit

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

        assert not os.path.exists(json_path), f"{json_path} already existed"
Severity: Info
Found in stagesepx/cutter/cut_result.py by bandit

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

        assert stage_id in self.data
Severity: Info
Found in stagesepx/cutter/cut_result.py by bandit

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

        assert not output_path.is_file(), f"file {output_path} already existed"
Severity: Info
Found in stagesepx/api.py by bandit

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

        assert classify_result.contain(
            from_stage
        ), f"no stage {from_stage} found in result"
Severity: Info
Found in stagesepx/api.py by bandit

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

        assert (boost_mode and valid_range) or (
            not (boost_mode or valid_range)
        ), "boost_mode required valid_range"

Severity: Info
Found in stagesepx/classifier/base.py by bandit

Standard pseudo-random generators are not suitable for security/cryptographic purposes.
Open

    salt = random.randint(10, 99)
Severity: Info
Found in stagesepx/toolbox.py by bandit

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

        assert os.path.isfile(from_file), f"file {from_file} not existed"
Severity: Info
Found in stagesepx/reporter.py by bandit

subprocess call - check for execution of untrusted input.
Open

    return subprocess.check_call(command)
Severity: Info
Found in stagesepx/toolbox.py by bandit

Remove this commented out code.
Open

        # model  = Sequential()
Severity: Major
Found in example/with_keras.py by sonar-python

Programmers should not comment out code as it bloats programs and reduces readability.

Unused code should be deleted and can be retrieved from source control history if required.

See

  • MISRA C:2004, 2.4 - Sections of code should not be "commented out".
  • MISRA C++:2008, 2-7-2 - Sections of code shall not be "commented out" using C-style comments.
  • MISRA C++:2008, 2-7-3 - Sections of code should not be "commented out" using C++ comments.
  • MISRA C:2012, Dir. 4.4 - Sections of code should not be "commented out"
Severity
Category
Status
Source
Language