Security & privacy

Authentication & sessions

  • Passwords are hashed with bcrypt (12 rounds). Login is rate limited per IP; failed and successful logins take the same time.
  • Sessions are random 256-bit tokens stored only as hashes; the cookie guidely_session is httpOnly, SameSite=Lax, Secure, 30-day expiry, revocable from Account settings.
  • Mutating dashboard requests must come from the dashboard's own origin (CSRF protection).
  • HSTS: every response served over HTTPS carries Strict-Transport-Security: max-age=31536000; includeSubDomains (set in src/middleware.ts from X-Forwarded-Proto, so plain-HTTP local dev never sends it), so browsers that have visited once use only HTTPS for a year, on every subdomain too. Every guidelytech.com subdomain a browser opens serves HTTPS; check that a new one does before adding it. Not on the browsers' preload list. Self-hosted deployments behind HTTPS send it as well, so the same applies to subdomains of their domain.
  • GitHub and Google login: OAuth 2 with a signed, short-lived state bound to the browser that started the flow (no login CSRF), and same-site redirects only. Guidely reads the verified email from the provider (GitHub: primary verified email and organization memberships; Google: the email must be verified). Existing accounts are linked by verified email; linking to a password account whose email was never verified removes that password and its sessions, so whoever registered the address first keeps no way in.
  • Who may sign in: a session is created only when the person can open something: a workspace they belong to that allows the method, a workspace auto-join rule they match, a pending invitation (for their email, into a workspace allowing the method), or open signup where it is enabled. Password logins are checked the same way after the password is verified, so a wrong password and a refused login are indistinguishable to someone without the password.
  • Per-workspace sign-in methods: each session remembers how it signed in (password, GitHub, Google or SAML single sign-on), and each workspace lists the methods it allows. A member whose session used another method is refused and sent to the workspace's sign-in page. Admins cannot save a policy that would lock out their own session.
  • Required two-step verification (Workspace.requireMfa, on for new workspaces; workspaces that existed before it start with it off): password sessions open the workspace only if they passed two-step verification, at sign-in or by setting it up in that session (Session.mfaVerified). Others get 403 with reason: "mfa_required" and are offered setup in place. GitHub, Google and SAML sessions aren't affected, since their providers enforce their own. Members can't turn their two-step verification off while they belong to such a workspace, admin resets un-verify the person's open sessions, and an admin can't turn the requirement on while their own password session lacks it.
  • Auto-join rules: GitHub organizations match the user's org memberships at sign-in; Google domains match the Google Workspace domain of the account (controlled by that domain's admin), never the email's domain. A workspace admin can only add an org or domain they belong to themselves (as of their last GitHub / Google sign-in).
  • Workspace sign-in links: /login?workspace=<slug> can render before sign-in; it reveals the workspace's name and allowed methods for a known slug, nothing else.
  • Workspace-managed logins: admins can create password accounts that belong to their workspace. Only those accounts can have their password reset by a workspace admin (which revokes their sessions), and they cannot be invited to, added to, auto-joined into or create any other workspace, so a workspace admin can never take over an account that reaches someone else's workspace. Removing such a member, or deleting the workspace, deletes the account. Creating a login for an email that already has an account is refused (invite them instead).
  • Two-step verification (password logins): people turn it on under Account settings with an authenticator app (TOTP, RFC 6238: SHA-1, 30-second steps, 6 digits, one step of drift either way). The secret is encrypted like project API keys (AES-256-GCM) and only counts once a code from it is confirmed. Every accepted step is recorded, so a code can't be used twice, and ten recovery codes (50 random bits each, stored as SHA-256 hashes, each removed atomically when used) cover a lost phone.
    • After a correct password the server sets no session. The browser gets a signed, httpOnly challenge cookie that lasts 5 minutes and is sent only to /api/v1/auth/login*. It names the user, any invitation being accepted (accepted only after the code) and a fingerprint of the password hash, so a password change or signing out cancels it.
    • Codes are rate limited per user (10 per 15 minutes) as well as per IP. Turning it off or making new recovery codes needs a current code, so an unattended session can't remove the second step.
    • Turning it on or off, new recovery codes and resets are written to the audit log of every workspace the person belongs to, and workspace member lists show who has it on.
    • The account holder is emailed (mfa-changed) whenever it's turned on or off and when new recovery codes are made, with the time, browser, IP address and, for admin resets, who did it, so a change they didn't make doesn't go unnoticed. The email never contains the codes.
    • Lost both? An admin of a workspace-managed login can turn it off while resetting the password, and a platform admin can turn it off for anyone from the admin console.
    • GitHub and Google sign-ins rely on those providers' own two-step verification.
  • AI assistants (MCP): the MCP server (/api/mcp, mcp.md) accepts only bearer tokens, never the session cookie. Tokens belong to one user and are stored as SHA-256 hashes: personal access tokens (gly_pat_), or OAuth access tokens (gly_oat_, one hour) with refresh tokens (gly_ort_, 30 days, rotated on each use; a reused refresh token is refused). OAuth uses public clients with PKCE (S256 only), single-use authorization codes (10 minutes, claimed atomically), exact redirect URI matching (any port only for loopback http), and a consent screen showing where the browser returns. Only a signed-in browser session can approve an app or create a token; an assistant can't. Each connection records the sign-in method and two-step state of the session that made it, so workspace sign-in rules apply to it as to that session. Platform admin rights never pass to an assistant.
  • The public SDK API (/api/v1/sdk/*) and the embed script stay reachable without a session by design, because customer websites call them; they expose only published configuration for the key's environment.

Authorization

  • Every request is checked against the workspace that owns the addressed resource. Workspace or project IDs sent by the client are never trusted as proof of access; a non-member gets 404.
  • Roles: OWNER > ADMIN > EDITOR > VIEWER. Each role grants default permissions, and admins can grant or revoke individual permissions per member. Owners always hold every permission. Member management, sign-in policy, the audit log and workspace deletion are role-only, admins can't edit their own permissions, only owners edit an admin's, and only admins may let editors publish to production, so a granted permission can't widen anyone's access further. Production publishing requires the Publish to production permission unless the project enables it for editors.
  • AI assistant connections act as their user through the same permission checks. A read-only connection is capped at the viewer role (keeping only View session replays if the member has it), enforced in the authorization layer as well as by hiding write tools. Workspaces can refuse all assistants (Workspace.mcpEnabled), and an assistant can't read a conversation without leaving it unread for the team.
  • Public SDK keys only expose published configuration for one environment, scoped by allowed origins. They cannot read drafts, analytics, other environments, or any management data.
  • Authoring sessions use random tokens (hashed at rest), expire after 2 hours, are bound to the creating user, and only expose the draft of the guide being authored.

Single sign-on (SAML) and SCIM

Workspaces can sign members in through their own identity provider (IdP) with SAML 2.0 and provision them with SCIM 2.0 (Settings → SSO & SCIM; admins can see the setup, and only owners can change it, see below). Guidely is the service provider; each workspace has its own SP entity ID (<APP_URL>/api/v1/auth/saml/<slug>/metadata, also its SP metadata) and assertion consumer service (…/<slug>/acs, HTTP-POST binding).

Owners only. Whoever controls the IdP decides who signs in to the workspace and with which role, so configuring it is as powerful as owning the workspace. Only owners can create, change or turn off the IdP connection, its domains, JIT and default role, the role attribute and mapping, Require single sign-on and test sign-in, and only owners can create or revoke SCIM tokens and map SCIM groups to roles. Admins (and everyone else) get 403; admins can still read the configuration and the provisioned users and groups. The dashboard shows these controls disabled to non-owners.

Trust model. A workspace's owners choose its IdP, and an IdP can assert any email address. So the IdP is trusted for that workspace only:

  • Session binding. A SAML session records the workspace that signed it in (Session.ssoWorkspaceId) and opens only that workspace. Every authorization check (requireWorkspaceRole) returns 404 for any other workspace, even one the account belongs to, and workspace lists, the /app landing page and the workspace switcher show only the bound workspace. A SAML session without a binding opens nothing.
  • No account-wide power. SAML sessions never carry platform admin rights, and can't set up two-step verification, create AI assistant tokens or approve assistant apps (an MCP connection has no workspace binding, so one made from a SAML session would escape it; connections recorded with the SAML method are refused everywhere anyway), accept invitations or create workspaces. They last 12 hours, so the IdP decides again every working day.
  • Domains. An owner can add only the domain of their own verified email (verified by signing in with GitHub or Google), never a public email provider; platform admins can add any. When domains are set, only emails on them can sign in. An existing Guidely account that isn't already in the workspace (or a login it manages) is joined through SSO or SCIM only when its email is on one of these proven domains. Logins managed by another workspace never are.
  • Owners. Neither SAML nor SCIM ever makes anyone an owner or changes an owner's role: the default role, the role mapping and SCIM group roles accept at most Admin (an owner value is refused, and one stored by other means is ignored in favour of the default role), and the last owner can't be deprovisioned.

What a response must pass (services/sso.ts, with @node-saml/node-saml for XML signature validation):

  • A valid XML signature from one of the configured certificates over the whole response or the assertion (only signed content is read; one assertion per response; encrypted assertions aren't accepted).
  • Issuer = the configured IdP entity ID; audience = the SP entity ID; the bearer SubjectConfirmationData Recipient (required) and the response Destination (when present) = the ACS URL.
  • NotBefore / NotOnOrAfter on the conditions and the subject confirmation, with 2 minutes of clock skew, and an IssueInstant no older than 10 minutes.
  • SP-initiated: the AuthnRequest id is stored for 10 minutes (SamlReplayGuard, kind request) and kept in an httpOnly cookie scoped to the SAML routes (SameSite=None; Secure in production, since the IdP posts back cross-site). The response's InResponseTo (from the signed assertion; the envelope's only when the whole response is signed) must name a pending request of this workspace that this browser started, and is used up atomically. The RelayState carries the return path, HMAC-bound to the workspace and request; only same-site paths are honoured.
  • IdP-initiated (unsolicited, from the IdP's app tile): accepted only while Allow sign-in from the identity provider's dashboard is on (the default). Turn it off to tie every sign-in to the browser that started it, which also rules out IdP-initiated login CSRF.
  • Replay: each assertion id is stored (kind assertion) until it could no longer be accepted, and a second use is refused. Expired rows are deleted hourly.
  • Failures send the browser to the workspace's sign-in page with a generic message ("couldn't be verified", "expired or already used", "not a member"); the reason is logged on the server only.

Accounts. The email comes from the NameID (email format, or any NameID that is an email) or a common email attribute (email, mail, the Entra ID / ADFS claim URIs, the LDAP OID). Members sign in. With Create accounts on first sign-in (JIT) on, others join with the default role, and unknown emails get a passwordless login managed by the workspace (deleted with it). Off, only existing members and SCIM-provisioned people get in. People deactivated through SCIM are refused even with JIT on.

Role mapping. With a group attribute set, the highest role whose mapped value appears in that attribute (else the default role) is applied at every sign-in, so removing someone from a group in the IdP demotes them at their next sign-in. Without one, roles set in Team stay.

Enforcement. Turning SSO on adds saml to the workspace's sign-in methods. Require single sign-on makes it the only one (password, GitHub, Google and managed password logins stop working there), and is accepted only from a SAML session of that workspace, so the owner has just proved SSO works and can't lock themselves out. Turning it off is refused from a SAML session for the same reason. Un-requiring or turning SSO off restores password, GitHub and Google (narrow them again in Sign-in). The Sign-in settings can't add or remove saml themselves. SAML sessions count as verified by the IdP for Require two-step verification, like GitHub and Google.

Test sign-in. Owners can run an SP-initiated sign-in before turning SSO on (?test=1, needs an owner's session). The response is validated exactly as above, then the result (email, name, role it would get, attribute names) is shown on a page from a 5-minute signed cookie. Nobody is signed in and nothing is created.

SCIM 2.0 (RFC 7643/7644) at <APP_URL>/api/scim/v2 (ServiceProviderConfig, ResourceTypes, Schemas, Users, Groups):

  • Authenticated only by workspace bearer tokens (gly_scim_…, 256 random bits, SHA-256 stored, shown once, revocable, last use recorded, 10 live per workspace, 1,200 requests a minute per token, failed attempts limited per IP). Cookies are never read, so there is no CSRF surface. Every lookup is scoped to the token's workspace: another workspace's users and groups are 404, and their ids are dropped from group member lists.
  • Users: filter (userName eq, externalId eq, emails[value eq], id eq, active eq, joined with and; anything else is invalidFilter, never ignored), startIndex/count paging, POST, GET, PUT, PATCH in Okta (path-less values) and Entra ID (per-path, "False" strings, enterprise extension ignored) shapes, DELETE. Creating a user links or creates the account under the same domain rules as SSO. A person's own account keeps its name and email; SCIM changes those only on logins the workspace manages.
  • Deprovisioning (active: false): the membership is removed (the last owner is refused with 409), their SAML sessions for this workspace are deleted (all sessions, for logins the workspace manages), and their AI assistant connections are revoked once they belong to no workspace. The account stays, so reactivation restores the membership. DELETE does the same and deletes logins the workspace manages.
  • Groups: list/filter by displayName, POST, GET, PUT, PATCH (add/remove/replace members, including members[value eq "…"] and Entra ID's remove-by-value list, and displayName), DELETE. Once an admin gives any group a role, the IdP decides roles for provisioned members: the highest role of their groups, else the default role. Until then, provisioned members keep the roles set in Team.
  • Every change is audit-logged: scim.user.create|update|deactivate|reactivate|delete, scim.group.create|update|delete|role, scim.token.create|revoke, plus member.join and member.role with source: "scim". SSO writes sso.update, sso.enable, sso.enforce and sso.login (and member.join / member.role with source: "saml"). Certificates appear in the audit log only as fingerprints.

Setting up an IdP (the settings page shows the values to copy):

  • Okta: Applications → Create App Integration → SAML 2.0. Single sign-on URL = ACS URL, Audience URI = SP entity ID, Name ID format EmailAddress, application username Email. Optionally a group attribute statement named groups for role mapping. Paste the app's metadata URL in Guidely. SCIM: enable SCIM provisioning, base URL …/api/scim/v2, unique identifier userName, auth mode HTTP Header with a SCIM token; enable Create/Update/Deactivate users and Push Groups.
  • Microsoft Entra ID: Enterprise applications → New application → Create your own (non-gallery) → Single sign-on → SAML. Identifier = SP entity ID, Reply URL = ACS URL. Unique user identifier user.mail (Email address format) and an optional group claim. Paste the App Federation Metadata URL in Guidely. Provisioning → Automatic: Tenant URL …/api/scim/v2, Secret Token = a SCIM token.
  • OneLogin: Applications → SAML Custom Connector (Advanced). Audience = SP entity ID, Recipient and ACS (Consumer) URL = ACS URL, ACS URL validator = the ACS URL as a regular expression, NameID format Email, sign the assertion (or both). Paste the issuer (metadata) URL in Guidely. SCIM: SCIM Provisioner with SAML (SCIM v2 Enterprise), base URL …/api/scim/v2, a SCIM token as the bearer token.

Content safety

  • All author HTML is sanitized on the server (allow-list of formatting tags; no scripts, styles, forms, event handlers, javascript:/data: URLs) and again in the runtime before injection. Guide content cannot execute scripts.
  • Media in HTML: an <iframe> survives only when its src is exactly the canonical YouTube (youtube-nocookie.com), Vimeo, Loom or Wistia player URL; a <video> only with an absolute http(s) src. PDFs are shown as a link plus page images, and the PDF itself is never framed. Embeds are rebuilt with fixed, sandboxed attributes (videos: controls, no autoplay), never the author's. The server, the web runtime and the mobile SDKs apply the same rules independently.
  • Article media uploads need the Editor role and are rate limited (5 GB per project). The stored type comes from the file's contents (PNG, JPEG, GIF, WebP, MP4, WebM, PDF only; SVG and HTML are refused), never from what the browser claims, with per-type size limits (10 MB images, 200 MB video, 50 MB PDF). Files are public at random, unguessable URLs (widgets on customer sites load them without credentials) and are served from a separate host that never receives dashboard cookies. Responses carry the detected type, nosniff, a sandboxing Content-Security-Policy and Content-Disposition: inline, so a file opened directly can't run script (PDF pages shown in articles are images rendered at upload).
  • How-to recordings use a capture token like authoring (random, stored hashed, 2-hour TTL, bound to one how-to). The SDK drops typed values from sensitive fields and pixelates sensitive fields, masked elements and email/card/SSN/phone-like text in the screenshot before uploading it; uploads are checked to be images and limited to 8 MB, 600 steps per recording per 10 minutes and 200 steps per how-to. Manual redaction re-encodes the image with the regions pixelated and deletes the original. Shared how-tos (/share/:token, /embed/:token, random tokens) are public and noindex; only /embed/* may be framed by other sites, every other page refuses framing.
  • Resource center audience targeting only changes which articles the widget lists. The published config and article bodies are the same for every visitor and end-user identities are self-asserted, so targeting is not access control. The same goes for "logged-in users only" articles.
  • Button URLs must be http(s) or relative.
  • The runtime renders inside a closed Shadow DOM with all: initial, so host CSS cannot leak in and Guidely CSS cannot leak out.

Data minimisation & privacy

  • The SDK only sends the traits your application passes to identify(). Property keys matching password|secret|token|credit|card|cvv|ssn|iban are dropped client- and server-side.
  • URL collection can be disabled per project (Collect page URLs); maskSelectors lets you list DOM selectors the authoring picker must never capture text from.
  • Consent: initialise the SDK with consent: "pending" to buffer analytics until grantConsent(); analytics: false disables event collection entirely while keeping guides working.
  • Product analytics: autocaptured clicks never include input values, and their text is dropped for masked elements; session recordings always mask inputs, mask text under maskSelectors/[data-guidely-mask] (or all text), and leave out [data-guidely-block] elements entirely. Replay is off until an admin enables it, sampling is per session, and recordings have their own retention (default 30 days). Network requests in recordings carry metadata only by default (sensitive query values redacted, Guidely's own requests excluded); headers and bodies need a separate opt-in and are still redacted (auth/cookie headers, sensitive JSON fields, 10 KB text/JSON only). Recordings are stored encrypted and only ever served to signed-in members of your workspace (no public links). With URL collection off Guidely stores no paths, titles, referrers or link targets. Details: product-analytics.md.
  • Retention: events are kept for 365 days by default, adjustable per project; expired events are deleted nightly.
  • Deletion: Users → user → "Delete user data" removes the profile, events, sessions, recordings, progress and responses (DELETE /projects/:id/users/:userId). See Data subject requests for exports and bulk deletion.
  • Storage used by the SDK: localStorage keys guidely:anon, guidely:config:<key>, guidely:state:<key>, guidely:queue:<key>, guidely:seen, guidely:conversations:<key> (messenger conversation tokens, cleared by reset()); sessionStorage key guidely:session, guidely:authoring. No cookies are set by the SDK.

Scout and AI

  • What leaves Guidely. When Scout is on, the conversation text, the published article catalog (titles and summaries), the bodies of articles Scout reads, published FAQs, learned answers and the names of live guides are sent to the Anthropic API to write replies. With learning on, the text of conversations a teammate resolved is sent once more to write a learned answer. Uploaded import files are sent to draft articles. In projects with how-tos available in the app, their catalog, the how-tos Scout reads and the path of the user's current page (ids replaced, no domain or query) are sent too. Two details about the person chatting are sent with each reply: the first name from their identify() traits (firstName, first_name or the first word of name, never an email) and the path of the page they wrote from, with ids folded (/invoices/:id; no domain, query or fragment, and nothing when the project turns off URL collection). Other traits, events and full URLs are not sent.
  • Per-project API keys. Admins can give a project its own Anthropic key. It is checked against the Anthropic API before saving, stored encrypted (AES-256-GCM), never returned by the API (only its last four characters), and left out of audit logs. Scout, the Playground and knowledge imports for that project use it.
  • Untrusted output. Scout's replies are rendered as text by the widget: paragraphs, bold, lists, code and http(s) links only — never images or HTML, so a manipulated reply cannot load remote content or run script. Article and how-to cards and "Show me" buttons come from structured, server-validated data (only real published articles, how-tos made available in the app that Scout read in that reply, and live guides).
  • How-tos in the app. How-tos are internal unless an editor turns on Available to Scout and in-app help (audit-logged). The public GET /sdk/how-tos endpoints and Scout only ever read how-tos with that switch on, in the key's project; steps go out as plain text (no selectors or element data) and the messenger renders them as plain text with http(s) images only. A how-to switched off stops being served on the next request, though screenshot files stay reachable at their unguessable URLs, as for shared how-tos. The page path a user is on is matched on the server and not stored beyond the conversation.
  • Prompt injection. User messages, the current page path and article and how-to text are treated as data; Scout's tools are read-only lookups plus handoff, so it cannot change data or reach other users' conversations.
  • Learned answers. Only conversations a teammate replied in and closed are studied, and the learned answer may only use facts the teammate stated (never the customer's or Scout's), written without names, accounts or other identifying details. Customers can't add knowledge by chatting. They are shown to other end users through Scout's replies, so projects that want a human check can turn on Review learned answers first; edits, approvals and deletions are audit-logged, and articles win over learned answers when they disagree. Learned answers are kept when retention deletes the source conversation.
  • Messenger home. Page suggestions receive only the pathname (never the query or fragment), store nothing, and apply article audience targeting like the Help tab. "People here often ask" shows questions from FAQs and from active learned answers whose source conversation started on the same page, which are written in general terms; teams that want to vet them first can turn on Review learned answers first. Teammates appear on the home screen by first name and avatar only (switch off with Show your team).
  • Session recordings and analytics. Recordings and events arrive with the public key, so Scout treats them as attacker-controlled. Before they reach the model, text is scrubbed (emails, card/phone/account-like numbers, tokens, keys, IPs, query strings, URL paths reduced to ids-folded paths) and angle brackets are replaced so recorded text can't close the prompt's sections; input values, request/response bodies, headers, selectors and traits are never read. Model output is scrubbed again and stripped of links and citation markers; it may only name pages the recording visited, merge into findings it was shown (never rewriting their text) and reference error issues from the report. Findings reach end users only after a teammate approves them (Review findings before Scout uses them, on by default); with review off, findings from recordings need two different visitors' recordings, findings from analytics still need approval, and trends never reach end users. Viewing findings needs View session replays; changing them needs Publish articles too; both are audit-logged. Reading is capped per project per day, most eventful first, and chunk reads are bounded in bytes and decompressed size.
  • The asker's own activity. Scout's view_user_activity lookup reads only the recording made by the browser in the conversation (matched on its random anonymous id, not the unverified identify() id) from the 15 minutes before the question, and not when that browser switched signed-in users without reset(). It can be turned off (Look at what the person was doing).
  • Conversation access. Each conversation has a random token held by the browser that started it (only a hash is stored). Conversations are never listed by anonymous id or user id, because identify() is unauthenticated. The Inbox labels user identity as unverified.
  • Cost and abuse limits are enforced on the server: replies per project per hour and month (Scout settings), 25 Scout replies per conversation, 20 new conversations per IP per hour, one reply generating at a time per conversation, 4,000-character messages and 32 KB request bodies. Allowed origins do not stop scripted access (requests without an Origin header are accepted), which is why these limits are server-side.
  • Retention. Conversations that are closed or not waiting on the team follow the event retention window. Uploaded files and Intercom access tokens (stored encrypted like project API keys) are deleted as soon as an import finishes.

Integrations and data sync

  • Credentials for CRMs, knowledge sources, Segment and warehouses (OAuth tokens, API tokens, service account and private keys) are checked with the vendor before they're saved, stored encrypted (AES-256-GCM, key derived from SESSION_SECRET) and never returned by the API, the dashboard or MCP tools (only the account they belong to and the last four characters). Changing who a credential belongs to (a Zendesk subdomain or email, an Intercom region) needs the secret again. Connecting needs Developer settings; ticket desks need workspace admins, like Linear and Jira.
  • OAuth (Salesforce, HubSpot): state is HMAC-signed, expires in 10 minutes, names the project, provider and user, and must match a nonce cookie set on the browser that started the flow; the callback only completes for that signed-in user with the permission. Refresh tokens are rotated in place; a refused refresh marks the connection for reconnecting.
  • Vendor hosts are fixed per vendor (*.zendesk.com, *.snowflakecomputing.com, Salesforce's own instance_url…), never URLs typed by users, so stored settings can't point Guidely's requests at internal addresses. Webhook URLs go through the same SSRF-safe fetch as complaint webhooks (public addresses, ports 80/443, re-checked redirects).
  • CDP ingestion (/api/v1/cdp) authenticates with a random per-connection key (gly_cdp_, 192 bits, stored only as a SHA-256 hash, shown once, rotatable). It is rate limited per connection, capped at 512 KB (and 2 MB decompressed) and 1,000 messages per request, deduplicates by messageId, drops sensitive-looking property names like the SDK, and counts towards the analytics allowance. Like identify(), what a CDP sends is unverified.
  • Outbound data: webhook batches are signed with a per-webhook secret (HMAC-SHA256, shown once); warehouse exports go only to the bucket, dataset or account the admin configured. Cross-account S3 roles are assumed with an external id unique to the project, and Guidely's task roles may only assume roles with a guidely-* external id. Files staged for BigQuery / Snowflake live in Guidely's bucket under exports/ for 7 days.
  • Live knowledge search sends the visitor's search words (or Scout's search query) to the connected help center, and Scout reads the articles it returns as untrusted data, like the project's own articles.
  • CRM pulls only update traits of accounts and visitors that already exist, never create them, and refuse sensitive-looking trait names.

Abuse protection

  • Rate limits: 600 req/min per public key + IP on SDK routes, 600 req/min per user on management routes, 30 login attempts / 15 min per IP, 20 signups / hour per IP.
  • Event batches are capped at 50 events, 8 KB of properties per event, future timestamps are clamped, and duplicates (eventId) are ignored.
  • Source maps are uploaded with secret project keys (gly_sk_…, scope sourcemaps:write). Keys are shown once, stored only as hashes, revocable, rate limited, and can be limited to some environments (any other environment gets a 403). Public pk_ keys can't upload. Maps are kept private and never fetched from customer sites.
  • Match your website (Branding) is the only feature that fetches a URL a user types. It allows http(s) on ports 80/443 only, refuses private, loopback, link-local and other non-public addresses, protects against DNS rebinding, re-checks every redirect, and caps time (10 s) and size (3 MB page, 2 MB per stylesheet). It needs the Admin role and is rate limited.
  • Error alerts post only to https://hooks.slack.com/services/… webhook URLs (no arbitrary outbound requests). Integration secrets such as webhook URLs are masked in every API response. Alerts have a per-issue cooldown, and ignored issues never alert.
  • Replay uploads are capped at 2 MB compressed and 16 MB decompressed, so oversized or malicious uploads are refused; duplicate chunks are ignored. A recording only accepts chunks from the visitor it belongs to, so a known session id can't be used to inject into or take over someone else's recording. The SDK throttles exceptions to 5 identical per page load and 100 per session.

Data subject requests (GDPR/CCPA)

Guidely is your processor for the data it stores about your end users, so it gives you what you need to answer their access, portability and erasure requests (GDPR articles 15, 17 and 20; CCPA right to know and to delete).

  • Export (access and portability). Users → user → Export data downloads everything stored about that person in the project: profile, ids and traits, accounts and their traits, audiences, environments seen, every product event (JSON Lines, split into files of 50,000), guide state, guide sessions and step interactions, checklist progress, survey answers with the question text, messenger conversations with every message and rating, complaints with their history and attachment details, session recordings (times, pages, sizes and storage keys of the recording files, not the footage), journey enrollments and step history, emails sent (subject, status, engagement; not the bodies), unsubscribes for their addresses, prototype tests (tasks, clicks, answers) and AI agent conversations. A ZIP has one file per category, a README.txt and a manifest.json (record counts, data categories, retention); format=json gives one document. Exports are streamed in pages, so a person with millions of events doesn't load them all into memory. Nothing is written to storage.
    • By identifier: GET /projects/:id/data-subject/export?externalId=…|email=…|anonymousId=… finds the person in that project only (never another project or workspace). Emails match the email trait without regard to case; an email several profiles share is refused with their ids, to be exported one by one. Anonymous ids match the profile's current id or an older one an alias left on its events.
    • Team members appear in exports only as "agent" (messages) or not at all (complaint history); internal complaint notes are included but flagged internal: true, so you can review them before handing the export over.
    • Recordings: workspace members with View session replays can watch each one at the dashboardUrl in the export. Raw recording files can be provided on request through Guidely support.
  • Erasure. "Delete user data" (and DELETE /projects/:id/users/:userId) removes the profile and everything linked to it or reported with the person's ids in that project: events, guide sessions, recordings (rows and files), complaints, messenger conversations, survey answers, journey enrollments, emails sent, prototype test sessions and agent conversations. Unsubscribe and other do-not-email records (EmailSuppression) are kept on purpose: honouring an opt-out after erasure is a legal requirement (keeping the address on a suppression list is the accepted way to never email it again), and they hold only the address, the reason and when.
  • In bulk. Users → Delete users by list (and POST /projects/:id/users/bulk-delete) takes up to 1,000 identifiers (identify() ids, emails, anonymous ids or Guidely ids, or detected automatically), shows the matches first (dryRun, the default) and asks for a typed confirmation before deleting. Each person is erased exactly as above.
  • Who can. Export end-user data (userData.export) and Delete end-user data (userData.delete), admins and owners by default, grantable per member. Read-only AI assistant connections never have them. Non-members get 404.
  • Audit. Every export is logged as end_user.export with the format, how the person was looked up and record counts, never the identifier or any personal data. Each deletion is logged as end_user.delete, and a bulk deletion adds one end_user.bulk_delete entry with counts only (end_user.bulk_delete_preview for a dry run).
  • AI assistants. The MCP tool export_end_user_data returns the same export, with the latest events (up to 1,000) and totals plus download links, under the same permission and audit entry. Deletion isn't available over MCP.

Data residency

Each Guidely deployment serves one data region (GUIDELY_REGION: us by default, or eu), with its own database, recording storage, secrets and email sending. A workspace's region (Workspace.dataRegion) is chosen when it is created and can't be changed; everything in it (guides, analytics, recordings, conversations, end-user data and members' accounts) is stored and processed only by that region's deployment. Settings → Workspace shows it.

  • Choosing a region. When a deployment knows other regions (GUIDELY_REGION_URLS), signup and "Create a workspace" offer a region. Picking this deployment's region creates the workspace here; picking another is refused with 421 wrong_region and that region's URL, and the person continues on that region's site (accounts aren't shared between regions). With nothing configured there is one region and no picker, exactly as before.
  • SDK traffic. Install snippets and the setup page hand out the SDK API and script URLs of the workspace's region. A public key whose workspace lives in another region gets 421 Misdirected Request with { "error": { "code": "wrong_region", "region": "eu", "apiUrl": "https://eu.…" } } for every SDK request, reads included: serving configuration or accepting identify/events here would process the visitor's data outside its region. A misdirected SDK can be pointed at apiUrl.
  • Management and API writes. Every dashboard or API check that asks for more than read access (requireWorkspaceRole with a role above viewer or a permission that changes data) is refused with the same 421 for a workspace of another region, and so are secret project API keys (gly_sk_, e.g. agent events and source maps) and SCIM tokens of such a workspace. Reading stays possible, including data subject exports, so data can be handed over. The guard is assertRegionWritable(workspace) in src/server/residency.ts.
  • Sub-processors. The EU deployment runs in AWS eu-west-1 (Ireland) and sends email through SendGrid's EU endpoint (SENDGRID_API_URL=https://api.eu.sendgrid.com, an EU-pinned SendGrid subuser). Scout's AI replies use the Anthropic API configured for that deployment.
  • Moving a workspace between regions isn't supported in the product. It is a manual, operator-run migration (export, import into the other region's database and storage, delete at the source); see docs/aws-deployment.md (Standing up the EU region).

HIPAA mode

Workspaces that store protected health information turn on HIPAA mode (Settings → HIPAA). An owner accepts Guidely's click-through Business Associate Agreement from a session that passed two-step verification or SAML single sign-on; the version, account, typed name and title and time are stored and audit-logged (workspace.hipaa_enable). Owners can't turn it off; a platform admin does, with a reason and the customer's confirmation that no PHI remains (workspace.hipaa_disable). There is no "HIPAA certification": Guidely signs a BAA and HIPAA mode is designed to support the customer's compliance. Details and limits: docs/hipaa-mode.md.

While it is on, enforced on the server:

  • Recordings mask all text and inputs and block images and media in the SDK config (services/hipaa.ts hipaaReplaySettings), with console output and request/response bodies off, whatever the project's replay settings say.
  • AI never uses the server's Anthropic key unless ANTHROPIC_BAA=true (Guidely's BAA with Anthropic, zero data retention); a project's own key keeps working. The check sits in ai/client.ts resolveAiKey, which every Anthropic call goes through and which requires the workspace's policy.
  • Email: nothing goes to end users; team notifications carry only a generic line and a link into the dashboard (email/outbox.ts queueEmail).
  • Sign-in: two-step verification is required for password sign-in; a session idle longer than the workspace's timeout (5–30 minutes, default 15) or older than 12 hours is signed out when it tries to open the workspace (authz.ts hipaaSessionLock), and the dashboard signs out idle browsers itself.
  • Audit: views of recordings, end-user profiles, conversations and complaints are logged with ids only (phi.*, once per person and record per 10 minutes); entries are kept 6 years, including after the workspace is deleted (ArchivedAuditLog), then destroyed.
  • AI assistants (MCP) can't run tools that return end-user data there (mcp/protocol.ts HIPAA_SAFE_TOOLS).
  • Integrations the customer connects keep working; their connect screens remind the customer to have their own BAA with that vendor.

Platform administration and SOC 2

Guidely is working towards a SOC 2 Type II report (Security, Availability and Confidentiality). It doesn't hold one yet. The program, policies, control matrix and control calendar are in docs/compliance/soc2/; the public status is in src/lib/soc2.ts and on /security#soc2.

  • Platform audit log (PlatformAuditLog): every privileged action from the admin console (granting and revoking platform admin, creating, changing and deleting workspaces and projects, adding members, resetting someone's two-step verification, turning HIPAA mode off, billing adjustments, email settings changes and compliance records) is written here with the actor's id and email. It has no foreign keys, so it outlives the workspace and the account, and nothing in the app updates or deletes it. Admin → Compliance → Audit log shows it and exports the last 12 months as CSV. Workspace-level admin.* entries are still written too.
  • Two-step verification for the admin console: with PLATFORM_ADMIN_REQUIRE_MFA=true (set by infra when soc2Controls is on), platform admin rights only apply to a password session that passed two-step verification, or to a GitHub or Google sign-in (the provider's own second factor). Other sessions see a page explaining what to do instead of the admin console (adminSessionAllowed in server/auth/session.ts).
  • Recurring controls (ComplianceRecord, src/lib/soc2-controls.ts): Admin → Compliance lists every recurring control from the control calendar with its last occurrence and next due date. A platform admin records each occurrence with the date it was done, the outcome, notes and an evidence link. Records are append-only; a mistake is corrected by recording again with a note. Export as CSV for the evidence store.
  • Access review: the quarterly platform admin review lists every admin (granted or from PLATFORM_ADMIN_EMAILS) with their latest sign-in and two-step status. Every admin needs a keep or revoke decision; revocations are applied and the record keeps a snapshot of who was reviewed. Configured admins are removed in infra/cdk.json, so the review refuses to revoke them in the app.
  • Reminders: every Monday at 09:00 UTC the worker emails platform admins the controls that are overdue, due soon or never recorded (compliance.reminders), once at least one control has been recorded.