Block access to credential files (*.env, *.env.local) to prevent AI exposure

Theory and practice differ. I could easily check the traffic using a proxy. It is sent via plaintext to the count token endpoint (and probably in binary form in several other requests, but it seems to use protobuff or something similar for communication).

Here is me triggering a Chat (which automatically added the .env file as context)

User Rule:

User Rule + Your suggested project rule


2 Likes