{"id":36764241,"url":"https://github.com/mattevans/ecr-cleanse","last_synced_at":"2026-01-12T12:58:25.565Z","repository":{"id":57605634,"uuid":"76813396","full_name":"mattevans/ecr-cleanse","owner":"mattevans","description":"🛁  A golang implementation for removing old images from ECR repositories","archived":false,"fork":false,"pushed_at":"2019-10-25T02:12:37.000Z","size":14,"stargazers_count":11,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"master","last_synced_at":"2024-06-20T09:17:27.530Z","etag":null,"topics":["aws","aws-ecr","aws-ecs","ecr","ecr-repositories","ecs","go","golang","golang-library"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mattevans.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-12-18T23:43:46.000Z","updated_at":"2023-12-01T07:25:00.000Z","dependencies_parsed_at":"2022-09-26T16:40:13.332Z","dependency_job_id":null,"html_url":"https://github.com/mattevans/ecr-cleanse","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mattevans/ecr-cleanse","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattevans%2Fecr-cleanse","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattevans%2Fecr-cleanse/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattevans%2Fecr-cleanse/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattevans%2Fecr-cleanse/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mattevans","download_url":"https://codeload.github.com/mattevans/ecr-cleanse/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mattevans%2Fecr-cleanse/sbom","scorecard":{"id":626372,"data":{"date":"2025-08-11","repo":{"name":"github.com/mattevans/ecr-cleanse","commit":"8ffcc235c645c31aa2eaf59f78562c1c014466b4"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/11 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 3 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-21T06:36:04.337Z","repository_id":57605634,"created_at":"2025-08-21T06:36:04.337Z","updated_at":"2025-08-21T06:36:04.337Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28338990,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-12T12:22:26.515Z","status":"ssl_error","status_checked_at":"2026-01-12T12:22:10.856Z","response_time":98,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["aws","aws-ecr","aws-ecs","ecr","ecr-repositories","ecs","go","golang","golang-library"],"created_at":"2026-01-12T12:58:25.505Z","updated_at":"2026-01-12T12:58:25.554Z","avatar_url":"https://github.com/mattevans.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ecr-cleanse\n\n[![Go Report Card](https://goreportcard.com/badge/github.com/mattevans/ecr-cleanse)](https://goreportcard.com/report/github.com/mattevans/ecr-cleanse)\n[![license](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/mattevans/ecr-cleanse/blob/master/LICENSE)\n\nThe [documented limit](http://docs.aws.amazon.com/AmazonECR/latest/userguide/service_limits.html) to the number of images in an ECR repository is ~1000~ ([Now 10K as of Jul 19 2019](https://aws.amazon.com/about-aws/whats-new/2019/07/amazon-ecr-now-supports-increased-repository-and-image-limits/)). This is a golang implementation for removing unused images from your ECR repositories.\n\nThis script will inspect all container services/tasks, across all ECS clusters, removing images that are not in-use (in [batches](http://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_BatchDeleteImage.html) of 100).\n\nUsage\n-----------------\n\n```go\ngo run main.go\n```\n\nFlags\n-----------------\n\n- `-aws-region`: Pass your AWS region.\n- `-dry-run`: Execute the script without purging any images.\n\n```go\ngo run main.go -aws-region us-west-2 -dry-run\n```\n\nExample Output\n-----------------\n\n```\nINFO[0005] Dry Run: true\nINFO[0005] AWS Region: us-west-2\nINFO[0005] Repositories Found: 3\nINFO[0005] Active Images Found: 8\nINFO[0005] ----------------------------------------------------------------\nINFO[0005] Repository: my.production.repository\nINFO[0005] [DRY RUN] `2` images would be purged\nINFO[0005] ----------------------------------------------------------------\nINFO[0005] Repository: my.staging.repository\nINFO[0005] [DRY RUN] `2` images would be purged\nINFO[0005] ----------------------------------------------------------------\nINFO[0006] Repository: my.test.repository\nINFO[0006] [DRY RUN] `1` images would be purged\nINFO[0006] ----------------------------------------------------------------\n```\n\nContributing\n-----------------\nIf you've found a bug or would like to contribute, please create an issue here on GitHub, or better yet fork the project and submit a pull request!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattevans%2Fecr-cleanse","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmattevans%2Fecr-cleanse","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmattevans%2Fecr-cleanse/lists"}