How do I set ImageScanningConfiguration on my aws-ecr orb?

Hello everyone

I would like to set ImageScanningConfiguration on our ECR, we’re using aws-ecr: circleci/aws-ecr@6.15.3.

How do I do that? I couldn’t find any docs on this.

Thanks

Hi @JwanKhalaf ,

Thank you for posting your question on our forum.

There is no option available within the orb to set additional options such as ImageScanningConfiguration, but you could do so in a separate step like the following:

steps:
  - run:
      name: Set put-image-scanning-configuration
      command: |
        aws ecr put-image-scanning-configuration \
        --repository-name sample-repo \
        --image-scanning-configuration scanOnPush=true

If you are using a job from the orb, you could also try setting the above step as a “pre-step” for that job.

Please let me know if this points you in the right direction, or if you would like any additional clarification.