Scripts/DockerHardeningCheck/DockerHardeningCheck.py
def check_memory(target_mem: str) -> str:
    """Check allocating memory

    Arguments:
        target_mem {str} -- target memory size. Can specify as 1g 1m and so on

    Returns:
        str -- error string if failed
    """
    size = mem_size_to_bytes(target_mem)
    LOG("starting process to check memory of size: {}".format(size))
    p = Process(target=big_string, args=(size, ))
    p.start()
    p.join()
    LOG("memory intensive process status code: {}".format(p.exitcode))
    if p.exitcode == 0:
        return ("Succeeded allocating memory of size: {}. "
                "It seems that you haven't limited the available memory to the docker container.".format(target_mem))
    return ""
Check allocating memory

    Arguments:
        target_mem {str} -- target memory size. Can specify as 1g 1m and so on

    Returns:
        str -- error string if failed
    
Check allocating memory
Arguments:
target_mem {str} -- target memory size. Can specify as 1g 1m and so on

- error string if failed
Check allocating memory Arguments : target_mem { str } -- target memory size . Can specify as 1g 1m and so on - error string if failed
def check_memory(target_mem: str) -> str:
    size = mem_size_to_bytes(target_mem)
    LOG("starting process to check memory of size: {}".format(size))
    p = Process(target=big_string, args=(size, ))
    p.start()
    p.join()
    LOG("memory intensive process status code: {}".format(p.exitcode))
    if p.exitcode == 0:
        return ("Succeeded allocating memory of size: {}. "
                "It seems that you haven't limited the available memory to the docker container.".format(target_mem))
    return ""
def check_memory ( target_mem : str ) -> str : size = mem_size_to_bytes ( target_mem ) LOG ( "starting process to check memory of size: {}" . format ( size ) ) p = Process ( target = big_string , args = ( size , ) ) p . start ( ) p . join ( ) LOG ( "memory intensive process status code: {}" . format ( p . exitcode ) ) if p . exitcode == 0 : return ( "Succeeded allocating memory of size: {}. " "It seems that you haven't limited the available memory to the docker container." . format ( target_mem ) ) return ""
Check allocating memory
Arguments:
target_mem {str} -- target memory size.
Check allocating memory Arguments : target_mem { str } -- target memory size .
"""Check allocating memory

    Arguments:
        target_mem {str} -- target memory size. Can specify as 1g 1m and so on

    Returns:
        str -- error string if failed
    """
target_mem
str