Introducing Akto CLI : You can now run Akto tests in CLI
You can now run Akto tests directly from the Command-Line Interface (CLI). Akto tests in CLI brings the functionality of Akto into your development workflow.
Ankita Gupta
5 mins
We love building features which are demanded by our users. Akto tests in CLI is one such feature.
There's an old saying, "Give the user what they want." We love building features which are demanded by our users. Today, we're proud to unveil a feature that has been on many wish lists: Running Akto tests directly from the Command-Line Interface (CLI)
.
Problem
While our dashboard is a powerful tool for managing and monitoring Akto tests, we've consistently received feedback about integrating Akto closer to the day-to-day workflows of developers. Developers want to run Akto tests as seamlessly as writing and executing code, especially when working locally or with custom domains.
Solution
Akto CLI is our first answer to this call for flexibility. Akto tests in CLI brings the functionality of Akto into your development workflow. To that end, we will be developing a lot more integrations in development workflows.
Benefits of the Akto CLI Integration
Flexibility & Local Development: Run Akto tests right from your terminal, be it locally or on a custom domain. No need to jump between screens or platforms.
Customizable Testing Environment: Want to override the application host URL to a localhost or different staging URL? No problem. You have total control over the testing environment.
Getting Started with Akto CLI
Setting up and running Akto tests via CLI is a breeze. Here's a quick guide:
Environment Preparation:
AKTO_API_KEY
: Navigate to My accounts > Settings > Integrations > Akto API. Generate and copy your token.AKTO_DASHBOARD_URL
: This is the URL where you access your dashboard. Here is an example, use your URL while you test.TEST_IDS
: List down the test IDs, separated by spaces, that you wish to execute. (Example: JWT_NONE_ALGO REMOVE_TOKENS). Navigate to test editor > Test name> ID ( in YAML template). Grab the ID from YAML templates.API_COLLECTION_ID
: Mention the specific API collection ID for the tests. (Example: 270263191)[Optional]
TEST_APIS
: If you wish to test specific APIs, list them here. By default, all APIs in the collection will be tested.[Optional]
OVERRIDE_APP_URL
Specify if you want to change the application host. You can just give the URL of the target application.
Run Your Test: Example CLI
Results: A short summary (API, Vulnerability, Severity) is printed on command line itself.
Key points to remember:
You can use the CLI if you want to run Akto tests locally on any API Collection.
The results from the CLI are NOT saved in Akto dashboard.
It is best used when developers want to run tests locally before committing to their branch. Note that the application host is chosen as in the API Collection by default.
You choose to override the application host url to localhost or a different staging URL.
Tests which use context will be skipped eg. AddUserId.yml, OldApiVersion.yml etc.
We believe that with this CLI integration, Akto becomes an even more vital tool in the arsenal of every developer and security professional. Our goal has always been to make security testing as smooth and efficient as possible, and with this update, we're one step closer to that ideal.
Finally, to start, follow the documentation - Run tests in Akto CLI.
Learn more about Akto test library and how to run tests in Akto .
Keep reading
API Security
8 minutes
Security Information and Event Management (SIEM)
SIEM aggregates and analyzes security data across an organization to detect, monitor, and respond to potential threats in real time.
News
8 mins
Akto Recognized as a High Performer in G2’s Fall 2024 Reports for API Security and DAST
We’re proud to announce that Akto has been named a High Performer in both the API Security and Dynamic Application Security Testing (DAST) in G2’s Fall 2024 reports.
Product updates
5 minutes
Introducing Akto Code: Automated API Discovery from source Code
Akto Code is the new addition to Akto's API Discovery suite, complementing our existing capabilities for traffic source analysis in production and lower environments.