Skip to content

Commit a72e3a3

Browse files
authored
Merge pull request #1 from talsec/add-demo-app
feat: add malware detection
2 parents 2b00c2e + c183864 commit a72e3a3

27 files changed

+609
-1116
lines changed

.github/workflows/ci.yml

Lines changed: 4 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -36,46 +36,20 @@ jobs:
3636
build-android:
3737
timeout-minutes: 30
3838
runs-on: ubuntu-latest
39-
continue-on-error: true
40-
env:
41-
TURBO_CACHE_DIR: .turbo/android
4239
steps:
4340
- name: Checkout
4441
uses: actions/checkout@v4
4542

4643
- name: Setup
4744
uses: ./.github/actions/setup
4845

49-
- name: Cache turborepo for Android
50-
uses: actions/cache@v4
46+
- name: Setup Java JDK
47+
uses: actions/setup-java@v4.5.0
5148
with:
52-
path: ${{ env.TURBO_CACHE_DIR }}
53-
key: ${{ runner.os }}-turborepo-android-${{ hashFiles('yarn.lock') }}
54-
restore-keys: |
55-
${{ runner.os }}-turborepo-android-
56-
57-
- name: Check turborepo cache for Android
58-
run: |
59-
TURBO_CACHE_STATUS=$(node -p "($(yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}" --dry=json)).tasks.find(t => t.task === 'build:android').cache.status")
60-
61-
if [[ $TURBO_CACHE_STATUS == "HIT" ]]; then
62-
echo "turbo_cache_hit=1" >> $GITHUB_ENV
63-
fi
64-
65-
- name: Install JDK
66-
if: env.turbo_cache_hit != 1
67-
uses: actions/setup-java@v4
68-
with:
69-
distribution: 'zulu'
49+
distribution: 'temurin'
7050
java-version: '17'
7151

72-
- name: Finalize Android SDK
73-
if: env.turbo_cache_hit != 1
74-
run: |
75-
/bin/bash -c "yes | $ANDROID_HOME/cmdline-tools/latest/bin/sdkmanager --licenses > /dev/null"
76-
7752
- name: Cache Gradle
78-
if: env.turbo_cache_hit != 1
7953
uses: actions/cache@v4
8054
with:
8155
path: |
@@ -89,32 +63,4 @@ jobs:
8963
env:
9064
JAVA_OPTS: "-XX:MaxHeapSize=6g"
9165
run: |
92-
yarn turbo run build:android --cache-dir="${{ env.TURBO_CACHE_DIR }}"
93-
94-
build-ios:
95-
timeout-minutes: 30
96-
if: 'false'
97-
runs-on: macos-14
98-
continue-on-error: true
99-
env:
100-
HOME: /Users/talsec
101-
TURBO_CACHE_DIR: .turbo/ios
102-
steps:
103-
- name: Checkout
104-
uses: actions/checkout@v4
105-
106-
- name: Setup
107-
uses: ./.github/actions/setup
108-
109-
- name: Install cocoapods
110-
if: env.turbo_cache_hit != 1 && steps.cocoapods-cache.outputs.cache-hit != 'true'
111-
run: |
112-
cd ios
113-
export LANG=en_US.UTF-8
114-
pod install
115-
env:
116-
NO_FLIPPER: 1
117-
118-
- name: Build example for iOS
119-
run: |
120-
yarn turbo run build:ios --cache-dir="${{ env.TURBO_CACHE_DIR }}"
66+
yarn run build:android

.yarn/releases/yarn-3.6.4.cjs

Lines changed: 0 additions & 874 deletions
This file was deleted.

.yarnrc.yml

Lines changed: 0 additions & 1 deletion
This file was deleted.

App.tsx

Lines changed: 0 additions & 118 deletions
This file was deleted.

LICENSE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2021 Talsec
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

Lines changed: 26 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,46 @@
1-
This is a new [**React Native**](https://reactnative.dev) project, bootstrapped using [`@react-native-community/cli`](https://github.com/react-native-community/cli).
1+
![freeMalwareDetection](https://raw.githubusercontent.com/talsec/freeMalwareDetection/main/visuals/freeMalwareDetection.png)
22

3-
# Getting Started
3+
# freeMalwareDetection for React Native
44

5-
>**Note**: Make sure you have completed the [React Native - Environment Setup](https://reactnative.dev/docs/environment-setup) instructions till "Creating a new application" step, before proceeding.
5+
Enhance the security of your Android application with Free Malware Detection, a powerful feature designed to scan for malicious or suspicious apps. Leveraging various blacklists and security policies, this tool ensures your application remains protected from known threats, providing a secure environment for your users.
66

7-
## Step 1: Start the Metro Server
7+
## Overview
88

9-
First, you will need to start **Metro**, the JavaScript _bundler_ that ships _with_ React Native.
9+
freeMalwareDetection is an easy-to-integrate SDK that operates asynchronously to safeguard your application without compromising performance. It runs scans in the background, ensuring that your app's performance remains unaffected while delivering comprehensive security checks. This SDK is freely available and designed for seamless integration with the freeRASP SDK, delivering a comprehensive security solution.
1010

11-
To start Metro, run the following command from the _root_ of your React Native project:
11+
## Key Advantages
1212

13-
```bash
14-
# using npm
15-
npm start
13+
- **Asynchronous Scanning**: Perform malware scans in the background without impacting app performance.
14+
- **Threat Analysis**: Receive information about detected threats to better inform and protect your users.
15+
- **Simple Integration**: Easy-to-follow integration process with extensive documentation and support.
16+
- **Versatile Blacklisting**: Supports hash-based, package name-based, and permission-based blacklists for comprehensive threat detection.
17+
- **Seamless Operation**: Integrates smoothly with freeRASP SDK to provide an all-in-one security solution.
1618

17-
# OR using Yarn
18-
yarn start
19-
```
19+
## 🎯 Features
2020

21-
## Step 2: Start your Application
21+
Free Malware Detection provides protection against potentially dangerous applications and behaviors, including:
2222

23-
Let Metro Bundler run in its _own_ terminal. Open a _new_ terminal from the _root_ of your React Native project. Run the following command to start your _Android_ or _iOS_ app:
23+
✔️ Detection of apps with suspicious package names or hashes.
2424

25-
### For Android
25+
✔️ Blocking of apps with disallowed permissions.
2626

27-
```bash
28-
# using npm
29-
npm run android
27+
✔️ Whitelisting of trusted installation sources to prevent unauthorized app installations.
3028

31-
# OR using Yarn
32-
yarn android
33-
```
29+
Visit our wiki to learn more about the specific checks performed and their impact on app security.
3430

35-
### For iOS
31+
## 📖 Discover Official Documentation
3632

37-
```bash
38-
# using npm
39-
npm run ios
33+
Explore our [GitBook page](https://docs.talsec.app/freemalwaredetection) for detailed guides, tutorials, and technical documentation.
4034

41-
# OR using Yarn
42-
yarn ios
43-
```
35+
## 🔗 Integration Guide
4436

45-
If everything is set up _correctly_, you should see your new app running in your _Android Emulator_ or _iOS Simulator_ shortly provided you have set up your emulator/simulator correctly.
37+
To integrate Free Malware Detection, follow our step-by-step [Integration Guide](https://docs.talsec.app/freemalwaredetection/integration-guide/requirements). This guide provides all the details you need for a smooth setup process on any platform.
4638

47-
This is one way to run your app — you can also run it directly from within Android Studio and Xcode respectively.
39+
## ✨ Enhancements
4840

49-
## Step 3: Modifying your App
41+
If you have any suggestions for improvement or notice anything that could be clarified in the new documentation, please open an issue. Your feedback helps us maintain high-quality resources for all users.
5042

51-
Now that you have successfully run the app, let's modify it.
43+
You can check out the [project board](https://github.com/orgs/talsec/projects/3) here.
5244

53-
1. Open `App.tsx` in your text editor of choice and edit some lines.
54-
2. For **Android**: Press the <kbd>R</kbd> key twice or select **"Reload"** from the **Developer Menu** (<kbd>Ctrl</kbd> + <kbd>M</kbd> (on Window and Linux) or <kbd>Cmd ⌘</kbd> + <kbd>M</kbd> (on macOS)) to see your changes!
55-
56-
For **iOS**: Hit <kbd>Cmd ⌘</kbd> + <kbd>R</kbd> in your iOS Simulator to reload the app and see your changes!
57-
58-
## Congratulations! :tada:
59-
60-
You've successfully run and modified your React Native App. :partying_face:
61-
62-
### Now what?
63-
64-
- If you want to add this new React Native code to an existing application, check out the [Integration guide](https://reactnative.dev/docs/integration-with-existing-apps).
65-
- If you're curious to learn more about React Native, check out the [Introduction to React Native](https://reactnative.dev/docs/getting-started).
66-
67-
# Troubleshooting
68-
69-
If you can't get this to work, see the [Troubleshooting](https://reactnative.dev/docs/troubleshooting) page.
70-
71-
# Learn More
72-
73-
To learn more about React Native, take a look at the following resources:
74-
75-
- [React Native Website](https://reactnative.dev) - learn more about React Native.
76-
- [Getting Started](https://reactnative.dev/docs/environment-setup) - an **overview** of React Native and how setup your environment.
77-
- [Learn the Basics](https://reactnative.dev/docs/getting-started) - a **guided tour** of the React Native **basics**.
78-
- [Blog](https://reactnative.dev/blog) - read the latest official React Native **Blog** posts.
79-
- [`@facebook/react-native`](https://github.com/facebook/react-native) - the Open Source; GitHub **repository** for React Native.
45+
## :page_facing_up: License
46+
This project is provided as freemium software, i.e. there is a fair usage policy that imposes some limitations on the free usage. The SDK software consists of open-source and binary parts, which is the property of Talsec. The open-source part is licensed under the MIT License - see the LICENSE file for details.

__tests__/App.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
import 'react-native';
66
import React from 'react';
7-
import App from '../App';
7+
import App from '../src/App';
88

99
// Note: import explicitly to use the types shipped with jest.
1010
import {it} from '@jest/globals';

assets/arrow-down.png

440 Bytes
Loading

assets/arrow-up.png

427 Bytes
Loading
8.76 KB
Loading

0 commit comments

Comments
 (0)