Without knowing any further feedback information which “bad traffic” and what you’d like to do with it, I can only suggest you the useful and helpful posts and articles related to your question.
At first, try enabling the Browser Integrity Check and Bot Fight Mode option at the Cloudflare dashboard. Make sure your DNS records are proxied under the DNS tab of Cloudflare dashboard.
Nevertheless, we can enable the various of Security options at Cloudflare dashboard which can help us in this case. Kindly see more by reading Cloudflare articles which contain a lot of helpful information for better understanding and usage as well in terms of Security and Protection: