python-client
by onekey-sec
An official Python client library and CLI tool for interacting with the ONEKEY firmware security platform API to automate vulnerability scanning and firmware analysis.
Official Python API client for ONEKEY
Primary Use Case
This tool is designed for firmware security professionals and developers who need to automate the uploading, analysis, and retrieval of firmware vulnerability scan results on the ONEKEY platform. It facilitates integration into CI/CD pipelines and programmatic access to firmware security data via a Python SDK or CLI.
- Python library and CLI for accessing the ONEKEY public API
- Supports authentication via email/password or API token
- Upload firmware images for security analysis
- Query firmware, product groups, and analysis configurations via GraphQL
- Fetch CI analysis results programmatically
- Manage tenants and obtain tenant-specific tokens
- Environment variable support for seamless CI/CD integration
Installation
- Clone the repository from https://github.com/onekey-sec/python-client
- Alternatively, install the package via pip: pip install onekey-client
Usage
>_ onekey --email "<email>" --tenant "<tenant-name>" --password "<password>" get-tenant-tokenAuthenticate and retrieve a tenant-specific Bearer token.
>_ onekey list-tenantsList all available tenants on the ONEKEY platform.
>_ onekey upload-firmwareUpload a firmware image to the ONEKEY platform for analysis.
>_ onekey ci-resultFetch analysis results for continuous integration workflows.
>_ Python Client login and tenant selectionUse the Python Client to login with email/password or API token and select a tenant for API queries.
>_ client.query(<GraphQL query>)Execute GraphQL queries to retrieve firmware, product groups, or analysis configurations.
>_ client.upload_firmware(metadata, firmware_path, enable_monitoring=True)Upload firmware with metadata and enable monitoring for security analysis.
- Integrate the ONEKEY Python client into CI/CD pipelines for automated firmware vulnerability scanning and early detection.
- Use the API token authentication method to securely automate firmware uploads and analysis without exposing credentials.
- Leverage GraphQL queries to customize and fine-tune firmware security data retrieval for targeted threat hunting and incident response.
- Combine with firmware reverse engineering tools to enrich vulnerability context and improve remediation prioritization.
- Develop custom alerting and reporting scripts using the client library to enhance situational awareness for blue and purple teams.
Docs Take 2 Hours. AI Takes 10 Seconds.
Ask anything about python-client. Installation? Config? Troubleshooting? Get answers trained on real docs and GitHub issues—not generic ChatGPT fluff.
This tool hasn't been indexed yet. Request indexing to enable AI chat.
Admin will review your request within 24 hours
Related Tools
FACT_core
fkie-cad/FACT_core
Firmware Analysis and Comparison Tool
owasp-fstm
scriptingxss/owasp-fstm
The Firmware Security Testing Methodology (FSTM) is composed of nine stages tailored to enable security researchers, software developers, consultants, and Information Security professionals with conducting firmware security assessments.
