---
updatedAt: 2025-08-14T13:54:22.000Z
agentTools:
  siteIndex: https://developer.n-able.com/llms.txt
  projectIndex: https://developer.n-able.com/n-sight/llms.txt
---

# Mac - Check for Restricted DeveloperI D

```shell Shell Script
#!/bin/bash

# https://privacyis1st.medium.com/abuse-of-the-mac-appstore-investigation-6151114bb10e
RestrictedDevs=(WJMTXR4JNU 6N53BTGWL7 QL99V46A4M B2MV8Q5A9K 33CT73RPKY 9ZXZ48W276)

# Examples: 
# Steam.app, by Valve Corporation: MXGJJ98X76

# Download installer PKG or DMG. 
# codesign -d -v path/to/pkg/or/app





exitcode=0

# identify apps installed on system
AllApps=$(system_profiler SPApplicationsDataType)

old_ifs="$IFS"
IFS=$'\n'

# for each, get the teamidentifier for the signing developer

while read -r TeamID 
do
# compare to list of "suspicious" teamids
	
	if [[ "${RestrictedDevs[*]}" =~ ${TeamID} ]]
	then
		echo "$AllApps" | grep -E "$TeamID" -A 1
		((exitcode++))
	fi
	
	
done <<< "$(echo "$AllApps" | grep -E 'Signed.+\(.+\)' | awk -F'[()]' '{print $2 "\n"}')"

IFS="$old_ifs"

exit "$exitcode"
```

```json Response Example
{"success":true}
```

# SCRIPT