This section provides a suggested workflow for automatically exporting Data Theorem issues to an external bug tracking
system, such as Jira. The workflow leverages the target’s external_id
field to store the ID of the target’s
corresponding ticket in the bug tracking system.
The following process should be run regularly (for example once a day) in order to keep all the issues found by Data Theorem in sync with the external bug tracking system. The process can be implemented as follows:
Query the list apps endpoint and filter it by the results_since
query parameter to find the list of apps that have
recent results (for example within the last 4 days). requests_since
should be a date/timestamp in
RFC-3339‘s profile of the ISO8601 time format. i.e. '%Y-%m-%dT%H:%M:%S.%f'
GET https://api.securetheorem.com/apis/mobile_security/results/v2/mobile_apps?results_since=2017-11-02T19:25:16.664990-00:00
For each app in the response of the previous query:
mobile_app_id
and results_since
query parameters to find security finding
targets within the given app that have recently changed. GET https://api.securetheorem.com/apis/mobile_security/results/v2/security_finding_targets?mobile_app_id=13&results_since=2016-11-02T19:25:16.664990-00:00
external_id
field; if the field is already set, it means that the target has already been exported to the external bug tracking system.external_id
field on the target using a PATCH request.Notes:
external_id
field of its corresponding target.external_id
to the same Jira ticket ID.Metadata for each new target such as the parent finding and the mobile app the issue relates to can be retrieved under the links section of the API response, and could be added to the ticket in the external bug tracking system, in order to provide a complete picture as to what the target relates to.
GET /mobile_apps:id
entry provided in the links section.GET /security_findings/:security_finding_id
entry provided in the links section.portal_url
field of the target.external_id
field of the corresponding target to the newly-created ticket ID. This id can be used for future reference for relating the target to the corresponding ticket, and to also keep track of which targets have already been exported.