Category filter

How to find the Code Requirement of an application on Mac

A code requirement is a constraint that the code must satisfy to consider it valid for some purpose. It specifies the conditions that the system must use to evaluate the code signature and determine if the code is safe to be trusted. If the code fails to satisfy the requirements during evaluation, the code signature validation fails.

You can include the code signature requirement and bundle ID for an app to allow access to protected user data. Specifying the bundle ID and code requirement enhances the security of the Privacy Preferences payload. You can fetch the code signature requirement for the app by running the codesign commands. The Execute Custom Script action lets you execute these commands as scripts from the Hexnode console.


The sample scripts provided below are adapted from third-party open-source sites.

Fetch Code Requirement of an app

Run this command to find the code requirement of an app installed on the Mac:

For example:

Replace the “path/Bundle ID” with the path or Bundle Identifier of the app. You can find the code requirement starting after the text “designated =>”

Fetch code requirement using custom script


  • It is recommended to manually validate the script execution on a system before executing the action in bulk.
  • Hexnode will not be responsible for any damage/loss to the system on the behavior of the script.

  • Sample Script Repository