Add a "Threat Model" section to SECURITY.md that describes the security goals of the library and the resulting vulnerability reporting policy, i.e. which issues should be reported privately and which can be handled as regular public issues. Link it from README.md and CONTRIBUTING.md.
So far, the security goals of the library were only documented implicitly, spread over the README, API docs and past review discussions. Writing them down in one place should help contributors, reviewers and reporters to decide what counts as a vulnerability and how to report it.
A further motivation is automated LLM-based vulnerability finding (e.g. Bitcoin Red Team, Project Loupe, and Anthropic's OSS scanner program, in whch we will enroll): such programs need a written definition of what is in scope and what is considered a security issue, in order to produce relevant findings and to route them to the right channel (private report vs. public issue).
The tested configurations and build modes listed in the reporting policy reflect what CI currently covers and need to be kept in sync with it.
Thanks to real-or-random and sipa for discussions and input. Further feedback is highly appreciated, in particular on the reporting matrix, which in its current state could be replaced by a few sentences, since the columns only differ in one row.