# `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.11",
"maintainer_email": null,
"keywords": "cloud security",
"author": "Some Engineering Inc.",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/fd/83/0b4ba478d0c3dfbadf4d6b97f8c993e1c33d49840b0808a30133ccde79b0/fixinventoryshell-4.1.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.1.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": "70d9b1006e4744304ba27fdc5c0333d4e51078ee71a822f531ef2fb1d2d6d37f",
"md5": "23a5190d9cb8c6bef2185681a3088b5b",
"sha256": "f44a0d00c74e358ab45f4f0080355fa3d6b3e21f7534cea75e990d329b6e6852"
},
"downloads": -1,
"filename": "fixinventoryshell-4.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "23a5190d9cb8c6bef2185681a3088b5b",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 22846,
"upload_time": "2024-07-18T16:38:36",
"upload_time_iso_8601": "2024-07-18T16:38:36.442609Z",
"url": "https://files.pythonhosted.org/packages/70/d9/b1006e4744304ba27fdc5c0333d4e51078ee71a822f531ef2fb1d2d6d37f/fixinventoryshell-4.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "fd830b4ba478d0c3dfbadf4d6b97f8c993e1c33d49840b0808a30133ccde79b0",
"md5": "26094ffc6cefc705d11f2c8077f99176",
"sha256": "996504dfb7d243599dadbfa17dc4224abeeb08e6ba3678ea8a756cf7b0d0361b"
},
"downloads": -1,
"filename": "fixinventoryshell-4.1.0.tar.gz",
"has_sig": false,
"md5_digest": "26094ffc6cefc705d11f2c8077f99176",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 25477,
"upload_time": "2024-07-18T16:38:37",
"upload_time_iso_8601": "2024-07-18T16:38:37.662247Z",
"url": "https://files.pythonhosted.org/packages/fd/83/0b4ba478d0c3dfbadf4d6b97f8c993e1c33d49840b0808a30133ccde79b0/fixinventoryshell-4.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-07-18 16:38:37",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "someengineering",
"github_project": "fix",
"github_not_found": true,
"lcname": "fixinventoryshell"
}