Skip to content

Commit

Permalink
init add of Xamarin rules (#824)
Browse files Browse the repository at this point in the history
* init add of Xamarin rules

* Update and rename get-system-information-in-dotnet-on-android.yml to get-os-version-in-dotnet-on-android.yml
  • Loading branch information
mike-hunhoff authored Nov 22, 2023
1 parent 533577f commit 20d2218
Show file tree
Hide file tree
Showing 8 changed files with 78 additions and 0 deletions.
2 changes: 2 additions & 0 deletions communication/socket/tcp/create-tcp-socket.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ rule:
- [email protected]
- [email protected]
- [email protected]
- [email protected]
scope: basic block
mbc:
- Communication::Socket Communication::Create TCP Socket [C0001.011]
Expand All @@ -21,4 +22,5 @@ rule:
- api: ws2_32.socket
- api: ws2_32.WSASocket
- api: socket
- api: System.Net.Sockets.Socket::ctor
- property/read: System.Net.Sockets.TcpClient::Client
10 changes: 10 additions & 0 deletions nursery/access-camera-in-dotnet-on-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
rule:
meta:
name: access camera in .NET on Android
namespace: host-interaction/hardware/camera
authors:
- [email protected]
scope: function
features:
- or:
- api: Android.Hardware.Camera::Open
13 changes: 13 additions & 0 deletions nursery/capture-microphone-audio-in-dotnet-on-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
rule:
meta:
name: capture microphone audio in .NET on Android
namespace: collection/microphone
authors:
- [email protected]
scope: function
features:
- and:
- api: Android.Media.AudioRecord::StartRecording
- optional:
- api: Android.Media.AudioRecord::Release
- api: Android.Media.AudioRecord::Stop
10 changes: 10 additions & 0 deletions nursery/capture-screenshot-in-dotnet-on-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
rule:
meta:
name: capture screenshot in .NET on Android
namespace: collection/screenshot
authors:
- [email protected]
scope: function
features:
- or:
- api: Android.Media.Projection.MediaProjectionManager::CreateScreenCaptureIntent
12 changes: 12 additions & 0 deletions nursery/check-for-incoming-call-in-dotnet-on-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
rule:
meta:
name: check for incoming call in .NET on Android
namespace: host-interaction
authors:
- [email protected]
scope: function
features:
- and:
- property/read: Android.Content.Intent::Action
- string: "android.intent.action.PHONE_STATE"
- property/read: Android.Telephony.TelephonyManager::ExtraStateRinging
11 changes: 11 additions & 0 deletions nursery/check-for-outgoing-call-in-dotnet-on-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
rule:
meta:
name: check for outgoing call in .NET on Android
namespace: host-interaction
authors:
- [email protected]
scope: function
features:
- and:
- property/read: Android.Content.Intent::Action
- string: "android.intent.action.NEW_OUTGOING_CALL"
10 changes: 10 additions & 0 deletions nursery/compiled-with-xamarin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
rule:
meta:
name: compiled with Xamarin
namespace: compiler/xamarin
authors:
- [email protected]
scope: file
features:
- or:
- namespace: Xamarin.Essentials
10 changes: 10 additions & 0 deletions nursery/get-os-version-in-dotnet-on-android.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
rule:
meta:
name: get OS version in .NET on Android
namespace: host-interaction/os/info
authors:
- [email protected]
scope: function
features:
- and:
- class: Android.OS.Build

0 comments on commit 20d2218

Please sign in to comment.