|
| 1 | +<img src="https://techally-content.s3-us-west-1.amazonaws.com/public-content/lacework_logo_full.png" width="600"> |
| 2 | + |
| 3 | +# `lacework-cli` |
| 4 | + |
| 5 | +The Lacework Command Line Interface is a tool that helps you manage your |
| 6 | +Lacework cloud security platform. You can use it to manage compliance |
| 7 | +reports, external integrations, vulnerability scans, and other operations. |
| 8 | + |
| 9 | +## Install |
| 10 | + |
| 11 | +### Bash: |
| 12 | +``` |
| 13 | +$ curl https://raw.githubusercontent.com/lacework/go-sdk/master/cli/install.sh | sudo bash |
| 14 | +``` |
| 15 | + |
| 16 | +### Powershell: |
| 17 | +``` |
| 18 | +C:\> Set-ExecutionPolicy Bypass -Scope Process -Force |
| 19 | +C:\> iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/lacework/go-sdk/master/cli/install.ps1')) |
| 20 | +``` |
| 21 | + |
| 22 | +## Configuration File |
| 23 | + |
| 24 | +The `lacework-cli` looks for a file named `.lacework.toml` inside your home |
| 25 | +directory (`$HOME/.lacework.toml`) to access the following parameters: |
| 26 | +* `account`: Account subdomain of URL (i.e. `<ACCOUNT>.lacework.net`) |
| 27 | +* `api_key`: API Access Key ID |
| 28 | +* `api_secret`: API Access Secret Key |
| 29 | + |
| 30 | + |
| 31 | +An example of a Lacework configuration file: |
| 32 | +```toml |
| 33 | +account = "example" |
| 34 | +api_key = "EXAMPLE_1234567890ABC" |
| 35 | +api_secret = "_super_secret_key" |
| 36 | +``` |
| 37 | + |
| 38 | +You can provide a different configuration file with the option `--config`. |
| 39 | + |
| 40 | +## Basic Usage |
| 41 | +Once you have created your configuration file `$HOME/.lacework.toml`, |
| 42 | +you are ready to use the Lacework cli, a few basic commands are: |
| 43 | + |
| 44 | +1) List all integration in your account: |
| 45 | +```bash |
| 46 | +$ lacework-cli integration list |
| 47 | +``` |
| 48 | +1) Use the `api` command to access Lacework's ResfulAPI, for example, |
| 49 | +to get details about and specific event: |
| 50 | +```bash |
| 51 | +$ lacework-cli api get '/external/events/GetEventDetails?EVENT_ID=16700' |
| 52 | +``` |
| 53 | + |
| 54 | +## Development |
| 55 | +To build and install the CLI from source, use the `make install-cli` directive, |
| 56 | +this command will ask you to update your `PATH` environment variable to point |
| 57 | +to the compiled `lacework-cli` binary. |
| 58 | +``` |
| 59 | +$ make install-cli |
| 60 | +
|
| 61 | +# Make sure to update your PATH with the command provided from the above command |
| 62 | +
|
| 63 | +$ lacework-cli help |
| 64 | +``` |
| 65 | + |
| 66 | +## License and Copyright |
| 67 | +Copyright 2020, Lacework Inc. |
| 68 | +``` |
| 69 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 70 | +you may not use this file except in compliance with the License. |
| 71 | +You may obtain a copy of the License at |
| 72 | +
|
| 73 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 74 | +
|
| 75 | +Unless required by applicable law or agreed to in writing, software |
| 76 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 77 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 78 | +See the License for the specific language governing permissions and |
| 79 | +limitations under the License. |
| 80 | +``` |
0 commit comments