4:7

הֲלוֹא אִם־תֵּיטִיב שְׂאֵת וְאִם לֹא תֵיטִיב לַפֶּתַח חַטָּאת רֹבֵץ וְאֵלֶיךָ תְּשׁוּקָתוֹ וְאַתָּה תִּמְשָׁל־בּוֹ׃

Surely, if you do good, you will be lifted up. And if you do not do good, sin crouches at the door. Its desire is for you, but you can rule over it."

Bereshit 4:7

הֲלוֹא אִם־תֵּיטִיב שְׂאֵת

Bereshit / Genesis 4:7 · Pshat

Bereshit 4:7

הֲלוֹא אִם־תֵּיטִיב שְׂאֵת וְאִם לֹא תֵיטִיב לַפֶּתַח חַטָּאת רֹבֵץ וְאֵלֶיךָ תְּשׁוּקָתוֹ וְאַתָּה תִּמְשָׁל־בּוֹ׃

Surely, if you do good, you will be lifted up. And if you do not do good, sin crouches at the door. Its desire is for you, but you can rule over it."

Pshat פְּשָׁט

Sin lies at the door

You know the feeling: something in you keeps pulling the wrong way. The verse calls it "sin that lies at the door", and Rashi says plainly who that is.

Rashi reads "sin lies at the door" as "at the door of your grave your sin is kept", and "its desire is towards you" as the evil inclination (יֵצֶר הָרָע), which always longs to make you stumble. "And you shall rule over it": if you wish, you will overcome it. Sforno adds the words of the sages: a person's evil inclination gets the better of him every day, and were the Holy One, blessed is He, not helping him, he could not manage it. But a person can rule over it by the power of the image of the Almighty in him.

How Rashi and Sforno explain it

Rashi Sin lies at the door

At the door of your grave your sin is kept.

And its desire is towards you.
The desire of sin: this is the evil inclination (יֵצֶר הָרָע), it always longs and craves to make you stumble.

And you shall rule over it.
If you wish, you will overcome it.

Sforno And its desire is towards you

Because you turn to it to fulfil its cravings, as the sages of blessed memory said: "a person's inclination gets the better of him every day" (Sukkah 52b).

And you shall rule over it.
It is in your hand to rise against it by the power of the image of the Almighty, as they said: "and were the Holy One, blessed is He, not helping him, he could not manage it", as it is said: "the Eternal will not leave him in his hand" (Tehillim / Psalms 37:33).

Takeaway

"At the door of your grave": Rashi takes "door" (פֶּתַח) as the door of the grave. Sin waits for a person where his life ends, until the judgement.
The evil inclination (יֵצֶר הָרָע) and the good inclination (יֵצֶר טוֹב): the two urges in a person in the teaching of the sages. Of their two letters yod (י) in the word "and He formed" Kitzur Ba'al HaTurim speaks on Bereshit / Genesis 2:7.
The words of the sages that Sforno brings stand together in the Talmud: "a person's evil inclination gets the better of him every day and seeks to kill him, and were the Holy One, blessed is He, not helping him, he could not manage it" (Sukkah 52b).
"The Eternal will not leave him in his hand": a verse about the righteous man whom the wicked lies in wait for (Tehillim / Psalms 37:33). The Talmud reads "the wicked" as the evil inclination.