react-native-security-suite 0.9.21 → 1.0.0-rc.1
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.
- package/README.md +233 -65
- package/android/build.gradle +11 -0
- package/android/gradle.properties +1 -1
- package/android/src/main/java/com/securitysuite/CryptoConfig.java +158 -0
- package/android/src/main/java/com/securitysuite/CryptoUtils.java +152 -0
- package/android/src/main/java/com/securitysuite/EcdhKeyStore.java +60 -0
- package/android/src/main/java/com/securitysuite/HeaderSanitizer.java +75 -0
- package/android/src/main/java/com/securitysuite/JWSGenerator.java +237 -32
- package/android/src/main/java/com/securitysuite/JwsFetchPayload.java +81 -0
- package/android/src/main/java/com/securitysuite/Obfuscation.java +57 -0
- package/android/src/main/java/com/securitysuite/SecureStorageNative.java +211 -0
- package/android/src/main/java/com/securitysuite/SecureView.java +2 -10
- package/android/src/main/java/com/securitysuite/SecureWindowHelper.java +30 -0
- package/android/src/main/java/com/securitysuite/SecuritySuiteModule.java +310 -102
- package/android/src/main/java/com/securitysuite/Sslpinning.java +219 -106
- package/android/src/main/java/com/securitysuite/security/AppIntegrityChecker.java +133 -0
- package/android/src/main/java/com/securitysuite/security/EmulatorDetector.java +145 -0
- package/android/src/main/java/com/securitysuite/security/RuntimeDetector.java +234 -0
- package/android/src/test/java/com/securitysuite/JWSGeneratorTest.java +153 -0
- package/android/src/test/java/com/securitysuite/SecureStorageNativeTest.java +37 -0
- package/ios/CryptoConfig.swift +124 -0
- package/ios/JWSGenerator.swift +288 -0
- package/ios/JWSGeneratorTests.swift +168 -0
- package/ios/KeychainHelper.swift +104 -0
- package/ios/Obfuscation.swift +42 -0
- package/ios/SecureStorageNative.swift +84 -0
- package/ios/Security/AppIntegrityChecker.swift +85 -0
- package/ios/Security/EmulatorDetector.swift +45 -0
- package/ios/Security/RuntimeDetector.swift +107 -0
- package/ios/SecuritySuite.mm +28 -4
- package/ios/SecuritySuite.swift +407 -131
- package/ios/SslPinning.swift +242 -263
- package/lib/commonjs/clipboard/index.js +3 -0
- package/lib/commonjs/clipboard/index.js.map +1 -0
- package/lib/commonjs/crypto/index.js +39 -0
- package/lib/commonjs/crypto/index.js.map +1 -0
- package/lib/commonjs/device/index.js +40 -0
- package/lib/commonjs/device/index.js.map +1 -0
- package/lib/commonjs/errors.js +62 -0
- package/lib/commonjs/errors.js.map +1 -0
- package/lib/commonjs/index.js +220 -151
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/integrity/index.js +40 -0
- package/lib/commonjs/integrity/index.js.map +1 -0
- package/lib/commonjs/jws.js +141 -0
- package/lib/commonjs/jws.js.map +1 -0
- package/lib/commonjs/legacy/cryptoOptions.js +20 -0
- package/lib/commonjs/legacy/cryptoOptions.js.map +1 -0
- package/lib/commonjs/native/bridge.js +23 -0
- package/lib/commonjs/native/bridge.js.map +1 -0
- package/lib/commonjs/network/index.js +3 -0
- package/lib/commonjs/network/index.js.map +1 -0
- package/lib/commonjs/risk/score.js +36 -0
- package/lib/commonjs/risk/score.js.map +1 -0
- package/lib/commonjs/runtime/index.js +31 -0
- package/lib/commonjs/runtime/index.js.map +1 -0
- package/lib/commonjs/screen/index.js +13 -0
- package/lib/commonjs/screen/index.js.map +1 -0
- package/lib/commonjs/securitySuite/index.js +42 -0
- package/lib/commonjs/securitySuite/index.js.map +1 -0
- package/lib/commonjs/storage/index.js +3 -0
- package/lib/commonjs/storage/index.js.map +1 -0
- package/lib/commonjs/types/detection.js +2 -0
- package/lib/commonjs/types/detection.js.map +1 -0
- package/lib/module/clipboard/index.js +3 -0
- package/lib/module/clipboard/index.js.map +1 -0
- package/lib/module/crypto/index.js +35 -0
- package/lib/module/crypto/index.js.map +1 -0
- package/lib/module/device/index.js +36 -0
- package/lib/module/device/index.js.map +1 -0
- package/lib/module/errors.js +55 -0
- package/lib/module/errors.js.map +1 -0
- package/lib/module/index.js +147 -148
- package/lib/module/index.js.map +1 -1
- package/lib/module/integrity/index.js +36 -0
- package/lib/module/integrity/index.js.map +1 -0
- package/lib/module/jws.js +127 -0
- package/lib/module/jws.js.map +1 -0
- package/lib/module/legacy/cryptoOptions.js +16 -0
- package/lib/module/legacy/cryptoOptions.js.map +1 -0
- package/lib/module/native/bridge.js +19 -0
- package/lib/module/native/bridge.js.map +1 -0
- package/lib/module/network/index.js +3 -0
- package/lib/module/network/index.js.map +1 -0
- package/lib/module/risk/score.js +32 -0
- package/lib/module/risk/score.js.map +1 -0
- package/lib/module/runtime/index.js +27 -0
- package/lib/module/runtime/index.js.map +1 -0
- package/lib/module/screen/index.js +5 -0
- package/lib/module/screen/index.js.map +1 -0
- package/lib/module/securitySuite/index.js +38 -0
- package/lib/module/securitySuite/index.js.map +1 -0
- package/lib/module/storage/index.js +3 -0
- package/lib/module/storage/index.js.map +1 -0
- package/lib/module/types/detection.js +2 -0
- package/lib/module/types/detection.js.map +1 -0
- package/lib/typescript/commonjs/docs/api-v1-proposal.d.ts +215 -0
- package/lib/typescript/commonjs/docs/api-v1-proposal.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/SecureView.d.ts +1 -1
- package/lib/typescript/commonjs/src/SecureView.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/clipboard/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/clipboard/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/crypto/index.d.ts +15 -0
- package/lib/typescript/commonjs/src/crypto/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/device/index.d.ts +11 -0
- package/lib/typescript/commonjs/src/device/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/errors.d.ts +17 -0
- package/lib/typescript/commonjs/src/errors.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/helpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/index.d.ts +77 -24
- package/lib/typescript/commonjs/src/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/src/integrity/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/integrity/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/jws.d.ts +44 -0
- package/lib/typescript/commonjs/src/jws.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/legacy/cryptoOptions.d.ts +35 -0
- package/lib/typescript/commonjs/src/legacy/cryptoOptions.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/native/bridge.d.ts +12 -0
- package/lib/typescript/commonjs/src/native/bridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/network/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/network/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/risk/score.d.ts +12 -0
- package/lib/typescript/commonjs/src/risk/score.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/runtime/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/runtime/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/screen/index.d.ts +3 -0
- package/lib/typescript/commonjs/src/screen/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/securitySuite/index.d.ts +6 -0
- package/lib/typescript/commonjs/src/securitySuite/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/storage/index.d.ts +2 -0
- package/lib/typescript/commonjs/src/storage/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/src/types/detection.d.ts +41 -0
- package/lib/typescript/commonjs/src/types/detection.d.ts.map +1 -0
- package/lib/typescript/module/docs/api-v1-proposal.d.ts +215 -0
- package/lib/typescript/module/docs/api-v1-proposal.d.ts.map +1 -0
- package/lib/typescript/module/src/SecureView.d.ts +1 -1
- package/lib/typescript/module/src/SecureView.d.ts.map +1 -1
- package/lib/typescript/module/src/clipboard/index.d.ts +2 -0
- package/lib/typescript/module/src/clipboard/index.d.ts.map +1 -0
- package/lib/typescript/module/src/crypto/index.d.ts +15 -0
- package/lib/typescript/module/src/crypto/index.d.ts.map +1 -0
- package/lib/typescript/module/src/device/index.d.ts +11 -0
- package/lib/typescript/module/src/device/index.d.ts.map +1 -0
- package/lib/typescript/module/src/errors.d.ts +17 -0
- package/lib/typescript/module/src/errors.d.ts.map +1 -0
- package/lib/typescript/module/src/helpers.d.ts.map +1 -1
- package/lib/typescript/module/src/index.d.ts +77 -24
- package/lib/typescript/module/src/index.d.ts.map +1 -1
- package/lib/typescript/module/src/integrity/index.d.ts +6 -0
- package/lib/typescript/module/src/integrity/index.d.ts.map +1 -0
- package/lib/typescript/module/src/jws.d.ts +44 -0
- package/lib/typescript/module/src/jws.d.ts.map +1 -0
- package/lib/typescript/module/src/legacy/cryptoOptions.d.ts +35 -0
- package/lib/typescript/module/src/legacy/cryptoOptions.d.ts.map +1 -0
- package/lib/typescript/module/src/native/bridge.d.ts +12 -0
- package/lib/typescript/module/src/native/bridge.d.ts.map +1 -0
- package/lib/typescript/module/src/network/index.d.ts +2 -0
- package/lib/typescript/module/src/network/index.d.ts.map +1 -0
- package/lib/typescript/module/src/risk/score.d.ts +12 -0
- package/lib/typescript/module/src/risk/score.d.ts.map +1 -0
- package/lib/typescript/module/src/runtime/index.d.ts +6 -0
- package/lib/typescript/module/src/runtime/index.d.ts.map +1 -0
- package/lib/typescript/module/src/screen/index.d.ts +3 -0
- package/lib/typescript/module/src/screen/index.d.ts.map +1 -0
- package/lib/typescript/module/src/securitySuite/index.d.ts +6 -0
- package/lib/typescript/module/src/securitySuite/index.d.ts.map +1 -0
- package/lib/typescript/module/src/storage/index.d.ts +2 -0
- package/lib/typescript/module/src/storage/index.d.ts.map +1 -0
- package/lib/typescript/module/src/types/detection.d.ts +41 -0
- package/lib/typescript/module/src/types/detection.d.ts.map +1 -0
- package/package.json +2 -4
- package/src/clipboard/index.ts +1 -0
- package/src/crypto/index.ts +49 -0
- package/src/device/index.ts +47 -0
- package/src/errors.ts +84 -0
- package/src/index.tsx +293 -195
- package/src/integrity/index.ts +46 -0
- package/src/jws.ts +213 -0
- package/src/legacy/cryptoOptions.ts +49 -0
- package/src/native/bridge.ts +37 -0
- package/src/network/index.ts +1 -0
- package/src/risk/score.ts +49 -0
- package/src/runtime/index.ts +43 -0
- package/src/screen/index.ts +2 -0
- package/src/securitySuite/index.ts +45 -0
- package/src/storage/index.ts +1 -0
- package/src/types/detection.ts +46 -0
- package/android/src/main/java/com/securitysuite/StorageEncryption.java +0 -52
- package/ios/StorageEncryption.swift +0 -89
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["NativeModules","Platform","LINKING_ERROR","select","ios","default","getNativeModule","module","SecuritySuite","Proxy","get","Error"],"sourceRoot":"../../../src","sources":["native/bridge.ts"],"mappings":";;AAAA,SAASA,aAAa,EAAEC,QAAQ,QAAQ,cAAc;AAEtD,MAAMC,aAAa,GACjB,sFAAsF,GACtFD,QAAQ,CAACE,MAAM,CAAC;EAAEC,GAAG,EAAE,gCAAgC;EAAEC,OAAO,EAAE;AAAG,CAAC,CAAC,GACvE,sDAAsD,GACtD,6CAA6C;AAgB/C,OAAO,SAASC,eAAeA,CAAA,EAA8B;EAC3D,MAAMC,MAAM,GAAGP,aAAa,CAACQ,aAEhB;EAEb,IAAID,MAAM,EAAE;IACV,OAAOA,MAAM;EACf;EAEA,OAAO,IAAIE,KAAK,CAAC,CAAC,CAAC,EAA+B;IAChDC,GAAGA,CAAA,EAAG;MACJ,MAAM,IAAIC,KAAK,CAACT,aAAa,CAAC;IAChC;EACF,CAAC,CAAC;AACJ","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["network/index.ts"],"mappings":"AAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export function computeRiskScore(input) {
|
|
4
|
+
let riskScore = 0;
|
|
5
|
+
if (input.isRooted || input.isJailbroken) {
|
|
6
|
+
riskScore += 40;
|
|
7
|
+
}
|
|
8
|
+
if (input.runtime.fridaDetected) {
|
|
9
|
+
riskScore += 40;
|
|
10
|
+
}
|
|
11
|
+
if (input.runtime.xposedDetected) {
|
|
12
|
+
riskScore += 40;
|
|
13
|
+
}
|
|
14
|
+
if (input.runtime.substrateDetected) {
|
|
15
|
+
riskScore += 40;
|
|
16
|
+
}
|
|
17
|
+
if (input.runtime.debuggerAttached) {
|
|
18
|
+
riskScore += 20;
|
|
19
|
+
}
|
|
20
|
+
if (input.environment.isEmulator || input.environment.isSimulator) {
|
|
21
|
+
riskScore += 20;
|
|
22
|
+
}
|
|
23
|
+
if (input.app.tampered) {
|
|
24
|
+
riskScore += 50;
|
|
25
|
+
}
|
|
26
|
+
const riskLevel = riskScore >= 70 ? 'high' : riskScore >= 30 ? 'medium' : 'low';
|
|
27
|
+
return {
|
|
28
|
+
riskScore: Math.min(100, riskScore),
|
|
29
|
+
riskLevel
|
|
30
|
+
};
|
|
31
|
+
}
|
|
32
|
+
//# sourceMappingURL=score.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["computeRiskScore","input","riskScore","isRooted","isJailbroken","runtime","fridaDetected","xposedDetected","substrateDetected","debuggerAttached","environment","isEmulator","isSimulator","app","tampered","riskLevel","Math","min"],"sourceRoot":"../../../src","sources":["risk/score.ts"],"mappings":";;AAOA,OAAO,SAASA,gBAAgBA,CAACC,KAMhC,EAA+C;EAC9C,IAAIC,SAAS,GAAG,CAAC;EAEjB,IAAID,KAAK,CAACE,QAAQ,IAAIF,KAAK,CAACG,YAAY,EAAE;IACxCF,SAAS,IAAI,EAAE;EACjB;EAEA,IAAID,KAAK,CAACI,OAAO,CAACC,aAAa,EAAE;IAC/BJ,SAAS,IAAI,EAAE;EACjB;EAEA,IAAID,KAAK,CAACI,OAAO,CAACE,cAAc,EAAE;IAChCL,SAAS,IAAI,EAAE;EACjB;EAEA,IAAID,KAAK,CAACI,OAAO,CAACG,iBAAiB,EAAE;IACnCN,SAAS,IAAI,EAAE;EACjB;EAEA,IAAID,KAAK,CAACI,OAAO,CAACI,gBAAgB,EAAE;IAClCP,SAAS,IAAI,EAAE;EACjB;EAEA,IAAID,KAAK,CAACS,WAAW,CAACC,UAAU,IAAIV,KAAK,CAACS,WAAW,CAACE,WAAW,EAAE;IACjEV,SAAS,IAAI,EAAE;EACjB;EAEA,IAAID,KAAK,CAACY,GAAG,CAACC,QAAQ,EAAE;IACtBZ,SAAS,IAAI,EAAE;EACjB;EAEA,MAAMa,SAAoB,GACxBb,SAAS,IAAI,EAAE,GAAG,MAAM,GAAGA,SAAS,IAAI,EAAE,GAAG,QAAQ,GAAG,KAAK;EAE/D,OAAO;IAAEA,SAAS,EAAEc,IAAI,CAACC,GAAG,CAAC,GAAG,EAAEf,SAAS,CAAC;IAAEa;EAAU,CAAC;AAC3D","ignoreList":[]}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { getNativeModule } from "../native/bridge.js";
|
|
4
|
+
function parseRuntimeReport(raw) {
|
|
5
|
+
const report = {
|
|
6
|
+
debuggerAttached: Boolean(raw.debuggerAttached),
|
|
7
|
+
fridaDetected: Boolean(raw.fridaDetected),
|
|
8
|
+
suspiciousLibraries: Array.isArray(raw.suspiciousLibraries) ? raw.suspiciousLibraries.filter(item => typeof item === 'string') : [],
|
|
9
|
+
suspiciousPorts: Array.isArray(raw.suspiciousPorts) ? raw.suspiciousPorts.filter(item => typeof item === 'number') : []
|
|
10
|
+
};
|
|
11
|
+
if (raw.xposedDetected !== undefined) {
|
|
12
|
+
report.xposedDetected = Boolean(raw.xposedDetected);
|
|
13
|
+
}
|
|
14
|
+
if (raw.substrateDetected !== undefined) {
|
|
15
|
+
report.substrateDetected = Boolean(raw.substrateDetected);
|
|
16
|
+
}
|
|
17
|
+
if (raw.magiskDetected !== undefined) {
|
|
18
|
+
report.magiskDetected = Boolean(raw.magiskDetected);
|
|
19
|
+
}
|
|
20
|
+
return report;
|
|
21
|
+
}
|
|
22
|
+
export const RuntimeSecurity = {
|
|
23
|
+
detect() {
|
|
24
|
+
return getNativeModule().runtimeDetect().then(result => parseRuntimeReport(result));
|
|
25
|
+
}
|
|
26
|
+
};
|
|
27
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["getNativeModule","parseRuntimeReport","raw","report","debuggerAttached","Boolean","fridaDetected","suspiciousLibraries","Array","isArray","filter","item","suspiciousPorts","xposedDetected","undefined","substrateDetected","magiskDetected","RuntimeSecurity","detect","runtimeDetect","then","result"],"sourceRoot":"../../../src","sources":["runtime/index.ts"],"mappings":";;AAAA,SAASA,eAAe,QAAQ,qBAAkB;AAGlD,SAASC,kBAAkBA,CAACC,GAA4B,EAAuB;EAC7E,MAAMC,MAA2B,GAAG;IAClCC,gBAAgB,EAAEC,OAAO,CAACH,GAAG,CAACE,gBAAgB,CAAC;IAC/CE,aAAa,EAAED,OAAO,CAACH,GAAG,CAACI,aAAa,CAAC;IACzCC,mBAAmB,EAAEC,KAAK,CAACC,OAAO,CAACP,GAAG,CAACK,mBAAmB,CAAC,GACvDL,GAAG,CAACK,mBAAmB,CAACG,MAAM,CAC3BC,IAAI,IAAqB,OAAOA,IAAI,KAAK,QAC5C,CAAC,GACD,EAAE;IACNC,eAAe,EAAEJ,KAAK,CAACC,OAAO,CAACP,GAAG,CAACU,eAAe,CAAC,GAC/CV,GAAG,CAACU,eAAe,CAACF,MAAM,CACvBC,IAAI,IAAqB,OAAOA,IAAI,KAAK,QAC5C,CAAC,GACD;EACN,CAAC;EAED,IAAIT,GAAG,CAACW,cAAc,KAAKC,SAAS,EAAE;IACpCX,MAAM,CAACU,cAAc,GAAGR,OAAO,CAACH,GAAG,CAACW,cAAc,CAAC;EACrD;EAEA,IAAIX,GAAG,CAACa,iBAAiB,KAAKD,SAAS,EAAE;IACvCX,MAAM,CAACY,iBAAiB,GAAGV,OAAO,CAACH,GAAG,CAACa,iBAAiB,CAAC;EAC3D;EAEA,IAAIb,GAAG,CAACc,cAAc,KAAKF,SAAS,EAAE;IACpCX,MAAM,CAACa,cAAc,GAAGX,OAAO,CAACH,GAAG,CAACc,cAAc,CAAC;EACrD;EAEA,OAAOb,MAAM;AACf;AAEA,OAAO,MAAMc,eAAe,GAAG;EAC7BC,MAAMA,CAAA,EAAiC;IACrC,OAAOlB,eAAe,CAAC,CAAC,CACrBmB,aAAa,CAAC,CAAC,CACfC,IAAI,CAAEC,MAAM,IAAKpB,kBAAkB,CAACoB,MAAM,CAAC,CAAC;EACjD;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["SecureView"],"sourceRoot":"../../../src","sources":["screen/index.ts"],"mappings":";;AAAA;AACA,SAASA,UAAU,QAAQ,kBAAe","ignoreList":[]}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { Platform } from 'react-native';
|
|
4
|
+
import { AppIntegrity } from "../integrity/index.js";
|
|
5
|
+
import { DeviceSecurity } from "../device/index.js";
|
|
6
|
+
import { RuntimeSecurity } from "../runtime/index.js";
|
|
7
|
+
import { computeRiskScore } from "../risk/score.js";
|
|
8
|
+
export const SecuritySuite = {
|
|
9
|
+
async getSecurityReport() {
|
|
10
|
+
const [runtime, app, environment, isCompromised] = await Promise.all([RuntimeSecurity.detect(), AppIntegrity.verify(), DeviceSecurity.getEnvironment(), DeviceSecurity.isCompromised()]);
|
|
11
|
+
const isRooted = Platform.OS === 'android' && isCompromised;
|
|
12
|
+
const isJailbroken = Platform.OS === 'ios' && isCompromised;
|
|
13
|
+
const {
|
|
14
|
+
riskScore,
|
|
15
|
+
riskLevel
|
|
16
|
+
} = computeRiskScore({
|
|
17
|
+
isRooted,
|
|
18
|
+
isJailbroken,
|
|
19
|
+
runtime,
|
|
20
|
+
app,
|
|
21
|
+
environment
|
|
22
|
+
});
|
|
23
|
+
return {
|
|
24
|
+
device: {
|
|
25
|
+
isRooted,
|
|
26
|
+
isJailbroken,
|
|
27
|
+
isEmulator: environment.isEmulator,
|
|
28
|
+
isSimulator: environment.isSimulator,
|
|
29
|
+
environmentIndicators: environment.indicators
|
|
30
|
+
},
|
|
31
|
+
runtime,
|
|
32
|
+
app,
|
|
33
|
+
riskScore,
|
|
34
|
+
riskLevel
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Platform","AppIntegrity","DeviceSecurity","RuntimeSecurity","computeRiskScore","SecuritySuite","getSecurityReport","runtime","app","environment","isCompromised","Promise","all","detect","verify","getEnvironment","isRooted","OS","isJailbroken","riskScore","riskLevel","device","isEmulator","isSimulator","environmentIndicators","indicators"],"sourceRoot":"../../../src","sources":["securitySuite/index.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,cAAc;AAEvC,SAASC,YAAY,QAAQ,uBAAc;AAC3C,SAASC,cAAc,QAAQ,oBAAW;AAC1C,SAASC,eAAe,QAAQ,qBAAY;AAC5C,SAASC,gBAAgB,QAAQ,kBAAe;AAGhD,OAAO,MAAMC,aAAa,GAAG;EAC3B,MAAMC,iBAAiBA,CAAA,EAA4B;IACjD,MAAM,CAACC,OAAO,EAAEC,GAAG,EAAEC,WAAW,EAAEC,aAAa,CAAC,GAAG,MAAMC,OAAO,CAACC,GAAG,CAAC,CACnET,eAAe,CAACU,MAAM,CAAC,CAAC,EACxBZ,YAAY,CAACa,MAAM,CAAC,CAAC,EACrBZ,cAAc,CAACa,cAAc,CAAC,CAAC,EAC/Bb,cAAc,CAACQ,aAAa,CAAC,CAAC,CAC/B,CAAC;IAEF,MAAMM,QAAQ,GAAGhB,QAAQ,CAACiB,EAAE,KAAK,SAAS,IAAIP,aAAa;IAC3D,MAAMQ,YAAY,GAAGlB,QAAQ,CAACiB,EAAE,KAAK,KAAK,IAAIP,aAAa;IAE3D,MAAM;MAAES,SAAS;MAAEC;IAAU,CAAC,GAAGhB,gBAAgB,CAAC;MAChDY,QAAQ;MACRE,YAAY;MACZX,OAAO;MACPC,GAAG;MACHC;IACF,CAAC,CAAC;IAEF,OAAO;MACLY,MAAM,EAAE;QACNL,QAAQ;QACRE,YAAY;QACZI,UAAU,EAAEb,WAAW,CAACa,UAAU;QAClCC,WAAW,EAAEd,WAAW,CAACc,WAAW;QACpCC,qBAAqB,EAAEf,WAAW,CAACgB;MACrC,CAAC;MACDlB,OAAO;MACPC,GAAG;MACHW,SAAS;MACTC;IACF,CAAC;EACH;AACF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["storage/index.ts"],"mappings":"AAAA;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/detection.ts"],"mappings":"","ignoreList":[]}
|
|
@@ -0,0 +1,215 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Proposed v1.0 TypeScript API — reference implementation for integrators.
|
|
3
|
+
* This file documents the target public surface; not yet wired to native code.
|
|
4
|
+
*/
|
|
5
|
+
export declare enum SecurityErrorCode {
|
|
6
|
+
ROOT_DETECTED = "ROOT_DETECTED",
|
|
7
|
+
JAILBREAK_DETECTED = "JAILBREAK_DETECTED",
|
|
8
|
+
FRIDA_DETECTED = "FRIDA_DETECTED",
|
|
9
|
+
EMULATOR_DETECTED = "EMULATOR_DETECTED",
|
|
10
|
+
APP_TAMPERED = "APP_TAMPERED",
|
|
11
|
+
SSL_PINNING_FAILED = "SSL_PINNING_FAILED",
|
|
12
|
+
SECURE_STORAGE_UNAVAILABLE = "SECURE_STORAGE_UNAVAILABLE",
|
|
13
|
+
CRYPTO_KEY_NOT_FOUND = "CRYPTO_KEY_NOT_FOUND",
|
|
14
|
+
BIOMETRIC_AUTH_FAILED = "BIOMETRIC_AUTH_FAILED",
|
|
15
|
+
JWS_SIGNING_FAILED = "JWS_SIGNING_FAILED"
|
|
16
|
+
}
|
|
17
|
+
export declare class SecurityError extends Error {
|
|
18
|
+
readonly code: SecurityErrorCode;
|
|
19
|
+
readonly details?: Record<string, unknown> | undefined;
|
|
20
|
+
constructor(code: SecurityErrorCode, message: string, details?: Record<string, unknown> | undefined);
|
|
21
|
+
}
|
|
22
|
+
export interface DeviceEnvironment {
|
|
23
|
+
isEmulator: boolean;
|
|
24
|
+
isSimulator: boolean;
|
|
25
|
+
indicators: string[];
|
|
26
|
+
}
|
|
27
|
+
export interface DeviceSecurityNamespace {
|
|
28
|
+
/** @deprecated alias — use isCompromised() */
|
|
29
|
+
hasSecurityRisk(): Promise<boolean>;
|
|
30
|
+
isCompromised(): Promise<boolean>;
|
|
31
|
+
isRooted(): Promise<boolean>;
|
|
32
|
+
isJailbroken(): Promise<boolean>;
|
|
33
|
+
getEnvironment(): Promise<DeviceEnvironment>;
|
|
34
|
+
}
|
|
35
|
+
export interface RuntimeThreatReport {
|
|
36
|
+
debuggerAttached: boolean;
|
|
37
|
+
fridaDetected: boolean;
|
|
38
|
+
xposedDetected?: boolean;
|
|
39
|
+
substrateDetected?: boolean;
|
|
40
|
+
suspiciousLibraries: string[];
|
|
41
|
+
suspiciousPorts: number[];
|
|
42
|
+
}
|
|
43
|
+
export interface RuntimeSecurityNamespace {
|
|
44
|
+
detect(): Promise<RuntimeThreatReport>;
|
|
45
|
+
}
|
|
46
|
+
export type BuildType = 'debug' | 'release' | 'testflight';
|
|
47
|
+
export interface AppIntegrityReport {
|
|
48
|
+
validSignature: boolean;
|
|
49
|
+
installerTrusted?: boolean;
|
|
50
|
+
debuggable: boolean;
|
|
51
|
+
tampered: boolean;
|
|
52
|
+
buildType: BuildType;
|
|
53
|
+
}
|
|
54
|
+
export interface AppIntegrityNamespace {
|
|
55
|
+
verify(): Promise<AppIntegrityReport>;
|
|
56
|
+
requestPlayIntegrity?(options: {
|
|
57
|
+
nonce: string;
|
|
58
|
+
}): Promise<{
|
|
59
|
+
token: string;
|
|
60
|
+
}>;
|
|
61
|
+
requestAppAttest?(options: {
|
|
62
|
+
challenge: string;
|
|
63
|
+
}): Promise<{
|
|
64
|
+
keyId: string;
|
|
65
|
+
attestationObject: string;
|
|
66
|
+
}>;
|
|
67
|
+
}
|
|
68
|
+
export type KeychainAccessibility = 'whenUnlocked' | 'whenUnlockedThisDeviceOnly' | 'afterFirstUnlock' | 'whenPasscodeSetThisDeviceOnly';
|
|
69
|
+
export interface SecureStorageOptions {
|
|
70
|
+
service?: string;
|
|
71
|
+
requireAuthentication?: boolean;
|
|
72
|
+
accessibility?: KeychainAccessibility;
|
|
73
|
+
useStrongBox?: boolean;
|
|
74
|
+
authenticationPrompt?: string;
|
|
75
|
+
}
|
|
76
|
+
export interface SecureStorageNamespace {
|
|
77
|
+
setItem(key: string, value: string, options?: SecureStorageOptions): Promise<void>;
|
|
78
|
+
getItem(key: string, options?: SecureStorageOptions): Promise<string | null>;
|
|
79
|
+
removeItem(key: string, options?: SecureStorageOptions): Promise<void>;
|
|
80
|
+
getAllKeys(options?: Pick<SecureStorageOptions, 'service'>): Promise<string[]>;
|
|
81
|
+
clear(options?: Pick<SecureStorageOptions, 'service'>): Promise<void>;
|
|
82
|
+
multiSet(pairs: Array<[string, string]>, options?: SecureStorageOptions): Promise<void>;
|
|
83
|
+
multiGet(keys: string[], options?: SecureStorageOptions): Promise<readonly [string, string | null][]>;
|
|
84
|
+
multiRemove(keys: string[], options?: SecureStorageOptions): Promise<void>;
|
|
85
|
+
}
|
|
86
|
+
export interface CryptoNamespace {
|
|
87
|
+
randomBytes(length: number): Promise<string>;
|
|
88
|
+
randomUUID(): Promise<string>;
|
|
89
|
+
getPublicKey(options?: {
|
|
90
|
+
alias?: string;
|
|
91
|
+
algorithm?: 'X25519' | 'P-256';
|
|
92
|
+
}): Promise<string>;
|
|
93
|
+
establishSharedKey(serverPublicKey: string, options?: {
|
|
94
|
+
alias?: string;
|
|
95
|
+
ephemeral?: boolean;
|
|
96
|
+
returnSharedKey?: boolean;
|
|
97
|
+
}): Promise<string | void>;
|
|
98
|
+
encrypt(plaintext: string, options?: {
|
|
99
|
+
alias?: string;
|
|
100
|
+
}): Promise<string>;
|
|
101
|
+
decrypt(ciphertext: string, options?: {
|
|
102
|
+
alias?: string;
|
|
103
|
+
}): Promise<string>;
|
|
104
|
+
generateKeyPair(options: {
|
|
105
|
+
alias: string;
|
|
106
|
+
algorithm: 'X25519' | 'P-256' | 'Ed25519';
|
|
107
|
+
}): Promise<void>;
|
|
108
|
+
rotateKey(alias: string): Promise<void>;
|
|
109
|
+
deleteKey(alias: string): Promise<void>;
|
|
110
|
+
}
|
|
111
|
+
export type JwsAlgorithm = 'HS256' | 'HS384' | 'HS512' | 'ES256' | 'EdDSA';
|
|
112
|
+
export interface ReplayProtectedHeaders {
|
|
113
|
+
timestamp: number;
|
|
114
|
+
nonce: string;
|
|
115
|
+
request_id: string;
|
|
116
|
+
}
|
|
117
|
+
export interface JWSNamespace {
|
|
118
|
+
createReplayProtectedHeaders(): Promise<ReplayProtectedHeaders>;
|
|
119
|
+
generate(options: {
|
|
120
|
+
algorithm?: JwsAlgorithm;
|
|
121
|
+
secret?: string;
|
|
122
|
+
keyAlias?: string;
|
|
123
|
+
payload?: string | Record<string, unknown>;
|
|
124
|
+
headers?: Record<string, string | number | boolean | null>;
|
|
125
|
+
detached?: boolean;
|
|
126
|
+
canonical?: boolean;
|
|
127
|
+
}): Promise<string>;
|
|
128
|
+
generateKeyPair(options: {
|
|
129
|
+
alias: string;
|
|
130
|
+
algorithm: 'ES256' | 'EdDSA';
|
|
131
|
+
}): Promise<void>;
|
|
132
|
+
exportPublicKey(alias: string): Promise<string>;
|
|
133
|
+
}
|
|
134
|
+
export interface SslPinningConfig {
|
|
135
|
+
validDomains: string[];
|
|
136
|
+
pins: {
|
|
137
|
+
primary: string[];
|
|
138
|
+
backup?: string[];
|
|
139
|
+
};
|
|
140
|
+
certificateTransparency?: boolean;
|
|
141
|
+
}
|
|
142
|
+
export interface NetworkLoggerConfig {
|
|
143
|
+
enabled: boolean;
|
|
144
|
+
redactHeaders?: string[];
|
|
145
|
+
redactBodyFields?: string[];
|
|
146
|
+
}
|
|
147
|
+
export interface SecureNetworkNamespace {
|
|
148
|
+
fetch(url: string, options: {
|
|
149
|
+
method?: 'GET' | 'POST' | 'PUT' | 'PATCH' | 'DELETE';
|
|
150
|
+
headers?: Record<string, string>;
|
|
151
|
+
body?: string | Record<string, unknown>;
|
|
152
|
+
timeout?: number;
|
|
153
|
+
sslPinning?: SslPinningConfig;
|
|
154
|
+
/** @deprecated use sslPinning */
|
|
155
|
+
certificates?: string[];
|
|
156
|
+
/** @deprecated use sslPinning */
|
|
157
|
+
validDomains?: string[];
|
|
158
|
+
jws?: Parameters<JWSNamespace['generate']>[0] & {
|
|
159
|
+
headerName?: string;
|
|
160
|
+
};
|
|
161
|
+
}): Promise<{
|
|
162
|
+
status: number;
|
|
163
|
+
response: string;
|
|
164
|
+
json(): Promise<unknown>;
|
|
165
|
+
duration: string;
|
|
166
|
+
}>;
|
|
167
|
+
}
|
|
168
|
+
export interface ScreenSecurityOptions {
|
|
169
|
+
screenshots?: boolean;
|
|
170
|
+
screenRecording?: boolean;
|
|
171
|
+
appSwitcherBlur?: boolean;
|
|
172
|
+
}
|
|
173
|
+
export interface ScreenSecurityNamespace {
|
|
174
|
+
enable(options: ScreenSecurityOptions): Promise<void>;
|
|
175
|
+
disable(): Promise<void>;
|
|
176
|
+
isScreenRecording(): Promise<boolean>;
|
|
177
|
+
}
|
|
178
|
+
export interface SecureClipboardNamespace {
|
|
179
|
+
setString(value: string, options?: {
|
|
180
|
+
expiresInMs?: number;
|
|
181
|
+
}): Promise<void>;
|
|
182
|
+
clear(): Promise<void>;
|
|
183
|
+
}
|
|
184
|
+
export type RiskLevel = 'low' | 'medium' | 'high';
|
|
185
|
+
export interface SecurityReport {
|
|
186
|
+
device: {
|
|
187
|
+
isRooted: boolean;
|
|
188
|
+
isJailbroken: boolean;
|
|
189
|
+
isEmulator: boolean;
|
|
190
|
+
isSimulator: boolean;
|
|
191
|
+
environmentIndicators: string[];
|
|
192
|
+
};
|
|
193
|
+
runtime: RuntimeThreatReport;
|
|
194
|
+
app: AppIntegrityReport;
|
|
195
|
+
riskScore: number;
|
|
196
|
+
riskLevel: RiskLevel;
|
|
197
|
+
}
|
|
198
|
+
export interface SecuritySuiteConfig {
|
|
199
|
+
secureNetwork?: {
|
|
200
|
+
requireHttps?: boolean;
|
|
201
|
+
logger?: NetworkLoggerConfig;
|
|
202
|
+
};
|
|
203
|
+
secureStorage?: {
|
|
204
|
+
accessibility?: KeychainAccessibility;
|
|
205
|
+
requireAuthentication?: boolean;
|
|
206
|
+
};
|
|
207
|
+
crypto?: {
|
|
208
|
+
returnSharedKey?: boolean;
|
|
209
|
+
};
|
|
210
|
+
}
|
|
211
|
+
export interface SecuritySuiteNamespace {
|
|
212
|
+
configure(config: SecuritySuiteConfig): void;
|
|
213
|
+
getSecurityReport(): Promise<SecurityReport>;
|
|
214
|
+
}
|
|
215
|
+
//# sourceMappingURL=api-v1-proposal.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"api-v1-proposal.d.ts","sourceRoot":"","sources":["../../../../docs/api-v1-proposal.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,oBAAY,iBAAiB;IAC3B,aAAa,kBAAkB;IAC/B,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,iBAAiB,sBAAsB;IACvC,YAAY,iBAAiB;IAC7B,kBAAkB,uBAAuB;IACzC,0BAA0B,+BAA+B;IACzD,oBAAoB,yBAAyB;IAC7C,qBAAqB,0BAA0B;IAC/C,kBAAkB,uBAAuB;CAC1C;AAED,qBAAa,aAAc,SAAQ,KAAK;aAEpB,IAAI,EAAE,iBAAiB;aAEvB,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;gBAFjC,IAAI,EAAE,iBAAiB,EACvC,OAAO,EAAE,MAAM,EACC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,YAAA;CAKpD;AAID,MAAM,WAAW,iBAAiB;I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AO,CAAC,cAAc,CAAC,CAAC;CAC9C"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SecureView: (props: any) => import("react
|
|
1
|
+
export declare const SecureView: (props: any) => import("react").JSX.Element;
|
|
2
2
|
//# sourceMappingURL=SecureView.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SecureView.d.ts","sourceRoot":"","sources":["../../../../src/SecureView.tsx"],"names":[],"mappings":"AAwBA,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"SecureView.d.ts","sourceRoot":"","sources":["../../../../src/SecureView.tsx"],"names":[],"mappings":"AAwBA,eAAO,MAAM,UAAU,GAAI,OAAO,GAAG,gCASpC,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/clipboard/index.ts"],"names":[],"mappings":"AAAA,sCAAsC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { CryptoOptions } from '../legacy/cryptoOptions';
|
|
2
|
+
export interface EstablishSharedKeyOptions extends CryptoOptions {
|
|
3
|
+
/** @deprecated Prefer native-only flow; set true only for legacy compatibility. */
|
|
4
|
+
returnSharedKey?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare const Crypto: {
|
|
7
|
+
getPublicKey(): Promise<string>;
|
|
8
|
+
/**
|
|
9
|
+
* Derives a shared encryption key natively without returning it to JavaScript.
|
|
10
|
+
* Call `encryptBySharedKey` / `decryptBySharedKey` afterward (legacy bridge methods).
|
|
11
|
+
*/
|
|
12
|
+
establishSharedKey(serverPublicKey: string, options?: EstablishSharedKeyOptions): Promise<string | void>;
|
|
13
|
+
};
|
|
14
|
+
export type { CryptoOptions } from '../legacy/cryptoOptions';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/crypto/index.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC;AAc7D,MAAM,WAAW,yBAA0B,SAAQ,aAAa;IAC9D,mFAAmF;IACnF,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B;AAED,eAAO,MAAM,MAAM;oBACD,OAAO,CAAC,MAAM,CAAC;IAI/B;;;OAGG;wCAEgB,MAAM,YACb,yBAAyB,GAClC,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;CAc1B,CAAC;AAEF,YAAY,EAAE,aAAa,EAAE,MAAM,yBAAyB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import type { DeviceEnvironment } from '../types/detection';
|
|
2
|
+
export declare const DeviceSecurity: {
|
|
3
|
+
/** @deprecated Use `isCompromised()` or `SecuritySuite.getSecurityReport()`. */
|
|
4
|
+
hasSecurityRisk(): Promise<boolean>;
|
|
5
|
+
isCompromised(): Promise<boolean>;
|
|
6
|
+
isRooted(): Promise<boolean>;
|
|
7
|
+
isJailbroken(): Promise<boolean>;
|
|
8
|
+
getEnvironment(): Promise<DeviceEnvironment>;
|
|
9
|
+
};
|
|
10
|
+
export type { DeviceEnvironment };
|
|
11
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/device/index.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AAY5D,eAAO,MAAM,cAAc;IACzB,gFAAgF;uBAC7D,OAAO,CAAC,OAAO,CAAC;qBAIlB,OAAO,CAAC,OAAO,CAAC;gBAIrB,OAAO,CAAC,OAAO,CAAC;oBAOZ,OAAO,CAAC,OAAO,CAAC;sBAOd,OAAO,CAAC,iBAAiB,CAAC;CAK7C,CAAC;AAEF,YAAY,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export declare enum SecurityErrorCode {
|
|
2
|
+
ROOT_DETECTED = "ROOT_DETECTED",
|
|
3
|
+
JAILBREAK_DETECTED = "JAILBREAK_DETECTED",
|
|
4
|
+
FRIDA_DETECTED = "FRIDA_DETECTED",
|
|
5
|
+
DEBUGGER_DETECTED = "DEBUGGER_DETECTED",
|
|
6
|
+
SSL_PINNING_FAILED = "SSL_PINNING_FAILED",
|
|
7
|
+
SECURE_STORAGE_UNAVAILABLE = "SECURE_STORAGE_UNAVAILABLE",
|
|
8
|
+
CRYPTO_KEY_NOT_FOUND = "CRYPTO_KEY_NOT_FOUND"
|
|
9
|
+
}
|
|
10
|
+
export declare class SecurityError extends Error {
|
|
11
|
+
readonly code: SecurityErrorCode;
|
|
12
|
+
readonly details?: Record<string, unknown>;
|
|
13
|
+
constructor(code: SecurityErrorCode, message: string, details?: Record<string, unknown>);
|
|
14
|
+
}
|
|
15
|
+
export declare function isSecurityError(error: unknown): error is SecurityError;
|
|
16
|
+
export declare function mapNativeError(error: unknown): SecurityError | Error;
|
|
17
|
+
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../../../src/errors.ts"],"names":[],"mappings":"AAAA,oBAAY,iBAAiB;IAC3B,aAAa,kBAAkB;IAC/B,kBAAkB,uBAAuB;IACzC,cAAc,mBAAmB;IACjC,iBAAiB,sBAAsB;IACvC,kBAAkB,uBAAuB;IACzC,0BAA0B,+BAA+B;IACzD,oBAAoB,yBAAyB;CAC9C;AAgBD,qBAAa,aAAc,SAAQ,KAAK;IACtC,QAAQ,CAAC,IAAI,EAAE,iBAAiB,CAAC;IACjC,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;gBAGzC,IAAI,EAAE,iBAAiB,EACvB,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC;CAOpC;AAED,wBAAgB,eAAe,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,aAAa,CAEtE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,OAAO,GAAG,aAAa,GAAG,KAAK,CAuCpE"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/helpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,
|
|
1
|
+
{"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../src/helpers.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,YAAY,GAAI,OAAO,MAAM,KAAG,OAO5C,CAAC;AAEF,eAAO,MAAM,SAAS,GAAI,OAAO,MAAM,QAMtC,CAAC"}
|
|
@@ -1,4 +1,49 @@
|
|
|
1
|
+
import { type CryptoOptions } from './legacy/cryptoOptions';
|
|
2
|
+
import { type GenerateJWSOptions, type JwsFetchOptions } from './jws';
|
|
1
3
|
export * from './SecureView';
|
|
4
|
+
export type { GenerateJWSOptions, JwsAlgorithm, JwsFetchOptions, JwsHeaderValue, JwsHeaders, JwsPayload, } from './jws';
|
|
5
|
+
export type { CryptoOptions, KeyAgreementAlgorithm, KeyType, EncryptionKeyAlgorithm, HmacAlgorithm, CipherAlgorithm, } from './legacy/cryptoOptions';
|
|
6
|
+
export { SecurityError, SecurityErrorCode, mapNativeError, isSecurityError } from './errors';
|
|
7
|
+
export { DeviceSecurity } from './device';
|
|
8
|
+
export { RuntimeSecurity } from './runtime';
|
|
9
|
+
export { AppIntegrity } from './integrity';
|
|
10
|
+
export { Crypto } from './crypto';
|
|
11
|
+
export { SecuritySuite } from './securitySuite';
|
|
12
|
+
export type { RuntimeThreatReport, AppIntegrityReport, DeviceEnvironment, DeviceSecurityReport, SecurityReport, RiskLevel, BuildType, } from './types/detection';
|
|
13
|
+
/** @deprecated Use `JwsHeaders` (optional `Record<string, JwsHeaderValue>`) instead. */
|
|
14
|
+
export interface LegacyJwsHeaders {
|
|
15
|
+
kid: string;
|
|
16
|
+
request_id: string;
|
|
17
|
+
[key: string]: string;
|
|
18
|
+
}
|
|
19
|
+
export interface SslPinningOptions {
|
|
20
|
+
/** Base64-encoded SPKI SHA-256 hashes (with or without `sha256/` prefix). */
|
|
21
|
+
certificates: string[];
|
|
22
|
+
/** Allowed hostnames. Request host must match one of these before pinning is evaluated. */
|
|
23
|
+
validDomains: string[];
|
|
24
|
+
}
|
|
25
|
+
interface Header {
|
|
26
|
+
[key: string]: string;
|
|
27
|
+
}
|
|
28
|
+
export interface Options {
|
|
29
|
+
body?: string | object;
|
|
30
|
+
headers: Header;
|
|
31
|
+
method?: 'DELETE' | 'GET' | 'POST' | 'PUT' | 'PATCH';
|
|
32
|
+
timeout?: number;
|
|
33
|
+
/** SSL pinning configuration. Both certificates and validDomains are required together. */
|
|
34
|
+
certificates?: string[];
|
|
35
|
+
validDomains?: string[];
|
|
36
|
+
/** @deprecated Use `jws` instead. */
|
|
37
|
+
keyId?: string;
|
|
38
|
+
/** @deprecated Use `jws` instead. */
|
|
39
|
+
requestId?: string;
|
|
40
|
+
/**
|
|
41
|
+
* @deprecated Legacy signing secret. Use `jws.secret` instead.
|
|
42
|
+
*/
|
|
43
|
+
secret?: string;
|
|
44
|
+
/** JWS request-signing configuration. */
|
|
45
|
+
jws?: JwsFetchOptions;
|
|
46
|
+
}
|
|
2
47
|
interface Response {
|
|
3
48
|
status: number;
|
|
4
49
|
url: string;
|
|
@@ -19,17 +64,6 @@ export interface ErrorResponse extends Response {
|
|
|
19
64
|
message: string;
|
|
20
65
|
code: string;
|
|
21
66
|
}
|
|
22
|
-
interface Header {
|
|
23
|
-
[key: string]: string;
|
|
24
|
-
}
|
|
25
|
-
export interface Options {
|
|
26
|
-
body?: string | object;
|
|
27
|
-
headers: Header;
|
|
28
|
-
method?: 'DELETE' | 'GET' | 'POST' | 'PUT';
|
|
29
|
-
certificates?: string[];
|
|
30
|
-
validDomains?: string[];
|
|
31
|
-
timeout?: number;
|
|
32
|
-
}
|
|
33
67
|
export interface FetchEventResponse {
|
|
34
68
|
url: string;
|
|
35
69
|
options: Options;
|
|
@@ -47,27 +81,46 @@ export interface FetchEventResponse {
|
|
|
47
81
|
duration: string;
|
|
48
82
|
};
|
|
49
83
|
}
|
|
50
|
-
declare const
|
|
84
|
+
declare const NativeSecuritySuiteModule: any;
|
|
51
85
|
export declare const getPublicKey: () => Promise<string>;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
86
|
+
/**
|
|
87
|
+
* @deprecated Prefer `Crypto.establishSharedKey()` which keeps the derived key in native memory.
|
|
88
|
+
*/
|
|
89
|
+
export declare const getSharedKey: (serverPublicKey: string, options?: CryptoOptions) => Promise<string>;
|
|
90
|
+
export declare const encryptBySharedKey: (input: string, options?: CryptoOptions) => Promise<string>;
|
|
91
|
+
export declare const decryptBySharedKey: (input: string, options?: CryptoOptions) => Promise<string>;
|
|
92
|
+
export declare const generateJWS: (options: GenerateJWSOptions) => Promise<string>;
|
|
93
|
+
/**
|
|
94
|
+
* Local obfuscation only — NOT secure encryption. Requires an explicit secret.
|
|
95
|
+
* Never use for credentials, tokens, or PII at rest.
|
|
96
|
+
*/
|
|
97
|
+
export declare const obfuscate: (input: string, secret: string) => Promise<string>;
|
|
98
|
+
export declare const deobfuscate: (input: string, secret: string) => Promise<string>;
|
|
55
99
|
export declare const getDeviceId: () => Promise<string>;
|
|
56
|
-
|
|
57
|
-
|
|
100
|
+
/**
|
|
101
|
+
* @deprecated Use `obfuscate()` with an explicit secret, or `SecureStorage` for at-rest data.
|
|
102
|
+
*/
|
|
103
|
+
export declare const encrypt: (input: string, hardEncryption?: boolean, secretKey?: string | null) => Promise<string>;
|
|
104
|
+
/**
|
|
105
|
+
* @deprecated Use `deobfuscate()` with an explicit secret, or `SecureStorage` for at-rest data.
|
|
106
|
+
*/
|
|
107
|
+
export declare const decrypt: (input: string, hardEncryption?: boolean, secretKey?: string | null) => Promise<string>;
|
|
108
|
+
/** Hardware-backed encrypted storage (Keychain on iOS, EncryptedSharedPreferences on Android). */
|
|
58
109
|
export declare const SecureStorage: {
|
|
59
110
|
setItem: (key: string, value: string) => Promise<void>;
|
|
60
111
|
getItem: (key: string) => Promise<string | null>;
|
|
61
|
-
mergeItem: (key: string, value: string) => Promise<void>;
|
|
62
112
|
removeItem: (key: string) => Promise<void>;
|
|
63
|
-
getAllKeys: () => Promise<
|
|
64
|
-
multiSet: (keyValuePairs: Array<Array<string>>) => Promise<void>;
|
|
65
|
-
multiGet: (keys: Array<string>) => Promise<readonly [string, string | null][]>;
|
|
66
|
-
multiMerge: (keyValuePairs: Array<Array<string>>) => Promise<void>;
|
|
67
|
-
multiRemove: (keys: Array<string>) => Promise<void>;
|
|
113
|
+
getAllKeys: () => Promise<string[]>;
|
|
68
114
|
clear: () => Promise<void>;
|
|
115
|
+
multiSet: (keyValuePairs: Array<[string, string]>) => Promise<void>;
|
|
116
|
+
multiGet: (keys: string[]) => Promise<readonly [string, string | null][]>;
|
|
117
|
+
multiRemove: (keys: string[]) => Promise<void>;
|
|
118
|
+
/** @deprecated Use multiSet instead. */
|
|
119
|
+
mergeItem: (key: string, value: string) => Promise<void>;
|
|
120
|
+
/** @deprecated Use multiSet instead. */
|
|
121
|
+
multiMerge: (keyValuePairs: Array<[string, string]>) => Promise<void>;
|
|
69
122
|
};
|
|
70
123
|
export declare function fetch(url: string, options: Options, loggerIsEnabled?: boolean): Promise<SuccessResponse | ErrorResponse>;
|
|
71
124
|
export declare function deviceHasSecurityRisk(): Promise<boolean>;
|
|
72
|
-
export default
|
|
125
|
+
export default NativeSecuritySuiteModule;
|
|
73
126
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/index.tsx"],"names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