Add Implementation Workflow section to model card
Browse files
README.md
CHANGED
|
@@ -71,6 +71,41 @@ The model can output these security actions:
|
|
| 71 |
}
|
| 72 |
```
|
| 73 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 74 |
## Usage
|
| 75 |
|
| 76 |
### Python
|
|
|
|
| 71 |
}
|
| 72 |
```
|
| 73 |
|
| 74 |
+
## Implementation Workflow
|
| 75 |
+
|
| 76 |
+
This model outputs JSON action blocks that your application must parse and execute. Here's the complete workflow:
|
| 77 |
+
|
| 78 |
+
### 1. Model Generates JSON Instructions
|
| 79 |
+
|
| 80 |
+
When you send user input to the model (e.g., "Check this suspicious link: bit.ly/malware-site"), it analyzes the threat and outputs structured JSON:
|
| 81 |
+
|
| 82 |
+
```json
|
| 83 |
+
{
|
| 84 |
+
"thought": "Suspicious URL detected",
|
| 85 |
+
"action": "scan_url",
|
| 86 |
+
"params": {"url": "bit.ly/malware-site"}
|
| 87 |
+
}
|
| 88 |
+
```
|
| 89 |
+
|
| 90 |
+
### 2. Application Parses JSON
|
| 91 |
+
|
| 92 |
+
Your Android app or Edge AI Service must:
|
| 93 |
+
- Parse the JSON response from the model
|
| 94 |
+
- Extract the `action` field to determine what security action to take
|
| 95 |
+
- Extract the `params` object to get necessary parameters (URL, process ID, etc.)
|
| 96 |
+
- Extract the `thought` field for logging/debugging
|
| 97 |
+
|
| 98 |
+
### 3. Execute Security Actions
|
| 99 |
+
|
| 100 |
+
Based on the action specified, your application implements the actual security function:
|
| 101 |
+
|
| 102 |
+
- **`scan_url(url)`**: Integrate with a URL scanning service (e.g., Google Safe Browsing API, VirusTotal) to check if the link is malicious
|
| 103 |
+
- **`kill_process(pid)`**: Use Android's `ActivityManager` or system APIs to terminate the suspicious application process
|
| 104 |
+
- **`isolate_network()`**: Disable network connectivity using `ConnectivityManager` or firewall APIs to prevent data exfiltration
|
| 105 |
+
- **`ignore()`**: No action needed - log the event and continue normal operation
|
| 106 |
+
|
| 107 |
+
**Important**: The model does NOT perform these actions itself. It only generates the instructions. Your application must implement the actual security mechanisms.
|
| 108 |
+
|
| 109 |
## Usage
|
| 110 |
|
| 111 |
### Python
|