I'm trying to find a word meaning "you can't do that" or "you're not allowed".

I thought of impossibility but I do not want it in the sense of being impossible, but in the sense of not being allowed to.

Context:

The Sneak Out automatically provides you with a guilty conscience and the impossibility of telling people who you saw.


Solution 1:

In your case I'd go with inability.

inability (n): lack of ability; lack of power, capacity, or means: his inability to make decisions

Solution 2:

The adjective forbidden means:

not allowed; prohibited: a forbidden food in his religion.

The noun form of this is forbiddenness. Another option (which is synonymous) is prohibition.

Solution 3:

With some reorganization of your sentence, you can use words like faux pas, verboten, taboo, forbidden, and gauche.

For example: "... and then it would be verboten / gauche / taboo / socially forbidden / a faux pas / a gaffe to reveal who you saw."