Command-line interface & Python wrapper for the Appknox API
Project description
appknox-python
Command-line interface & Python wrapper for the Appknox API.
Python API documentation is available here.
Installation
appknox-python is officially supported on python 3.5 & 3.6. pip is the recommended way to install appknox-python.
pip install appknox
Usage
$ appknox
Usage: appknox [OPTIONS] COMMAND [ARGS]...
Command line wrapper for the Appknox API
Options:
-v, --verbose Specify log verbosity.
--help Show this message and exit.
Commands:
analyses List analyses for file
files List files for project
login Log in and save session credentials
logout Delete session credentials
organizations List organizations
projects List projects
recent_uploads List recent file uploads by the user
report Download report for file
upload Upload and scan package
switch_organization Switch organization in CLI instance
vulnerability Get vulnerability
whoami Show session info
Authentication
Log in to appknox CLI using your secure.appknox.com credentials.
$ appknox login
Username: viren
Password:
Logged in to https://api.appknox.com
Using Environment Variables
Instead of login we can use environment variables for authentication. This will be useful for scenarios such as CI/CD setup.
$ export APPKNOX_ACCESS_TOKEN=aaaabbbbbcccddeeeffgghhh
$ export APPKNOX_ORGANIZATION_ID=2
Supported variables are:
| Environment variable | Value |
|---|---|
APPKNOX_ACCESS_TOKEN |
Access token can be generated from Appknox dashboard (Settings → Developer Settings → Generate token). |
APPKNOX_HOST |
Defaults to https://api.appknox.com |
APPKNOX_ORGANIZATION_ID |
Your Appknox organization id |
Data fetch & actions
| Available commands | Use |
|---|---|
organizations |
List organizations of user |
projects |
List projects user has access to |
files <project_id> |
List files for a project |
analyses <file_id> |
List analyses for a file |
vulnerability <vulnerability_id> |
Get vulnerability detail |
owasp <owasp_id> |
Get OWASP detail |
upload <path_to_app_package> |
Upload app file from given path and get the file_id |
rescan <file_id> |
Rescan a file (this will create a new file under the same project.) |
Example:
$ appknox organizations
id name
---- -------
2 MyOrganization
$ appknox projects
id created_on file_count package_name platform updated_on
---- ------------------- ------------ ----------------------------- ---------- -------------------
3 2017-06-23 07:19:26 3 org.owasp.goatdroid.fourgoats 0 2017-06-23 07:26:55
4 2017-06-27 08:27:54 2 com.appknox.mfva 0 2017-06-27 08:30:04
$ appknox files 4
id name version version_code
---- ------ --------- --------------
6 MFVA 1 6
7 MFVA 1 6
Development
Update docs
Install sphinx-autobuild:
pip install sphinx-autobuild
Build docs:
sphinx-autobuild -p 9009 -b html sphinx-docs docs
License: MIT
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file appknox-4.0.0.tar.gz.
File metadata
- Download URL: appknox-4.0.0.tar.gz
- Upload date:
- Size: 12.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8c07a29ae4671c6719ade9ae9d7ad63e165c4f17155046c878235ffca9bf777f
|
|
| MD5 |
02e756555b62746e94d1f59c491e9d9a
|
|
| BLAKE2b-256 |
cea607ce75b6aab2abc3a086be9d885b06410d7cf8e8b3c94a97ff8730564dcf
|
File details
Details for the file appknox-4.0.0-py2.py3-none-any.whl.
File metadata
- Download URL: appknox-4.0.0-py2.py3-none-any.whl
- Upload date:
- Size: 12.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.7.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d24de411992934baa8a141786a55a23ad585a8a6a1b88bd3edca9776207f5dc
|
|
| MD5 |
93f8ecbc76c4da5293b2d13e1a487c25
|
|
| BLAKE2b-256 |
91d16f5361e6dc8ae60f3ad8977d30418fa64d3ecafdaa4a9ea0f866c9d60d57
|