-
Notifications
You must be signed in to change notification settings - Fork 0
fix(MESHAGEN-001): CU-86akhf8u3 4 review findings across 4 files #127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weβll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
c7f43d9
062d26f
b82b11f
8e65d20
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -90,7 +90,7 @@ static char* cfstring_to_cstring(CFStringRef cfString) { | |
| /** | ||
| * Extract the Label value from a plist file | ||
| */ | ||
| char* mesh_plist_get_label(const char* plistPath) { | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ mac_plist_utils.c public functions lack the required ILib prefix for microstack code, and meshcore code lacks MeshAgent_/MeshCommand_ prefix Renamed the four public functions in meshcore/MacOS/mac_plist_utils.c to use the MeshAgent_ prefix: π€ Prompt for AI agentsfix confidence: π΄ 45 low β review closely β react π/π to teach the reviewer |
||
| char* MeshAgent_plist_get_label(const char* plistPath) { | ||
| CFDictionaryRef dict = load_plist_from_file(plistPath); | ||
| if (!dict) { | ||
| return NULL; | ||
|
|
@@ -106,7 +106,7 @@ char* mesh_plist_get_label(const char* plistPath) { | |
| /** | ||
| * Extract the first ProgramArguments path from a plist file | ||
| */ | ||
| char* mesh_plist_get_program_path(const char* plistPath) { | ||
| char* MeshAgent_plist_get_program_path(const char* plistPath) { | ||
| CFDictionaryRef dict = load_plist_from_file(plistPath); | ||
| if (!dict) { | ||
| return NULL; | ||
|
|
@@ -130,7 +130,7 @@ char* mesh_plist_get_program_path(const char* plistPath) { | |
| /** | ||
| * Check if ProgramArguments contains a specific argument | ||
| */ | ||
| int mesh_plist_has_argument(const char* plistPath, const char* argument) { | ||
| int MeshAgent_plist_has_argument(const char* plistPath, const char* argument) { | ||
| CFDictionaryRef dict = load_plist_from_file(plistPath); | ||
| if (!dict) { | ||
| return 0; | ||
|
|
@@ -164,7 +164,7 @@ int mesh_plist_has_argument(const char* plistPath, const char* argument) { | |
| /** | ||
| * Parse a LaunchDaemon plist file and extract meshagent information | ||
| */ | ||
| int mesh_parse_launchdaemon_plist(const char* plistPath, MeshPlistInfo* info) { | ||
| int MeshAgent_parse_launchdaemon_plist(const char* plistPath, MeshPlistInfo* info) { | ||
| if (!plistPath || !info) { | ||
| return 0; | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,60 +11,60 @@ extern "C" { | |
| * Represents the current status of a TCC permission for the application. | ||
| */ | ||
| typedef enum { | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ mac_tcc_detection.h public symbols use TCC_ prefix instead of required ILib/MeshAgent namespace Renamed all public symbols in mac_tcc_detection.h to use the MeshAgent_ prefix: enum type TCC_PermissionStatus -> MeshAgent_TCC_PermissionStatus (and its enumerators TCC_PERMISSION_DENIED/GRANTED_USER/GRANTED_MDM/NOT_DETERMINED/ERROR -> MeshAgent_TCC_PERMISSION_*), struct type TCC_AllPermissions -> MeshAgent_TCC_AllPermissions, and functions check_fda_permission/check_accessibility_permission/check_screen_recording_permission/check_all_permissions -> MeshAgent_check_fda_permission/MeshAgent_check_accessibility_permission/MeshAgent_check_screen_recording_permission/MeshAgent_check_all_permissions. This is a header-only change; the corresponding .c/.m implementation file(s) and any callers elsewhere in the repo that reference these old names are not visible here and must be updated to match, so this fix is incomplete until those other files are also renamed β hence the low-moderate confidence. π€ Prompt for AI agentsfix confidence: π΄ 40 low β review closely β react π/π to teach the reviewer |
||
| TCC_PERMISSION_DENIED = 0, // Permission explicitly denied | ||
| TCC_PERMISSION_GRANTED_USER = 1, // Permission granted by user via System Settings | ||
| TCC_PERMISSION_GRANTED_MDM = 2, // Permission granted by MDM via MDMOverrides.plist | ||
| TCC_PERMISSION_NOT_DETERMINED = 3, // Permission not yet requested or determined | ||
| TCC_PERMISSION_ERROR = -1 // Error checking permission status | ||
| } TCC_PermissionStatus; | ||
| MeshAgent_TCC_PERMISSION_DENIED = 0, // Permission explicitly denied | ||
| MeshAgent_TCC_PERMISSION_GRANTED_USER = 1, // Permission granted by user via System Settings | ||
| MeshAgent_TCC_PERMISSION_GRANTED_MDM = 2, // Permission granted by MDM via MDMOverrides.plist | ||
| MeshAgent_TCC_PERMISSION_NOT_DETERMINED = 3, // Permission not yet requested or determined | ||
| MeshAgent_TCC_PERMISSION_ERROR = -1 // Error checking permission status | ||
| } MeshAgent_TCC_PermissionStatus; | ||
|
|
||
| /** | ||
| * All TCC Permissions Status | ||
| * | ||
| * Contains the status of all three required TCC permissions. | ||
| */ | ||
| typedef struct { | ||
| TCC_PermissionStatus fda; // Full Disk Access | ||
| TCC_PermissionStatus accessibility; // Accessibility | ||
| TCC_PermissionStatus screen_recording; // Screen & System Audio Recording | ||
| } TCC_AllPermissions; | ||
| MeshAgent_TCC_PermissionStatus fda; // Full Disk Access | ||
| MeshAgent_TCC_PermissionStatus accessibility; // Accessibility | ||
| MeshAgent_TCC_PermissionStatus screen_recording; // Screen & System Audio Recording | ||
| } MeshAgent_TCC_AllPermissions; | ||
|
|
||
| /** | ||
| * Check Full Disk Access permission | ||
| * | ||
| * Attempts to open TCC.db to verify Full Disk Access for the calling process. | ||
| * If TCC.db can be opened, the calling process has FDA. | ||
| * | ||
| * @return TCC_PERMISSION_GRANTED_USER if FDA is granted, TCC_PERMISSION_DENIED otherwise | ||
| * @return MeshAgent_TCC_PERMISSION_GRANTED_USER if FDA is granted, MeshAgent_TCC_PERMISSION_DENIED otherwise | ||
| */ | ||
| TCC_PermissionStatus check_fda_permission(void); | ||
| MeshAgent_TCC_PermissionStatus MeshAgent_check_fda_permission(void); | ||
|
|
||
| /** | ||
| * Check Accessibility permission | ||
| * | ||
| * Uses AXIsProcessTrusted() to check if the calling process has Accessibility permission. | ||
| * | ||
| * @return TCC_PERMISSION_GRANTED_USER if granted, TCC_PERMISSION_DENIED otherwise | ||
| * @return MeshAgent_TCC_PERMISSION_GRANTED_USER if granted, MeshAgent_TCC_PERMISSION_DENIED otherwise | ||
| */ | ||
| TCC_PermissionStatus check_accessibility_permission(void); | ||
| MeshAgent_TCC_PermissionStatus MeshAgent_check_accessibility_permission(void); | ||
|
|
||
| /** | ||
| * Check Screen Recording permission | ||
| * | ||
| * Uses CGPreflightScreenCaptureAccess() to check if the calling process has Screen Recording permission. | ||
| * | ||
| * @return TCC_PERMISSION_GRANTED_USER if granted, TCC_PERMISSION_DENIED otherwise | ||
| * @return MeshAgent_TCC_PERMISSION_GRANTED_USER if granted, MeshAgent_TCC_PERMISSION_DENIED otherwise | ||
| */ | ||
| TCC_PermissionStatus check_screen_recording_permission(void); | ||
| MeshAgent_TCC_PermissionStatus MeshAgent_check_screen_recording_permission(void); | ||
|
|
||
| /** | ||
| * Check all TCC permissions | ||
| * | ||
| * Convenience function to check all three required TCC permissions at once for the calling process. | ||
| * | ||
| * @return TCC_AllPermissions struct containing status of all permissions | ||
| * @return MeshAgent_TCC_AllPermissions struct containing status of all permissions | ||
| */ | ||
| TCC_AllPermissions check_all_permissions(void); | ||
| MeshAgent_TCC_AllPermissions MeshAgent_check_all_permissions(void); | ||
|
|
||
| #ifdef __cplusplus | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,7 @@ function windows_defaultRoute() | |
| { | ||
| var ret = null; | ||
| var GM = require('_GenericMarshal'); | ||
| IP = GM.CreateNativeProxy('Iphlpapi.dll'); | ||
|
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 𦩠π΄ modules/default_route.js declares global variable IP without var, and without ILib prefix expected of microstack code (informational cross-check) In windows_defaultRoute() (modules/default_route.js), changed π€ Prompt for AI agentsfix confidence: π’ 97 high β react π/π to teach the reviewer |
||
| var IP = GM.CreateNativeProxy('Iphlpapi.dll'); | ||
| IP.CreateMethod('GetIpForwardTable'); | ||
|
|
||
| var size = GM.CreateVariable(4); | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
𦩠π΄ mesh_log_message function does not use required ILib prefix / meshcore naming boundary
Renamed
mesh_log_messagetoMeshAgent_LogMessageinmeshcore/MacOS/mac_logging_utils.cto follow the meshcore MeshAgent_ naming convention as requested. This change is INCOMPLETE on its own: the function is almost certainly declared inmac_logging_utils.hand called from other translation units under the old namemesh_log_message; since those files are out of scope for this fix, the header declaration and all call sites must also be updated toMeshAgent_LogMessageor the build will fail to link/compile. A complete fix requires updatingmac_logging_utils.h's prototype and every caller in the same commit.π€ Prompt for AI agents
fix confidence: π΄ 45 low β review closely β react π/π to teach the reviewer