8000 GitHub - qdzlug/ironbank-tools: Tools to interact with Iron Bank
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

qdzlug/ironbank-tools

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Overview

This Bash script automates the process of managing Docker images by pulling them from a specified registry, re-tagging them under a new namespace, and pushing them to a designated repository. Additionally, the script downloads collateral on the image stored by the Iron Bank repository and current output from Docker Scout, storing this data in a user-defined directory.

How to Use the Script

  1. Setup:

    • Ensure Docker, Cosign, and jq are installed on your system.
    • Store the list of Docker images to be processed in a file named images.txt, with each image specified by its registry path.
    • Ensure you have appropriate permissions to access the Docker registries and perform actions such as pulling and pushing images.
  2. Running the Script:

    • Place the script in a directory with images.txt.
    • Open a terminal in the script's directory.
    • Run the script using the command:
      bash image_pull.sh
      
  3. Dependencies:

    • Docker for pulling and pushing images.
    • Cosign for downloading attestations.
    • jq for processing JSON data.

Script Functionalities

  • Image Pulling and Retagging: The script pulls images as listed in images.txt, re-tags them with a new namespace, and pushes them to the new registry.
  • Downloading and Storing Data: Downloads additional data like attestation from Iron Bank and output from Docker Scout, storing it in structured directories based on the image name.
  • Error Checking: Checks for the presence of necessary tools and the existence of the images.txt file before proceeding.

Output Description

  • Log Files: Outputs from the operations are logged to the console and saved in specific directories created for each image.
  • Output Directory: Outputs related to each image, including downloaded attestations and Docker Scout reports, are stored in a directory named after the image but safe for filesystem naming (special characters are replaced).

Detailed Operations

  • Retag and Push: Images are re-tagged to include the new namespace and then pushed to a specified repository.
  • Attestation and Compliance Data: The script pulls attestation and compliance data from predefined URLs and sav 619E es them as JSON files in the respective image's directory.
  • Docker Scout Integration: Runs Docker Scout on the newly tagged images to analyze CVEs, saving the output in markdown format in the image-specific directory.

Image Repository Details

  • Source Registry: Specified in images.txt.
  • Destination Registry: Specified by the new_registry variable in the script, which should be set to the target Docker registry.

Security Note

Ensure that Docker configurations and network communications are secured, especially when handling image pulls and pushes to registries. Use secure methods for handling Docker login credentials, such as secrets or environment variables.

Comparison and Verification

  • Verification: After pushing, verify the presence and tags of images in the new registry.
  • Comparison: Utilize the downloaded Docker Scout reports to compare security assessments before and after re-tagging and pushing to ensure consistency in vulnerability management.

Conclusion

This script is a robust tool for Docker image management, ensuring that images are updated, compliant with security standards, and stored in a controlled registry environment. It automates crucial steps in image processing workflows, enhancing the efficiency and security of Docker image deployments in any environment.

About

Tools to interact with Iron Bank

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0