{"id":30305036,"url":"https://github.com/amalmurali47/onaws","last_synced_at":"2025-08-17T08:03:19.531Z","repository":{"id":45470087,"uuid":"380976566","full_name":"amalmurali47/onaws","owner":"amalmurali47","description":"Fetch the details of assets hosted on AWS.","archived":false,"fork":false,"pushed_at":"2023-12-04T16:52:23.000Z","size":45,"stargazers_count":89,"open_issues_count":0,"forks_count":12,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-07-25T01:09:44.723Z","etag":null,"topics":["aws","bug-bounty","reconnaissance","tool"],"latest_commit_sha":null,"homepage":"https://github.com/amalmurali47/onaws","language":"Python","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/amalmurali47.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-28T09:27:54.000Z","updated_at":"2025-06-14T14:45:20.000Z","dependencies_parsed_at":"2024-06-18T22:43:26.108Z","dependency_job_id":"9629e015-92ad-494e-92d0-7f87331cabe7","html_url":"https://github.com/amalmurali47/onaws","commit_stats":{"total_commits":57,"total_committers":2,"mean_commits":28.5,"dds":0.2807017543859649,"last_synced_commit":"8612023926a53daa02f532701a55a41669f35208"},"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/amalmurali47/onaws","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalmurali47%2Fonaws","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalmurali47%2Fonaws/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalmurali47%2Fonaws/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalmurali47%2Fonaws/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/amalmurali47","download_url":"https://codeload.github.com/amalmurali47/onaws/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/amalmurali47%2Fonaws/sbom","scorecard":{"id":188176,"data":{"date":"2025-08-11","repo":{"name":"github.com/amalmurali47/onaws","commit":"8612023926a53daa02f532701a55a41669f35208"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"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":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","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":"Code-Review","score":4,"reason":"Found 8/18 approved changesets -- score normalized to 4","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":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/python-publish.yml:1","Info: no jobLevel write permissions found"],"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":"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":2,"reason":"dependency not pinned by hash detected -- score normalized to 2","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:21: update your workflow using https://app.stepsecurity.io/secureworkflow/amalmurali47/onaws/python-publish.yml/main?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python-publish.yml:23: update your workflow using https://app.stepsecurity.io/secureworkflow/amalmurali47/onaws/python-publish.yml/main?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:42","Warn: pipCommand not pinned by hash: .github/workflows/python-publish.yml:43","Info:   0 out of   2 GitHub-owned GitHubAction dependencies pinned","Info:   1 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of   2 pipCommand dependencies pinned"],"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":"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":"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":"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 'main'"],"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":"Vulnerabilities","score":7,"reason":"3 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-9hjg-9r4m-mvj7","Warn: Project is vulnerable to: GHSA-9wx4-h78v-vm56","Warn: Project is vulnerable to: PYSEC-2023-74 / GHSA-j8r2-6x86-q33q"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 20 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-16T20:09:51.278Z","repository_id":45470087,"created_at":"2025-08-16T20:09:51.278Z","updated_at":"2025-08-16T20:09:51.278Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270820793,"owners_count":24651534,"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","status":"online","status_checked_at":"2025-08-17T02:00:09.016Z","response_time":129,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","bug-bounty","reconnaissance","tool"],"created_at":"2025-08-17T08:01:30.624Z","updated_at":"2025-08-17T08:03:19.411Z","avatar_url":"https://github.com/amalmurali47.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# onaws\n\n`onaws` is a simple tool to check if an IP/hostname belongs to the AWS IP space or not. It uses the [AWS IP address ranges data](https://docs.aws.amazon.com/general/latest/gr/aws-ip-ranges.html) published by AWS to perform the search.\n\nThe tool could be helpful in:\n\n- Continuous recon of assets\n- Gathering assets that use a specific service (e.g. EC2)\n- Subdomain/DNS takeovers\n- Finding region information for S3 buckets\n- etc.\n\n![onaws](https://user-images.githubusercontent.com/3582096/124377256-bac56280-dcc8-11eb-9a3f-fa689abaa12b.png)\n\n\n# Install\n\n```shell\npip install onaws\n```\n\n# Upgrade\n\n```shell\npip install -U onaws\n```\n# Usage\n\n## Given an IP:\n```shell\nonaws 52.219.47.34\n```\n\n## Given a hostname:\n\nA domain or subdomain can be passed as input:\n\n```shell\nonaws example.com\n```\n\nYou may also supply an S3 bucket hostname as input:\n\n```shell\nonaws dropbox.s3.amazonaws.com\n```\n\n## Given an input list\n\n`onaws` accepts line-delimited hosts on STDIN. This is helpful if you want to pipe the output of other tools to `onaws`:\n\n```shell\n$ cat hosts.txt\nuber.s3.amazonaws.com\naws.com\ngoogle.com\n23.21.52.140\n\n\n$ cat hosts.txt | onaws\n{\n    \"is_aws_ip\": true,\n    \"ip_address\": \"52.218.106.162\",\n    \"service\": \"S3\",\n    \"region\": \"eu-west-1\",\n    \"matched_subnet\": \"52.218.0.0/17\",\n    \"hostname\": \"uber.s3.amazonaws.com\"\n}\n{\n    \"is_aws_ip\": true,\n    \"ip_address\": \"143.204.225.9\",\n    \"service\": \"CLOUDFRONT\",\n    \"region\": \"GLOBAL\",\n    \"matched_subnet\": \"143.204.0.0/16\",\n    \"hostname\": \"aws.com\"\n}\n{\n    \"is_aws_ip\": false,\n    \"ip_address\": \"216.58.201.238\",\n    \"hostname\": \"google.com\"\n}\n{\n    \"is_aws_ip\": true,\n    \"ip_address\": \"23.21.52.140\",\n    \"service\": \"EC2\",\n    \"region\": \"us-east-1\",\n    \"matched_subnet\": \"23.20.0.0/14\"\n}\n```\n\n## Many hostnames\n\nonaws accepts hostnames as input, but it resolves them individually with no optimization. Therefore, it's *significantly* faster to do the resolution first with a tool like [MassDNS](https://github.com/blechschmidt/massdns) or [dnsx](https://github.com/projectdiscovery/dnsx):\n\n```shell\ncat hosts.txt | dnsx -silent -a -resp-only | onaws\n```\n\n# Output\n\nIf the IP/hostname falls in the AWS IP range, `onaws` will return the service, region and other details in the output:\n\n```json\n{\n    \"is_aws_ip\": true,\n    \"ip_address\": \"52.218.196.155\",\n    \"service\": \"S3\",\n    \"region\": \"us-west-2\",\n    \"matched_subnet\": \"52.218.128.0/17\",\n    \"hostname\": \"flaws.cloud\"\n}\n```\n\nFor multiple inputs, the output format will be in JSONL:\n\n```json\n{\n    \"is_aws_ip\": true,\n    \"ip_address\": \"143.204.225.9\",\n    \"service\": \"CLOUDFRONT\",\n    \"region\": \"GLOBAL\",\n    \"matched_subnet\": \"143.204.0.0/16\",\n    \"hostname\": \"aws.com\"\n}\n{\n    \"is_aws_ip\": false,\n    \"ip_address\": \"216.58.201.238\",\n    \"hostname\": \"google.com\"\n}\n{\n    \"is_aws_ip\": true,\n    \"ip_address\": \"23.21.52.140\",\n    \"service\": \"EC2\",\n    \"region\": \"us-east-1\",\n    \"matched_subnet\": \"23.20.0.0/14\"\n}\n```\n\nIf you want to save the output to a file, you can use Bash redirection or `tee`:\n\n```shell\ncat hosts | onaws | tee -a output.json\n```\n\n## More examples\n\nTo get hosts that use EC2:\n\n```shell\ncat output.json | jq -scr '.[] | select(.service == \"EC2\") | .hostname'\n```\nOutput:\n\n```\ngroove.uber.com\nphotos.uber.com\nphotography.uber.com\n...\n```\n\nTo get a list of hosts that use AWS services:\n\n```shell\ncat output.json | jq -sc '.[] | select(.is_aws_ip == true ) | [.hostname, .ip_address, .service] | join (\",\")' \n```\n\nOutput:\n\n```csv\nassets-share.uber.com,52.84.13.77,CLOUDFRONT\ngroove.uber.com,3.223.41.171,EC2\ndevbuilds.uber.com,52.84.13.29,CLOUDFRONT\nphotos.uber.com,54.237.133.81,EC2\n...\n```\n\n## Errors\n\nIf the input you provide is an invalid IP or is not resolvable, the output will indicate so:\n\n```shell\n$ onaws 'invalid.invalid'\n{\n    \"hostname\": \"invalid.invalid\",\n    \"resolvable\": false\n}\n```\n\nIf, for some reason, the tool fails to fetch the AWS IP ranges, it will throw the following exception:\n\n```shell\n$ onaws\nFailed to get AWS IP ranges\n```\n\n# Contribution\n\nI welcome contributions from the public. If you find something that could be improved, please file an Issue or send a PR :)\n\n# Credits\n\n- Thanks to @TomNomNom for suggesting the name.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famalmurali47%2Fonaws","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Famalmurali47%2Fonaws","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Famalmurali47%2Fonaws/lists"}