In the world full of microservices, there are cosmic number of APIs that a single organization exposes for internal and external use. But with the advantage of APIs making microservices architecture possible, there also comes the downside of data abuse, exposure and security. More the APIs exposed, an organization becomes more and more vulnerable to API attacks such as the OWASPs Top 10. To solve this problem TRACEABLE AI helps you by continuously securing your APIs, bringing you deep visibility, real-time protection, and threat analytics. Traceable AI combines distributed tracing and advanced context-based behavioral analytics to deliver modern API security to your cloud-native and API-based applications.
API Security Testing helps in finding vulnerabilities in very early stages, giving developers and Product security engineers more time and context to prioritize mitigation of vulnerabilities and build the resilient systems by scanning APIs for vulnerabilities by changing the data in the existing api specifications as required to introduce vulnerabilities.
This Jenkins plugin for AST allows to run AST scan as a job on local jenkins instance.
- Navigate to "Manage Jenkins > Manage Plugins > Available".
- Search for "Traceable AST".
- Install the plugin.
To get your scan token go to app.traceable.ai and login.
- Go to the API testing tab.
- Press the generate scan button, a dialog appears.
- In the dialog "Generate new Token" and remember/note the scan token you generate.
- To add AST scan job, create a new item in jenkins as a Freestyle project.
- Add Traceable AST as the build step for the job.
- Fill the configuration fields for the job.
- Click on Advanced button to fill additional configuration fields.
- Apply and Save.
- Build a job, which will run a scan according to the configurations.
- After the completion of the job, go to the Job's page.
- the report of the scan will be available as the Traceable AST report tab.
Option | Description |
---|---|
Scan Name (optional) | The name of the scan used to identify the scan |
Test Environment (Required) | The environment from which we should analyze the traffic and generate tests. In most of the cases this will be the environment where functional test traffic is coming |
Client Token (Required) | Client Token/Scan Token is the token you get from the traceable API testing section while generating a new scan |
Traceable CLI Binary Location (optional) | Provide the location of the Traceble AST cli binary, else the latest version will be downloaded from Traceable Artifactory |
Plugins (optional) | List of comma seperated identified vulnerabilities, for which you want to test in your scan. (Refer to help in plugins field for the list of available plugins) |
Include Url Regex (optional) | Include the URLs which matches the regular expression in the scan |
Exclude Url Regex (optional) | Excludes the URLs matching this regular expression in the scan |
Target Url (optional) | Specific url for which you want to run the scan |
Traceable Server (optional) | Specify the Traceable's server you want to use for the scan |
Idle Timeout (optional) | Continuous duration in which if no test suite is received scan is marked completed and stopped |
Scan Timeout (optional) | Maximum time a scan is executed,scan is stopped after scan timeout |
Scan Suite (optional) | Name of the Scan Suite to run the scan |
Include All Endpoints (default asset selected) | All endpoints targeted during the scan |
Include Endpoint Ids (commas separated) | Specific endpoints ids targeted during the scan |
Include Endpoint Labels (commas separated) | Specific endpoint labels targeted during the scan |
Include Service Ids (commas separated) | Specific service ids targeted during the scan |
XAST Replay | Replay traffic type used during the scan |
Open Api Spec Ids (commas separated) | List of open api spec file ids for generating traffic used during the scan |
Postman Collection Ids (commas separated) | Postman collection file IDs for generating traffic during the scan |
Postman Environment Ids (commas separated) | Postman environment file IDs with target URLs and traffic environments configuration used during the scan |
Hook Names (optional) | Authentication hook to mutate request headers during scan |
- Only one type of asset (All Endpoints, Endpoint Ids, Service Ids, Endpoint label names) can be selected during scan
- Only one type of traffic (XAST Replay, Open Api Spec Ids, Postman Collection Ids, Postman Environment Ids) scan be used during scan. By default live traffic will be selected
- Provide the suite name to run the suite scan
Compile and run the plugin automated tests on Java 11 or Java 17 with:
mvn clean verify
Run the plugin inside a Jenkins environment with Maven HPI Plugin
mvn -Djetty.port=8080 hpi:run
Code coverage reporting is available as a maven target. Please improve code coverage with tests when you submit.
mvn -P enable-jacoco clean install jacoco:report
to report code coverage
Source code and pom file formatting is maintained by the spotless
maven plugin.
Before submitting a pull request, confirm the formatting is correct with:
mvn spotless:apply