From 900704d01bcedc2a966305976d9ff9d38b2c61f4 Mon Sep 17 00:00:00 2001 From: James Olds Date: Wed, 20 Sep 2023 11:42:50 -0400 Subject: [PATCH] rename and remove references to fuzzing --- .github/workflows/release.yml | 2 +- .goreleaser.yml | 6 +-- README.md | 82 ++++++++++++++++---------------- cmd/cloudexec/clean.go | 6 +-- cmd/cloudexec/configure.go | 2 +- cmd/cloudexec/init.go | 4 +- cmd/cloudexec/launch.go | 10 ++-- cmd/cloudexec/logs.go | 4 +- cmd/cloudexec/main.go | 14 +++--- cmd/cloudexec/pull.go | 4 +- cmd/cloudexec/push.go | 4 +- cmd/cloudexec/user_data.go | 2 +- cmd/cloudexec/user_data_test.go | 2 +- go.mod | 2 +- pkg/digitalocean/digitalocean.go | 4 +- pkg/s3/s3.go | 2 +- pkg/state/state.go | 4 +- 17 files changed, 76 insertions(+), 78 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 31f7abf..21ee2bb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: for file in *.{tar.gz,zip}; do if [ -f "$file" ]; then cosign verify-blob \ - --certificate-identity-regexp "https://github.com/trailofbits/cloudexec.*" \ + --certificate-identity-regexp "https://github.com/crytic/cloudexec.*" \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ --bundle "$file.bundle" \ $file diff --git a/.goreleaser.yml b/.goreleaser.yml index 364f6f6..3ca81b2 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -53,9 +53,7 @@ brews: owner: trailofbits name: homebrew-tools token: "{{ .Env.GITHUB_TOKEN }}" - homepage: https://github.com/trailofbits/cloudexec - download_strategy: GitHubPrivateReleaseDownloadStrategy - custom_require: lib/private + homepage: https://github.com/crytic/cloudexec folder: Formula install: |- bin.install "cloudexec" @@ -69,4 +67,4 @@ brews: brew install --cask 1password-cli For more information on using 1Password CLI with CloudExec, visit: - https://github.com/trailofbits/cloudexec#configure-credentials + https://github.com/crytic/cloudexec#configure-credentials diff --git a/README.md b/README.md index cc4d1ce..c8bff3c 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# CloudFuzz +# CloudExec -CloudFuzz is a command-line tool for easily running cloud-based fuzzing jobs on DigitalOcean. Start, manage and pull the results of fuzzing jobs from your terminal. +CloudExec is a command-line tool for easily running cloud-based jobs on DigitalOcean. Start, manage and pull the results of jobs from your terminal. ## Getting Started @@ -10,20 +10,20 @@ CloudFuzz is a command-line tool for easily running cloud-based fuzzing jobs on ```bash brew tap trailofbits/tools -brew install cloudfuzz +brew install cloudexec ``` #### Upgrade with Brew ```bash -brew update && brew upgrade cloudfuzz +brew update && brew upgrade cloudexec ``` alternatively, you can install from a GitHub release: ### Install from a GitHub release -Download the latest release for your platform from the [releases page](https://github.com/trailofbits/cloudfuzz/releases). +Download the latest release for your platform from the [releases page](https://github.com/crytic/cloudexec/releases). #### Release verification @@ -31,36 +31,36 @@ Releases are signed with sigstore. You can verify using [`cosign`](https://githu ```bash cosign verify-blob \ - --certificate-identity-regexp "https://github.com/trailofbits/cloudfuzz.*" \ + --certificate-identity-regexp "https://github.com/crytic/cloudexec.*" \ --certificate-oidc-issuer https://token.actions.githubusercontent.com \ - --bundle cloudfuzz---.tar.gz.bundle \ - cloudfuzz---.tar.gz + --bundle cloudexec---.tar.gz.bundle \ + cloudexec---.tar.gz ``` #### Install from a tarball ```bash -tar -xzf cloudfuzz---.tar.gz -mv cloudfuzz /usr/local/bin +tar -xzf cloudexec---.tar.gz +mv cloudexec /usr/local/bin ``` #### Install from source -Running the command below will build the CLI tool from source with a binary named `cloudfuzz` in a `dist` folder: +Running the command below will build the CLI tool from source with a binary named `cloudexec` in a `dist` folder: ```bash make build ``` -Then, move the resulting binary from `./dist/cloufuzz` into your `PATH`. +Then, move the resulting binary from `./dist/clouexec` into your `PATH`. -Nix users can run `nix build` and then `nix profile install ./result` to install `cloudfuzz`. A helper command `make nix-install` is available which performs these steps for you and also upgrades an existing version of `cloudfuzz` that might already be installed. +Nix users can run `nix build` and then `nix profile install ./result` to install `cloudexec`. A helper command `make nix-install` is available which performs these steps for you and also upgrades an existing version of `cloudexec` that might already be installed. ### Configure credentials -CloudFuzz requires DigitalOcean API credentials to manage droplets, and Spaces credentials to store state and job data. The recommended method for storing and providing your credentials securely is by using the 1Password CLI. +CloudExec requires DigitalOcean API credentials to manage droplets, and Spaces credentials to store state and job data. The recommended method for storing and providing your credentials securely is by using the 1Password CLI. -CloudFuzz supports natively integrating with 1Password, allowing you to reference your credentials stored in your 1Password vault. However, you can also choose to provide plaintext credentials using the `cloudfuzz configure` command. Additionally, you can override individual values or the entire configuration by setting the corresponding environment variables. +CloudExec supports natively integrating with 1Password, allowing you to reference your credentials stored in your 1Password vault. However, you can also choose to provide plaintext credentials using the `cloudexec configure` command. Additionally, you can override individual values or the entire configuration by setting the corresponding environment variables. #### Get credentials from DigitalOcean @@ -82,14 +82,14 @@ brew install --cask 1password/tap/1password-cli # see the link above for install eval $(op signin) ``` -Note what your [1Password secret references](https://developer.1password.com/docs/cli/secret-references/) are and use them in place of your actual secret values during the `cloudfuzz configure` or env var setup steps described in the next section. +Note what your [1Password secret references](https://developer.1password.com/docs/cli/secret-references/) are and use them in place of your actual secret values during the `cloudexec configure` or env var setup steps described in the next section. These references generally follow the format: `op:////`. For example, if you saved your keys to a vault called `Private`, in an item called `DigitalOcean` and the api key field is called `ApiKey`, then the secret reference to use is `op://Private/DigitalOcean/ApiKey`. -#### Configure CloudFuzz +#### Configure CloudExec ```bash -cloudfuzz configure +cloudexec configure ``` or set environment variables: @@ -103,41 +103,41 @@ DIGITALOCEAN_SPACES_REGION Remember, if you save secret values to a `.env` file, never commit it to any version control system. Add such `.env` files to your project's `.gitignore` file to help prevent making such mistakes. -### Check CloudFuzz access +### Check CloudExec access -Confirm `cloudfuzz` has access to DigitalOcean. +Confirm `cloudexec` has access to DigitalOcean. ```bash -cloudfuzz check +cloudexec check ``` -### Initialize your CloudFuzz environment +### Initialize your CloudExec environment ```bash -cloudfuzz init +cloudexec init ``` -### Launch a new remote fuzzing job +### Launch a new remote job -Generate a cloudfuzz.toml configuration file in the current directory. +Generate a cloudexec.toml configuration file in the current directory. ```bash -cloudfuzz launch init +cloudexec launch init ``` -Update the `cloudfuzz.toml` as needed. +Update the `cloudexec.toml` as needed. ```bash -# default nyc3 region and c-2 size droplet, using a cloudfuzz.toml file in the current directory -cloudfuzz launch +# default nyc3 region and c-2 size droplet, using a cloudexec.toml file in the current directory +cloudexec launch # custom region and droplet size -cloudfuzz launch --size c-4 --region sfo2 +cloudexec launch --size c-4 --region sfo2 ``` ### Stream logs from the provisioning script ```bash -cloudfuzz logs +cloudexec logs ``` Note that the `logs` subcommand will continue to stream logs until you stop with ctrl-c, even after the job is finished and stops producing new logs. This is a read-only command and it is safe to kill it at any point. @@ -145,53 +145,53 @@ Note that the `logs` subcommand will continue to stream logs until you stop with ### Get logs from a previous run ```bash -cloudfuzz logs --job 1 +cloudexec logs --job 1 ``` ### Attach to the running job ```bash -cloudfuzz attach +cloudexec attach # or -ssh -t cloudfuzz tmux attach -s cloudfuzz +ssh -t cloudexec tmux attach -s cloudexec ``` ### SSH to your droplet ```bash -ssh cloudfuzz +ssh cloudexec ``` ### Check on the status of your jobs ```bash # show only runnning jobs, and the last completed job -cloudfuzz status +cloudexec status # show all jobs -cloudfuzz status --all +cloudexec status --all ``` ### Sync files from a completed job to a local path ```bash # pull from the latest successful job -cloudfuzz pull example/output +cloudexec pull example/output # pull from any job ID -cloudfuzz pull --job 1 example/output +cloudexec pull --job 1 example/output ``` ### Cancel any in progress jobs ```bash -cloudfuzz cancel +cloudexec cancel ``` ### Cleanup all bucket contents and reset state (destructive) ```bash -cloudfuzz clean +cloudexec clean ``` Note that there is often a delay while deleting files from Digital Ocean Spaces buckets. diff --git a/cmd/cloudexec/clean.go b/cmd/cloudexec/clean.go index 4586598..05a34d6 100644 --- a/cmd/cloudexec/clean.go +++ b/cmd/cloudexec/clean.go @@ -4,9 +4,9 @@ import ( "fmt" "strings" - "github.com/trailofbits/cloudexec/pkg/config" - do "github.com/trailofbits/cloudexec/pkg/digitalocean" - "github.com/trailofbits/cloudexec/pkg/s3" + "github.com/crytic/cloudexec/pkg/config" + do "github.com/crytic/cloudexec/pkg/digitalocean" + "github.com/crytic/cloudexec/pkg/s3" ) func ConfirmDeleteDroplets(config config.Config, userName string, instanceToJobs map[int64][]int64) error { diff --git a/cmd/cloudexec/configure.go b/cmd/cloudexec/configure.go index bc0cf17..d800e22 100644 --- a/cmd/cloudexec/configure.go +++ b/cmd/cloudexec/configure.go @@ -8,7 +8,7 @@ import ( "os/exec" "strings" - "github.com/trailofbits/cloudexec/pkg/config" + "github.com/crytic/cloudexec/pkg/config" "golang.org/x/term" ) diff --git a/cmd/cloudexec/init.go b/cmd/cloudexec/init.go index 990c188..d62c12d 100644 --- a/cmd/cloudexec/init.go +++ b/cmd/cloudexec/init.go @@ -3,8 +3,8 @@ package main import ( "fmt" - "github.com/trailofbits/cloudexec/pkg/config" - "github.com/trailofbits/cloudexec/pkg/s3" + "github.com/crytic/cloudexec/pkg/config" + "github.com/crytic/cloudexec/pkg/s3" ) func Init(username string, config config.Config) error { diff --git a/cmd/cloudexec/launch.go b/cmd/cloudexec/launch.go index 7bb6c33..58d01f1 100644 --- a/cmd/cloudexec/launch.go +++ b/cmd/cloudexec/launch.go @@ -9,11 +9,11 @@ import ( "time" "github.com/BurntSushi/toml" - "github.com/trailofbits/cloudexec/pkg/config" - do "github.com/trailofbits/cloudexec/pkg/digitalocean" - "github.com/trailofbits/cloudexec/pkg/s3" - "github.com/trailofbits/cloudexec/pkg/ssh" - "github.com/trailofbits/cloudexec/pkg/state" + "github.com/crytic/cloudexec/pkg/config" + do "github.com/crytic/cloudexec/pkg/digitalocean" + "github.com/crytic/cloudexec/pkg/s3" + "github.com/crytic/cloudexec/pkg/ssh" + "github.com/crytic/cloudexec/pkg/state" ) type Commands struct { diff --git a/cmd/cloudexec/logs.go b/cmd/cloudexec/logs.go index 9583d43..97872cf 100644 --- a/cmd/cloudexec/logs.go +++ b/cmd/cloudexec/logs.go @@ -6,8 +6,8 @@ import ( "os/exec" "strings" - "github.com/trailofbits/cloudexec/pkg/config" - "github.com/trailofbits/cloudexec/pkg/s3" + "github.com/crytic/cloudexec/pkg/config" + "github.com/crytic/cloudexec/pkg/s3" ) func GetLogsFromBucket(config config.Config, jobID int, bucketName string) error { diff --git a/cmd/cloudexec/main.go b/cmd/cloudexec/main.go index cb5c187..94f703c 100644 --- a/cmd/cloudexec/main.go +++ b/cmd/cloudexec/main.go @@ -9,10 +9,10 @@ import ( "strconv" "time" + do "github.com/crytic/cloudexec/pkg/digitalocean" + "github.com/crytic/cloudexec/pkg/ssh" + "github.com/crytic/cloudexec/pkg/state" "github.com/olekukonko/tablewriter" - do "github.com/trailofbits/cloudexec/pkg/digitalocean" - "github.com/trailofbits/cloudexec/pkg/ssh" - "github.com/trailofbits/cloudexec/pkg/state" "github.com/urfave/cli/v2" ) @@ -38,7 +38,7 @@ func main() { app := &cli.App{ Name: "cloudexec", - Usage: "easily run cloud based fuzzing jobs", + Usage: "easily run cloud based jobs", Commands: []*cli.Command{ { Name: "check", @@ -65,7 +65,7 @@ func main() { }, { Name: "init", - Usage: "Initialize a cloud fuzzing environment", + Usage: "Initialize the cloud environment", Aliases: []string{"i"}, Action: func(*cli.Context) error { // Abort on configuration error @@ -93,7 +93,7 @@ func main() { }, { Name: "launch", - Usage: "Launch a droplet and start a fuzzing job", + Usage: "Launch a droplet and start a job", Aliases: []string{"l"}, Flags: []cli.Flag{ &cli.StringFlag{ @@ -267,7 +267,7 @@ func main() { }, { Name: "pull", - Usage: "Pulls down the results of the latest successful fuzzing job", + Usage: "Pulls down the results of the latest successful job", Flags: []cli.Flag{ &cli.IntFlag{ Name: "job", diff --git a/cmd/cloudexec/pull.go b/cmd/cloudexec/pull.go index a015ddb..c1dc274 100644 --- a/cmd/cloudexec/pull.go +++ b/cmd/cloudexec/pull.go @@ -6,8 +6,8 @@ import ( "path/filepath" "strings" - "github.com/trailofbits/cloudexec/pkg/config" - "github.com/trailofbits/cloudexec/pkg/s3" + "github.com/crytic/cloudexec/pkg/config" + "github.com/crytic/cloudexec/pkg/s3" ) func DownloadJobOutput(config config.Config, jobID int, localPath string, bucketName string) error { diff --git a/cmd/cloudexec/push.go b/cmd/cloudexec/push.go index 2cdcb5b..aec4018 100644 --- a/cmd/cloudexec/push.go +++ b/cmd/cloudexec/push.go @@ -5,8 +5,8 @@ import ( "os" "path/filepath" - "github.com/trailofbits/cloudexec/pkg/config" - "github.com/trailofbits/cloudexec/pkg/s3" + "github.com/crytic/cloudexec/pkg/config" + "github.com/crytic/cloudexec/pkg/s3" ) func UploadDirectoryToSpaces(config config.Config, bucketName string, sourcePath string, destPath string) error { diff --git a/cmd/cloudexec/user_data.go b/cmd/cloudexec/user_data.go index 6f582f1..9839780 100644 --- a/cmd/cloudexec/user_data.go +++ b/cmd/cloudexec/user_data.go @@ -7,7 +7,7 @@ import ( "text/template" "time" - "github.com/trailofbits/cloudexec/pkg/config" + "github.com/crytic/cloudexec/pkg/config" ) type UserData struct { diff --git a/cmd/cloudexec/user_data_test.go b/cmd/cloudexec/user_data_test.go index b00b2eb..b5210ce 100644 --- a/cmd/cloudexec/user_data_test.go +++ b/cmd/cloudexec/user_data_test.go @@ -5,7 +5,7 @@ import ( "strings" "testing" - "github.com/trailofbits/cloudexec/pkg/config" + "github.com/crytic/cloudexec/pkg/config" ) func getLaunchConfig(duration string) LaunchConfig { diff --git a/go.mod b/go.mod index 8ec2f5f..bf510aa 100644 --- a/go.mod +++ b/go.mod @@ -1,4 +1,4 @@ -module github.com/trailofbits/cloudexec +module github.com/crytic/cloudexec go 1.20 diff --git a/pkg/digitalocean/digitalocean.go b/pkg/digitalocean/digitalocean.go index 17f9925..ee9c227 100644 --- a/pkg/digitalocean/digitalocean.go +++ b/pkg/digitalocean/digitalocean.go @@ -9,8 +9,8 @@ import ( "github.com/digitalocean/godo" "github.com/digitalocean/godo/util" - "github.com/trailofbits/cloudexec/pkg/config" - "github.com/trailofbits/cloudexec/pkg/s3" + "github.com/crytic/cloudexec/pkg/config" + "github.com/crytic/cloudexec/pkg/s3" ) type Droplet struct { diff --git a/pkg/s3/s3.go b/pkg/s3/s3.go index 4c47cf3..6c7708c 100644 --- a/pkg/s3/s3.go +++ b/pkg/s3/s3.go @@ -14,7 +14,7 @@ import ( "github.com/aws/aws-sdk-go/aws/credentials" "github.com/aws/aws-sdk-go/aws/session" "github.com/aws/aws-sdk-go/service/s3" - "github.com/trailofbits/cloudexec/pkg/config" + "github.com/crytic/cloudexec/pkg/config" ) /* diff --git a/pkg/state/state.go b/pkg/state/state.go index db2f85b..e17af85 100644 --- a/pkg/state/state.go +++ b/pkg/state/state.go @@ -5,8 +5,8 @@ import ( "fmt" "time" - "github.com/trailofbits/cloudexec/pkg/config" - "github.com/trailofbits/cloudexec/pkg/s3" + "github.com/crytic/cloudexec/pkg/config" + "github.com/crytic/cloudexec/pkg/s3" ) type JobStatus string