Use Cursor hooks to check brin before installing packages or browsing the web
Cursor's hooks system lets you intercept agent actions before they execute. Use the beforeShellExecution hook to check brin whenever the agent installs a package.
The hook uses curl response headers (x-brin-verdict, x-brin-score) for a lightweight check — no JSON parsing needed. If the verdict is suspicious or dangerous, the command is blocked and the agent is told why.
If brin is unreachable, the hook allows the command through.