awslabs / automated-security-helper

https://awslabs.github.io/automated-security-helper/
Apache License 2.0
382 stars 47 forks source link

Rate Limit Exceeded in Github Actions Pipeline #13

Closed saftinaz closed 1 year ago

saftinaz commented 1 year ago

Hello!

I'm using the tool in a Github Actions pipeline, however I got a rate limit exceeded error in my build:

Run git clone https://github.com/aws-samples/automated-security-helper.git
Cloning into 'automated-security-helper'...
ASH version 1.0.1-e-[10](https://github.com/awslabs/guidance-for-enterprise-mlops-deployments/actions/runs/4285951315/jobs/7464880879#step:12:11)Jan2023

Found one of: yaml yml json items in your source dir, running Dockerfile-cdk ...
Found one of: js py java go cs sh items in your source dir, running Dockerfile-grype ...
Found one of: py pyc ipynb items in your source dir, running Dockerfile-py ...
Found one of: yaml yml tf json dockerfile items in your source dir, running Dockerfile-yaml ...
Found one of: git items in your source dir, running Dockerfile-git ...
toomanyrequests: Rate exceeded
toomanyrequests: Rate exceeded

Is this error internal to the project or could it be a dependency issue such as too many unauthenticated Docker requests? Is there a way to buffer the scan tool to prevent too many requests at once or should I split the scan into multiple different stages?

saftinaz commented 1 year ago

Solved

Solution was to log in to docker through AWS ECR Public

aws ecr-public get-login-password --region $region | docker login --username AWS --password-stdin public.ecr.aws
git clone https://github.com/aws-samples/automated-security-helper.git
./automated-security-helper/ash --source-dir src --output-dir ash-report