Skip to content

Commit 508d78c

Browse files
committed
Run Fluid Attacks using Fastlane
1 parent 2c2b57c commit 508d78c

File tree

4 files changed

+32
-1
lines changed

4 files changed

+32
-1
lines changed

.gitignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,4 +54,4 @@ local.properties
5454

5555
# Fluid Attacks
5656
**/fastlane/fluidattacks/results.csv
57-
/apk_files/
57+
**/fastlane/fluidattacks/apks/**

fastlane/Fastfile

+23
Original file line numberDiff line numberDiff line change
@@ -332,6 +332,29 @@ platform :android do |options|
332332
FileUtils.rm_r("exodus-test")
333333
end
334334

335+
desc "Run fluidattacks"
336+
lane :runFluidattacks do |options|
337+
# if you want to run it for a specific version just set e.g. version = "1.10.0"
338+
fluidattacks_apks_path = "fluidattacks/apks"
339+
340+
FileUtils.mkdir("#{fluidattacks_apks_path}")
341+
342+
FileUtils.mkdir("#{fluidattacks_apks_path}/Cryptomator-#{version}_signed/")
343+
FileUtils.mkdir("#{fluidattacks_apks_path}/Cryptomator-#{version}_fdroid_signed/")
344+
FileUtils.mkdir("#{fluidattacks_apks_path}/Cryptomator-#{version}_lite_signed/")
345+
FileUtils.mkdir("#{fluidattacks_apks_path}/Cryptomator-#{version}_playstore_signed/")
346+
347+
FileUtils.cp("release/Cryptomator-#{version}_signed.apk", "#{fluidattacks_apks_path}/Cryptomator-#{version}_signed/")
348+
FileUtils.cp("release/Cryptomator-#{version}_fdroid_signed.apk", "#{fluidattacks_apks_path}/Cryptomator-#{version}_fdroid_signed/")
349+
FileUtils.cp("release/Cryptomator-#{version}_lite_signed.apk", "#{fluidattacks_apks_path}/Cryptomator-#{version}_lite_signed/")
350+
FileUtils.cp("release/Cryptomator-#{version}_playstore_signed.apk", "#{fluidattacks_apks_path}/Cryptomator-#{version}_playstore_signed/")
351+
352+
puts "Run Fluidattacks. Results are in /src/fastlane/fluidattacks/results.csv"
353+
sh("docker run -v $(cd .. && pwd):/src -w /src fluidattacks/cli:amd64 skims scan /src/fastlane/fluidattacks/config.yaml")
354+
355+
FileUtils.rm_r("#{fluidattacks_apks_path}")
356+
end
357+
335358
desc "Create GitHub draft release"
336359
lane :createGitHubDraftRelease do |options|
337360
target_branch = "main"

fastlane/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,14 @@ Check if tracking added in some dependency using Izzy's script
7171

7272
Check if tracking added in some dependency using exodus
7373

74+
### android runFluidattacks
75+
76+
```sh
77+
[bundle exec] fastlane android runFluidattacks
78+
```
79+
80+
Run fluidattacks
81+
7482
### android createGitHubDraftRelease
7583

7684
```sh

fastlane/fluidattacks/apks/.gitkeep

Whitespace-only changes.

0 commit comments

Comments
 (0)