(archive_path: str)
Extracts files to scan from a Docker image archive.
    Only the configuration and the layers generated with a `COPY` and `ADD`
    command are scanned.
Extracts files to scan from a Docker image archive.
    Only the configuration and the layers generated with a `COPY` and `ADD`
    command are scanned.
Extracts files to scan from a Docker image archive . Only the configuration and the layers generated with a COPY and ADD command are scanned .
def get_files_from_docker_archive(archive_path: str) -> Files:
    """
    Extracts files to scan from a Docker image archive.
    Only the configuration and the layers generated with a `COPY` and `ADD`
    command are scanned.
    """
    with tarfile.open(archive_path) as archive:
        manifest, config, config_file_to_scan = _get_config(archive)

        layer_files_to_scan = _get_layers_files(
            archive, filter(_should_scan_layer, _get_layer_infos(manifest, config))
        )

        return Files(list(chain((config_file_to_scan,), layer_files_to_scan)))
def get_files_from_docker_archive ( archive_path : str ) -> Files : with tarfile . open ( archive_path ) as archive : manifest , config , config_file_to_scan = _get_config ( archive ) layer_files_to_scan = _get_layers_files ( archive , filter ( _should_scan_layer , _get_layer_infos ( manifest , config ) ) ) return Files ( list ( chain ( ( config_file_to_scan , ) , layer_files_to_scan ) ) )