# `fixsh`
Fix Shell
## Table of contents
* [Overview](#overview)
* [Usage](#usage)
* [Examples](#examples)
* [Basics](#basics)
* [Intermediate](#intermediate)
* [Advanced](#advanced)
* [Contact](#contact)
* [License](#license)
## Overview
`fixsh` starts the fix shell. It is used to interact with `fixcore`. It allows you to explore the graph, find resources of interest, mark them for cleanup, fix their tagging, aggregate over their metadata to create metrics and format the output for use in a 3rd party script or system.
More information can be found below and in [the docs](https://inventory.fix.security/docs/concepts/components/shell).
## Usage
`fixsh` uses the following commandline arguments:
```
--fixcore-uri fixCORE_URI
fixcore URI (default: https://localhost:8900)
--fixcore-section fixCORE_SECTION
All queries are interpreted with this section name. If not set, the server default is used.
--fixcore-graph fixCORE_GRAPH
The name of the graph to use by default. If not set, the server default is used.
--download-directory DOWNLOAD_DIRECTORY
If files are received, they are written to this directory.
--no-color Output should be rendered plain without any color escape sequences.
--stdin Read from STDIN instead of opening a shell
--verbose, -v Verbose logging
--quiet Only log errors
--psk PSK Pre-shared key
--ca-cert CA_CERT Path to custom CA certificate file
--no-verify-certs Turn off certificate verification
```
ENV Prefix: `fixSHELL_`
Every CLI arg can also be specified using ENV variables.
For instance `--fixcore-uri http://foobar.tld:8900` would become `fixSHELL_fixCORE_URI=http://foobar.tld:8900`.
## Examples
### Basics
Enter `help` into `fixsh` to get an overview of all available commands
Using `help` followed by a command will provide more information about that command.
### Intermediate
Show all storage volumes that are in use
```
> search is(volume) and volume_status = in-use
```
Show all storage volumes in use and format the output as CSV
```
> search is(volume) and volume_status = in-use | format {kind},{id},{name},{ctime}
```
Show all storage volumes not in use with a size of more than 10 GB
```
> search is(volume) and volume_status = available and volume_size > 10
```
### Advanced
Find volumes in cloud AWS that are in use
```
search is(volume) and volume_status = in-use and /ancestors.cloud.reported.name = aws
```
Alternatively instead of filtering for storage volumes of the generic `volume` kind we can also be more specific
```
search is(aws_ec2_volume) and volume_status = in-use
```
Find unused AWS volumes older than 30 days with no I/O in the past 7 days
```
search is(aws_ec2_volume) and volume_status = available and ctime < -30d and atime < -7d and mtime < -7d
```
## Contact
If you have any questions feel free to [join our Discord](https://discord.gg/fixsecurity) or [open a GitHub issue](https://github.com/someengineering/fix/issues/new).
## License
See [LICENSE](../LICENSE) for details.
Raw data
{
"_id": null,
"home_page": null,
"name": "fixinventoryshell",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.12",
"maintainer_email": null,
"keywords": "cloud security",
"author": "Some Engineering Inc.",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/10/1f/ce9ba5d17d7df67421062f8174ca13be03322f82fd03a457fb6da4777afc/fixinventoryshell-4.2.0.tar.gz",
"platform": null,
"description": "# `fixsh`\nFix Shell\n\n\n## Table of contents\n\n* [Overview](#overview)\n* [Usage](#usage)\n* [Examples](#examples)\n * [Basics](#basics)\n * [Intermediate](#intermediate)\n * [Advanced](#advanced)\n* [Contact](#contact)\n* [License](#license)\n\n\n## Overview\n`fixsh` starts the fix shell. It is used to interact with `fixcore`. It allows you to explore the graph, find resources of interest, mark them for cleanup, fix their tagging, aggregate over their metadata to create metrics and format the output for use in a 3rd party script or system.\n\nMore information can be found below and in [the docs](https://inventory.fix.security/docs/concepts/components/shell).\n\n\n## Usage\n`fixsh` uses the following commandline arguments:\n```\n --fixcore-uri fixCORE_URI\n fixcore URI (default: https://localhost:8900)\n --fixcore-section fixCORE_SECTION\n All queries are interpreted with this section name. If not set, the server default is used.\n --fixcore-graph fixCORE_GRAPH\n The name of the graph to use by default. If not set, the server default is used.\n --download-directory DOWNLOAD_DIRECTORY\n If files are received, they are written to this directory.\n --no-color Output should be rendered plain without any color escape sequences.\n --stdin Read from STDIN instead of opening a shell\n --verbose, -v Verbose logging\n --quiet Only log errors\n --psk PSK Pre-shared key\n --ca-cert CA_CERT Path to custom CA certificate file\n --no-verify-certs Turn off certificate verification\n```\n\nENV Prefix: `fixSHELL_`\nEvery CLI arg can also be specified using ENV variables.\n\nFor instance `--fixcore-uri http://foobar.tld:8900` would become `fixSHELL_fixCORE_URI=http://foobar.tld:8900`.\n\n\n\n## Examples\n### Basics\nEnter `help` into `fixsh` to get an overview of all available commands\n\nUsing `help` followed by a command will provide more information about that command.\n\n\n### Intermediate\nShow all storage volumes that are in use\n```\n> search is(volume) and volume_status = in-use\n```\n\nShow all storage volumes in use and format the output as CSV\n```\n> search is(volume) and volume_status = in-use | format {kind},{id},{name},{ctime}\n```\n\nShow all storage volumes not in use with a size of more than 10 GB\n```\n> search is(volume) and volume_status = available and volume_size > 10\n```\n\n\n### Advanced\nFind volumes in cloud AWS that are in use\n```\nsearch is(volume) and volume_status = in-use and /ancestors.cloud.reported.name = aws\n```\n\nAlternatively instead of filtering for storage volumes of the generic `volume` kind we can also be more specific\n```\nsearch is(aws_ec2_volume) and volume_status = in-use\n```\n\nFind unused AWS volumes older than 30 days with no I/O in the past 7 days\n```\nsearch is(aws_ec2_volume) and volume_status = available and ctime < -30d and atime < -7d and mtime < -7d\n```\n\n\n## Contact\nIf you have any questions feel free to [join our Discord](https://discord.gg/fixsecurity) or [open a GitHub issue](https://github.com/someengineering/fix/issues/new).\n\n\n## License\nSee [LICENSE](../LICENSE) for details.\n",
"bugtrack_url": null,
"license": "AGPLv3",
"summary": "Commandline interpreter to interact with Fix Inventory.",
"version": "4.2.0",
"project_urls": {
"Documentation": "https://inventory.fix.security",
"Source": "https://github.com/someengineering/fix/tree/main/fixshell"
},
"split_keywords": [
"cloud",
"security"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "0c8b642ff7b28f2dab3e375f4e8e17087954f757cd9e7076b95c296077d397c7",
"md5": "84df2066b4d77521dc7fa8a51671ce0a",
"sha256": "48f6df0c1a8a8f250bbde96006334f84e77e631d347f7fa0ab092c36858245d1"
},
"downloads": -1,
"filename": "fixinventoryshell-4.2.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "84df2066b4d77521dc7fa8a51671ce0a",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.12",
"size": 22851,
"upload_time": "2024-12-05T17:27:09",
"upload_time_iso_8601": "2024-12-05T17:27:09.669485Z",
"url": "https://files.pythonhosted.org/packages/0c/8b/642ff7b28f2dab3e375f4e8e17087954f757cd9e7076b95c296077d397c7/fixinventoryshell-4.2.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "101fce9ba5d17d7df67421062f8174ca13be03322f82fd03a457fb6da4777afc",
"md5": "32af4261727b74856f1794a64aeec4df",
"sha256": "42f97db92f2ae084298a83ae7881f9f7d227da01d18a22024936fd60b9d13b5f"
},
"downloads": -1,
"filename": "fixinventoryshell-4.2.0.tar.gz",
"has_sig": false,
"md5_digest": "32af4261727b74856f1794a64aeec4df",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.12",
"size": 25490,
"upload_time": "2024-12-05T17:27:10",
"upload_time_iso_8601": "2024-12-05T17:27:10.643624Z",
"url": "https://files.pythonhosted.org/packages/10/1f/ce9ba5d17d7df67421062f8174ca13be03322f82fd03a457fb6da4777afc/fixinventoryshell-4.2.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-05 17:27:10",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "someengineering",
"github_project": "fix",
"github_not_found": true,
"lcname": "fixinventoryshell"
}