ai_root_shield 0.3.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +25 -0
- data/Gemfile.lock +1 -1
- data/README.md +210 -12
- data/examples/policies/banking_policy.json +79 -0
- data/examples/policies/development_policy.json +64 -0
- data/examples/policies/enterprise_policy.json +89 -0
- data/exe/ai_root_shield +314 -8
- data/lib/ai_root_shield/advanced_proxy_detector.rb +406 -0
- data/lib/ai_root_shield/certificate_pinning_helper.rb +258 -0
- data/lib/ai_root_shield/enterprise_policy_manager.rb +431 -0
- data/lib/ai_root_shield/version.rb +1 -1
- data/lib/ai_root_shield.rb +290 -4
- metadata +15 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7ab00a90d8cb8fbc0cb67c95ef7bc24b29b6cc9c77049be87d228b4dbdb6f4e8
|
4
|
+
data.tar.gz: c4be63597e34946070cea7ffd0d9d978cc3049923e5d4b86aca02fc2151f23df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b22228772e76a7d77b02a42c1a448c5aa694cdf2c90fe193d489d71264fb2e9946090a72d49fe4c98a7670b65d56e3f6e872242ee950c4599effd52226801a65
|
7
|
+
data.tar.gz: 0e2e77706e50afb391d0fcf5c40ea2c541033392b279edb7a4fdd42087736724084cac47c9f046a39d908920dfd117811075428c057484864b13c4efa8e6bc4c
|
data/CHANGELOG.md
CHANGED
@@ -12,6 +12,31 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
12
12
|
- Real-time threat monitoring capabilities
|
13
13
|
- Custom rule engine for security policies
|
14
14
|
|
15
|
+
## [0.4.0] - 2024-12-XX
|
16
|
+
|
17
|
+
### Added
|
18
|
+
- **Advanced Network Security** capabilities
|
19
|
+
- Certificate pinning helper with TLS public key pinning integration
|
20
|
+
- Advanced proxy detection (VPN, Tor, custom DNS, MITM appliance detection)
|
21
|
+
- Enterprise policy management with JSON-based customizable security rules
|
22
|
+
- Policy compliance validation and violation reporting
|
23
|
+
- Network security analysis integration
|
24
|
+
- Support for banking, enterprise, and development policy templates
|
25
|
+
- CLI support for network security features (`--enable-cert-pinning`, `--enable-proxy-detection`, `--policy`)
|
26
|
+
|
27
|
+
### Enhanced
|
28
|
+
- Comprehensive security status reporting across all components
|
29
|
+
- Enhanced CLI with network analysis options (`--target-ip`, `--target-url`)
|
30
|
+
- Policy-driven risk assessment and compliance checking
|
31
|
+
- Real-time network threat detection and reporting
|
32
|
+
|
33
|
+
### Technical
|
34
|
+
- Certificate chain validation and pin extraction
|
35
|
+
- Multi-layered proxy detection (Tor exit nodes, VPN services, MITM appliances)
|
36
|
+
- JSON policy definition with inheritance and merging
|
37
|
+
- Audit logging and compliance reporting
|
38
|
+
- Network analysis integration with existing risk calculation
|
39
|
+
|
15
40
|
## [0.3.0] - 2024-01-03
|
16
41
|
|
17
42
|
### Added
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -4,28 +4,46 @@
|
|
4
4
|
[](https://opensource.org/licenses/MIT)
|
5
5
|
[](https://www.ruby-lang.org/)
|
6
6
|
[](https://github.com/ahmetxhero/ai-root-shield)
|
7
|
+
[](https://buymeacoffee.com/ahmetxhero)
|
7
8
|
|
8
9
|
> **Created by [Ahmet KAHRAMAN](https://ahmetxhero.web.app)** - Mobile Developer & Cyber Security Expert
|
9
10
|
> *"Security first, innovation always"* 🛡️
|
10
11
|
|
11
|
-
An AI-powered Ruby library that performs comprehensive
|
12
|
+
An enterprise-grade AI-powered Ruby library that performs comprehensive cross-platform mobile security analysis. Features advanced platform-specific detection, hardware security validation, CI/CD integration, and enterprise SIEM connectivity - all without requiring a backend.
|
12
13
|
|
13
14
|
## Features
|
14
15
|
|
16
|
+
### 🔒 Core Security Detection
|
15
17
|
- **Root & Jailbreak Detection**: Comprehensive detection of rooted Android devices and jailbroken iOS devices
|
16
18
|
- **Emulator/Simulator Detection**: Identifies virtual devices, emulators, and simulators
|
17
19
|
- **Hooking Framework Detection**: Detects Frida, Xposed, Substrate, and other instrumentation tools
|
18
20
|
- **Application Integrity Checks**: Validates app signatures and detects repackaging/tampering
|
19
21
|
- **Network Security Analysis**: Identifies TLS issues, custom CAs, and MITM tools
|
20
|
-
|
21
|
-
|
22
|
-
-
|
23
|
-
-
|
24
|
-
-
|
22
|
+
|
23
|
+
### 🆕 v0.5.0 Platform-Specific Security Modules
|
24
|
+
- **Android SafetyNet & Play Integrity API**: Native Google security API integration
|
25
|
+
- **iOS Advanced Jailbreak Detection**: DYLD injection, sandbox escape, code signing validation
|
26
|
+
- **Hardware Security Analysis**: TEE/SE validation, biometric consistency checks
|
27
|
+
- **Cross-Platform Unified Reporting**: Standardized security reports across platforms
|
28
|
+
|
29
|
+
### 🛠️ Developer Tools & CI/CD Integration
|
30
|
+
- **CI/CD Security Testing Module**: Automated security tests for GitHub Actions, GitLab CI, Jenkins
|
31
|
+
- **Web Dashboard**: Optional GUI for log analysis and risk visualization
|
32
|
+
- **Risk Score Visualization**: Interactive charts, timelines, and heatmaps
|
33
|
+
- **SIEM/SOC Integrations**: Splunk, Elastic Stack, QRadar, Sentinel, Sumo Logic, Datadog
|
34
|
+
|
35
|
+
### 🔐 Advanced Security Features
|
36
|
+
- **Certificate Pinning Helper**: TLS public key pinning with common CA support
|
37
|
+
- **Advanced Proxy Detection**: VPN, Tor, custom DNS, and MITM appliance detection
|
38
|
+
- **Enterprise Policy Management**: JSON-based customizable security rules and compliance
|
39
|
+
- **RASP Protection**: Runtime Application Self-Protection with real-time threat blocking
|
25
40
|
- **AI Behavioral Analysis**: ONNX-powered behavioral pattern analysis with anomaly detection
|
26
|
-
- **
|
27
|
-
|
41
|
+
- **Hardware Attestation**: Android Key Attestation and iOS Device Check integration
|
42
|
+
|
43
|
+
### 📊 Enterprise Features
|
44
|
+
- **Compliance Frameworks**: OWASP MASVS, NIST, ISO 27001, PCI DSS, GDPR support
|
28
45
|
- **Risk Scoring System**: Comprehensive risk assessment with weighted factors (0-100 scale)
|
46
|
+
- **Threat Intelligence**: IoC extraction and attack vector identification
|
29
47
|
- **CLI Tool**: Command-line interface with multiple output formats
|
30
48
|
- **Privacy-First**: Completely offline, no data collection or external dependencies
|
31
49
|
|
@@ -63,6 +81,50 @@ puts result[:risk_score] # => 87
|
|
63
81
|
puts result[:factors] # => ["ROOT_SU_FOUND", "FRIDA_GADGET", "TLS_UNPINNED"]
|
64
82
|
```
|
65
83
|
|
84
|
+
### v0.5.0 Platform-Specific Analysis
|
85
|
+
|
86
|
+
```ruby
|
87
|
+
require "ai_root_shield"
|
88
|
+
|
89
|
+
# Load device logs
|
90
|
+
device_logs = JSON.parse(File.read("device_logs/android_device.json"))
|
91
|
+
|
92
|
+
# Android-specific security analysis
|
93
|
+
android_results = AiRootShield.analyze_android_security(device_logs, {
|
94
|
+
api_key: "your_safetynet_api_key",
|
95
|
+
package_name: "com.yourapp.package"
|
96
|
+
})
|
97
|
+
|
98
|
+
puts "SafetyNet Basic Integrity: #{android_results[:safetynet][:basic_integrity]}"
|
99
|
+
puts "Play Integrity Verdict: #{android_results[:play_integrity][:device_verdict]}"
|
100
|
+
puts "Hardware TEE Available: #{android_results[:hardware_security][:tee_available]}"
|
101
|
+
|
102
|
+
# iOS-specific security analysis
|
103
|
+
ios_logs = JSON.parse(File.read("device_logs/ios_device.json"))
|
104
|
+
ios_results = AiRootShield.analyze_ios_security(ios_logs)
|
105
|
+
|
106
|
+
puts "Jailbreak Detected: #{ios_results[:jailbreak_detection][:file_system_check][:detected]}"
|
107
|
+
puts "Code Signing Valid: #{ios_results[:code_signing][:main_bundle_signed]}"
|
108
|
+
puts "Secure Enclave Available: #{ios_results[:hardware_security][:secure_enclave_available]}"
|
109
|
+
|
110
|
+
# Hardware security analysis
|
111
|
+
hardware_analysis = AiRootShield.analyze_hardware_security(device_logs, 'android')
|
112
|
+
puts "Hardware Security Score: #{hardware_analysis[:security_score]}"
|
113
|
+
|
114
|
+
# Generate unified cross-platform report
|
115
|
+
unified_report = AiRootShield.generate_unified_report(
|
116
|
+
android_results: android_results,
|
117
|
+
ios_results: ios_results,
|
118
|
+
metadata: {
|
119
|
+
app_name: "MySecureApp",
|
120
|
+
app_version: "1.0.0",
|
121
|
+
organization: "MyCompany"
|
122
|
+
}
|
123
|
+
)
|
124
|
+
|
125
|
+
puts "Overall Risk Level: #{unified_report[:unified_risk_assessment][:risk_level]}"
|
126
|
+
```
|
127
|
+
|
66
128
|
### Advanced Configuration
|
67
129
|
|
68
130
|
```ruby
|
@@ -89,6 +151,76 @@ actions = AiRootShield::RiskCalculator.recommended_actions(result[:factors])
|
|
89
151
|
actions.each { |action| puts "→ #{action}" }
|
90
152
|
```
|
91
153
|
|
154
|
+
### CI/CD Integration (New in v0.5.0)
|
155
|
+
|
156
|
+
```ruby
|
157
|
+
# Run security tests in CI/CD pipeline
|
158
|
+
test_results = AiRootShield.run_ci_cd_tests("device_logs/sample.json", {
|
159
|
+
fail_on_high_risk: true,
|
160
|
+
risk_threshold: 70,
|
161
|
+
report_format: 'json',
|
162
|
+
artifacts_path: './security_artifacts'
|
163
|
+
})
|
164
|
+
|
165
|
+
puts "Pipeline Result: #{test_results[:pipeline_result][:result]}"
|
166
|
+
|
167
|
+
# Generate CI/CD configuration
|
168
|
+
github_config = AiRootShield.generate_ci_config('github_actions')
|
169
|
+
File.write('.github/workflows/security.yml', github_config)
|
170
|
+
|
171
|
+
gitlab_config = AiRootShield.generate_ci_config('gitlab_ci')
|
172
|
+
File.write('.gitlab-ci.yml', gitlab_config)
|
173
|
+
```
|
174
|
+
|
175
|
+
### SIEM Integration (New in v0.5.0)
|
176
|
+
|
177
|
+
```ruby
|
178
|
+
# Configure SIEM connector
|
179
|
+
AiRootShield.configure_siem(:splunk, {
|
180
|
+
api_endpoint: 'https://your-splunk-instance.com:8088',
|
181
|
+
api_key: 'your-hec-token',
|
182
|
+
index: 'mobile_security'
|
183
|
+
})
|
184
|
+
|
185
|
+
# Send security events to SIEM
|
186
|
+
analysis_results = AiRootShield.analyze_android_security(device_logs)
|
187
|
+
AiRootShield.send_to_siem(analysis_results, {
|
188
|
+
device_id: 'device-123',
|
189
|
+
user_id: 'user-456',
|
190
|
+
app_version: '1.0.0'
|
191
|
+
})
|
192
|
+
|
193
|
+
# Configure multiple SIEM platforms
|
194
|
+
elastic_connector = AiRootShield.configure_siem(:elastic, {
|
195
|
+
api_endpoint: 'https://your-elastic-cluster.com',
|
196
|
+
api_key: 'your-api-key',
|
197
|
+
index: 'ai-root-shield-events'
|
198
|
+
})
|
199
|
+
|
200
|
+
datadog_connector = AiRootShield.configure_siem(:datadog, {
|
201
|
+
api_endpoint: 'https://api.datadoghq.com',
|
202
|
+
api_key: 'your-datadog-api-key'
|
203
|
+
})
|
204
|
+
```
|
205
|
+
|
206
|
+
### Web Dashboard (New in v0.5.0)
|
207
|
+
|
208
|
+
```ruby
|
209
|
+
# Start the web dashboard
|
210
|
+
AiRootShield.start_dashboard({
|
211
|
+
port: 4567,
|
212
|
+
bind: '0.0.0.0'
|
213
|
+
})
|
214
|
+
|
215
|
+
# Dashboard will be available at http://localhost:4567
|
216
|
+
# Features:
|
217
|
+
# - Real-time security analysis
|
218
|
+
# - Risk score visualization
|
219
|
+
# - Interactive charts and heatmaps
|
220
|
+
# - Historical trend analysis
|
221
|
+
# - Compliance reporting
|
222
|
+
```
|
223
|
+
|
92
224
|
### CLI Usage
|
93
225
|
|
94
226
|
The gem includes a command-line interface:
|
@@ -97,6 +229,23 @@ The gem includes a command-line interface:
|
|
97
229
|
# Basic scan
|
98
230
|
$ ai_root_shield device_logs/sample.json
|
99
231
|
|
232
|
+
# Platform-specific analysis
|
233
|
+
$ ai_root_shield --platform android --safetynet-api-key YOUR_KEY device_logs/android.json
|
234
|
+
$ ai_root_shield --platform ios --enable-jailbreak-detection device_logs/ios.json
|
235
|
+
|
236
|
+
# CI/CD mode with artifacts
|
237
|
+
$ ai_root_shield --ci-mode --format json --artifacts-path ./reports device_logs/sample.json
|
238
|
+
|
239
|
+
# SIEM integration
|
240
|
+
$ ai_root_shield --siem splunk --siem-endpoint https://splunk.com:8088 --siem-token TOKEN device_logs/sample.json
|
241
|
+
|
242
|
+
# Web dashboard
|
243
|
+
$ ai_root_shield --start-dashboard --port 8080
|
244
|
+
|
245
|
+
# Generate CI/CD configs
|
246
|
+
$ ai_root_shield --generate-ci-config github-actions > .github/workflows/security.yml
|
247
|
+
$ ai_root_shield --generate-ci-config gitlab-ci > .gitlab-ci.yml
|
248
|
+
|
100
249
|
# With options
|
101
250
|
$ ai_root_shield --format text --threshold 60 device_logs/sample.json
|
102
251
|
|
@@ -132,7 +281,54 @@ puts "AI Confidence: #{result[:ai_confidence]}"
|
|
132
281
|
puts "ML Emulator Score: #{result[:ml_emulator_score]}"
|
133
282
|
```
|
134
283
|
|
135
|
-
##
|
284
|
+
## Advanced Network Security & Policy Management (New in v0.4.0)
|
285
|
+
|
286
|
+
Enterprise-grade network security and policy management capabilities:
|
287
|
+
|
288
|
+
### Features
|
289
|
+
- **Certificate Pinning Helper**: Easy TLS public key pinning integration with common CA support
|
290
|
+
- **Advanced Proxy Detection**: Comprehensive detection of VPN, Tor, custom DNS, and MITM appliances
|
291
|
+
- **Enterprise Policy Management**: JSON-based customizable security rules and compliance validation
|
292
|
+
- **Policy Templates**: Pre-built policies for banking, enterprise, and development environments
|
293
|
+
- **Compliance Reporting**: Detailed violation tracking and audit logging
|
294
|
+
- **Network Analysis Integration**: Real-time network threat detection and assessment
|
295
|
+
|
296
|
+
### Usage
|
297
|
+
|
298
|
+
```ruby
|
299
|
+
# Configure enterprise policy
|
300
|
+
AiRootShield.configure_policy('examples/policies/banking_policy.json')
|
301
|
+
|
302
|
+
# Set up certificate pinning
|
303
|
+
pinning = AiRootShield.configure_certificate_pinning
|
304
|
+
pinning.add_pin('api.mybank.com', ['sha256/YLh1dUR9y6Kja30RrAn7JKnbQG/uEtLMkBgFF2Fuihg='])
|
305
|
+
|
306
|
+
# Configure proxy detection
|
307
|
+
AiRootShield.configure_proxy_detection
|
308
|
+
|
309
|
+
# Scan with network analysis
|
310
|
+
result = AiRootShield.scan_device_with_config('device_logs.json', {
|
311
|
+
enable_network_analysis: true,
|
312
|
+
target_ip: '192.168.1.100',
|
313
|
+
target_url: 'https://api.mybank.com'
|
314
|
+
})
|
315
|
+
|
316
|
+
puts "Compliance Status: #{result[:compliance][:compliant] ? 'COMPLIANT' : 'NON-COMPLIANT'}"
|
317
|
+
puts "Network Analysis: #{result[:network_analysis]}"
|
318
|
+
```
|
319
|
+
|
320
|
+
### CLI Usage
|
321
|
+
|
322
|
+
```bash
|
323
|
+
# Scan with enterprise policy and network security
|
324
|
+
$ ai_root_shield --policy examples/policies/banking_policy.json \
|
325
|
+
--enable-cert-pinning \
|
326
|
+
--enable-proxy-detection \
|
327
|
+
--target-url https://api.mybank.com \
|
328
|
+
--verbose device_logs.json
|
329
|
+
```
|
330
|
+
|
331
|
+
## RASP Protection (v0.3.0)
|
136
332
|
|
137
333
|
Runtime Application Self-Protection provides real-time threat detection and blocking:
|
138
334
|
|
@@ -313,9 +509,11 @@ See the `examples/device_logs/` directory for complete examples.
|
|
313
509
|
|
314
510
|
- **v0.1** ✅ Static root/jailbreak checks
|
315
511
|
- **v0.2** ✅ Emulator/simulator detection + TLS pinning helper
|
316
|
-
- **v0.3**
|
317
|
-
- **v0.4**
|
318
|
-
- **
|
512
|
+
- **v0.3** ✅ AI behavioral model (ONNX inference) + RASP protection
|
513
|
+
- **v0.4** ✅ Advanced network security + enterprise policy management
|
514
|
+
- **v0.5** ✅ Platform-specific modules + CI/CD integration + SIEM connectivity
|
515
|
+
- **v0.6** 🔄 Real-time threat feeds + ML model updates
|
516
|
+
- **v1.0** 🎯 Enterprise security orchestration platform
|
319
517
|
|
320
518
|
## 🤝 Contributing
|
321
519
|
|
@@ -0,0 +1,79 @@
|
|
1
|
+
{
|
2
|
+
"version": "1.0",
|
3
|
+
"name": "Banking Security Policy",
|
4
|
+
"description": "High-security policy for banking and financial applications",
|
5
|
+
"minimum_security_level": 95,
|
6
|
+
"compliance_rules": {
|
7
|
+
"device_requirements": {
|
8
|
+
"allow_rooted_devices": false,
|
9
|
+
"allow_jailbroken_devices": false,
|
10
|
+
"allow_emulators": false,
|
11
|
+
"require_screen_lock": true,
|
12
|
+
"minimum_os_version": {
|
13
|
+
"android": "10.0",
|
14
|
+
"ios": "14.0"
|
15
|
+
},
|
16
|
+
"require_biometric_authentication": true,
|
17
|
+
"require_device_encryption": true
|
18
|
+
},
|
19
|
+
"network_security": {
|
20
|
+
"allow_vpn": false,
|
21
|
+
"allow_proxy": false,
|
22
|
+
"allow_tor": false,
|
23
|
+
"require_certificate_pinning": true,
|
24
|
+
"allowed_dns_servers": [
|
25
|
+
"8.8.8.8",
|
26
|
+
"1.1.1.1"
|
27
|
+
],
|
28
|
+
"blocked_dns_servers": [],
|
29
|
+
"require_tls_1_3_minimum": true,
|
30
|
+
"block_self_signed_certificates": true,
|
31
|
+
"require_hsts": true
|
32
|
+
},
|
33
|
+
"application_integrity": {
|
34
|
+
"allow_debug_builds": false,
|
35
|
+
"allow_repackaged_apps": false,
|
36
|
+
"require_code_signing": true,
|
37
|
+
"allowed_certificate_issuers": [
|
38
|
+
"Bank Certificate Authority"
|
39
|
+
],
|
40
|
+
"require_app_store_installation": true,
|
41
|
+
"block_sideloaded_apps": true,
|
42
|
+
"require_integrity_verification": true
|
43
|
+
},
|
44
|
+
"runtime_protection": {
|
45
|
+
"enable_rasp": true,
|
46
|
+
"allow_debugging": false,
|
47
|
+
"allow_hooking_frameworks": false,
|
48
|
+
"enable_tamper_detection": true,
|
49
|
+
"enable_anti_debug": true,
|
50
|
+
"enable_memory_protection": true,
|
51
|
+
"protection_interval": 500,
|
52
|
+
"enable_screenshot_protection": true
|
53
|
+
}
|
54
|
+
},
|
55
|
+
"risk_thresholds": {
|
56
|
+
"low": 5,
|
57
|
+
"medium": 15,
|
58
|
+
"high": 30,
|
59
|
+
"critical": 50
|
60
|
+
},
|
61
|
+
"actions": {
|
62
|
+
"on_policy_violation": "immediate_block",
|
63
|
+
"on_high_risk": "immediate_block",
|
64
|
+
"on_critical_risk": "immediate_block",
|
65
|
+
"custom_actions": {
|
66
|
+
"any_security_threat": "immediate_block_and_alert"
|
67
|
+
}
|
68
|
+
},
|
69
|
+
"reporting": {
|
70
|
+
"enable_audit_logs": true,
|
71
|
+
"log_level": "info",
|
72
|
+
"retention_days": 365,
|
73
|
+
"enable_real_time_alerts": true,
|
74
|
+
"alert_endpoints": [
|
75
|
+
"https://security.bank.com/critical-alerts",
|
76
|
+
"https://soc.bank.com/mobile-threats"
|
77
|
+
]
|
78
|
+
}
|
79
|
+
}
|
@@ -0,0 +1,64 @@
|
|
1
|
+
{
|
2
|
+
"version": "1.0",
|
3
|
+
"name": "Development Environment Policy",
|
4
|
+
"description": "Relaxed policy for development and testing environments",
|
5
|
+
"minimum_security_level": 40,
|
6
|
+
"compliance_rules": {
|
7
|
+
"device_requirements": {
|
8
|
+
"allow_rooted_devices": true,
|
9
|
+
"allow_jailbroken_devices": true,
|
10
|
+
"allow_emulators": true,
|
11
|
+
"require_screen_lock": false,
|
12
|
+
"minimum_os_version": {
|
13
|
+
"android": "7.0",
|
14
|
+
"ios": "11.0"
|
15
|
+
}
|
16
|
+
},
|
17
|
+
"network_security": {
|
18
|
+
"allow_vpn": true,
|
19
|
+
"allow_proxy": true,
|
20
|
+
"allow_tor": false,
|
21
|
+
"require_certificate_pinning": false,
|
22
|
+
"allowed_dns_servers": [],
|
23
|
+
"blocked_dns_servers": [],
|
24
|
+
"require_tls_1_2_minimum": false,
|
25
|
+
"block_self_signed_certificates": false
|
26
|
+
},
|
27
|
+
"application_integrity": {
|
28
|
+
"allow_debug_builds": true,
|
29
|
+
"allow_repackaged_apps": true,
|
30
|
+
"require_code_signing": false,
|
31
|
+
"allowed_certificate_issuers": [],
|
32
|
+
"require_app_store_installation": false,
|
33
|
+
"block_sideloaded_apps": false
|
34
|
+
},
|
35
|
+
"runtime_protection": {
|
36
|
+
"enable_rasp": false,
|
37
|
+
"allow_debugging": true,
|
38
|
+
"allow_hooking_frameworks": true,
|
39
|
+
"enable_tamper_detection": false,
|
40
|
+
"enable_anti_debug": false,
|
41
|
+
"enable_memory_protection": false,
|
42
|
+
"protection_interval": 5000
|
43
|
+
}
|
44
|
+
},
|
45
|
+
"risk_thresholds": {
|
46
|
+
"low": 30,
|
47
|
+
"medium": 60,
|
48
|
+
"high": 80,
|
49
|
+
"critical": 95
|
50
|
+
},
|
51
|
+
"actions": {
|
52
|
+
"on_policy_violation": "log_only",
|
53
|
+
"on_high_risk": "log_only",
|
54
|
+
"on_critical_risk": "alert",
|
55
|
+
"custom_actions": {}
|
56
|
+
},
|
57
|
+
"reporting": {
|
58
|
+
"enable_audit_logs": true,
|
59
|
+
"log_level": "debug",
|
60
|
+
"retention_days": 30,
|
61
|
+
"enable_real_time_alerts": false,
|
62
|
+
"alert_endpoints": []
|
63
|
+
}
|
64
|
+
}
|
@@ -0,0 +1,89 @@
|
|
1
|
+
{
|
2
|
+
"version": "1.0",
|
3
|
+
"name": "Enterprise Security Policy",
|
4
|
+
"description": "Comprehensive enterprise security policy for mobile applications",
|
5
|
+
"minimum_security_level": 80,
|
6
|
+
"compliance_rules": {
|
7
|
+
"device_requirements": {
|
8
|
+
"allow_rooted_devices": false,
|
9
|
+
"allow_jailbroken_devices": false,
|
10
|
+
"allow_emulators": false,
|
11
|
+
"require_screen_lock": true,
|
12
|
+
"minimum_os_version": {
|
13
|
+
"android": "9.0",
|
14
|
+
"ios": "13.0"
|
15
|
+
},
|
16
|
+
"allowed_device_models": [],
|
17
|
+
"blocked_device_models": []
|
18
|
+
},
|
19
|
+
"network_security": {
|
20
|
+
"allow_vpn": false,
|
21
|
+
"allow_proxy": false,
|
22
|
+
"allow_tor": false,
|
23
|
+
"require_certificate_pinning": true,
|
24
|
+
"allowed_dns_servers": [
|
25
|
+
"8.8.8.8",
|
26
|
+
"8.8.4.4",
|
27
|
+
"1.1.1.1",
|
28
|
+
"1.0.0.1"
|
29
|
+
],
|
30
|
+
"blocked_dns_servers": [
|
31
|
+
"94.140.14.14",
|
32
|
+
"76.76.19.19"
|
33
|
+
],
|
34
|
+
"require_tls_1_2_minimum": true,
|
35
|
+
"block_self_signed_certificates": true
|
36
|
+
},
|
37
|
+
"application_integrity": {
|
38
|
+
"allow_debug_builds": false,
|
39
|
+
"allow_repackaged_apps": false,
|
40
|
+
"require_code_signing": true,
|
41
|
+
"allowed_certificate_issuers": [
|
42
|
+
"Apple Inc.",
|
43
|
+
"Google Inc.",
|
44
|
+
"Enterprise CA"
|
45
|
+
],
|
46
|
+
"require_app_store_installation": true,
|
47
|
+
"block_sideloaded_apps": true
|
48
|
+
},
|
49
|
+
"runtime_protection": {
|
50
|
+
"enable_rasp": true,
|
51
|
+
"allow_debugging": false,
|
52
|
+
"allow_hooking_frameworks": false,
|
53
|
+
"enable_tamper_detection": true,
|
54
|
+
"enable_anti_debug": true,
|
55
|
+
"enable_memory_protection": true,
|
56
|
+
"protection_interval": 1000
|
57
|
+
}
|
58
|
+
},
|
59
|
+
"risk_thresholds": {
|
60
|
+
"low": 15,
|
61
|
+
"medium": 35,
|
62
|
+
"high": 60,
|
63
|
+
"critical": 80
|
64
|
+
},
|
65
|
+
"actions": {
|
66
|
+
"on_policy_violation": "block",
|
67
|
+
"on_high_risk": "alert_and_log",
|
68
|
+
"on_critical_risk": "block_and_alert",
|
69
|
+
"custom_actions": {
|
70
|
+
"device_rooted": "immediate_block",
|
71
|
+
"tor_detected": "immediate_block",
|
72
|
+
"debugging_detected": "immediate_block"
|
73
|
+
}
|
74
|
+
},
|
75
|
+
"reporting": {
|
76
|
+
"enable_audit_logs": true,
|
77
|
+
"log_level": "warning",
|
78
|
+
"retention_days": 180,
|
79
|
+
"enable_real_time_alerts": true,
|
80
|
+
"alert_endpoints": [
|
81
|
+
"https://security.company.com/alerts"
|
82
|
+
]
|
83
|
+
},
|
84
|
+
"exemptions": {
|
85
|
+
"test_devices": [],
|
86
|
+
"development_environments": [],
|
87
|
+
"emergency_override_codes": []
|
88
|
+
}
|
89
|
+
}
|