Skip to content

Commit

Permalink
Merge pull request #163 from projectdiscovery/dev
Browse files Browse the repository at this point in the history
v1.0.1 Release
  • Loading branch information
ehsandeep authored Jun 9, 2022
2 parents a2d2952 + 872274f commit 802ff6f
Show file tree
Hide file tree
Showing 17 changed files with 537 additions and 248 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
os: [ubuntu-latest, windows-latest, macOS-latest]
steps:
- name: Set up Go
uses: actions/setup-go@v2
uses: actions/setup-go@v3
with:
go-version: 1.17

- name: Check out code
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Build
run: go build .
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,16 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
with:
languages: ${{ matrix.language }}

- name: Autobuild
uses: github/codeql-action/autobuild@v1
uses: github/codeql-action/autobuild@v2

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2
10 changes: 5 additions & 5 deletions .github/workflows/dockerhub-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,26 +12,26 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Git Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Get Github tag
id: meta
run: |
echo "::set-output name=tag::$(curl --silent "https://api.github.com/repos/projectdiscovery/cloudlist/releases/latest" | jq -r .tag_name)"
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v2

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_TOKEN }}

- name: Build and push
uses: docker/build-push-action@v2
uses: docker/build-push-action@v3
with:
context: .
platforms: linux/amd64,linux/arm64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
uses: actions/checkout@v3
- name: Run golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3.2.0
with:
version: latest
args: --timeout 5m
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,12 @@ jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
with:
go-version: 1.17

- uses: goreleaser/goreleaser-action@v2
- uses: goreleaser/goreleaser-action@v3
with:
args: "release --rm-dist"
version: latest
Expand Down
37 changes: 37 additions & 0 deletions .github/workflows/sonarcloud.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: 👮🏼‍♂️ Sonarcloud
on:
push:
branches:
- main
- dev
pull_request:
types: [opened, synchronize, reopened]
workflow_dispatch:

jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis

- name: "Set up Go"
uses: actions/setup-go@v2
with:
go-version: 1.17

- name: Run unit Tests
run: |
go test -coverprofile=./cov.out ./...
- name: Run Gosec Security Scanner
run: |
go install github.com/securego/gosec/cmd/gosec@latest
gosec -no-fail -fmt=sonarqube -out report.json ./...
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
4 changes: 2 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
FROM golang:1.17.6-alpine AS builder
FROM golang:1.18.3-alpine AS builder
RUN apk add --no-cache git
RUN go install -v github.com/projectdiscovery/cloudlist/cmd/cloudlist@latest

FROM alpine:3.15.0
FROM alpine:3.16.0
RUN apk -U upgrade --no-cache \
&& apk add --no-cache bind-tools ca-certificates
COPY --from=builder /go/bin/cloudlist /usr/local/bin/
Expand Down
16 changes: 16 additions & 0 deletions PROVIDERS.md
Original file line number Diff line number Diff line change
Expand Up @@ -330,3 +330,19 @@ Specifying https in the `nomad_url` automatically turns SSL to on. All the field

References -
- https://www.nomadproject.io/api-docs

### Hetzner Cloud

Hetzner Cloud can be integrated by using the following configuration block.

```yaml
- # provider is the name of the provider
provider: hetzner
# id is the name of the provider id
id: staging
# auth_token is the is the hetzner authentication token
auth_token: <hetzner-token>
```

References -
- https://docs.hetzner.cloud/#authentication
80 changes: 46 additions & 34 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
</p>


Cloudlist is a multi-cloud tool for getting Assets (Hostnames, IP Addresses) from Cloud Providers. This is intended to be used by the blue team to augment Attack Surface Management efforts by maintaining a centralized list of assets across multiple clouds with very little configuration efforts.
Cloudlist is a multi-cloud tool for getting Assets from Cloud Providers. This is intended to be used by the blue team to augment Attack Surface Management efforts by maintaining a centralized list of assets across multiple clouds with very little configuration efforts.


# Features
Expand All @@ -36,10 +36,12 @@ Cloudlist is a multi-cloud tool for getting Assets (Hostnames, IP Addresses) fro
</h1>


- Easily list Cloud assets with multiple configurations.
- Multiple cloud providers support.
- Highly extensible making adding new providers a breeze.
- **stdout** support to work with other tools in pipelines.
- List Cloud assets with multiple configurations
- Multiple Cloud providers support
- Multiple output format support
- Multiple filters support
- Highly extensible making adding new providers a breeze
- **stdout** support to work with other tools in pipelines

# Usage

Expand Down Expand Up @@ -152,29 +154,31 @@ cloudlist -silent | httpx -silent | nuclei -t cves/
- Nomad
- Consul
- Terraform
- Hetzner Cloud
- Instances


# Configuration file

The default provider config file should be located at `$HOME/.config/cloudlist/provider-config.yaml` and has the following contents as an example. In order to run this tool, the keys need to updated in the config file.
The default provider config file should be located at `$HOME/.config/cloudlist/provider-config.yaml` and has the following contents as an example. In order to run this tool, the keys need to updated in the config file for the desired providers.

<details>
<summary>Example Provider Config</summary>

```yaml
- # provider is the name of the provider
provider: do
- provider: do # provider is the name of the provider
# id is the name of the provider id
id: xxxx
# digitalocean_token is the API key for digitalocean cloud platform
digitalocean_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

- # provider is the name of the provider
provider: scw
- provider: scw # provider is the name of the provider
# scaleway_access_key is the access key for scaleway API
scaleway_access_key: SCWXXXXXXXXXXXXXX
# scaleway_access_token is the access token for scaleway API
scaleway_access_token: xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx

- # provider is the name of the provider
provider: aws
- provider: aws # provider is the name of the provider
# id is the name of the provider id
id: staging
# aws_access_key is the access key for AWS account
Expand All @@ -183,14 +187,14 @@ The default provider config file should be located at `$HOME/.config/cloudlist/p
aws_secret_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# aws_session_token session token for temporary security credentials retrieved via STS (optional)
aws_session_token: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- # provider is the name of the provider (Google Cloud Platform)
provider: gcp

- provider: gcp # provider is the name of the provider
# profile is the name of the provider profile
id: logs
# gcp_service_account_key is the minified json of a google cloud service account with list permissions
gcp_service_account_key: '{xxxxxxxxxxxxx}'
- # provider is the name of the provider
provider: azure

- provider: azure # provider is the name of the provider
# id is the name of the provider id
id: staging
# client_id is the client ID of registered application of the azure account (not requuired if using cli auth)
Expand All @@ -203,32 +207,32 @@ The default provider config file should be located at `$HOME/.config/cloudlist/p
subscription_id: xxxxxxxxxxxxxxxxxxx
#use_cli_auth if set to true cloudlist will use azure cli auth
use_cli_auth: true
- # provider is the name of the provider
provider: cloudflare

- provider: cloudflare # provider is the name of the provider
# email is the email for cloudflare
email: user@domain.com
# api_key is the api_key for cloudflare
api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
- # provider is the name of the provider
provider: heroku

- provider: heroku # provider is the name of the provider
# id is the name of the provider id
id: staging
# heroku_api_token is the api key for Heroku account
heroku_api_token: xxxxxxxxxxxxxxxxxxxx
- # provider is the name of the provider
provider: linode

- provider: linode # provider is the name of the provider
# id is the name of the provider id
id: staging
# linode_personal_access_token is the personal access token for linode account
linode_personal_access_token: XXXXXXXXXXXXXXXXXXXXXXXX
- # provider is the name of the provider
provider: fastly

- provider: fastly # provider is the name of the provider
# id is the name of the provider id
id: staging
# fastly_api_key is the personal API token for fastly account
fastly_api_key: XX-XXXXXXXXXXXXXXXXXXXXXX-
- # provider is the name of the provider
provider: alibaba

- provider: alibaba # provider is the name of the provider
# id is the name of the provider id
id: staging
# alibaba_region_id is the region id of the resources
Expand All @@ -237,22 +241,28 @@ The default provider config file should be located at `$HOME/.config/cloudlist/p
alibaba_access_key: XXXXXXXXXXXXXXXXXXXX
# alibaba_access_key_secret is the secret access key for alibaba cloud account
alibaba_access_key_secret: XXXXXXXXXXXXXXXX
- # provider is the name of the provider
provider: namecheap

- provider: namecheap # provider is the name of the provider
# id is the name of the provider id
id: staging
# namecheap_api_key is the api key for namecheap account
namecheap_api_key: XXXXXXXXXXXXXXXXXXXXXXX
# namecheap_user_name is the username of the namecheap account
namecheap_user_name: XXXXXXX
- # provider is the name of the provider
provider: terraform

- provider: terraform # provider is the name of the provider
# id is the name of the provider id
id: staging
#tf_state_file is the location of terraform state file (terraform.tfsate)
tf_state_file: path/to/terraform.tfstate
- # provider is the name of the provider
provider: nomad

- provider: hetzner # provider is the name of the provider
# id is the name of the provider id
id: staging
# auth_token is the is the hetzner authentication token
auth_token: <hetzner-token>

- provider: nomad # provider is the name of the provider
# nomad_url is the url for nomad server
nomad_url: http:/127.0.0.1:4646/
# nomad_ca_file is the path to nomad CA file
Expand All @@ -265,8 +275,8 @@ The default provider config file should be located at `$HOME/.config/cloudlist/p
# nomad_token: <nomad-token>
# nomad_http_auth is the nomad http auth value
# nomad_http_auth: <nomad-http-auth-value>
- # provider is the name of the provider
provider: consul

- provider: consul # provider is the name of the provider
# consul_url is the url for consul server
consul_url: http://localhost:8500/
# consul_ca_file is the path to consul CA file
Expand All @@ -281,6 +291,8 @@ The default provider config file should be located at `$HOME/.config/cloudlist/p
# consul_http_auth: <consul-http-auth-value>
```

</details>

# Contribution

Please check [PROVIDERS.md](https://github.com/projectdiscovery/cloudlist/blob/main/PROVIDERS.md) and [DESIGN.md](https://github.com/projectdiscovery/cloudlist/blob/main/DESIGN.md) to include support for new cloud providers in Cloudlist.
Expand Down
Loading

0 comments on commit 802ff6f

Please sign in to comment.