authd/taskgated error -67050/-67062 on MacOS High Sierra
This error occurs when unsigned code is run.  The taskgated process is the one checking if the executable is signed.  In order to check, it must open the file.  So to track down what is being opened by the process you can use dtruss (you may have install the Xcode command line tools to get it).  Just create the following file named unsigned.pl:
#!/usr/bin/perl

use strict;
use warnings;

open my $fh, &quot;-|&quot;, &quot;dtruss -p `ps -ef | grep taskgated | grep -v grep | awk '{print \$2}'` -t open 2&gt;&amp;1&quot;;

while (my $line = &lt;$fh&gt;) {
        my ($file) = $line =~ /open\(&quot;(.*)\\0&quot;/;

        next unless defined $file and -f $file;

        my $signed = qx/codesign -dvvv &quot;$file&quot;/;

        print $signed;
}

Which can be run like this:
sudo perl unsigned.pl
and it will spit out lines like
/path/to/executable: code object is not signed at all

You can then create a self signed cert with Keychain Access:

launch the Keychain Access app
go to Keychain Access &gt; Certificate Assistance &gt; Create a Certificate...
set the name to something like codesigner
set the certificate type to Code Signing
create the cert

Once you have a self-signed cert you can sign the executables in the terminal with
codesign -s codesigner /path/to/executable

Note: you will see a lot of examples using -f, but that forces it to be resigned with the new cert.  If you have lost access to the cert, or if the cert has expired, that might be necessary, but I try to avoid it.