checksec is part of pwntools and can be used to examine a binary’s security settings. For example:

$ pwn checksec $(which whoami)

[*] '/run/current-system/sw/bin/whoami'
    Arch:     amd64-64-little
    RELRO:    Full RELRO
    Stack:    Canary found
    NX:       NX enabled
    PIE:      No PIE (0x400000)
    RUNPATH:  b'/nix/store/ms22nmzw84v4kgaa8zjsq9p8hwfbwyd6-acl-2.3.2/lib:/nix/store/hmvccjqnp7p9vyfhc2ffjm4rpdx513ap-attr-2.5.2/lib:/nix/store/bir81kvmpzxrck74q3dcyqyhvzgiv2rl-gmp-with-cxx-6.3.0/lib:/nix/store/9xgpmwqw0881kxa9sl498qfmzy7z2ndn-openssl-3.0.13/lib:/nix/store/35pq4hr29c3sl79lgfwgsvd9nwzyp4am-glibc-2.39-5/lib'
    FORTIFY:  Enabled