@@ -8,9 +8,12 @@ https://www.datatheorem.com/products/mobile-secure
88
99Enabling this integration requires a valid Data Theorem API key.
1010
11- ## Set your Data Theorem upload API key as a secret:
12- To find your Data Theorem API key, connect to https://www.securetheorem.com/mobile/sdlc/api_access using your Data Theorem account.'
13- Create an encrypted variable named ` DT_UPLOAD_API_KEY ` in your Github repository
11+ ## Set your Data Theorem API keys as secrets:
12+ To find your Data Theorem API keys, go to https://www.securetheorem.com/devsecops/results_api_access using your Data Theorem account.
13+
14+ Create encrypted variables in your Github repository:
15+ - ` DT_UPLOAD_API_KEY ` - Required for uploading binaries
16+ - ` DT_RESULTS_API_KEY ` - Required when using vulnerability blocking (BLOCK_ON_SEVERITY) or warnings (WARN_ON_SEVERITY)
1417
1518For more information, see [ Github Encrypted secrets] ( https://docs.github.com/en/actions/reference/encrypted-secrets )
1619
@@ -32,6 +35,67 @@ At this time, comments, release id, external id, and platform variant parameters
3235
3336If multiple files match the provided pattern, the same set of optional values will be sent with each file.
3437
38+ ## Vulnerability Blocking and Warnings
39+
40+ The action supports automatic build blocking and vulnerability warnings based on security findings.
41+
42+ ### ` BLOCK_ON_SEVERITY `
43+ When ` BLOCK_ON_SEVERITY ` is specified, the action will:
44+
45+ 1 . Wait for the scan to complete (up to 5 minutes)
46+ 2 . Check for security findings at or above the specified severity level
47+ 3 . Block the build if any vulnerabilities are found at the minimum severity threshold
48+
49+ ### ` WARN_ON_SEVERITY `
50+ When ` WARN_ON_SEVERITY ` is specified, the action will:
51+
52+ 1 . Wait for the scan to complete (up to 5 minutes)
53+ 2 . Check for security findings at or above the specified severity level
54+ 3 . Print warning messages if vulnerabilities are found, but continue the build
55+
56+ ** Important:** Both vulnerability blocking and warnings require a separate ` DT_RESULTS_API_KEY ` with results access permissions.
57+
58+ ### Severity Levels
59+ - ` HIGH ` : Block on high severity vulnerabilities only
60+ - ` MEDIUM ` : Block on medium and high severity vulnerabilities
61+ - ` LOW ` : Block on all severity vulnerabilities (low, medium, high)
62+
63+ ### Example with Vulnerability Blocking
64+ ``` yaml
65+ - name : Upload to Data Theorem with blocking if high or medium vulnerabilities are found
66+ uses : datatheorem/datatheorem-mobile-secure-action@v2.3.1
67+ with :
68+ UPLOAD_BINARY_PATH : " ./app/build/outputs/apk/debug/app-debug.apk"
69+ DT_UPLOAD_API_KEY : ${{ secrets.DT_UPLOAD_API_KEY }}
70+ DT_RESULTS_API_KEY : ${{ secrets.DT_RESULTS_API_KEY }}
71+ BLOCK_ON_SEVERITY : " MEDIUM"
72+ ` ` `
73+
74+ ### Example with Vulnerability Warnings
75+ ` ` ` yaml
76+ - name : Upload to Data Theorem with warnings for high severity vulnerabilities
77+ uses : datatheorem/datatheorem-mobile-secure-action@v2.3.1
78+ with :
79+ UPLOAD_BINARY_PATH : " ./app/build/outputs/apk/debug/app-debug.apk"
80+ DT_UPLOAD_API_KEY : ${{ secrets.DT_UPLOAD_API_KEY }}
81+ DT_RESULTS_API_KEY : ${{ secrets.DT_RESULTS_API_KEY }}
82+ WARN_ON_SEVERITY : " HIGH"
83+ ` ` `
84+
85+ ### Example with Both Blocking and Warnings
86+ ` ` ` yaml
87+ - name : Upload to Data Theorem with blocking on high and warnings on medium vulnerabilities
88+ uses : datatheorem/datatheorem-mobile-secure-action@v2.3.1
89+ with :
90+ UPLOAD_BINARY_PATH : " ./app/build/outputs/apk/debug/app-debug.apk"
91+ DT_UPLOAD_API_KEY : ${{ secrets.DT_UPLOAD_API_KEY }}
92+ DT_RESULTS_API_KEY : ${{ secrets.DT_RESULTS_API_KEY }}
93+ BLOCK_ON_SEVERITY : " HIGH"
94+ WARN_ON_SEVERITY : " MEDIUM"
95+ ` ` `
96+
97+ **Note:** Both vulnerability blocking and warning features will cause the action to wait for scan completion before proceeding. This adds time to your build process but ensures security issues are caught before deployment.
98+
3599## Sample usage
36100
37101` ` ` yaml
@@ -46,22 +110,25 @@ jobs:
46110 name : Generate & Upload APK
47111 runs-on : ubuntu-20.04
48112 steps :
49- - uses : actions/checkout@v2
50- - name : set up JDK 1.8
51- uses : actions/setup-java@v1
113+ - uses : actions/checkout@v4
114+ - name : set up JDK 17
115+ uses : actions/setup-java@v4
52116 with :
53- java-version : 1.8
117+ java-version : 17
54118 - name : Build debug APK
55119 run : bash ./gradlew assembleDebug
56120 - name : Upload to Data Theorem
57- uses : datatheorem/datatheorem-mobile-secure-action@v2.1.0
121+ uses : datatheorem/datatheorem-mobile-secure-action@v2.3.1
58122 with :
59123 UPLOAD_BINARY_PATH : " ./app/build/outputs/apk/debug/app-debug.apk"
60124 DT_UPLOAD_API_KEY : ${{ secrets.DT_UPLOAD_API_KEY }}
125+ DT_RESULTS_API_KEY : ${{ secrets.DT_RESULTS_API_KEY }} # Required for vulnerability blocking
61126 USERNAME : " test_user"
62127 PASSWORD : ${{ secrets.DT_DAST_PASSWORD }}
63128 COMMENTS : " This is a pre-production build."
64129 RELEASE_ID : ${{ vars.GITHUB_RUN_NUMBER }}
65130 EXTERNAL_ID : " App_12230045"
131+ BLOCK_ON_SEVERITY : " HIGH" # Optional: Block build on high severity vulnerabilities
132+ WARN_ON_SEVERITY : " MEDIUM" # Optional: Warn on medium severity vulnerabilities
66133
67- ```
134+ ```
0 commit comments