Are there any sources which suggest that somebody's Jewish status is dependent on their refraining from wrongdoing? Obviously a cherem can limit someone's involvement in the community in response to wrongdoing. But are there any texts suggesting that someone can altogether be regarded as not Jewish if they engage in [perhaps specified] wrongful conduct?
(The answer may well be 'no'. Just curious.)