System binaries don't have the hardened flag set, but still receive the same protections from task_for_pid
at least.
$ codesign -dvvv --entitlements - /usr/bin/w
Executable=/usr/bin/w
Identifier=com.apple.w
Format=Mach-O universal (x86_64 arm64e)
CodeDirectory v=20400 size=580 flags=0x0(none) hashes=13+2 location=embedded # Notice that no flags are set
Platform identifier=13
Hash type=sha256 size=32
CandidateCDHash sha256=f07e2b264c5db1f915652db1e62de3c59a489134
CandidateCDHashFull sha256=f07e2b264c5db1f915652db1e62de3c59a4891348c78deae6948aad86cb16365
Hash choices=sha256
CMSDigest=f07e2b264c5db1f915652db1e62de3c59a4891348c78deae6948aad86cb16365
CMSDigestType=2
CDHash=f07e2b264c5db1f915652db1e62de3c59a489134
Signature size=4442
Authority=Software Signing
Authority=Apple Code Signing Certification Authority
Authority=Apple Root CA
Signed Time=Jun 17, 2022 at 18:47:28
Info.plist=not bound
TeamIdentifier=not set
Sealed Resources=none
Internal requirements count=1 size=60
$ lldb /usr/bin/w
(lldb) target create "/usr/bin/w"
Current executable set to '/usr/bin/w' (x86_64).
(lldb) r
error: process exited with status -1 (attach failed (Not allowed to attach to process. Look in the console messages (Console.app), near the debugserver entries, when the attach failed. The subsystem that denied the attach permission will likely have logged an informative message about why it was denied.))
macOSTaskPolicy: (com.apple.debugserver) may not get the task control port of (w) (pid: 7651): (w) is hardened, (w) doesn't have get-task-allow, (com.apple.debugserver) is a declared debugger(com.apple.debugserver) is not a declared read-only debugger
These should probably be excluded from the output.