Skip to main content

No project description provided

Project description

Aquilax Python Client

This is a Python client for interacting with the Aquilax API. It allows you to easily manage organizations, groups, initiate scans and to get scan results by making request to the Aquilax server.

Features

  • Create an organization
  • Create a group within an organization
  • Start a scan on a given Git repository
  • Get scan results for a given Git repository
  • Get all organizations
  • Get all groups
  • Get all scans

Prerequisites

  • Python 3.7 or higher
  • pip package manager

Set Up the Environment

Create and activate a virtual environment:

python3 -m venv env
source env/bin/activate  # On Windows, use `env\Scripts\activate`

Installation

# install from PyPI
pip install aquilax

Usage Command Structure and General Usage

To run the client, use the following structure:aquilax <command> [options]The Aquilax API Client supports the following commands:- org: Create an organization.- group: Create a group within an organization.- scan: Start a scan for a specific group.- get-scan-details: Retrieve details of a specific scan.

Command: login

Authenticate yourself using API token

Example Usage:

aquilax login <token>

Configuration

Set organization or group as default.

Example Usage:

aquilax --set-org "org_id"
aquilax --set-group "group_id"

Command: get

Get details of organization, groups & scans

Example Usage:

aquilax get orgs
aquilax get groups #requires to set default org
aquilax get scans #requires to set default org & group

Command: org

Creates a new organization with specified details.

Options: --name (required): The name of the organization.--description (optional, default: "Default Org"): A brief description of the organization.--business-name (optional, default: "Aquilax"): The business name associated with the organization.--website (optional, default: "aquilax.io"): The organization's website URL.--org-pic (optional, default: a predefined image URL): The URL of the organization's picture.--usage (optional, default: "Business"): The usage type for the organization.

Example Usage:

aquilax org --name "My Organization" --description "Org Desc" --business-name "Tech" --website "test.com" --usage "Business"

Command: get orgs

Get All Organizations Example Usage:

aquilax get orgs

Command: group

Creates a new group within an existing organization.

Options: --org-id (required): The ID of the organization in which to create the group.--name (required): The name of the group.--description (optional, default: "To test all the prod apps"): A brief description of the group.--tags (optional, default: ['default', 'dev']): Tags associated with the group.

aquilax group --org-id "org123" --name "Development Group" --description "Group for devs" --tags "dev" "team"

Command: get groups

Get All Groups Example Usage:

aquilax get groups --org-id "your-org-id"

Command: scan

Starts a scan for a specific group within an organization.

Options: --org-id (required): The ID of the organization.--group-id (required): The ID of the group.--git-uri (required): The URI of the Git repository to scan.--scanners (optional, default: ['pii_scanner']): A list of scanners to use.--public (optional, default: True): Whether the scan should be public.--frequency (optional, default: Once): The frequency of the scan (e.g., Once).--tags (optional, default: ['github', 'python', 'django']): Tags associated with the scan.

aquilax scan https://github.com/user/repo
aquilax scan https://github.com/user/repo --sync #tail logs
aquilax scan --org-id "org123" --group-id "group456" --git-uri "https://github.com/user/repo" --scanners "sast_scanner" "iac_scanner" --public True --frequency Once --tags "security" "audit"

Command: get scan-details

Retrieves the details of a specific scan.

Options: --org-id (required): The ID of the organization.--group-id (required): The ID of the group.--project-id (required): The ID of the project.--scan-id (required): The ID of the scan.

aquilax get scan-details --org-id "org123" --group-id "group456" --project-id "proj789" --scan-id "scan101"
aquilax get scan-details --project-id "proj789" --scan-id "scan101"

Command: get scans

Get All Scans Example Usage: Example Usage:

aquilax get scans #requires to set org as default
aquilax get scans --org-id "your-org-id"

Command: get scans

  • logout
aquilax logout

Command-Line Arguments

  • aquilax org --name: The name of the organization to create.
  • aquilax group --name: The name of the group to create within the organization.
  • aquilax --gitUri: The Git URI of the repository to scan.

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Error Handling

If the API token is not provided or if any request fails, the client will raise an appropriate error and log the details.

Troubleshooting

  • Module Import Errors: Ensure your environment is activated and the package is installed.
  • Unauthorized Error: Ensure the AQUILAX_AUTH environment variable is set correctly.

Clone the Repository

git clone https://github.com/AquilaX-AI/AquilaX-Client.git
cd AquilaX-Client

Project details


Release history Release notifications | RSS feed

This version

1.2.3

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

aquilax-1.2.3.tar.gz (17.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

aquilax-1.2.3-py3-none-any.whl (16.6 kB view details)

Uploaded Python 3

File details

Details for the file aquilax-1.2.3.tar.gz.

File metadata

  • Download URL: aquilax-1.2.3.tar.gz
  • Upload date:
  • Size: 17.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for aquilax-1.2.3.tar.gz
Algorithm Hash digest
SHA256 0adfec2f260d70cc0027177f65387adbd0222bced9c0b5a587078045b9d81738
MD5 488e29b51ca2b222fe23e213c9dd8c6b
BLAKE2b-256 1bf8c0e863569e4758de528af3c8d1544328f314470e11b228e0cd8ed24e2d18

See more details on using hashes here.

File details

Details for the file aquilax-1.2.3-py3-none-any.whl.

File metadata

  • Download URL: aquilax-1.2.3-py3-none-any.whl
  • Upload date:
  • Size: 16.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for aquilax-1.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 0143725d706c43d92081398383e0e2e2e65f740620e31af0e00683c62496f4d9
MD5 7bfebfae97718d8be0d9019a169dde24
BLAKE2b-256 7a21fd9e20d97e999582998efd35bf2540216525236c68d45eb8848959cefee6

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page