Integrating Acunetix 360 with Travis CI

Travis CI is a hosted continuous integration service. It is used to test and deploy software projects hosted on GitHub. You log in to Travis CI with GitHub, instruct Travis CI to test the code of a project, and then push it to GitHub.

Image result for travis ci

For further information, see What Systems Does Acunetix 360 Integrate With?.

Generating and Using Acunetix 360’ss Travis CI Integration Scripts

Acunetix 360 uses cURL and PowerShell command-line tools to integrate with Travis.

How to Generate Acunetix 360's Travis CI Integration Scripts
  1. Log in to Acunetix 360.
  2. From the main menu, select Integrations, then New Integration.

  1. From the Continuous Integration Systems section, click Travis CI. The Travis CI Integration window is displayed.

  1. From the Integration Script Generator section, select the relevant Scan Settings:
  • From the Scan Type field, select an option
  • From the Website dropdown, select a website
  • From the Scan Profile dropdown, select a scan profile (this is not displayed if you select Full with Primary Profile as the Scan Type)

  1. In the cURL field, click Copy to clipboard to copy the cURL script. (You will then paste this into the file described in How to Use Acunetix 360’s’s Travis Integration Script.)
How to Use Acunetix 360's Travis Integration Script
  1. Navigate to your Git project and open .travis.yml file.
  2. Paste the copied script (from How to Generate Acunetix 360’s Travis CI Integration Scripts) into your .travis.yml file. Then commit and push it to the Git repository.
  3. Log in to your Travis account.
  4. Navigate to your Travis Project window.

You can copy and paste the cURL script below into your .yml file and use it as an example.

script: |

    curl -u "$ACUNETIXUSERID:$ACUNETIXAPITOKEN" -X POST -H 'Content-Type: application/json' -d "{'WebsiteId': '004c4483-7dba-460d-fee9-abc902e94424', 'ScanType': 'FullWithPrimaryProfile', 'VcsCommitInfoModel': {'CiBuildConfigurationName' : '$TRAVIS_JOB_NAME', 'CiBuildHasChange': '$TRAVIS_COMMIT', 'CiBuildId': '$TRAVIS_BUILD_ID', 'CiBuildServerVersion': '$TRAVIS_APP_HOST', 'CiBuildUrl': '$TRAVIS_BUILD_WEB_URL', 'Committer': '$USER', 'IntegrationSystem': 'TravisCI', 'VcsName': 'Git', 'VcsVersion': '$TRAVIS_COMMIT'}}"

  1. Click Project Settings.
  2. Navigate to Environmental Variables and add your Acunetix 360 API credentials as ACUNETIXUSERID and ACUNETIXAPITOKEN variables.

« Back to the Acunetix Support Page