Skip to content

Commit

Permalink
fix: resoto -> fix (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
TheCatLady authored Sep 19, 2024
1 parent 6415f25 commit 5929c29
Show file tree
Hide file tree
Showing 33 changed files with 75 additions and 73 deletions.
4 changes: 2 additions & 2 deletions docs/development/apps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ Using [`fixinventoryappbundler`](https://github.com/someengineering/fixinventory
You can perform a dry run of the `cleanup-untagged` app for sample infrastructure app output:

```bash
$ resotoapprunner --path fixinventory-apps/cleanup-untagged/
$ fixinventoryapprunner --path fixinventory-apps/cleanup-untagged/
```

:::

6. Bundle all apps into a single `index.json` file:

```bash
$ resotoappbundler --path fixinventory-apps/ --discover > index.json
$ fixinventoryappbundler --path fixinventory-apps/ --discover > index.json
```

7. From within [Fix Inventory Shell](../reference/components/shell.mdx), install an app using the [`app install` command](../reference/cli/app/install.mdx):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ See [How to Roll Out Fix Inventory AWS Permissions with CloudFormation](../confi

:::info

If you prefer to deploy the role yourself, the S3 URL of the template to create the `FixInventoryAccess` role is [https://resotopublic.s3.amazonaws.com/cf/fixinventory-role.template](https://resotopublic.s3.amazonaws.com/cf/fixinventory-role.template).
If you prefer to deploy the role yourself, the S3 URL of the template to create the `FixInventoryAccess` role is [https://fixinventorypublic.s3.amazonaws.com/cf/fixinventory-role.template](https://fixinventorypublic.s3.amazonaws.com/cf/fixinventory-role.template).

:::

Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/config/show.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ config show <id>
# CLI related properties.
​ cli:
# Use this graph for CLI actions, if no graph is specified explicitly.
​ default_graph: 'resoto'
​ default_graph: 'fix'
# Use this graph section by default, if no section is specified.
# Relative paths will be interpreted with respect to this section.
​ default_section: 'reported'
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/cli/db.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The `db` command synchronizes data to a SQL database.
```

```bash title="Sync the complete graph to a postgresql database"
> db sync postgresql --host localhost --port 5432 --database resoto --user ci --password bombproof
> db sync postgresql --host localhost --port 5432 --database fix --user ci --password bombproof
```

```bash title="Sync the complete graph to a mariadb database"
Expand Down
8 changes: 4 additions & 4 deletions docs/reference/cli/env.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ env
```bash title="fixshell will set the graph, section, and session ID"
> env
# highlight-start
​graph: resoto
​graph: fix
​section: reported
resoto_session_id: SHQF9MBUEJ
fix_session_id: SHQF9MBUEJ
# highlight-end
```

```bash title="Environment variables can be defined directly on the command line"
> section=desired foo=bla env
# highlight-start
​graph: resoto
​graph: fix
​section: desired
resoto_session_id: SHQF9MBUEJ
fix_session_id: SHQF9MBUEJ
​foo: bla
# highlight-end
```
4 changes: 2 additions & 2 deletions docs/reference/cli/graph/copy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ graph copy [--force] [from_graph_name] <to_graph_name>
## Example

```bash
> graph copy resoto resoto_backup
> graph copy fix fix_backup
# highlight-start
Graph resoto copied to resoto_backup.
Graph fix copied to fix_backup.
# highlight-end
```

Expand Down
4 changes: 2 additions & 2 deletions docs/reference/cli/graph/delete.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ graph delete <graph_name>
## Example

```bash
> graph delete resoto_backup
> graph delete fix_backup
# highlight-start
Graph resoto_backup deleted.
Graph fix_backup deleted.
# highlight-end
```
2 changes: 1 addition & 1 deletion docs/reference/cli/graph/export.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ graph export [--force] [graph_name] <file_name>
## Example

```bash
> graph export resoto fixinventory.graph
> graph export fix fixinventory.graph
# highlight-start
Received a file fixinventory.graph, which is stored to ./fixinventory.graph
# highlight-end
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/cli/graph/import.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ graph import [--force] [graph_name] <file_name>
## Example

```bash
> graph import resoto_test fixinventory.graph
> graph import fix_test fixinventory.graph
# highlight-start
Graph resoto_test imported from fixinventory.graph.
Graph fix_test imported from fixinventory.graph.
# highlight-end
```
2 changes: 1 addition & 1 deletion docs/reference/cli/graph/list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The `graph list` command lists all Fix Inventory Rewind [asset inventory graph](
```bash
> graph list
# highlight-start
resoto
fix
snapshot-fix-hourly-20230614T222121Z
snapshot-fix-daily-20230614T222121Z
# highlight-end
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/cli/graph/snapshot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ graph snapshot [from_graph_name] <snapshot_label>
## Example

```bash
> graph snapshot resoto daily
> graph snapshot fix daily
# highlight-start
Graph resoto snapshoted to snapshot-fix-daily-20230619T121940Z.
Graph fix snapshoted to snapshot-fix-daily-20230619T121940Z.
# highlight-end
```
8 changes: 4 additions & 4 deletions docs/reference/cli/report/check/show.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ categories:
# Default values for the check. Will be merged with the values from the config.
default_values: null
# Defines possible detection methods.
# `resoto` defines a Fix Inventory search, `resoto_cmd` a Fix Inventory CLI command.
# At least one of `resoto` or `resoto_cmd` must be defined.
# `fix` defines a Fix Inventory search, `fix_cmd` a Fix Inventory CLI command.
# At least one of `fix` or `fix_cmd` must be defined.
# Additional keys can be defined on top.
detect:
fix: 'is(aws_ec2_security_group) and group_ip_permissions[*].{(ip_protocol=-1 or (from_port>=22 and to_port<=22 and ip_protocol=tcp)) and ip_ranges[*].cidr_ip="0.0.0.0/0"}'
Expand All @@ -43,9 +43,9 @@ related: []
# Remediation action for the check.
remediation:
# Remediation actions with tool as key.
# Example tools: resoto_cmd, awscli, gcloud, terraform
# Example tools: fix_cmd, awscli, gcloud, terraform
action: null
kind: 'resoto_core_report_check_remediation'
kind: 'fix_core_report_check_remediation'
# Textual description of the remediation.
text: 'Apply Zero Trust approach. Implement a process to scan and remediate unrestricted or overly permissive network acls. Recommended best practices is to narrow the definition for the minimum ports required.'
# URL that documents the remediation action.
Expand Down
6 changes: 3 additions & 3 deletions docs/reference/components/core.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ We will evaluate the search before executing it for demonstration. We also intro
```
```bash title="Typo"
> echo 'graph=resoto search is("resource") limit1' | http :8900/cli/evaluate
> echo 'graph=fix search is("resource") limit1' | http :8900/cli/evaluate
# highlight-start
​HTTP/1.1 400 Bad Request
​Content-Length: 151
Expand All @@ -64,7 +64,7 @@ We will evaluate the search before executing it for demonstration. We also intro
## Execute
```bash title="Correct"
> echo 'graph=resoto search is("resource") limit 1' | http :8900/cli/execute
> echo 'graph=fix search is("resource") limit 1' | http :8900/cli/execute
# highlight-start
​HTTP/1.1 200 OK
​Content-Type: application/json
Expand Down Expand Up @@ -98,7 +98,7 @@ We will evaluate the search before executing it for demonstration. We also intro
```
```bash title="Typo"
> echo 'graph=resoto search is("resource") limit1' | http :8900/cli/execute
> echo 'graph=fix search is("resource") limit1' | http :8900/cli/execute
# highlight-start
​HTTP/1.1 400 Bad Request
​Content-Length: 151
Expand Down
2 changes: 1 addition & 1 deletion docs/reference/configuration/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ fixworker:
# Use forked process instead of threads
fork_process: true
# Name of the graph to import data into and run searches on
graph: resoto
graph: fix
# Resource kind to merge graph at (cloud or account)
graph_merge_kind: cloud
# Collector thread/process pool size
Expand Down
10 changes: 5 additions & 5 deletions docs/reference/notebook/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ Fix Inventory Notebook is a library that allows you to interact with [Fix Invent

## Installation

Simply install the `resotonotebook` package and [Jupyter](https://jupyter.org)'s `notebook` package using [pip](https://pip.pypa.io):
Simply install the `fixnotebook` package and [Jupyter](https://jupyter.org)'s `notebook` package using [pip](https://pip.pypa.io):

```bash
pip install notebook resotonotebook
pip install notebook fixnotebook
```

Then, start [Jupyter](https://jupyter.org) Notebook:
Expand All @@ -28,11 +28,11 @@ First, create a new notebook by clicking `New` &rarr; `Python 3`:

![Create a new notebook](./img/create_new_notebook.png)

Then, instantiate the `ResotoNotebook` object with the URL and PSK (if configured) of your [Fix Inventory Core](../components/core.mdx) instance:
Then, instantiate the `FixNotebook` object with the URL and PSK (if configured) of your [Fix Inventory Core](../components/core.mdx) instance:

```python
from resotonotebook import ResotoNotebook
rnb = ResotoNotebook("https://localhost:8900", psk=None)
from fixnotebook import FixNotebook
rnb = FixNotebook("https://localhost:8900", psk=None)
```

### Visualization
Expand Down
4 changes: 2 additions & 2 deletions docs/reference/security.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -129,8 +129,8 @@ Use the retrieved CA cert and generated http headers with `curl` in a shell to t
```bash
$ auth_header="Authorization: Bearer eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiIsInNhbHQiOiJuSVEzU3M5TGVNS1JHYUNQUEJxMnlBPT0ifQ.eyJleHAiOjE2NDkzNzI1MTR9.KXAmijfSsV-taO3890qJNzXKXng1u38eU6PTrDYTgVs"
$ resoto_command="search is(resource) | count"
$ curl --cacert fixinventory_ca.crt -H "$auth_header" -H "Content-Type: text/plain" -H "Accept: application/json" -X POST -d "$resoto_command" https://localhost:8900/cli/execute
$ fixinventory_command="search is(resource) | count"
$ curl --cacert fixinventory_ca.crt -H "$auth_header" -H "Content-Type: text/plain" -H "Accept: application/json" -X POST -d "$fixinventory_command" https://localhost:8900/cli/execute
```
## Disabling Security Features
Expand Down
12 changes: 7 additions & 5 deletions tools/security_report_howtos.py
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,11 @@ def howto_from_command(check: dict, command: str) -> None:


if __name__ == "__main__":
for check_json in get_url("https://localhost:8900/report/checks", params={"category": "security"}).json():
for check_json in get_url(
"https://localhost:8900/report/checks", params={"category": "security"}
).json():
detect = check_json["detect"]
if detect.get("resoto"):
howto_from_command(check_json, "search " + detect["resoto"].strip())
elif detect.get("resoto_cmd"):
howto_from_command(check_json, detect["resoto_cmd"].strip())
if detect.get("fix"):
howto_from_command(check_json, "search " + detect["fix"].strip())
elif detect.get("fix_cmd"):
howto_from_command(check_json, detect["fix_cmd"].strip())
4 changes: 2 additions & 2 deletions versioned_docs/version-4.X/development/apps.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -48,15 +48,15 @@ Using [`fixinventoryappbundler`](https://github.com/someengineering/fixinventory
You can perform a dry run of the `cleanup-untagged` app for sample infrastructure app output:

```bash
$ resotoapprunner --path fixinventory-apps/cleanup-untagged/
$ fixinventoryapprunner --path fixinventory-apps/cleanup-untagged/
```

:::

6. Bundle all apps into a single `index.json` file:

```bash
$ resotoappbundler --path fixinventory-apps/ --discover > index.json
$ fixinventoryappbundler --path fixinventory-apps/ --discover > index.json
```

7. From within [Fix Inventory Shell](../reference/components/shell.mdx), install an app using the [`app install` command](../reference/cli/app/install.mdx):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ See [How to Roll Out Fix Inventory AWS Permissions with CloudFormation](../confi

:::info

If you prefer to deploy the role yourself, the S3 URL of the template to create the `FixInventoryAccess` role is [https://resotopublic.s3.amazonaws.com/cf/fixinventory-role.template](https://resotopublic.s3.amazonaws.com/cf/fixinventory-role.template).
If you prefer to deploy the role yourself, the S3 URL of the template to create the `FixInventoryAccess` role is [https://fixinventorypublic.s3.amazonaws.com/cf/fixinventory-role.template](https://fixinventorypublic.s3.amazonaws.com/cf/fixinventory-role.template).

:::

Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.X/reference/cli/config/show.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ config show <id>
# CLI related properties.
​ cli:
# Use this graph for CLI actions, if no graph is specified explicitly.
​ default_graph: 'resoto'
​ default_graph: 'fix'
# Use this graph section by default, if no section is specified.
# Relative paths will be interpreted with respect to this section.
​ default_section: 'reported'
Expand Down
2 changes: 1 addition & 1 deletion versioned_docs/version-4.X/reference/cli/db.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ The `db` command synchronizes data to a SQL database.
```

```bash title="Sync the complete graph to a postgresql database"
> db sync postgresql --host localhost --port 5432 --database resoto --user ci --password bombproof
> db sync postgresql --host localhost --port 5432 --database fix --user ci --password bombproof
```

```bash title="Sync the complete graph to a mariadb database"
Expand Down
8 changes: 4 additions & 4 deletions versioned_docs/version-4.X/reference/cli/env.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -19,18 +19,18 @@ env
```bash title="fixshell will set the graph, section, and session ID"
> env
# highlight-start
​graph: resoto
​graph: fix
​section: reported
resoto_session_id: SHQF9MBUEJ
fix_session_id: SHQF9MBUEJ
# highlight-end
```

```bash title="Environment variables can be defined directly on the command line"
> section=desired foo=bla env
# highlight-start
​graph: resoto
​graph: fix
​section: desired
resoto_session_id: SHQF9MBUEJ
fix_session_id: SHQF9MBUEJ
​foo: bla
# highlight-end
```
4 changes: 2 additions & 2 deletions versioned_docs/version-4.X/reference/cli/graph/copy.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ graph copy [--force] [from_graph_name] <to_graph_name>
## Example

```bash
> graph copy resoto resoto_backup
> graph copy fix fix_backup
# highlight-start
Graph resoto copied to resoto_backup.
Graph fix copied to fix_backup.
# highlight-end
```

Expand Down
4 changes: 2 additions & 2 deletions versioned_docs/version-4.X/reference/cli/graph/delete.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ graph delete <graph_name>
## Example

```bash
> graph delete resoto_backup
> graph delete fix_backup
# highlight-start
Graph resoto_backup deleted.
Graph fix_backup deleted.
# highlight-end
```
2 changes: 1 addition & 1 deletion versioned_docs/version-4.X/reference/cli/graph/export.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ graph export [--force] [graph_name] <file_name>
## Example

```bash
> graph export resoto fixinventory.graph
> graph export fix fixinventory.graph
# highlight-start
Received a file fixinventory.graph, which is stored to ./fixinventory.graph
# highlight-end
Expand Down
4 changes: 2 additions & 2 deletions versioned_docs/version-4.X/reference/cli/graph/import.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ graph import [--force] [graph_name] <file_name>
## Example

```bash
> graph import resoto_test fixinventory.graph
> graph import fix_test fixinventory.graph
# highlight-start
Graph resoto_test imported from fixinventory.graph.
Graph fix_test imported from fixinventory.graph.
# highlight-end
```
2 changes: 1 addition & 1 deletion versioned_docs/version-4.X/reference/cli/graph/list.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ The `graph list` command lists all Fix Inventory Rewind [asset inventory graph](
```bash
> graph list
# highlight-start
resoto
fix
snapshot-fix-hourly-20230614T222121Z
snapshot-fix-daily-20230614T222121Z
# highlight-end
Expand Down
4 changes: 2 additions & 2 deletions versioned_docs/version-4.X/reference/cli/graph/snapshot.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@ graph snapshot [from_graph_name] <snapshot_label>
## Example

```bash
> graph snapshot resoto daily
> graph snapshot fix daily
# highlight-start
Graph resoto snapshoted to snapshot-fix-daily-20230619T121940Z.
Graph fix snapshoted to snapshot-fix-daily-20230619T121940Z.
# highlight-end
```
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ categories:
# Default values for the check. Will be merged with the values from the config.
default_values: null
# Defines possible detection methods.
# `resoto` defines a Fix Inventory search, `resoto_cmd` a Fix Inventory CLI command.
# At least one of `resoto` or `resoto_cmd` must be defined.
# `fix` defines a Fix Inventory search, `fix_cmd` a Fix Inventory CLI command.
# At least one of `fix` or `fix_cmd` must be defined.
# Additional keys can be defined on top.
detect:
fix: 'is(aws_ec2_security_group) and group_ip_permissions[*].{(ip_protocol=-1 or (from_port>=22 and to_port<=22 and ip_protocol=tcp)) and ip_ranges[*].cidr_ip="0.0.0.0/0"}'
Expand All @@ -43,9 +43,9 @@ related: []
# Remediation action for the check.
remediation:
# Remediation actions with tool as key.
# Example tools: resoto_cmd, awscli, gcloud, terraform
# Example tools: fix_cmd, awscli, gcloud, terraform
action: null
kind: 'resoto_core_report_check_remediation'
kind: 'fix_core_report_check_remediation'
# Textual description of the remediation.
text: 'Apply Zero Trust approach. Implement a process to scan and remediate unrestricted or overly permissive network acls. Recommended best practices is to narrow the definition for the minimum ports required.'
# URL that documents the remediation action.
Expand Down
Loading

0 comments on commit 5929c29

Please sign in to comment.