Appknox integration
How to integrate your workflows with Appknox using codemagic.yaml
Appknox is a mobile application security testing solution that can be integrated into your Codemagic CI/CD pipelines to run security checks for your applications.
Configuring Appknox in Codemagic
Signing up with Appknox here is required to be able to generate your personal access token in the Appknox UI. After receiving the token, follow the steps below:
Open your Codemagic app settings, and go to the Environment variables tab
Enter the desired Variable name, e.g.
APPKNOX_ACCESS_TOKEN
Enter the required value as Token value
Enter the variable group name, e.g. appknox_credentials
Make sure the Secure option is selected
Click the Add button to add the variable
Add the variable group to your
codemagic.yaml
fileenvironment: groups: - appknox_credentials
Adding the following scripts in codemagic.yaml will allow you to start the security scanning process in the the Appknox environment:
- name: Appknox binary installation
script: curl -L https://github.com/appknox/appknox-go/releases/latest/download/appknox-`uname -s`-x86_64 > /usr/local/bin/appknox && chmod +x /usr/local/bin/appknox
Make sure that the following script is executed in the post-build script (after your app binary is built):
- name: Upload binary to Appknox
script: appknox upload PATH_TO_APP_BINARY
It is also possible to check if the scanner detected any vulnerability risk levels by executing the following command:
- name: Check vulnerability risk level
script: appknox cicheck <file-id> --risk_threshold <low|medium|high|critical>