Skip to content

Commit

Permalink
Run Fluid Attacks using Fastlane
Browse files Browse the repository at this point in the history
  • Loading branch information
SailReal committed Aug 13, 2024
1 parent 2c2b57c commit 508d78c
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,4 +54,4 @@ local.properties

# Fluid Attacks
**/fastlane/fluidattacks/results.csv
/apk_files/
**/fastlane/fluidattacks/apks/**
23 changes: 23 additions & 0 deletions fastlane/Fastfile
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,29 @@ platform :android do |options|
FileUtils.rm_r("exodus-test")
end

desc "Run fluidattacks"
lane :runFluidattacks do |options|
# if you want to run it for a specific version just set e.g. version = "1.10.0"
fluidattacks_apks_path = "fluidattacks/apks"

FileUtils.mkdir("#{fluidattacks_apks_path}")

FileUtils.mkdir("#{fluidattacks_apks_path}/Cryptomator-#{version}_signed/")
FileUtils.mkdir("#{fluidattacks_apks_path}/Cryptomator-#{version}_fdroid_signed/")
FileUtils.mkdir("#{fluidattacks_apks_path}/Cryptomator-#{version}_lite_signed/")
FileUtils.mkdir("#{fluidattacks_apks_path}/Cryptomator-#{version}_playstore_signed/")

FileUtils.cp("release/Cryptomator-#{version}_signed.apk", "#{fluidattacks_apks_path}/Cryptomator-#{version}_signed/")
FileUtils.cp("release/Cryptomator-#{version}_fdroid_signed.apk", "#{fluidattacks_apks_path}/Cryptomator-#{version}_fdroid_signed/")
FileUtils.cp("release/Cryptomator-#{version}_lite_signed.apk", "#{fluidattacks_apks_path}/Cryptomator-#{version}_lite_signed/")
FileUtils.cp("release/Cryptomator-#{version}_playstore_signed.apk", "#{fluidattacks_apks_path}/Cryptomator-#{version}_playstore_signed/")

puts "Run Fluidattacks. Results are in /src/fastlane/fluidattacks/results.csv"
sh("docker run -v $(cd .. && pwd):/src -w /src fluidattacks/cli:amd64 skims scan /src/fastlane/fluidattacks/config.yaml")

FileUtils.rm_r("#{fluidattacks_apks_path}")
end

desc "Create GitHub draft release"
lane :createGitHubDraftRelease do |options|
target_branch = "main"
Expand Down
8 changes: 8 additions & 0 deletions fastlane/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,14 @@ Check if tracking added in some dependency using Izzy's script

Check if tracking added in some dependency using exodus

### android runFluidattacks

```sh
[bundle exec] fastlane android runFluidattacks
```

Run fluidattacks

### android createGitHubDraftRelease

```sh
Expand Down
Empty file.

0 comments on commit 508d78c

Please sign in to comment.