api.py 文件源码

python
阅读 54 收藏 0 点赞 0 评论 0

项目:dockerscan 作者: cr0hn 项目源码 文件源码
def run_analyze_upload_dockerscan(config: DockerAnalyzeUploadModel):

    assert isinstance(config, DockerAnalyzeUploadModel)

    # Sanitize the URL
    target = sanitize_url(config.registry)

    # Build remote file name
    remote_filename = config.remote_filename
    if not remote_filename:
        characters = string.ascii_lowercase + string.digits

        remote_filename = "".join(random.choice(characters)
                                  for x in range(random.randint(5, 20)))

    link, _ = upload_content_v2(target,
                                remote_filename,
                                config.local_file)

    return link
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号