snyk-api-import icon indicating copy to clipboard operation
snyk-api-import copied to clipboard

Import targets for the ACR [Feature Request]

Open bugwrangler opened this issue 2 years ago • 0 comments

Describe the user need

I want Snyk to supply a target JSON list for the ACR or allow CSV Import instead JSON

As of now, I am using the following bash script to generate the list of images from the ACR. This generate the CSV

registry_name='sec'
destination='snyk-auto-import/output.csv'
az acr login --name $registry_name
touch $destination

repos="$(az acr repository list -n $registry_name --output tsv)"

for i in $repos; do
    images="$(az acr repository show-tags -n $registry_name --repository $i --output tsv --orderby time_desc)"
    for j in $images; do
        echo $i":"$j >> $destination;
    done;
done;

cat output.csv 

Describe expected behaviour

It would be nice if snyk can supply the target json similar SCM target - https://github.com/snyk-tech-services/snyk-api-import/blob/master/docs/import-data.md or allow the user to supply the CSV

Additional context

This feature can be available in the Integration UI, rather than running the additional script

bugwrangler avatar Feb 21 '23 10:02 bugwrangler