fixinventoryshell


Namefixinventoryshell JSON
Version 4.0.5 PyPI version JSON
download
home_pageNone
SummaryCommandline interpreter to interact with Fix Inventory.
upload_time2024-04-26 20:22:13
maintainerNone
docs_urlNone
authorSome Engineering Inc.
requires_python>=3.11
licenseAGPLv3
keywords cloud security
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # `resh`
Fix Shell


## Table of contents

* [Overview](#overview)
* [Usage](#usage)
* [Examples](#examples)
    * [Basics](#basics)
    * [Intermediate](#intermediate)
    * [Advanced](#advanced)
* [Contact](#contact)
* [License](#license)


## Overview
`resh` 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
`resh` 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 `resh` 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/0b/b4/eede965205ef5bb2f297c13b0f89c88917767e4964ba1fd586069e696087/fixinventoryshell-4.0.5.tar.gz",
    "platform": null,
    "description": "# `resh`\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`resh` 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`resh` 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 `resh` 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.0.5",
    "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": "eea08e05d2fc5091f1b28694a2bef7f0dd7a4239f650bbd001b2214aeed48581",
                "md5": "44c1a44d53c16abe4ecc84416ead1a89",
                "sha256": "87d807d1cca353391faa25f74d0f2e899b3f3a5aa63fdc284031e4ab763d5996"
            },
            "downloads": -1,
            "filename": "fixinventoryshell-4.0.5-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "44c1a44d53c16abe4ecc84416ead1a89",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.11",
            "size": 20867,
            "upload_time": "2024-04-26T20:22:12",
            "upload_time_iso_8601": "2024-04-26T20:22:12.717329Z",
            "url": "https://files.pythonhosted.org/packages/ee/a0/8e05d2fc5091f1b28694a2bef7f0dd7a4239f650bbd001b2214aeed48581/fixinventoryshell-4.0.5-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "0bb4eede965205ef5bb2f297c13b0f89c88917767e4964ba1fd586069e696087",
                "md5": "c8c4d9c87e8432f336e5a8d2218cae68",
                "sha256": "1b789e0a167990be0d8f0c553628f1c9b62a757f857b37c820bd9db57c4041e3"
            },
            "downloads": -1,
            "filename": "fixinventoryshell-4.0.5.tar.gz",
            "has_sig": false,
            "md5_digest": "c8c4d9c87e8432f336e5a8d2218cae68",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.11",
            "size": 23087,
            "upload_time": "2024-04-26T20:22:13",
            "upload_time_iso_8601": "2024-04-26T20:22:13.875936Z",
            "url": "https://files.pythonhosted.org/packages/0b/b4/eede965205ef5bb2f297c13b0f89c88917767e4964ba1fd586069e696087/fixinventoryshell-4.0.5.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-26 20:22:13",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "someengineering",
    "github_project": "fix",
    "github_not_found": true,
    "lcname": "fixinventoryshell"
}
        
Elapsed time: 0.26085s