

___x_cmd_osv_sarif___docker(){
    local image="$1"

    case "$image" in
        -h|--help)  ___x_cmd help -m osv sarif docker                       ;;
        --all)      ___x_cmd_osv_sarif___docker_all                         ;;
        *)          ___x_cmd osv scanner --format sarif --docker "$image"   ;;
    esac

}

___x_cmd_osv_sarif___docker_all(){
    # TODO：Scanning Fedora-based Docker images is not effective.
    osv:info "Scan all docker images."
    ___x_cmd_cmds docker images --format "{{.Repository}}:{{.Tag}}" | while read -r image; do
        osv:info "scan docker image: $image"
        ___x_cmd osv scanner --format sarif --docker "$image"
    done
}


