If your GSD is eating poop from your cat's litter box, make sure you keep it clean.
Give your GSD a proper diet that includes digestive enzymes and probiotics.
Make sure your German Shepherd is eating the best dog food available.
Do not let your dog be bored because many GSDs will eat their own feces when bored.