Git-Hooks

 view release on metacpan or  search on metacpan

scripts/find-secret-leakage-in-git-diff.pl  view on Meta::CPAN


  my $aws_access_key = 'AKIA1234567890ABCDEF'; ## not a secret leak

The mark is the string C<## not a secret leak>. The two hashes are part of it!

Sometimes you can't put the mark in the same line. Lines beginning private keys,
for example, do not have room for anything else. In these cases you can skip a
whole block marking its beginning and end like this:

  ## not a secret leak begin
  my $rsa_private_key = <<EOS;
  -----BEGIN RSA PRIVATE KEY-----
  izfrNTmQLnfsLzi2Wb9xPz2Qj9fQYGgeug3N2MkDuVHwpPcgkhHkJgCQuuvT+qZI
  MbS2U6wTS24SZk5RunJIUkitRKeWWMS28SLGfkDs1bBYlSPa5smAd3/q1OePi4ae
  <...>
  8S86b6zEmkser+SDYgGketS2DZ4hB+vh2ujSXmS8Gkwrn+BfHMzkbtio8lWbGw0l
  eM1tfdFZ6wMTLkxRhBkBK4JiMiUMvpERyPib6a2L6iXTfH+3RUDS6A==
  -----END RSA PRIVATE KEY-----
  EOS
  ## not a secret leak end



( run in 0.371 second using v1.01-cache-2.11-cpan-a5abf4f5562 )