Collection of tools for use with AppThreat/atom.
Project description
atom-tools
Collection of tools for use with slices generated by AppThreat/atom.
Install atom
This program does not generate slices; its purpose is to manipulate slices generated by atom. The current documentation for atom is housed in the AppThreat/atom GitHub repository.
Atom can easily be installed from a
native image or via npm
npm install @appthreat/atom
.
Atom-tools installation
pip install atom-tools
CLI Usage
Atom-tools uses py-poetry/cleo to construct its command-line interface and therefore uses the same sorts of conventions as the package management utility poetry.
To access the commands help menu, enter atom-tools list
for a list of
available commands.
Individual command options can be accessed with atom help
and the command
name (e.g. atom help convert
).
Atom Tools (version 0.4.0)
Usage:
command [options] [arguments]
Options:
-h, --help Display help for the given command. When no command is given display help for the list command.
-q, --quiet Do not output any message.
-V, --version Display this application version.
--ansi Force ANSI output.
--no-ansi Disable ANSI output.
-n, --no-interaction Do not ask any interactive question.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
Available commands:
convert Convert an atom slice to a different format
help Displays help for a command.
list Lists commands.
validate-lines Check the accuracy of the line numbers in an atom slice.
Features
Convert
The convert command can be used to output an atom slice in a different format. The current capabilities are limited to processing usages in order to generate endpoints for an openapi 3.x paths object. Future iterations will populate the path item objects with more details based on atom slices.
Description:
Convert an atom slice to a different format
Usage:
convert [options]
Options:
-f, --format=FORMAT Destination format [default: "openapi3.0.1"]
-i, --input-slice=INPUT-SLICE Usages slice file
-t, --type=TYPE Origin type of source on which the atom slice was generated. [default: "java"]
-o, --output-file=OUTPUT-FILE Output file [default: "openapi_from_slice.json"]
-s, --server=SERVER The server url to be included in the server object.
-h, --help Display help for the given command. When no command is given display help for the list command.
-q, --quiet Do not output any message.
-V, --version Display this application version.
--ansi Force ANSI output.
--no-ansi Disable ANSI output.
-n, --no-interaction Do not ask any interactive question.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
Help:
The convert command converts an atom slice to a different format.
Currently supports outputting an OpenAPI 3.x document based on a usages
slice.
Example
atom-tools convert -i usages.slices.json -f openapi3.0.1 -o openapi_usages.json -t java -s https://myserver.com
Validate Lines
The validate-lines command checks the accuracy of the line numbers reported by atom against your source files.
Description:
Check the accuracy of the line numbers in an atom slice.
Usage:
validate-lines [options]
Options:
-i, --input-slice=INPUT-SLICE Slice file to validate. [default: "slices.json"]
-t, --type=TYPE Origin type of source on which the atom slice was generated. [default: "java"]
-d, --base-path=BASE-PATH This should be the same path that was used by atom when the slice was generated.
-l, --interval=INTERVAL Try matching within a range. Ex. slice has line number 567, with interval of 5, we check lines 562-572. Use 0 for exact matching. [default: 5]
-r, --report=REPORT Output summary to file. [default: "output.txt"]
-j, --export-json=EXPORT-JSON JSON report file to store invalid lines. Include valid lines as well using -v flag.
-h, --help Display help for the given command. When no command is given display help for the list command.
-q, --quiet Do not output any message.
-V, --version Display this application version.
--ansi Force ANSI output.
--no-ansi Disable ANSI output.
-n, --no-interaction Do not ask any interactive question.
-v|vv|vvv, --verbose Increase the verbosity of messages: 1 for normal output, 2 for more verbose output and 3 for debug.
Help:
Validate source file line numbers in an atom usages or reachables slice.
Example
atom-tools -v validate-lines -t java -j project_json_report.json -i usages.slices.json -d /home/my_project_dir
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file atom-tools-0.4.4.tar.gz
.
File metadata
- Download URL: atom-tools-0.4.4.tar.gz
- Upload date:
- Size: 119.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b7eaf5514a29d8644f2f1ce7a9655c751ff3822c19d218a87647b01e2d36a9b |
|
MD5 | 66f9d13a2171f7b9afa8ff7df9d5172b |
|
BLAKE2b-256 | 9977a7d228a98be6ddd12ddf9ec5083ce38a2f11400a903a1850c8f93f708059 |
File details
Details for the file atom_tools-0.4.4-py3-none-any.whl
.
File metadata
- Download URL: atom_tools-0.4.4-py3-none-any.whl
- Upload date:
- Size: 30.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.0.0 CPython/3.12.2
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbd6cdcfc2cebc5b89a30b72ab237914890c8f52ea8d4a1e9a2b501624b897c1 |
|
MD5 | 155f8bd82e6d7789e40578b7412a2fb2 |
|
BLAKE2b-256 | 8271b8d091d34fe839fad54d3b0561b4633aca8c1000ce54d148cba61f909e03 |