This file configures Claude Code Review, the automated reviewer started with @claude review. “Important” and “Nit” are its severity labels: Important (🔴) marks security issues only, and Nit (🟡) marks everything else, including functional bugs that still need fixing. They are not a ranking for human reviewers.
Every review covers, in this order of priority:
STYLE.md and DOCUMENTATION.md at the repository root.Reserve Important for security issues: problems an attacker can trigger through untrusted input, such as a TLS or QUIC peer, a certificate, key or message being parsed, or a file or network stream, and problems that break a security property: memory safety, secrecy of keys and secrets, authentication or verification results, constant-time behaviour, or enforcement of mandatory properties such as fips=yes. The first sentence of an Important finding names the bug. The second says who can trigger it and what they gain.
Functional bugs, behaviour changes, performance regressions, misuse of a public API by the calling application, and STYLE.md and DOCUMENTATION.md violations are Nit at most, however likely they are to cause failures. Start each Nit with its kind, such as “Functional:”, “Performance:” or “Documentation:”.
Each finding states the inputs or state that trigger it and what goes wrong, with a path/from/root.c:line citation for every claim about code outside the diff. Read the callee before claiming what it returns or who owns its result. A bug finding that cannot name a trigger is not reported. Style, documentation and compatibility findings cite the rule or the manual page instead.
return in a function that otherwise uses goto err usually leaks.err: or end: label only touches objects that are initialised on every path reaching it.sk_*_push(), *_set0_*() and *_add0_*() take ownership only on success. set1 and add1 take a new reference or a copy; the caller keeps its own. Read the callee to see which. State who frees the object on success and on failure, and check the pointer is set to NULL after a transfer.OPENSSL_free(). dup and free functions cover every new owned field; a struct-copying dupctx must not alias owned pointers.*_free() functions accept NULL; a NULL guard before calling one is redundant. Read an internal free function before assuming the same.ASN1_TYPE, CHOICE or union member is preceded by a check of the discriminant on the same object (->type, the ptype from X509_ALGOR_get0()). Never select the member by what the caller expects.NULL before use, including X509_ALGOR->parameter. Use the ASN.1 template (ASN1_OPT, ASN1_EXP_OPT), not the RFC text, to find which fields are optional.remaining >= N holds. Prefer PACKET and WPACKET helpers to hand-written length handling.+ 1 for a terminator, and size_t to int conversions are checked against INT_MAX.int-returning sizes such as EVP_MD_get_size() are checked for <= 0 before use as size_t. Such a check must not reject inputs the manual page allows: where a NULL digest is valid, do not pass it to EVP_MD_get_size(), which fails on NULL.<= 0 for failure.ret through every new label. A function that raises an error returns failure, and a success path does not fall into error reporting.assert() disappears in release builds.SSL_SESSION, before it is verified. Verification results are reset on every failure path.*_TRUSTOTHER are not applied to peer-supplied certificate sets.OPENSSL_PEDANTIC_ZEROIZATION; that macro is only for non-secret data such as salts.EVP_Cipher() one-shot and update/final; assembly and generic code; check, generate and verify entry points. Zero-length input does not skip finalisation.PARTIAL_CHAIN, QUIC without address validation) keeps every invariant that consumers of the default path rely on, such as a certificate being present.Treat “mechanical” changes as semantic ones.
#if lines.const qualifiers are compared against its manual page. Say which existing callers break.openssl-*), a behaviour change or large refactor is a finding.EVP_get_digestbyname().update, final and get_params handle that.ossl_prov_is_running() is checked at operation entry points. Do not add new checks on per-update paths; existing ones are not a finding.OPENSSL_NO_* or platform conditions they need..rodata.extern "C" guards. Inline functions in public headers use ossl_inline.TEST_* result is acted on, assertions check expected values, and negative tests fail for the reason they claim.Report per-call allocation, locking or repeated lookups added to hot paths, such as per-record or per-update code.
Read STYLE.md and DOCUMENTATION.md and report violations in lines the pull request adds or changes. Each finding cites the section it violates.
CHANGES.md entry or comment inaccurate updates it.doc/man3 with a HISTORY entry naming the release, and are removed from util/missingcrypto*.txt or util/missingssl*.txt if listed. Public manual pages do not describe internal functions.doc/man1, and new Configure options in INSTALL.md.CHANGES.md entry written for users.DOCUMENTATION.md requires, unless trivial.NULL. Magic numbers are named or explained.Write like a maintainer reviewing a colleague's patch. Start with what is wrong in this diff, address the author directly, and say each fact once. Give the trigger and the fix in plain sentences. No preamble, no restating, no closing summary. Do not relate a finding to other findings unless fixing one changes the other.
Cite a location once, where it matters, always as the full path from the repository root with the line number, such as crypto/evp/evp.c:4312. For several lines in one file, give the path once: crypto/evp/evp.c:4312, 4350, 4401 for separate lines, crypto/evp/evp.c:4312-4330 for a block. Never use a bare file name.
Report at most ten non-functional Nits per review. Functional Nits and Important findings are not limited.
make doc-nits, make md-nits, no-deprecated build failures, FIPS checksum changes.STYLE.md and DOCUMENTATION.md non-conformance in code the pull request does not touch.make update. The update rule in Configurations/unix-Makefile.tmpl lists the targets that write them.