<div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, Aug 30, 2015 at 9:28 PM, Paul Schwendenman <span dir="ltr"><<a href="mailto:schwendenman.paul@gmail.com" target="_blank">schwendenman.paul@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">Hi All:<div><br></div><div>I was wondering how you identify passwords that haven't been changed in a while. </div><div><br></div><div>Maybe someone has a better solution but this is what I came up with:</div><div><br></div><div><div>git ls-tree -r HEAD --name-only -z | xargs -0 -n1 -I{} sh -c 'echo {}; \</div><div>   git log -n1 --format="%at:%ar" -- {}' | paste - - -d: | sort -k 2 -t: | \</div><div>   cut -d: -f1,3- | column -t -s:</div></div><div><br></div><div>My solution is mildly naive because it doesn't look for changes to the first line, which is where passwords are normally stored.  But for my use I think it does the job.</div><div><br></div><div>Is this a feature that people might want built in to pass? If so, I would be willing to try making and submitting a patch. Also I would enjoy any feedback you might have.</div><div><br></div><div>Thanks for reading,</div><div>Paul</div></div>
</blockquote></div><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Out of curiosity I tweaked the line to check git blame for the last commit to change the first line</div><div class="gmail_extra"><br></div><div class="gmail_extra"> git ls-tree -r HEAD --name-only -z | xargs -0n1 -I{} sh -c 'echo {}; git blame -L 1,1 -- {}' | \</div><div class="gmail_extra">sed 's/\^//g' | paste - - -d, | cut -f1 -d" " | awk 'BEGIN{FS=",";OFS=",";} {print $2,$1}' | \</div><div class="gmail_extra">sed 's/,/ -- /' | xargs -n3 -I{} sh -c 'echo {}; git log -n1 --format="%at:%ar" {}' | \</div><div class="gmail_extra">paste - - -d: | cut -f 3- -d" " | sort -k 2 -t: | cut -d: -f1,3- | column -t -s:</div><div class="gmail_extra"><br></div><div class="gmail_extra">Note: you will have to configure git to use gpg with blame</div><div class="gmail_extra"><div class="gmail_extra">git config --local blame.gpg.binary true</div><div class="gmail_extra">git config --local blame.gpg.textconv "gpg -d --quiet --yes --compress-algo=none --no-encrypt-to"</div></div><div class="gmail_extra"><br></div></div>