PageRenderTime 25ms CodeModel.GetById 23ms RepoModel.GetById 0ms app.codeStats 0ms

/README.md

https://bitbucket.org/datatheorem/dt-api-client
Markdown | 88 lines | 53 code | 35 blank | 0 comment | 0 complexity | 7c55b2b8b839ec7cf86e2056004148e1 MD5 | raw file
  1. Data Theorem Portal API
  2. -----------------------
  3. This repository provides a reference client in Python for querying the Data Theorem APIs.
  4. The client has been tested on Python 3.6, Python 3.7 and Python 3.8. Documentation for these APIs is
  5. available at https://docs.securetheorem.com/ (Formally https://datatheorem.github.io/PortalApi/)
  6. ### Functional Tests
  7. Requirements :
  8. XCode should be at least 10.2 ( to support Swift 5.0)
  9. Swiftlint is required to compile duckduckgo ( brew install swiftlint)
  10. To download the functional tests XCode projects you need to install lfs
  11. brew install git-lfs
  12. git lfs install --local # On your local repo
  13. git lfs fetch --all # On your local repo
  14. git lfs pull # On your local repo
  15. Then you can launch functional tests with python
  16. python -m functional_tests.test
  17. The full stacktrace of the building process can be found on file building-stack-trace.txt
  18. ### Setup
  19. The Python module uses the _requests_ library for connecting to the Data Theorem APIs:
  20. python setup.py install
  21. ### Results API
  22. The **Results API v2** provides access to a list of all mobile apps registered within a specified customer's Data
  23. Theorem account and the list of scans and security issues found during the scanning of the apps.
  24. The _results_api_cli.py_ sample script can be used to write all the issues affecting all the mobile Apps configured
  25. within your Data Theorem account to a CSV file, with a CVSS score generated for each issue.
  26. A **Result API key** is needed in order to call the script; the API key can be found in the Data Theorem portal at
  27. https://www.securetheorem.com/sdlc/api under the **"Accessing Data"** section. With the Results API key, the script can
  28. then be used:
  29. python results_api_cli.py --api-key <results_api_key>
  30. Full documentation for the Results API is available at https://docs.securetheorem.com/mobile_security_results/introduction.html.
  31. ### Upload API
  32. The **Upload API** can be used to upload **PreProd** mobile binaries directly to Data Theorem for scanning.
  33. The _upload_app_cli.py_ sample script can be used to upload a mobile App build to be scanned.
  34. An **Upload API key** is needed in order to call the script; the API key can be found in the Data Theorem portal at
  35. https://www.securetheorem.com/sdlc/api under the **"Uploading Applications"** section. With the Upload API key, the
  36. script can then be used:
  37. python upload_app_cli.py --api-key <upoad_api_key> --comments test --username user --password p4ss ./app.ipa
  38. Full documentation for the Upload API is available at https://docs.securetheorem.com/mobile_security_devops/uploading_mobile_apps.html.
  39. ### Upload UI Test API
  40. The **UI Test Upload API** can be used to upload `XCUITest` bundles to be used to perform a fully-automated dynamic scan of its associated mobile app in your Data Theorem account.
  41. The _upload_xcuitest_cli.py_ sample script can be used to automatically extract your application's UI Tests, an `.xctest` bundle, from your Xcode project. This bundle can then be uploaded to DataTheorem and used to quickly dynamically scan the associated app.
  42. An **Upload API key** is needed in order to call the script; the API key can be found in the Data Theorem portal at
  43. https://www.securetheorem.com/sdlc/api under the **"Uploading Applications"** section. With the Upload API key, the
  44. script can then be used:
  45. python upload_xcuitest_cli.py --api-key <upoad_api_key> MyApp/MyApp.xcodeproj
  46. Optional arguments:
  47. * `--scheme`: Scheme to use to build the Xcode project. Required if more than one scheme exists in the Xcode project.
  48. * `--product`: Product name of to your UI Test target in your Xcode project. Required if you have more than one UI Test target.
  49. * `--release_type`: The type of release this UI Testing bundle should run for: APP_STORE (default) or PRE_PROD.
  50. * `--app_bundle_id`: Specify a bundle ID instead of using the bundle ID from the Xcode project. It will be used to associate the UI Test with the corresponding app in your Data Theorem account.
  51. * `--app_version`: Specify the app version instead of version from the Xcode project. It will be used to associate the UI Test with the corresponding app in your Data Theorem account.
  52. * `--workspace_path`: Extract the testing bundle from a workspace - required if the main Xcode product depends on other Xcode projects within such workspace.
  53. Full documentation for the Upload UI Test API is available at https://docs.securetheorem.com/mobile_security_devops/uploading_xcuitest_bundles.html.