CircleCI Integration

CircleCI Integration Instructions

The following tutorial will guide you through the process of integrating CircleCI with NowSecure Auto.

Integration Step-By-Step

STEP 1 Get an API token from NowSecure Auto

API tokens can be created by navigating to the Profile & Preferences page. Enter a Token Name in the Create Access Token field and click the Create button.

STEP 2 Open your CircleCI build configuration and navigate to Environment Variables.

STEP 3 Add a variable with the value of your access token given by NowSecure Auto. In this case we named ours “LAB_TOKEN.”

STEP 4 Open your “circle.yml” file in the root of your app’s repository.

STEP 5 In the test section, confirm that your built IPA or APK file is going to the artifacts.

STEP 6 In the deployment section under commands, add the following to run a security assessment on the uploaded file. Make sure that the command points to the location of the binary in the CircleCI artifacts.

LAB_TOKEN is used here but may be different depending on how you defined your access token.

    - (./gradlew assemble -PdisablePreDex):
      timeout: 360
    - cp -r ${HOME}/${CIRCLE_PROJECT_REPONAME}/app/build/outputs/apk/ $CIRCLE_ARTIFACTS

#Deploy when tests pass
    branch: master
        #Send to NowSecure Auto and run an assessment
        - curl -X POST --data-binary @$CIRCLE_ARTIFACTS/apk/app-debug.apk -H "Authorization:Bearer $LAB_TOKEN"

Every build on the master branch will now automatically push a new binary and start a security assessment in NowSecure Auto. You can place the curl command however you see fit to determine which builds are affected.

Integration Complete

CircleCI integration is now complete for your account with NowSecure Auto. If you need assistance, feel free to contact support.

CircleCI Integration Video