This is a test to pull new docker images from DockerHub and search the image for sensitive information.
I was learning Docker for a project and when I (by default) uploaded my docker image to DockerHub. I noticed that before I had the chance to log in and change the privacy setting of the repository there were 6 downloads of my image. It gave me the idea that perhaps people or organizations might be accidentally uploading images with sensitive information in those images and people are pulling and proccessing images; searching for such information. The hypothetical here is that an employee or some user accidentally uploads an image (by default) publicly and the image contains sensitive information. I took this opportunity to write this in Go to learn Go lang. The linting in VSCode for Go is cool but also a bit annoying xD I strucure my code like I do with C/C++ and Rust while trying to use the minimal ideas of Go.
This will make an HTTP request to Docker for the most recently updated repositories. With the given URL it will print the information of images that have been pulled less than 10 times. This will likely never happen because the images in the link are only offical repositories with thousands of pulls. It will wait 5 minutes between requests. Because it is only offical repos using this URL it will not perform as hoped. There is no code for searching or processing images as I never got that far.
I believe there is still a way! - This will require more research...
- Perhaps scraping DockerHub or using the Docker search CLI tool.