Skip to content

Commit

Permalink
Merge pull request #10 from crytic/rename
Browse files Browse the repository at this point in the history
More find/replace and remove references to fuzzing
  • Loading branch information
bohendo authored Sep 20, 2023
2 parents 1880245 + 900704d commit 83ef5d8
Show file tree
Hide file tree
Showing 17 changed files with 76 additions and 78 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 2 additions & 4 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
82 changes: 41 additions & 41 deletions README.md
Original file line number Diff line number Diff line change
@@ -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

Expand All @@ -10,57 +10,57 @@ 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

Releases are signed with sigstore. You can verify using [`cosign`](https://github.com/sigstore/cosign) with the following example command:

```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-<version>-<os>-<arch>.tar.gz.bundle \
cloudfuzz-<version>-<os>-<arch>.tar.gz
--bundle cloudexec-<version>-<os>-<arch>.tar.gz.bundle \
cloudexec-<version>-<os>-<arch>.tar.gz
```

#### Install from a tarball

```bash
tar -xzf cloudfuzz-<version>-<os>-<arch>.tar.gz
mv cloudfuzz /usr/local/bin
tar -xzf cloudexec-<version>-<os>-<arch>.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

Expand All @@ -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://<vault-name>/<item-name>/<field-name>`. 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:
Expand All @@ -103,95 +103,95 @@ 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.

### 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.
6 changes: 3 additions & 3 deletions cmd/cloudexec/clean.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/cloudexec/configure.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (
"os/exec"
"strings"

"github.com/trailofbits/cloudexec/pkg/config"
"github.com/crytic/cloudexec/pkg/config"
"golang.org/x/term"
)

Expand Down
4 changes: 2 additions & 2 deletions cmd/cloudexec/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
10 changes: 5 additions & 5 deletions cmd/cloudexec/launch.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions cmd/cloudexec/logs.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
14 changes: 7 additions & 7 deletions cmd/cloudexec/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
)

Expand All @@ -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",
Expand All @@ -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
Expand Down Expand Up @@ -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{
Expand Down Expand Up @@ -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",
Expand Down
4 changes: 2 additions & 2 deletions cmd/cloudexec/pull.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
4 changes: 2 additions & 2 deletions cmd/cloudexec/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion cmd/cloudexec/user_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (
"text/template"
"time"

"github.com/trailofbits/cloudexec/pkg/config"
"github.com/crytic/cloudexec/pkg/config"
)

type UserData struct {
Expand Down
2 changes: 1 addition & 1 deletion cmd/cloudexec/user_data_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (
"strings"
"testing"

"github.com/trailofbits/cloudexec/pkg/config"
"github.com/crytic/cloudexec/pkg/config"
)

func getLaunchConfig(duration string) LaunchConfig {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/trailofbits/cloudexec
module github.com/crytic/cloudexec

go 1.20

Expand Down
Loading

0 comments on commit 83ef5d8

Please sign in to comment.