@assinafy/sdk 2.2.0 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/SECURITY.md CHANGED
@@ -48,6 +48,19 @@ opportunity to upgrade.
48
48
  rejected unless its host is loopback, so a credential cannot be sent in the
49
49
  clear to a remote host. Debug logging and error telemetry must be reviewed
50
50
  for response data before being enabled in production.
51
+ - An OAuth `client_secret` belongs only on a server you control: never in
52
+ browser code, a mobile application, or a repository. A public application has
53
+ no secret and authenticates with PKCE alone. The SDK sends the token and
54
+ revocation requests on the credential-free transport, so a workspace
55
+ `X-Api-Key` is never attached to a route that authenticates the application.
56
+ - Treat OAuth refresh tokens as single-use. Each refresh returns a new one and
57
+ retires the old one, and replaying a retired token ends the whole connection
58
+ for that user. Persist the new value before acting on the response, and never
59
+ refresh one connection concurrently.
60
+ - Authorization responses are validated before they are trusted: `state` is
61
+ compared in constant time and `iss` must match the expected issuer. Do not
62
+ bypass `readAuthorizationCallback()` and exchange a code straight from the
63
+ query string.
51
64
  - The webhook HMAC helper is an opt-in utility, not proof of an official
52
65
  Assinafy signing contract. Confirm the header, algorithm, encoding, and secret
53
66
  delivery mechanism with Assinafy before enforcing it. See