I also recently saw a bash parser/analyser/runner written in go. Might use that to static analyse run_command() type invocations to do RBAC - like imagine a policy that says run command but this user can't pipe output to anything etc (probsbly bad example but you get the idea)