Skip to content

feat(rules,cli): security/tls-certificate key and certificate options #1259 - #1402

Closed
nc9 wants to merge 3 commits into
mainfrom
feat/tls-key-options-1259
Closed

nc9 wants to merge 3 commits into
mainfrom
feat/tls-key-options-1259

Conversation

@nc9

@nc9 nc9 commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Refs #1259 (PR 2 of 2; the start-URL report is #1401)

Spike first, as the issue asks: on the pinned Bun the probe reads the leaf's key type, size and signature algorithm (X509Certificate on the peer's DER) and the negotiated protocol (getProtocol()). All seven options ship. What the runtime cannot reach is stated in the docs, the CHANGELOG and the option text:

  • Bun's client refuses below TLS 1.2, so a server that only speaks TLS 1.0 or 1.1 is not checked (a handshake alert), never a protocol warning. With the default min_tls_version = TLSv1.2 the protocol check cannot fire; only TLSv1.3 against a server that tops out at TLS 1.2 warns.

  • Ed25519, Ed448, DSA, RSA-PSS, P-521 and secp256k1 leaves fail Bun's handshake, so live those sites are not checked; the key naming and key_types handling for them are covered by fact-based tests only. RSA and ECDSA P-256/P-384 are judged live.

  • Options under [rule_options."security/tls-certificate"], each validated (the option named in the error): key_types, rsa_min_bits, ecdsa_min_bits, dsa_min_bits, reject_weak_signature, min_tls_version, check_counterpart. warn_days, error_days and their check are unchanged.

  • tls-certificate-key names the type and size and warns on a disallowed type or size under the minimum; new tls-certificate-signature (leaf only) and tls-certificate-protocol. No new rule id; meta is unchanged (its solution text is still accurate).

  • Tests: 10 rule tests, a rule-stage test through rule_options (config reaches all three checks and the counterpart switch), a real-handshake probe test (RSA 2048 and 1024, P-256, SHA-256 signature, protocol), utils key facts.

  • Docs: checks, options with defaults and limits, a squirrel.toml example. CHANGELOG. Skill change: none. Conflicts with fix(cli): a broken start-URL certificate is reported as security/tls-certificate failing #1259 #1401 only in CHANGELOG (keep both bullets).

nik

nc9 added 3 commits October 31, 2026 11:19
…zes, weak signature, minimum protocol and counterpart options; key check names type and size #1259

Signed-off-by: Nik Cubrilovic <[email protected]>
…519, DSA, RSA-PSS, P-521); key message wording; pipeline test for the new checks #1259

Signed-off-by: Nik Cubrilovic <[email protected]>
@nc9

nc9 commented Oct 31, 2026

Copy link
Copy Markdown
Contributor Author

Landed in v0.0.147 as 19d3bbec 6a2c8f85 c8181e1b via #1412. Release: https://github.com/squirrelscan/squirrelscan/releases/tag/v0.0.147. Closing this original.

nik

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant