be in imminent danger of punishment or other trouble.
Here's a sentence using "be for it" to convey imminent danger of punishment or trouble:
The reckless driver was weaving through traffic, clearly about to be for it if a cop spotted him.
This sentence implies the driver's actions will surely lead to trouble (getting pulled over) if a police officer sees him.