You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(ssl): update assertions to the property-scoped grammar
Rewrites the SSL assertion docs from the flat 14-source model to the new
{ source, property } grammar: CERTIFICATE / CONNECTION (property = field
selector) + RESPONSE_TIME / JSON_RESPONSE / TEXT_RESPONSE, and the CLI
SslAssertionBuilder to certificate()/connection()/responseTime()/
jsonResponse()/textResponse(). Drops the removed GREATER_THAN_OR_EQUAL /
MATCHES operators.
Note: api-reference/openapi.json (generated from the backend OpenAPI) will
pick up the new assertion enums when the backend change is published.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013AYwkvoaANQTH5dGStbBj2
|`keySizeBits()`|`KEY_SIZE_BITS`| number | Leaf certificate public key size in bits |
293
-
|`issuerCn()`|`ISSUER_CN`| string | Common name of the certificate issuer |
294
-
|`certFingerprintSha256()`|`CERT_FINGERPRINT_SHA256`| string | SHA-256 fingerprint of the leaf certificate |
295
-
|`issuerFingerprintSha256()`|`ISSUER_FINGERPRINT_SHA256`| string | SHA-256 fingerprint of the issuer |
296
-
|`sanContains()`|`SAN_CONTAINS`| string | Any SAN matches the given value |
297
-
|`ocspStapled()`|`OCSP_STAPLED`| boolean | A stapled OCSP response was included in the handshake |
298
-
|`handshakeTimeMs()`|`HANDSHAKE_TIME_MS`| number | TLS handshake duration in milliseconds |
280
+
Define `assertions` using the `SslAssertionBuilder`. Five entry points map to the assertion sources — `certificate`/`connection` take a `property` (a field selector); `jsonResponse`/`textResponse` take a JSONPath/regex:
281
+
282
+
| Builder | Source | Description |
283
+
|---------|--------|-------------|
284
+
|`certificate(property)`|`CERTIFICATE`| Assert on a leaf-certificate field |
285
+
|`connection(property)`|`CONNECTION`| Assert on a TLS handshake / connection field |
286
+
|`responseTime()`|`RESPONSE_TIME`| TLS handshake duration in milliseconds |
287
+
|`jsonResponse(jsonPath)`|`JSON_RESPONSE`| Assert on any response field via a JSONPath expression |
288
+
|`textResponse(regex?)`|`TEXT_RESPONSE`| Extract a value from the serialized response with a regex, then compare |
|`cipherSuite`| string | IANA cipher suite name negotiated during the handshake |
103
+
|`hostnameVerified`| boolean | The certificate's SANs cover the monitored hostname |
104
+
|`chainTrusted`| boolean | The full certificate chain is trusted by the system root store |
105
+
|`ocspStapled`| boolean | A stapled OCSP response was included in the handshake |
106
+
|`ocspStatus`| string | Decoded stapled-OCSP status: `good`, `revoked`, or `unknown`|
107
+
|`resolvedIp`| string | The IP address the hostname resolved to |
108
+
109
+
Comparisons follow the property's type: numbers support `EQUALS`, `NOT_EQUALS`, `GREATER_THAN`, `LESS_THAN`; strings add `CONTAINS` / `NOT_CONTAINS`; booleans use `EQUALS`; the `sans` list uses `CONTAINS` / `NOT_CONTAINS`.
110
+
111
+
<Note>
112
+
Certificate validity, minimum TLS version and minimum key size are also enforced by the security baseline above — reach for assertions when you need an exact value check (a specific issuer, fingerprint pinning, a SAN, etc.).
113
+
</Note>
88
114
89
115
For more details, see our documentation on [Assertions](/detect/assertions).
0 commit comments