With this permission an attacker could upload new versions of the artifacts with malicious code like Docker images:
# Configure docker to use gcloud to authenticate with Artifact Registrygcloudauthconfigure-docker<location>-docker.pkg.dev# tag the image to upload itdockertag<local-img-name>:<local-tag><location>-docker.pkg.dev/<proj-name>/<repo-name>/<img-name>:<tag># Upload itdockerpush<location>-docker.pkg.dev/<proj-name>/<repo-name>/<img-name>:<tag>
It was checked that it's possible to upload a new malicious docker image with the same name and tag as the one already present, so the old one will lose the tag and next time that image with that tag is downloaded the malicious one will be downloaded.
Upload a Python library
Start by creating the library to upload (if you can download the latest version from the registry you can avoid this step):
Set up your project structure:
Create a new directory for your library, e.g., hello_world_library.
Inside this directory, create another directory with your package name, e.g., hello_world.
Inside your package directory, create an __init__.py file. This file can be empty or can contain initializations for your package.
It's not possible to upload a python library with the same version as the one already present, but it's possible to upload greater versions (or add an extra .0 at the end of the version if that works -not in python though-), or to delete the last version an upload a new one with (needed artifactregistry.versions.delete):
With this permission you can download artifacts and search for sensitive information and vulnerabilities.
Download a Docker image:
# Configure docker to use gcloud to authenticate with Artifact Registrygcloudauthconfigure-docker<location>-docker.pkg.dev# Dowload imagedockerpull<location>-docker.pkg.dev/<proj-name>/<repo-name>/<img-name>:<tag>