This Bash script converts GitLab container scanning reports in JSON format (gl-container-scanning-report.json
) into both CSV and Markdown table formats. It's designed specifically for processing GitLab container scanning reports and converting them into formats suitable for documentation, reporting, or analysis.
- Bash
- jq
To utilise this script in a GitLab CI/CD pipeline, simply configure a job to execute the script, converting the GitLab container scanning report JSON to CSV and Markdown formats, and save the converted files as artifacts for easy download.
To use the script, follow these steps:
-
Ensure jq is Installed: Make sure you have
jq
installed on your system. If not, you can install it using your package manager or by downloading it from jq's official website. -
Download the Script: Clone or download the
gitlab-container-scanning-report-converter
repository from GitHub. -
Make the Script Executable: If needed, make the script executable by running the following command:
chmod +x converter.sh
-
Run the Script: Execute the script by providing the GitLab container scanning report file name as an argument.
./converter.sh example.json
Suppose you have a GitLab container scanning report named example.json
. To convert it into CSV and Markdown table formats, you can run the script as follows:
./converter.sh example.json
This command will generate example.csv and example.md files in the same directory containing the converted data.
This project is licensed under the MIT License. See the LICENSE file for details.
Feel free to use this README.md for your repository.
If this project has helped save you time during development, I'd greatly appreciate a gesture of gratitude in the form of a cup of coffee :)
- Author: Jody WAN
- Linkedin: https://www.linkedin.com/in/jodywan/
- Website: https://www.jodywan.com