{"id":18975115,"url":"https://github.com/bufferapp/aws-key-auditor","last_synced_at":"2025-04-19T16:45:08.273Z","repository":{"id":28536696,"uuid":"118667338","full_name":"bufferapp/aws-key-auditor","owner":"bufferapp","description":"Get all keys from an AWS account and send an email if a key is getting old","archived":false,"fork":false,"pushed_at":"2022-12-06T20:26:20.000Z","size":82,"stargazers_count":4,"open_issues_count":6,"forks_count":2,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-29T10:24:01.799Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bufferapp.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-01-23T20:45:30.000Z","updated_at":"2022-04-07T07:52:02.000Z","dependencies_parsed_at":"2023-01-14T09:01:01.293Z","dependency_job_id":null,"html_url":"https://github.com/bufferapp/aws-key-auditor","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Faws-key-auditor","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Faws-key-auditor/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Faws-key-auditor/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bufferapp%2Faws-key-auditor/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bufferapp","download_url":"https://codeload.github.com/bufferapp/aws-key-auditor/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249223976,"owners_count":21232844,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-11-08T15:17:25.884Z","updated_at":"2025-04-16T09:34:32.996Z","avatar_url":"https://github.com/bufferapp.png","language":"JavaScript","readme":"# aws-key-auditor\n\nGet all keys from an AWS account and send an email if a key is getting old\n\n## Environment Variables\n\nAn example environment variable file:\n\n```\nAWS_ACCESS_KEY_ID=AKIAXXXXX\nAWS_SECRET_ACCESS_KEY=XXXXX\nSENDGRID_API_KEY=XXXXX\nDAYS_WARN=80\nDAYS_ERROR=90\nEMAIL_TO=XXXXX\nEMAIL_FROM=XXXXX\nEMAIL_REPLY_TO=XXXXX\n```\n\n### AWS_ACCESS_KEY_ID\n\nThe AWS ID (yes this service does audit its own key)\n\n### AWS_SECRET_ACCESS_KEY\n\nThe AWS secret\n\n### SENDGRID_API_KEY\n\nAPI Key for [Sendgrid](https://sendgrid.com/)\n\n### DAYS_WARN\n\nThe number of days a key can live before marked as needing to be deleted _soon_\n\n### DAYS_ERROR\n\nThe number of days a key can live before marked as needing to be deleted\n\n### EMAIL_TO\n\nThe email address to send the email to\n\n### EMAIL_FROM\n\nThe email address the email is sent as\n\n### EMAIL_REPLY_TO\n\nThe email address to reply to (helpful when clicking REPLY ALL)\n\n## Deployment\n\nThe application is (currently) deployed to the us-east1 Kubernetes cluster and is done manually for now.\n\nThe secrets and cronjob configuration can be found in the `kube` repo at: `\u003ckube repo root\u003e/us-east1.buffer-k8s.com/internal/aws-key-auditor`\n\n### Deploying aws-key-auditor\n\n_NOTE_: all scripts are run in the `aws-key-auditor` directory in the `kube` repo.\n\nFirst make sure the secret containing the .env file is created\n\n```sh\n./create-secret.sh\n```\n\nApply the cronjob deployment to kuberenetes\n\n```sh\nkubectl apply -f cronjob.yaml\n```\n\n### Updating the aws-key-auditor version\n\n_Make changes to code, commit and push_\n\nGet the latest git hash\n\n```sh\ngit rev-parse HEAD\n```\n\nPublish with the latest git hash as the version\n\n```\n./publish.sh \u003cthe git hash\u003e\n```\n\nUpdate version in the `kube` repo\n\n```sh\ncd \u003ckube repo root\u003e/us-east1.buffer-k8s.com/internal/aws-key-auditor\nedit cronjob.yaml\n```\n\nUpdate the image version\n\n```\nimage: bufferapp/aws-key-auditor:\u003cthe git hash\u003e\n```\n\nDeploy the version\n\n```sh\nkubectl apply -f cronjob.yaml\n```\n\n### Updating environment variables\n\nOpen the environment variables in the `kube` repo\n\n```sh\ncd \u003ckube repo root\u003e/us-east1.buffer-k8s.com/internal/aws-key-auditor\nedit env\n```\n\n_change the environment variables_\n\nUpdate the environment variables secret\n\n```sh\n./create-secret.sh\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbufferapp%2Faws-key-auditor","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbufferapp%2Faws-key-auditor","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbufferapp%2Faws-key-auditor/lists"}