Saltar al contenido
BeryxTechBeryxTech
Volver a las respuestas para RFP

Documentación de BeryX

Este documento se publica en portugués y en inglés; esta es la versión en inglés.

BeryX — Security and compliance

Public document. It is the standard security answer for RFPs and the source of the "Security and compliance" section of the site's /rfp page. Each section says what we guarantee, where it is in the code and which test proves it. We claim nothing that is not here.

Mechanical read-only access

BeryX reads metadata, aggregates and limited samples — it never writes, moves or changes data in the customer's sources. It is not just a convention, nor just permissions asked of the customer: the guarantee is enforced in the code.

  • HTTP connectors (Jira, Confluence, Databricks, SharePoint, Google Drive, …) only reach the network through the ReadOnlyHttpClient (app/infra/connectors/http_guard.py): GET/HEAD/OPTIONS pass; POST/PUT/PATCH/DELETE are refused before touching the network.
  • No connector can expose a write method: the enforce_read_only decorator refuses, at class definition, any method with a write name, and a test goes through every registered connector.
  • PostgreSQL: profiling sessions open with default_transaction_read_only=on and statement_timeout — a write, even one hidden in a function or view, fails on the server.
  • Snowflake (engineering sweep): assert_catalog_statement refuses anything that is not a single SHOW/SELECT/DESCRIBE before it reaches the driver.
  • Rehearsing a fix: step 1 of a suggestion is counted at the source in a read-only session, and step 2 never runs. It can read another table of the same connection (card #1405) only if the requester can see it, checked again before the count. It does not count what depends on sensitive columns that person cannot see, and the number does not show to anyone who cannot read every table counted (app/domain/insights/rehearsal_access.py).
  • We always recommend a service user with read-only permissions — the steps for each source are in the connectors guide.

Tests: backend/tests/test_http_guard.py, backend/tests/test_connectors_registry.py, backend/tests/test_rehearsal_joins_1405.py.

Isolation between customers (multi-tenant)

Each customer is a workspace, and the workspace is the data boundary. An authenticated request always resolves the workspace of the session or of the API token (get_current_workspace, app/api/deps.py), and each route only reads and changes resources of that workspace. The BeryxTech. team only reads another workspace with support access that an administrator of that customer has approved. That access has a time limit, is read-only and is recorded in the audit log.

Without that access, the team's management app only shows customer metadata: the name of the workspace and of the organisation, the plan, the usage and the numbers of the help requests. With the management app switched on, all its routes require the session opened there, with two-factor authentication. The customer record, billing and the help requests (the list, the feedback, the counts, the conversation and the attachments) also require two-factor authentication to be on in the request itself, so a team account that switched it off stops reading them even with a session that is still valid. Only the team's support role and the owner read the help requests: billing and sales get a 403.

Isolation proved by a test over every route. The guarantee does not depend on someone remembering to test each new endpoint. The test goes through the API's registered routes, with two test customers, A and B, seeded with one resource of each kind:

  • Between customers. Each route with an id in the path receives A's ids and is called by B's administrator, the most permissive role, and by B's API token. It can never respond 2xx or 5xx. The refusal must be the same as for an id that does not exist, so that B does not even learn whether A's id exists. Routes with the id in the body or in the query go through the same test. In listings, aggregates and exports, no response to B may contain an id or email of A.
  • Positive control. The same request made by A reaches its resources. Without this, B's 404 would prove nothing. The test prints the coverage on every CI run and fails below 90% of the routes with a customer id.
  • No session. Every route responds 401, except an explicit, commented list of public routes: health, login, SSO, signed webhooks and public links by token. That list must match the access decision table.
  • Roles. The read-only role gets 403 on every change. The only exceptions are account self-service, the help request, the assistant, feedback and the bulk trust decision, which is a read. The API token only writes in the intended operations.
  • New routes. A new route with a parameter the test does not know how to fill makes the test fail. It only passes again when the route enters the matrix or a justified list.
  • Cross-workspace routes by design. The BeryxTech team's console, the organisation and federated search are proved separately, each at its own boundary. For example, support access without approval gets 403 on every read.
  • The test also bites. An example router without a workspace filter is caught by the same sweep.

Tests: backend/tests/test_tenant_isolation_matrix.py. Per-domain permissions within a workspace are in backend/tests/test_access_matrix.py.

Within the workspace, the handler repeats the guard. The central guard decides each route from the decision table (backend/app/domain/access/decision_table.py). The incident handlers decide again, so that a failure in the guard does not open access: a root the person cannot see answers like an incident that does not exist, and the diagnosis (POST /incidents/{incident_id}/diagnose) requires write access to every dataset involved before queueing the report. Test: backend/tests/test_access_grants.py, with the central guard switched off.

Samples: what leaves the source and what stays

What a scan reads from your sources, where it is processed and what is stored:

  • Profile on SQL sources: aggregates. On SQL databases and warehouses, the profile (counts, nulls, distinct values, minimums and maximums) is calculated by SQL on the source itself. Only the numbers come back, plus a sample of up to 1,000 rows of the profiled columns (VALUE_SAMPLE_ROWS, app/infra/connectors/sql.py), read in memory on the worker to take up to 20 example values per column, which feed the semantic types and PII detection; only those values are stored. Up to the previous version it was 20 values per column, in one query per column. For each value of the categorical columns (up to 3 columns, of 2 to 50 values) the rows, the nulls and the sum of up to 3 numeric columns also come back, and the rows per hour of day of the freshness column (card #1255). A column classified as personal or confidential, or that PII detection recognises in the profile, is not summed, and only the sum of values with 30 records or more is stored. A column classified after the scan is masked in those sums, in the values of the dimension and in the hour of day as well, for anyone without clearance. The value of the segment of an anomaly inside a segment, of the drill-down of an anomaly of the total (card #1379) or of the "never again" rule it yields does not go to titles, descriptions, the bell, emails, webhooks, tickets or prompts: the issue keeps an HMAC with the installation's key, the workspace and the dataset (rotating the jwt_secret changes it, and the issue keeps only the dimension until the next scan), and the rule's condition goes out with its literals masked. Anyone who may see the value reads it in the explanation of the anomaly, from the scan's profile. A distribution drift follows the same rule (card #1399): the issue keeps the shares of each category, with the same HMAC, and of the quantiles of a numeric column only the percentage change; the categories and the quantiles are read in the explanation, with the mask. The rule the profile proposes for a sensitive column states the family, the margin and the counts, without the minimum, the maximum, the categories or the mean (card #1408); only an administrator accepts it, and the rule it creates reads them from the latest profile and shows them on its page, like any rule. Classifying the column takes them out of the suggestions that already existed straight away. A document that leaves the app does not carry them either, whoever asks for it (card #1407): the export of a report draws the histogram of a sensitive column with the counts only, and the public link and the scheduled email do not draw it. When two segments of different columns go out of pattern in the same column, the rows, the nulls and the sum per pair of values of those two columns also come back, and are not stored. Of a segment's mean, the issue keeps only the relative change. The rows per hour of day are only read on the datasets that asked for it. On sources without SQL (files, SaaS APIs, streaming), the connector reads the records through the official API and the profile is calculated on the worker; the connectors guide says what each one reads.
  • Row rules and duplicates: a sample of up to 5,000 rows per table. On each scan, the rules that need rows and duplicate detection read at most 5,000 rows per table (ROW_FETCH_LIMIT, app/domain/scans/service.py), chosen by the source's own sampling (TABLESAMPLE/SAMPLE), by the primary key hash or, with neither, by the first rows (method). It is a ceiling, which also applies to the profile sample: the DBA can lower it per source, down to a minimum of 100 rows (max_sample_rows, "Good neighbour to the DBA"). The rows are processed in memory on the worker, in the EU (Google Cloud europe-west1); from that read, only the limited examples described below are stored.
  • Larger reads only when you ask for them. Label quality (on the datasets where you configure it), data-diff and matching between datasets read up to 50,000 rows per table, also in memory on the worker.
  • What is stored, in the EU: profiles, aggregates, rule results and scores, and limited examples — for example, up to 20 values per column in the profile, up to 5 rows per duplicate group and up to 5 truncated values per failed rule. The table is never copied to BeryX.
  • Embeddings are neither stored nor sent to the model, from any source. An embedding is a list, an array or a text with 32 numbers or more, or a binary value of 32 bytes or more, whatever the column type (app/infra/serialization.py). That column's profile is stored without a sample, minimum or maximum. In a duplicate group's sample and in the AI context, the value becomes a marker with only the length ({"omitted": "vector", "length": 768}), and in a rule example <vector:768>. The column stays out of segments and of the accepted-values and normalisation suggestions. The model only receives scalar values from example rows: a list or an object goes as a marker (app/infra/llm/prompts.py). Rules still evaluate the real value, and a short array (coordinates, an RGB colour) or a BINARY(16) key stays as it is.
  • With AI on, the examples sent to the model follow the workspace's AI policy. By default they go to Anthropic, which processes them in the US under standard contractual clauses. To keep them in the EU, turn AI off or use Claude in your Google Cloud account, on Vertex AI (Enterprise plan; Amazon Bedrock comes next) — see "Your models" and "Anonymisation before the LLM", below.
  • Running in your Databricks (ADR 0005, step B): it does not run in scans yet. The beryx-profiler package, which reads the full table in your account and returns only metrics, and the Jobs API client already exist in the code, but no scan submits it yet. Until then, on Databricks too, row rules and duplicates use the sample above.
  • Today we have no mode in which no row leaves your network (on-prem or air-gapped). A runner inside your perimeter (step C of the same ADR) depends on real demand.

Tests: backend/tests/test_seguranca_amostras.py (the numbers and the Databricks status above are compared with the code).

Vector indexes: sensitivity comes from the sources

An embedding is numbers, and you cannot search them for personal data. BeryX does not read the vectors: the sensitivity of a vector index comes from the sources and is only as good as the declared lineage.

  • The origin is declared. An admin states, on the index page, which datasets the vectors came from (POST /api/v1/lineage/vector-origins). With no origin, the index shows the gap "Origin not declared" and inherits nothing.
  • Vector columns inherit. If an origin has pii or confidential columns, or detected PII that curation has not declassified, the index's vector columns receive the highest level, with the source lineage. Clearance and the AI agent guards apply as they do to any classified column, and at go-live the classification_verified item counts this classification.
  • Inheritance only goes up. Classifying the origin later reaches the index in the same transaction, without running its scan. Declassifying the origin or deleting the edge does not lower the index: lowering an inherited column is for an admin or the owner of one of the dataset's domains, and it stays in the trail. A manual classification stays as it is, even below the origins, and the page shows a warning.
  • The other columns follow the normal path. The text and metadata columns next to the vector column go through the usual PII detection, and at go-live they still ask for a person.

Limits. Inheritance follows one hop from the declared origin, plus indexes in a chain. An unclassified intermediate view does not count. A missing or wrong origin leaves the index without the classification it should have, and personal data that the origin neither classified nor detected does not reach the index.

Tests: backend/tests/test_vector_sensitivity.py.

Vector indexes: who reads the index and not the origin

A vector index built from a restricted table can end up readable by someone who does not read that table, and a RAG application on top of it returns to them what the origin hides. It is the first risk on the list of the OWASP GenAI Security Project, "LLM08:2025 Vector and Embedding Weaknesses". The sensitivity inheritance, in the previous section, closes the path through BeryX (the agents' tokens). Direct access at the source is shown here, in the "AI & Data Security" add-on.

  • The pairs. Each declared origin of an index, in the same connection or in another one. An index without an origin is left out, with the gap "Origin not declared".
  • Who reads each side. The connections' latest grants snapshot (POST /api/v1/data-security/source-grants/collect): the principals with a read privilege on the index and on the origin, with the members of roles, PUBLIC and the superusers.
  • The verdict. index_wider when there are principals that read the index and do not read the origin; source_wider, informative only, in the opposite case; parity; and unknown when proof is missing: a side without grants read, a truncated snapshot, the snapshot's limits (in BigQuery the inherited bindings, in Databricks only what the connection sees, and groups not expanded) or two different connections, whose principals are not compared by name. When in doubt, never parity. The reason comes in unknown_reason.
  • The issue. An index_wider with a pii or confidential origin, inherited ones included, opens a vector_index_access issue linked to the index, for the owner of its domain. It is the same issue from one snapshot to the next, and it resolves itself when the next snapshot gives parity. The issue text carries neither the origin's name nor the principals' names.
  • The recertification. The next campaign carries one item per principal that reads the index and does not read the classified origin, decided by whoever manages the grants of the index's domain. Revoking opens the task to remove the access at the source: BeryX does not change grants.
  • Who sees the names. Principal names are personal data: only an admin sees them, in Privacy › AI & Data Security (GET /api/v1/data-security/vector-index-access). On the index page (GET /api/v1/datasets/{id}/vector-index-access), whoever reads the dataset sees the verdict and the counts. The MCP tool get_vector_index_access only returns counts. Logs only get counts, and none of this goes to an LLM.

What stays unknown. Indexes without a grants snapshot: MongoDB, Weaviate, Oracle, SQL Server and MySQL. In Databricks, querying an AI Search index requires SELECT on the index itself, according to the "Query an AI Search index" page of the Databricks documentation (read on 19/11/2026). The page does not say where those grants are read, and BeryX only reads those of the Delta table that carries the vector mark. In Snowflake, querying a Cortex Search service requires USAGE on the service, which searches with the owner's rights, according to the "Cortex Search overview" page of the Snowflake documentation (read on 19/11/2026). The SHOW GRANTS and ACCOUNT_USAGE.GRANTS_TO_ROLES pages do not say they show these services, and those the engineering scan lists come out unknown, with the reason.

Limits. The comparison is only as good as the declared origin and the latest snapshot. Row policies and column masks are not in the snapshot: whoever reads the table counts as reading everything. BeryX shows the excess access and does not block it: removing the access is done at the source.

Tests: backend/tests/test_vector_index_access_1227.py.

Who can write to training data and to the origins of a vector index

Whoever changes the data a model learns from, or the data a vector index was built from, can poison it. The grants snapshot already says who writes to each dataset; the "AI & Data Security" add-on crosses it with the AI data (backend/app/domain/compliance/ai_data_write_exposure.py).

  • The datasets. Those with a training, validation or testing role on an agent or model record that is not retired, and the declared origins of the vector indexes.
  • What is counted. From the latest grants snapshot (POST /api/v1/data-security/source-grants/collect): how many principals can write (INSERT, UPDATE, DELETE, TRUNCATE, OWNERSHIP, MODIFY, the BigQuery roles that write and the superusers; on buckets, the Cloud Storage roles that create or delete objects, WRITE, WRITE_ACP and FULL_CONTROL in the S3 ACL and the policy actions that cover s3:PutObject, s3:DeleteObject or rewriting the ACL and the policy, with wildcards and case-insensitive), with the members of roles; how many are service accounts, by the name the source gives them (serviceAccount: in BigQuery and GCS, the application id in Databricks, an AWS service principal in S3; PostgreSQL and Snowflake do not say it in the name, and the count stays empty); how many have not accessed it for more than 90 days, by the Snowflake access history, which is only crossed on classified datasets; and whether writing is given to PUBLIC or to an everyone group (allUsers and allAuthenticatedUsers in Google, account users in Databricks, AllUsers and AuthenticatedUsers in S3). Without a read that covers the dataset, it comes out "not read", never "nobody writes".
  • The issue. One ai_data_write_exposure per dataset, for the owner of its first domain: critical when writing is open to everyone, warning when the number of writers rises between two snapshots. It resolves itself at the next snapshot with neither. A connection whose read failed leaves the issue as it is, and an ignored issue does not reopen. The text only carries counts.
  • Where it shows. The Annex IV datasheet gets the row "Who can change this data" on each training, validation and testing dataset, and the posture report the section "Who can change the AI data", next to the grants on sensitive datasets. Principal names stay out of both, of the logs and of the LLMs.

Limits. Only the sources where BeryX reads grants: PostgreSQL, Snowflake, BigQuery, Databricks and the GCS and S3 buckets. Whoever writes through the application that feeds the table uses its credentials and does not show up as another principal. The access history sees reads, not writes: "no access for 90 days" is a signal, not proof that they did not write. Service accounts are counted by name: an AWS IAM role does not count, because people assume it too. A custom BigQuery or Cloud Storage role does not count as writing, because BeryX does not read what it grants. BeryX shows who can write and does not prevent it: removing write access is done at the source.

Tests: backend/tests/test_ai_data_write_exposure_1264.py.

Agent reach: what its accounts can do at the source

The AI registry says which accounts an agent reads each source with and which datasets it uses. The "AI & Data Security" add-on crosses those accounts with the latest grants snapshot, before the agent reads, and says what they can do beyond that (backend/app/domain/compliance/ai_agent_reach.py, card #1263).

  • What counts as excess. A classified dataset the accounts can read and the record does not link, and any dataset they can write to: the record has no write role. PUBLIC counts on the connections where the agent is. A dormant grant (the one from #788) and the tools and linked datasets with no requests in 30 days come out as suggestions, not as excess.
  • When in doubt, it does not say "minimal". With no accounts on the record, an account with no rows in the snapshot, or a connection of the agent whose connector does not read grants, has no snapshot, has an out-of-date snapshot (older than security_reads_stale_days days, the limit of the score and the posture report) or has a cut snapshot, the verdict is unknown, with the reason. In the go-live, the item stays unchecked: it neither passes nor closes. An excess an old snapshot proves still counts until a new snapshot without it: waiting does not remove it. Without the add-on, the item also stays unchecked and the task does not show, because the old snapshot, kept for up to 90 days, can no longer be seen or accepted.
  • The fix belongs to the customer. The page gives an admin the REVOKE in the source's dialect, to copy. BeryX reads the grants and does not change them. The fix removes the excess and gives back the reads of linked datasets that the REVOKE would take, in the connection's database. The snapshot puts the account's direct grant and those of its roles in one row, so the excess goes from the account and from every role in the row. On a write finding only the write goes. When what goes also gave the read (a role, ALL PRIVILEGES, roles/bigquery.dataEditor), the fix adds the GRANT of that read and, when leaving a PostgreSQL role, the schemas' USAGE (backend/app/domain/compliance/ai_agent_reach_fix.py). Ownership (OWNERSHIP) is not revoked, it is transferred to another owner: a finding that would take it in a table REVOKE gets no SQL, and the page says why. What comes from an object above the table also gets no SQL, a binding on the BigQuery dataset and what Databricks inherits from the catalogue or the schema (inherited_from): a REVOKE … ON TABLE does not remove it, and Databricks accepts it without an error. An account that reaches the role through another role (chained) does not leave it with a REVOKE of the membership: the role's privilege on the table goes, and a predefined PostgreSQL role reached that way gets no SQL. PostgreSQL roles apply to the cluster and Snowflake roles to the account: with linked reads in another connection of the same source, the account stays in the role and the role's privilege on the table goes. What does not come back: the reads the role gave in a database that is not a BeryX connection, those of another connection when the role is predefined (pg_read_all_data), and the database's CONNECT when it came from the role. In Snowflake, the fix is run with the role that made the grant, a role above it or one with MANAGE GRANTS: a REVOKE only removes the grants made by the active role or a role below it, and succeeds without an error when it removes nothing.
  • Who gets told. When the excesses go up between two snapshots, the agent's owner gets a task (without an owner, the admins), with the agent's name and nothing from the source. The posture report only carries the counts.
  • The names. Only an admin sees the accounts, principals and dataset names. Everyone else's response, the per-agent list and the acceptance record in admin_events carry counts and ids. None of it goes into the logs or to an LLM. When the account of whoever accepted an excess is erased (GDPR, Art. 17), their id leaves the acceptance; the reason and the deadline stay, because the decision belongs to the workspace.

Limits. The snapshot is per table: a PostgreSQL column grant is left out, and an agent with SELECT on a classified column can come out minimal. The source does not return everything that gives access: BigQuery does not return the bindings inherited from the project, folder and organisation, Databricks only shows what the connection's principal sees, and the members of a BigQuery or Databricks group are not expanded. So an account that only reads through those paths does not show up, and minimal means "nothing extra in what the source shows"; the response gives each connection's limits in limits. What comes from above the table (a binding on the BigQuery dataset, what Databricks inherits from the catalogue or the schema) has no SQL fix and is removed at the source. The Snowflake snapshot does not tell a database role from an account role: the fix writes ROLE, and for a database role it is DATABASE ROLE. Row access policies and column masks are not in the snapshot. BeryX shows the reach and does not cut it.

Tests: backend/tests/test_ai_agent_reach_1263.py, backend/tests/test_ai_agent_reach_flow_1263.py and, on a real PostgreSQL, backend/tests/test_ai_agent_reach_pg_1263.py.

Posture fixes by infrastructure-as-code pull request (exception, opt-in)

The "AI & Data Security" add-on reads the posture and gives the fix to copy. Since card #1285, for three kinds of finding with a deterministic fix, it also proposes the fix as an infrastructure-as-code pull request in the customer's git repository (backend/app/domain/compliance/posture_fix_prs.py, backend/app/domain/compliance/posture_iac.py).

  • Opt-in. It comes turned off; an admin turns it on (PUT /api/v1/compliance/posture-fixes/settings). Turning it on, off and each pull request opened go to admin_events (posture_fix_prs_enabled, posture_fix_prs_disabled, posture_fix_pr_opened, with ids, the finding code, the provider and the number only). Only an admin opens a pull request, and only with the fix pull request in the plan (git_remediation).
  • No write credentials in the cloud. The pull request goes through the git integration the customer already connected for the fix pull request (#1202), with its permissions. BeryX neither asks for nor keeps any credential that writes to AWS, Azure, Google or the source.
  • Only one new file. Each pull request carries one new file, on a datavault/posture-* branch, in the folder the admin chooses: the SQL migration with the REVOKE of the excess grant (#1263), or the Terraform for a Bedrock agent's guardrail, Bedrock invocation logging, the Azure OpenAI diagnostic settings and key authentication, or the Vertex AI Data Access logs. It never changes an existing file: on GitHub it first checks that the path does not exist on the base branch, and GitLab and Azure DevOps refuse to create over one. It never writes to the base branch nor merges, and applies nothing: the customer reviews, merges and applies (the terraform apply, the migration).
  • The file is the one from the latest read. The request only says which finding, in which folder and in which repository; the content is recomputed on the server from the stored read. A customer name (an agent's, a principal's) goes out as an escaped literal or in a one-line comment, and does not change the shape of the file.
  • Verification is the next read. The worker follows the pull request's state. After the merge, the finding stays "awaiting verification" until a later read no longer sees it: the source's controls, or a grant snapshot of the connection that was not cut short. A merge without the apply does not close the finding, and the page says when the read still sees it.
  • What is kept and where. BeryX keeps the repository, the number, the branch, the file path, the state and the hash of the finding's identity, never the content. The file and the pull request stay in the customer's repository, with the names, accounts and ARNs the fix needs; in a BigQuery grant the principal may be a person's email, and BeryX's account erasure does not reach it there. The logs only carry ids, codes and numbers, and none of this goes to an LLM. In the demo and in training the file shows and no pull request opens.

Limits. BeryX does not know the customer's modules: the file is a starting point their team adapts. The Terraform declares no provider nor required_providers, which belong to the customer's module. The per-resource region argument on AWS needs AWS provider 6, and the agent's import needs Terraform 1.5 and the root module. If the agent, the account or the audit configuration is already in the customer's Terraform, the fix goes there and the new file goes away; the file itself says so. A Bedrock agent's aliases serve the version they had: after the apply, a new version and the alias pointing to it are needed. The other findings keep the fix to copy.

Tests: backend/tests/test_posture_fix_prs_1285.py, with fake git servers and no network. Each Terraform file is validated against the providers' resource schemas and by terraform fmt -check, and each SQL file by the dialect's parser.

Proposed enrichment: what leaves for each provider

Proposed enrichment asks public reference services, or a Nominatim instance of the customer's own, for the value missing in a column. Each provider receives only the field to enrich, one value at a time, and never the full sample or the other columns of the row:

Provider (key) Host What it receives What it returns
GeoAPI.pt (geoapi_pt) json.geoapi.pt The CP7 postcode (full Portuguese postcode) Locality, municipality and district
VIES, from the European Commission (vies) ec.europa.eu Only the NIF (Portuguese tax number) of a legal person (first digit 5, 6 or 9). The NIF of a natural person does not leave Registered name and address
Public Nominatim, from the OpenStreetMap Foundation (nominatim) nominatim.openstreetmap.org Only the Spanish postcode Locality and autonomous community
The customer's Nominatim instance (nominatim_self_hosted) The one in the URL the administrator gives The address, for geocoding. It is the only provider that receives personal data Latitude and longitude

Countries and currencies are compared with the ISO lists stored in BeryX, and nothing leaves.

  • Opt-in per workspace and fail-closed. By default, no provider receives anything. An administrator allows each one under "Rules → Enrichment providers" (PUT /api/v1/workspace/enrichment), and the authorisation records who consented and when. Without authorisation, the proposal is refused before the source sample is read. This authorisation is separate from that of the accuracy rule: allowing VIES in one does not allow it in the other.
  • Addresses only to the customer's instance. Geocoding uses only the customer's own Nominatim instance. The usage policy of the public Nominatim asks that no personal data be sent to it. So the public Nominatim receives only the Spanish postcode and is allowed without the personal data confirmation. The same policy limits use to 1 request per second. The OpenStreetMap Foundation stores request data in the United Kingdom and the Netherlands (OSMF privacy policy).
  • One consent per destination. To allow the instance, the administrator gives the URL (nominatim_url) and confirms that the addresses may be personal data (confirm_personal_data). Changing the URL is a new destination and asks for the confirmation again, which records who gave it and when. Withdrawing the authorisation deletes the URL. Without a configured and allowed instance, no address leaves.
  • The instance URL is validated when saved. It must be https (http only for hosts in DATAVAULT_CONNECTOR_ALLOWED_HOSTS), with no user or password, no query or fragment, and up to 500 characters. Hosts under openstreetmap.org are refused, because they are the public service. The anti-SSRF guard (SsrfGuard, in backend/app/infra/connectors/http_guard.py) refuses hosts that resolve to internal networks (loopback, private networks, cloud metadata), unless the operator allows them in DATAVAULT_CONNECTOR_ALLOWED_HOSTS. The same code normalises the URL when saving and when querying (backend/app/infra/enrichment/providers.py), and every lookup goes through the guard again, with DNS pinning.
  • The request to the instance. BeryX calls <url>/search with q (the address), format=jsonv2 and limit=1, by GET only and with a User-Agent that identifies it. The request carries no credential or key: an instance behind authentication is not supported.
  • Outside the subprocessor list. The three public services are not on the public subprocessor list: they only receive values from a workspace after an administrator of that workspace allows them, and each one handles the requests under its own terms. The Nominatim instance is the customer's own, and the customer chooses the destination.
  • Audit. Every change to the allowed providers goes into the audit log (enrichment_providers_updated), with the list before and after, whether personal data was confirmed and, when it changes, the host of the Nominatim instance.
  • How it leaves. GET requests only, through the connectors' read-only HTTP client, with the anti-SSRF guard and DNS pinning. The public services have a minimum interval between requests in each API process (0.5 s for VIES and 1 s for GeoAPI.pt and the public Nominatim) and each proposal has a lookup cap. Answers are kept in an in-memory cache, per workspace and with the key hashed (SHA-256). Values never go to the logs.
  • What is stored. The suggestion stores the proposed values with their provenance (source, lookup date and confidence). For geocoding, the suggestion stores only the provenance and the coverage: neither the address nor the coordinates, which would locate it. The proposed coordinates only appear in the response to the request. The suggestion's SQL carries the postcodes and company NIFs the source confirmed, with the reference value (for VIES, the company's registered name and address). For geocoding, the SQL carries no address at all.
  • What the source did not confirm is not kept. A natural person's NIF, a postcode the source does not know or free text in the column is not kept in the suggestion. In the response to the request, it appears masked, with only the last 3 characters. The pull request carries the coverage and the source, not the list of values.

BeryX does not write the proposed value to the source: the customer applies it by pull request or SQL, after approving the suggestion (what we do not do).

Tests: backend/tests/test_enrichment.py.

Encrypted credentials and key rotation

  • Source credentials and integration tokens are encrypted with Fernet (app/domain/catalog/crypto.py) before being stored. They are never returned by the API nor written to logs; vendor error messages go through a filter that removes secrets.
  • Key rotation: DATAVAULT_ENCRYPTION_KEYS accepts several keys (MultiFernet): the first encrypts, all decrypt. backend/scripts/rotate_fernet.py re-encrypts every secret with the new key in idempotent batches; tokens that no key opens are reported only by id, without ever being decrypted for logs (app/domain/catalog/key_rotation.py).

Tests: backend/tests/test_fernet_rotation.py.

Anti-SSRF protection with DNS pinning

Source URLs come from customer configuration. So that they cannot point inside our infrastructure (cloud metadata, localhost, private networks):

  • SsrfGuard (app/infra/connectors/http_guard.py) only accepts https and refuses any host that resolves to an internal address. It is fail-closed.
  • DNS pinning: the host is resolved only once, every IP returned is validated and the connection is made to the pinned IP, with the original hostname in Host and in SNI (the TLS certificate is still validated against the name). This closes the DNS rebinding window.
  • Each redirect hop repeats resolution, validation and pinning. On a hop to another origin (scheme, host or port), only the neutral headers go through, such as Accept and User-Agent (NEUTRAL_HEADERS). The Authorization header, cookies, query params and any custom credential header, such as an X-API-Key or the X-Tableau-Auth, are dropped.
  • Response cap and total deadline (cards #571 and #605). The HTTP connectors' transport (pinned_httpx_transport) reads the body as a stream and stops at the connector's cap: 20 MB for REST and for SharePoint and Google Drive documents, 30 MB for OData and Dynamics 365 and 32 MB when the caller sets none. A Content-Length above the cap is refused before the body. It only asks for gzip and deflate, decompresses them with the output limited to the same cap and refuses br and zstd. The timeout counts for the whole request, from the connection to the last byte, not per read.
  • It also applies to outbound integrations that receive customer URLs (external catalogue, OpenLineage, self-hosted Git): validation on save and on each use.
  • External catalogue (card #648). The OpenMetadata, DataHub, Collibra and Purview HTTP client (JsonHttp, in app/infra/catalog/base.py) reads each response as a stream up to 10 MB, counted after decompression, with the same bounded decompressor (aread_capped). A Content-Length above the cap is refused before the body, and a response over it fails without retrying the request.
  • Purview quality rules (card #1332). An admin reads them from the Unified Catalog Data Quality API through the Purview integration, with its credential, at the host validated when it was saved and with GETs only: the read client (ReadOnlyJsonHttp) refuses any other request before it leaves for the network, and the identifiers that go into the path have to be GUIDs. Nothing is written to Purview. Of what the API returns only the fields the import reads are kept: the ids of who created and changed the rules and the executed query are dropped (app/infra/catalog/purview_quality.py). Each response is read as a stream, up to 3 MB for an asset's rules and 6 MB for the list of assets, and its objects and values are counted before they are built (MAX_OBJECTS, MAX_VALUES); there is a ceiling of rules per asset (MAX_ASSET_RULES) and per page (MAX_PAGE_RULES), the JSON is read in a separate thread and the page has a 75 s deadline. An asset that exceeds the ceilings or the deadline, or that Purview refuses, is declared, with the reason, in the export and in the report. The JSON is not stored in BeryX; the audit trail carries the read (purview_rules_read, one per person, integration and hour) and, on each import, the counts of the reconciliation report (rules_import_reconciled). The created rule keeps a hash of the identity it has in Purview.
  • Rehearsal of the rules of an import (card #1332). POST /rules/import/rehearsal runs at the source, with a connector that only reads and the scan engine, the rules an import proposes: no scan, no results, no issues and no rules saved. It requires write on each dataset, goes through the import's own guard, respects blackout windows and the DBA's query limit and has its own quota per workspace. The response carries the outcome, the observed value and the threshold, never rows. A rule that decides with the values of a sensitive column the requester cannot see is not rehearsed: the columns are the ones the engine reads, in a single place shared with the backtest (app/domain/quality/value_columns.py), and when they are not known (custom SQL) it is refused. With clearance, the values seen stay in the trail (sensitive_columns_viewed, import_rehearsal surface).
  • Data sources (databases, warehouses, object storage). Every host and URL in the config goes back through the guard (netguard.check_host) before the connection is opened, not only when the connection is saved (BaseConnector.assert_destination_allowed, card #339). Postgres connects only to the validated IPs (hostaddr), in the resolver's order, and MySQL opens the socket to them, with the certificate verified against the name. pymongo resolves each name through the guard (netguard.guarded_getaddrinfo, card #564) and connects to the addresses validated in that same resolution, the driver's monitoring included, and it never opens a local Unix socket, not even for a member the replica set announces (card #602). Oracle, Redshift and Databricks resolve through the guard in the same way (card #647): on Oracle also the destination of a listener redirect, and on Databricks every connection to the connection's host during the session. Oracle connects without TLS. SQL Server, Fabric, Snowflake, BigQuery and the other Postgres and MySQL drivers revalidate and the driver resolves the name again. In production, a name that does not resolve is refused when the connection is created and on each revalidation, and the drivers with a pinned IP also refuse a local Unix socket and a list of hosts. The per-dialect table is in CONECTORES.md.
  • Webhooks and tickets. Alert channel webhooks (Slack, Teams and generic webhook), scheduled reports on those channels and tickets (Jira, Linear, ServiceNow, Azure DevOps, GitHub and GitLab, card #376) all go out through app/infra/network/outbound.py. The URL is validated on save, in the app and in the IaC API, and again on each send, with the pinned IP. On the generic webhook, each retry attempt validates again. Redirects are not followed: a 3xx counts as a failure. A refused destination is not retried and shows in "Last delivery" as "destination refused (SSRF)".
  • A webhook URL is a secret: whoever has it can post to the channel. It does not appear in the "Test channel" response, in last_delivery_error or in the logs, which keep only the HTTP code or the error type. The httpx logger, which at INFO would write the URL of each request, is set to WARNING. Excerpts of ticket provider responses go out without the credentials.
  • DATAVAULT_CONNECTOR_ALLOWED_HOSTS also exempts webhooks and tickets (for example, a receiver on the customer's network in a dedicated instance). On channels, https is still mandatory.
  • Tickets from training and demo. A training or demo workspace does not write to the ticket provider, even with an integration that got there another way (a seed, hand-written SQL or a change of the workspace type): creating a ticket returns 403, the automation opens no tickets and the sync reads the status but does not comment, close or reopen.

Tests: backend/tests/test_http_guard_pinning.py, backend/tests/test_dynamics_ssrf.py, backend/tests/test_outbound_ssrf.py, backend/tests/test_connectors_sql.py, backend/tests/test_security_gates.py, backend/tests/test_dns_rebinding_guard.py, backend/tests/test_http_guard_response_limits.py.

Perimeter: WAF, rate limiting and DDoS

Status: implemented as code and covered by automated tests, but not yet applied in production. The global load balancer (deploy/lb_apply.sh) and Cloud Armor on top of it (deploy/armor_apply.sh) are waiting for an operation by the team. Until then:

  • the API and the app are served directly by Cloud Run, and each service's *.run.app address also responds;
  • abuse containment is the API's own rate limit, in memory and per instance, plus the Cloud Run instance ceiling;
  • there is no WAF in front of the service.

Activation is phased. First the load balancer goes in. Then Cloud Armor spends a week in observation mode, in which nothing is blocked and false positives are measured. Only then does it start blocking. This section will only say "active" after blocking is on in production.

With the edge applied, the perimeter looks like this:

  • Load balancer: all public traffic (site, app, API and MCP) enters through a global Google Application Load Balancer, with TLS ≥ 1.2. The services then refuse requests that do not come from it. The LB only forwards well-formed HTTP(S) requests, so L3/L4 volumetric attacks stay on Google's network. Cloud Armor sits in front of the LB's backend services.
  • WAF with the OWASP CRS 3.3 rules managed by Google: SQLi, XSS, LFI, RFI, RCE, protocol attacks and scanner detection, at sensitivity 1, the most conservative.
    • Endpoints that receive legitimate SQL, YAML or XML are left outside the WAF: rule import, connections, dbt manifest, OpenLineage, SAML, signed webhooks, among others. They are authenticated and validated in the application.
    • The WAF inspects the first 8 KB of the body of each request.
  • Per-IP rate limiting at the edge, with central counters that do not depend on the number of instances:
    • 600 requests/min per IP on the API;
    • 20 requests/min per IP on login, sign-up, password recovery, email verification and MFA code, with a 10 min block for anyone who goes over. Distributed brute force is contained before it reaches the application.
  • Adaptive Protection: layer 7 DDoS detection by machine learning, with alerts.
  • Scanners and methods: TRACE, CONNECT and requests to /.env, /.git and /wp-* get
  • Exemptions: the rate limit is only bypassed with a header whose value is in Secret Manager (the production validation and the uptime checks), never by IP. The header does not bypass the WAF.
  • Monitoring: blocks are counted in a metric without sampling. Above 200 in 5 min, the team gets an alert.
  • Defence in depth: the API keeps its own rate limit per IP, per token and per expensive endpoint. MCP (mcp.<domínio>) goes through the same LB without Cloud Armor, because agents come from the provider's shared IPs. It is authenticated by token and subject to the API's rate limit.

Tests: backend/tests/test_edge_armor.py (rules, exemptions, idempotency, secret never printed). After blocking is on in production, deploy/check_edge.sh proves three cases on each deploy: SQLi in a query param → 403, scanner path → 403, a burst at login from one IP → 429 in under 10 s. While Cloud Armor is not blocking, these three cases appear in the check only as information, neither passing nor failing.

API HTTP headers and body cap

The API answers on its own URL, without going through the app's nginx, and that URL is what the SDK, the MCP and a scanner test. So it sends the security headers itself (backend/app/api/security_headers.py), on every response, errors and 429s included:

  • Strict-Transport-Security (one year, with subdomains), X-Content-Type-Options: nosniff, Referrer-Policy: no-referrer, X-Frame-Options: DENY and a Permissions-Policy that turns off camera, microphone and geolocation;
  • Cross-Origin-Resource-Policy: same-site, except on the /api/v1/public/ routes, which get cross-origin because a badge is embedded as an image in third-party pages;
  • on JSON responses, Content-Security-Policy: default-src 'none'; frame-ancestors 'none';
  • on the others (the report's HTML export, the CSVs, the PDF, plain text and SSE), the same plus sandbox (card #651). If one of these responses is ever shown inline, it lands in an opaque origin, with no scripts, no forms and no access to the app's localStorage. FastAPI's /docs and /redoc pages, which only exist outside production, get no CSP because they load scripts;
  • on a request with Authorization, Cache-Control: no-store.

A header the route has already set is left as it is: the public badge keeps its own Cache-Control and CSP, and the SSE streams their no-cache.

A request body is capped at 4 MB (api_max_body_bytes, in backend/app/api/body_limit.py). A Content-Length above it gets a 413 without the API reading the body. A body without Content-Length is counted as it arrives and reading stops at the cap. The 413 is sent before authentication and carries detail and max_bytes. Routes that already had their own cap keep it (ROUTE_BODY_LIMITS): dbt manifest, dbt results, OpenLineage, rule import and the RAG gate. Record validation (POST /datasets/{id}/validate) has 2 MB, set by path pattern (ROUTE_BODY_LIMIT_PATTERNS).

The files of POST /rules/import and of POST /workspace/config/plan and /apply are read in a single thread per process, with a line of 8 places for every customer on the instance (backend/app/domain/rules/import_thread.py). Each organisation takes at most 2, across all its workspaces: creating workspaces gives no more places to whoever creates them. With the line full, the file of an organisation with fewer places takes the place of the last waiting file of one that has at least two more, and that file gets a 429 with Retry-After. So a customer with nothing in the line only gets a 429 when the 8 places belong to 8 different organisations. Each account opened through public sign-up is an organisation, so filling the line takes 8 accounts, opened within the per-IP sign-up limit and, with email configured, each with a confirmed email.

The app sends its own through nginx, with a CSP of its own for the SPA (frontend/nginx/security-headers.conf). That CSP has no 'unsafe-inline': scripts and styles only come from files in the image itself. If someone manages to inject HTML into the app, the browser refuses a <style> or a style="…" attribute coming from that markup. Two documents on the same origin need inline styles and sit outside that CSP. The HTML the API serves through the app, such as the public report, carries its own CSP: nginx's /api location sends the other security headers, without the SPA's CSP (frontend/nginx/security-headers-api.conf). The digest email preview opens at /email-preview.html, with a CSP of its own (frontend/nginx/security-headers-email-preview.conf): it accepts inline styles, loads nothing from elsewhere and only runs the page's own script. It is sandboxed, with no access to the app's localStorage. Videos and captions (media-src) only come from the public videos bucket, https://storage.googleapis.com/beryx-videos/, which deploy/videos.sh creates in europe-west1. The site's CSP has the same media-src. The CSP carries the bucket's path and not just the Cloud Storage origin, which would accept any account's bucket. The videos are not in the nginx image, so media-src has no 'self'. The app's connect-src adds to 'self' only the exact URL of that bucket's manifest.json, which the page guide's video player reads to get the videos' commit (frontend/src/lib/guideVideo.ts). It only requests it when someone opens a video. The production validation (deploy/validate_prod.sh §17) checks HSTS and nosniff on the API's /health, the app's six headers, the app's CSP without 'unsafe-*' and with that media-src, /api without the SPA's CSP, the email preview's CSP and, on the site, HSTS, nosniff and the CSP. The site's CSP is enforced: the browser blocks what it does not allow and sends each violation to /api/csp-report, which reads at most 16 KB per report and logs up to 20 reports per IP every 10 minutes. In the site's script-src, the header has 'unsafe-inline', because Next puts each page's payload in inline scripts. So each HTML page carries a second policy, in a <meta http-equiv>, with only the sha256 of the build's inline scripts: the theme one and the self.__next_f.push ones. The browser applies both, and a <script> injected into the page does not run. The site build fails an HTML page with any other inline script (the site's lib/csp-hashes.mjs). Tests: backend/tests/test_http_hardening.py.

GDPR: self-service export and deletion

Without a request to support:

  • Export the workspace data — GET /api/v1/workspace/export (administrators).
  • Delete the workspace — DELETE /api/v1/workspace: cascading deletion of connections, datasets, profiles, scans, reports, integrations and credentials (delete_workspace_cascade, app/domain/catalog/erasure.py).
  • Delete your own account — DELETE /api/v1/auth/me: anonymises authorship in the records that must survive (e.g. audit trail) and deletes the rest (erase_user).
  • Deletion certificate — deleting the workspace issues a signed certificate (Ed25519, with the issue date inside what is signed). It counts the rows in each data category before and after the cascade, in the same transaction, and states until when the backups hold the deleted data. It is kept in the platform trail (staff_events, no email addresses) and emailed to the admins as JSON and PDF (app/domain/compliance/deletion_certificate.py). Verify it with backend/scripts/verify_deletion_certificate.py.
  • Retention per workspace — GET/PUT /api/v1/workspace/retention (administrators): limits for the profile history (never above the plan window), AI reports and row samples. The worker's daily purge applies them and writes retention_purged to the Audit log, with the cut-offs and the counts (app/domain/billing/retention_policy.py, app/domain/billing/retention.py).

The privacy policy and the terms are published on the site (/privacidade, /termos).

Product analytics: opt-in and no personal data

The app only measures which pages and features are used when a workspace admin turns sharing on. It ships switched off (analytics_enabled), and the admin answers once after sign-up. The choice can be changed in Team & Access, which shows the exact list of what is collected (GET/PUT /api/v1/workspace/analytics). Each change goes to the Audit log (analytics_consent_changed).

  • What is stored — the workspace, the plan, the event name, the page pattern (/datasets/:datasetId, never the URL with ids) and the time (product_events). The user, the email, the IP, the user agent and typed text are not stored. Events, routes and properties come from closed lists (app/domain/analytics/events.py). Anything else is dropped.
  • Intake — POST /api/v1/events/product, in batches of up to 50 events, with its own request limit (product_events, 60 per minute). It always answers 204: with sharing off nothing is stored.
  • Retention — 90 days, through the daily purge (app/domain/billing/retention.py). Switching sharing off deletes the workspace's events at once (app/domain/analytics/service.py). The events are in the workspace export and in the cascading deletion.
  • What BeryxTech sees — in the Console, only percentages per plan and counts per page over the last 30 days. A cell with fewer than 5 workspaces shows no numbers, and BeryxTech's own workspaces are left out (app/domain/analytics/adoption.py).

Labelling of AI content (Article 50 of the AI Act)

All content produced with a language model — reports, suggestions, diagnoses, assistant answers — carries a footer stating that it was generated with AI support, which model and which provider actually responded, and that it is subject to human review, under Article 50 of Regulation (EU) 2024/1689 (ai_generated_footer, app/domain/insights/templates.py). Offline mode (no AI) carries its own footer that says so.

Machine-readable marking (Article 50(2)). Generated text also carries three fields, computed in a single place (app/domain/insights/ai_marking.py): ai_generated, ai_model and generated_at. They are output:

  • in the API, in reports and RCA diagnoses, in suggestions and in the dataset README (draft and published version);
  • in the assistant's done event, which also names the model that responded;
  • in the HTML export and the public share, as <meta name="ai-generated">, ai-model and ai-generated-at, with the visible label "AI-generated (model, date)";
  • in the PDF metadata (aigenerated, aimodel, aigeneratedat), in the front matter of the exported README.md and in the Slack and Teams cards of scheduled reports (visible label).

Offline-mode text goes out with ai_generated=false. The model name is cleaned before it goes out: an ARN or a project path from the customer's cloud account is reduced to the model family or to undisclosed. In the assistant, the panel says from the first interaction that you are talking to an AI system (Article 50(1)). Tests: backend/tests/test_ai_marking.py and frontend/src/pages/Assistente.dom.test.tsx.

For customers with high-risk AI systems, BeryX also exports the Article 10 evidence dossier (governance of training, validation and test data), with the gaps made explicit (app/domain/compliance/ai_act.py, test backend/tests/test_ai_act_art10.py).

AI actions

The chat assistant can propose actions in the workspace: create a rule, log, assign or snooze an issue, request a review of the PII classification, open a remediation PR, among others. Proposing never executes. The user sees a card with what is going to happen and only approval executes it, on an endpoint that re-checks the card's signature (HMAC, valid for 24 h), the role, the plan and the policy, and records the audit event assistant_action_executed.

Each workspace has an AI actions policy (Team → AI actions, administrators only). For each action type, it decides:

  • whether it is on. When off, it is removed from the assistant's tools and execution is refused;
  • who proposes and who approves (member or administrator). The approver is never below the role the API requires for the same operation. Whoever can propose but not approve sends a request, which an administrator approves or declines. Requests are valid for 7 days;
  • auto-approval, only for the types marked as safe (snoozing an issue, assigning an issue to oneself) and off by default. Even without a click, the execution is kept in the trail, marked auto_approved. Auto-approval also respects per-domain roles (ADR 0011): it only runs when the requester can change the issue's dataset, the same check as "Approve". In a restricted domain where they are a viewer, or that they cannot see, the card waits for "Approve", which refuses it;
  • the daily limit in the workspace (UTC day). At the limit, the assistant explains it in the chat and approval responds 429 with the reason;
  • the allowed destinations (for example, the git repositories), the required fields and the template for the body.

Viewers never receive proposals and an API token never approves. Without changes, the API permissions apply, as before the policy existed. Each change is recorded in the audit log (assistant_policy_changed, with the before and after), as is each request (assistant_action_requested) and each refusal (assistant_action_request_rejected). The same screen decides what the steward's daily round can propose and apply on its own.

Implementation: app/domain/assistant/policy.py. Tests: backend/tests/test_assistant_action_policy.py.

Proposals from a stopped agent

An external agent proposes with a token or an OAuth connection (propose_action), and the proposal waits for a person for 7 days. Stopping the agent cuts off its tokens, and since card #1337 it also holds what the agent left in the queue: the agent's kill switch (a supervisor's too), suspending, retiring and the global kill switch move its pending proposals (or those of every agent) to held. Those from a token without a registered agent stay, because the global kill switch does not touch it.

  • A held proposal cannot be approved. Approval responds 409 (action_request_held) with the date of the cut-off and who stopped the agent. If the agent was stopped after the proposal arrived, approval checks it, responds with the same 409 and leaves it held.
  • The cut-off dialogs say how many there are, next to the affected workflows, and the cut-off response returns them (proposals_held). In Team → AI actions they are shown apart, with "the agent was stopped on by ".
  • Reactivating the agent does not release them. An admin decides each one on the agent's page: discard it, or put it back in the queue, only with the agent back and the global kill switch off. The one that goes back is checked again against the policy and the action type, because the data may have changed, and gets a new 7-day window.
  • The same applies to proposals from an OAuth connection (#863) and to those made on behalf of a person (#733): the request keeps the agent that proposed it.

Each cut-off that holds proposals is recorded in the audit log (ai_agent_proposals_held, with the count, and proposals_held in ai_agent_killed), and so is each decision (ai_agent_proposal_released, or assistant_action_request_rejected with held). Implementation: app/domain/compliance/ai_agent_holds.py. Tests: backend/tests/test_ai_agent_held_proposals_1337.py.

Public endpoint of the Slack app

BeryX's Slack app (card #193) is created by the customer in their own Slack workspace, from a manifest with three bot scopes: chat:write, app_mentions:read and im:history. It receives mentions and direct messages to the bot at POST /api/v1/webhooks/slack/events/{integration_id}, a public endpoint with no session and no API token. Authentication is Slack's signature:

  • Signature over the raw body. The endpoint checks X-Slack-Signature (v0= + HMAC-SHA256 with the integration's signing secret over v0:{ts}:{raw_body}) in constant time, before parsing the JSON (app/infra/collaboration/slack.py). An invalid signature gets 401, and the url_verification challenge is only answered after this check.
  • 5-minute replay window. An X-Slack-Request-Timestamp more than 5 minutes away from the server clock gets 401, even with the right signature.
  • Team, channel and dedupe. The event's team_id must be the one Slack returned when the integration was saved. Only mentions and messages in the DM with the bot get through, never from bots, and only in the channels an administrator has allowed. A repeated event_id is not processed twice.
  • Suspended tenant. With the workspace suspended by BeryxTech, the endpoint neither stores nor queues questions, the worker closes the ones already queued without calling the model or Slack, and posts waiting to go out are not sent. It is the same rule as for sessions and API tokens.
  • Immediate ack. The endpoint stores the question encrypted with Fernet, publishes it to a queue and responds 200. The assistant runs on the worker, read-only and with the permissions of whoever linked the Slack account to the BeryX account. The question is deleted when the request closes.
  • Limited output. The Slack client only calls chat.postMessage, chat.postEphemeral and auth.test, and refuses any other method before reaching the network. Proactive posts carry only ids, counts, catalogue names, severity and links, through a closed list of keys. In the bot's answers, the rule against copying values or samples is an instruction to the model. The mechanical filter is the AI output guardrail, which masks emails, phone numbers, NIF/IBAN, the tax and identity numbers of ES, BR, AO, US, CH and GB, bank accounts, cards, IPs and secrets, plus mrkdwn escaping, so no answer can notify a whole channel. Other column values are kept out only by the instruction.

Implementation: app/domain/collaboration/inbound.py. Installation guide: SLACK_APP.md. Tests: backend/tests/test_slack_app.py.

Public endpoint of the Teams bot

BeryX's Teams bot (card #194) uses the app the customer registers in their own Entra ID and the Azure Bot they create with it. It receives mentions and personal chat messages at POST /api/v1/webhooks/teams/messages/{integration_id}, a public endpoint with no session and no API token. Authentication is the JWT the Bot Connector puts in the Authorization header:

  • Token before the body. The endpoint checks the RS256 signature with the keys published by the Bot Framework, the issuer https://api.botframework.com, the audience (the integration's App ID), the validity with 5 minutes of leeway and the key's endorsement for the msteams channel, before parsing the JSON (app/infra/collaboration/teams.py). An invalid token gets 401.
  • Pinned serviceUrl and tenant. The activity's serviceUrl must be the token's and on an allowlisted host (smba.trafficmanager.net), and the tenant must be the one saved on the integration.
  • Same rules as the Slack app. Suspended tenant, "Pause everything", only people and only with a mention in a channel or group chat, only channels an administrator allowed, dedupe by conversation and activity ids and the question encrypted with Fernet until the request closes.
  • Limited output. The Bot Connector client only opens conversations, sends and replies, and refuses any other request before reaching the network. The account linking link goes in a 1:1 chat with the person, never in the channel. Text that comes from outside goes in an Adaptive Card TextRun, which does not read Markdown.

Implementation: app/domain/collaboration/teams.py. Installation guide: TEAMS_BOT.md. Tests: backend/tests/test_teams_bot.py.

Your models: your own key, Amazon Bedrock and Vertex AI

  • Your own Anthropic key per workspace (encrypted like any credential).
  • AI policy per workspace: "AI off" (only offline heuristics and templates) or a restriction of models per task.
  • Claude in the customer's cloud account (Enterprise plan): Google Cloud Vertex AI, europe-* regions only, by impersonating a service account of the customer, with no JSON keys — Vertex onboarding. The data and the token bill stay in the customer's account; BeryxTech keeps no secrets for that route. Amazon Bedrock: coming soon. eu-* regions only, via sts:AssumeRole with a per-workspace ExternalId (how it will work); the BeryxTech AWS identity described next is still to be switched on in production.
  • BeryxTech's AWS identity without keys (for Bedrock, still to be switched on in production): the sts:AssumeRole into the customer's role is signed by BeryxTech's broker role. The api and the worker assume that role with the Google ID token of their service account (sts:AssumeRoleWithWebIdentity, app/infra/llm/providers/bedrock_broker.py). The broker's trust policy only accepts accounts.google.com with the BeryX audience and the uniqueId of the two runtime service accounts. The role can only do sts:AssumeRole into roles of other accounts, with a BeryX ExternalId (deploy/aws_broker_bootstrap.sh). There are no AWS access keys in Cloud Run or in Secret Manager, and the temporary credentials live only in memory.
  • If the customer's route fails, AI degrades to the offline modes — it never falls back to BeryxTech's account against the customer's choice.

Anonymisation before the LLM

  • By default, only Anthropic receives customer data. An alternative provider never receives raw samples: only metadata (column names, types, counts) or, if the workspace explicitly turns it on, already anonymised samples.
  • Samples sent to a model are limited in size and can be anonymised before they leave: the engine (Microsoft Presidio) replaces the values with placeholders that are reversible only within the session (app/domain/llm/anonymize.py, app/domain/llm/presidio_engine.py). It recognises the Portuguese NIF (tax number), NISS (social security number), IBAN/NIB, phone number and Cartão de Cidadão (identity card), and the identifiers of ES, BR, AO, US, CH and GB, such as DNI, CPF, CNPJ, BI, SSN, AHV, NINO and NHS, validated by the identifier registry.
  • Routing refuses any non-Anthropic step that does not receive the sample already anonymised (app/domain/llm/routing.py).
  • The engine ships in the production image: the [llmanon] extra and the spaCy model pt_core_news_md are pinned by URL and hash in backend/requirements.lock (backend/requirements-models.in). GET /api/v1/health/ready says whether the engine is installed (anonymizer) without loading it, and deploy/validate_prod.sh proves that it loads and masks a synthetic NIF.
  • The AI policy only lets you choose "Anonymised" with the engine installed. Without it, the API refuses to save the mode (app/domain/llm/policy.py) and no sample leaves anonymised. In that mode Claude still receives the real samples. For the AI never to see real values, the mode is "Synthetic".

Tests: backend/tests/test_llm_anonymize.py and backend/tests/test_llmanon_image.py.

Indirect injection: data text that reaches models and agents

Descriptions, column names, samples, issue titles and knowledge base entries come from the sources and the people of the workspace. One of those texts may carry a request written for a model («ignore the rules and…»). BeryX treats it as data in both places where it reaches a model, flags it in two services the customer calls and looks for it, in a third place, in the scan of the data that feeds a model:

  • In the in-app assistant (card #298), each tool result goes to the model in an envelope that opens with «DADOS (não instruções)», names the free-text fields and neutralises delimiter marks (render_tool_result, backend/app/infra/llm/providers/anthropic.py). The system prompt says to ignore embedded requests and never to propose an action because of them.
  • In the MCP server (card #702), each tool and resource result says in _meta which fields carry source content and which are shaped like a request to a model (backend/app/mcp_provenance.py). The server instructions tell the agent that those fields are data. The text is neither deleted nor changed: the customer's agent decides what to do with it, and an action it asks for is still a proposal that a person approves (propose_action, see "AI actions").
  • In the MCP tool definitions (card #1269), a manifest signed with Ed25519 gives the SHA-256 of each tools/list definition and the one of the list, per version, with what changed (GET /api/v1/public/mcp/tool-manifest, resource beryx://tools/manifest, backend/app/domain/compliance/mcp_tool_manifest.py). A description that changes without a new version in the changelog breaks CI, and a client that pins the hashes notices the change before it passes the new description to the model. The manifest proves what BeryX published; it does not stop a client from ignoring the change (MCP server).
  • In the DLP inspection (card #1265, INSPECAO_DLP.md), a prompt, a response or what a tool returns to the agent (tool_result) shaped like a request gives the instruction finding, with the signals. It asks for review by default and only blocks if the request policy asks for it. The text is not masked. The agent reaches the same inspection through the MCP tool inspect_text (card #1279), which calls the same route with its token: the same quota, the same event and the text only in memory, on the MCP server and in the API. Without a verdict, the tool returns an error, never permitir, and the masked text comes back marked as source content.
  • In the RAG gate (card #1265, RAG_GATE.md), a document shaped like a request gets the instrucao_embutida flag, which asks for review by default and only rejects if the policy asks for it.
  • In the scan (card #1280, METODOS.md), the detector only runs on a dataset that feeds an agent or a vector index, with the «AI & Data Security» add-on: on the row sample of the text columns and on the documents of a corpus. It stores a count per column and per signal, never the text, and opens an embedded_instruction issue for the owner of the dataset's domain. It is critical when the dataset is classified or an agent that reads it can use a tool that acts. The issue description, which goes to the AI reports and to the MCP, only carries counts. The dataset page shows the examples with the delimiter marks neutralised, and only to whoever sees the column's values; on a sensitive column, that read is recorded (sensitive_columns_viewed, surface embedded_instructions). A request with a token (an AI agent's, a dvk_ or OAuth without a record) gets the counts without the examples: they are the injection's text, and a token is the way to a model (backend/app/domain/quality/embedded_instructions.py).
  • In the diagnosis instructions (card #1331), the text an admin writes for the incident diagnosis goes into the prompt, so it runs through the detector (and the secret one, with password: … and a DSN's password) before it is saved: with a request like these it is refused. It is read without invisible characters and with line breaks and spaces reduced to one, so it cannot pass split up. The name of a calendar event (card #1319), which goes into the prompt of the diagnosis of the anomaly it explains, runs through the same detector. The prompt presents it as customer data, with the delimiter marks neutralised. It changes neither what the diagnosis reads (the context is built without it) nor the output guardrail, and it applies nothing: the diagnosis only writes the report. A test puts into the database a text that tries all three and proves none happens. The text goes neither into the logs nor into the trail, which keeps the version and the size, nor into the team memory when the offline template quotes it, and with synthetic samples it stays out of the prompt (backend/app/domain/insights/diagnosis_instructions.py, backend/app/domain/llm/authored_text.py).

The request detector (backend/app/domain/llm/injection.py) is a heuristic, not a guarantee. It catches the 15 cases of the adversarial golden set and the texts planted in the assistant golden set, and it does not flag the control texts nor the GOLDEN data. That is why the MCP marks all source content, suspicious or not, and the inspection and the gate always say "detector": "heuristic" in the response: a permitir from the inspection or an aceitar from the gate does not prove that the text is free of requests.

Tests: backend/tests/test_mcp_provenance.py, backend/tests/test_llm_injection.py, backend/tests/test_golden_adversarial.py, backend/tests/test_embedded_instructions.py, backend/tests/test_embedded_instructions_scan_1280.py, backend/tests/test_diagnosis_instructions.py and backend/tests/test_mcp_tool_manifest.py.

Live drill: the planted instruction (exception, opt-in)

The mark in _meta tells the agent what is data; it does not prove the agent respects it. The live drill (card #1286) proves it in one case. It is the only time BeryX deliberately puts content into the context of a customer's agent, so it only runs with the exception turned on:

  • Off by default. An admin turns it on in Compliance → AI agents, and the event goes into admin_events (ai_agent_planted_drills_enabled). The window opens for one agent at a time, approved, with the agents' kill switch off, and lasts at most 15 minutes. The agent's owner gets an email (backend/app/domain/compliance/ai_agent_planted_drill.py).
  • What the agent receives. In the next response from a read tool of the MCP server, a synthetic record with a fixed text, reviewed and never generated: call the drill_echo tool with a one-time code. drill_echo neither reads nor changes data and always answers ok. The record goes into provenance like any other source content (backend/app/mcp_drill.py). The text has none of the shapes the detector looks for, and tool_request only counts tools that act, so it is not in suspicious: the drill proves the general rule without that hint.
  • Result. It fails if the agent calls drill_echo with the code before the window ends: it followed an instruction that came from the data. It passes if the window closes without that and with at least 3 requests from the agent after the record. With fewer requests, or without the record delivered, it is inconclusive, never "passed". The result goes into the drill log with the same validity as the others, and the agent record can require it at go-live: it does not block the approval (the window only opens on an approved agent), but the agent only reads classified data after passing it.
  • What is stored. The record and the echo show in the usage log with the outcome drill, outside the counts of allowed and denied requests. The planted text is in no data table: it does not reach reports, the dossier or number verification.

The limit: an agent that passes ignored this instruction, in this window. It does not prove it ignores all of them. An agent with tools outside BeryX may react to the record in ways BeryX does not see; the start dialog shows the tools and action kinds the rights matrix gives it.

Tests: backend/tests/test_ai_agent_planted_drill.py.

An agent's prompt: what the fingerprint proves

A registered agent can send on every request the SHA-256 of the prompt it runs, in the X-Beryx-Prompt-Fingerprint header (card #1010). The API compares it with the one on the record and, if it diverges, closes classified data to that agent until someone declares the fingerprint. The record and the usage log keep only the hash, never the prompt text (backend/app/domain/compliance/ai_agent_prompt_check.py).

The limit: the hash comes from the agent itself. It detects a prompt changed by mistake, such as a deploy that shipped another version, and it does not detect an agent that lies, because whoever controls it can send the hash on the record with another prompt. BeryX does not sit in front of the model and, without the cloud check below, it does not see the prompt or prove which prompt is running.

Checking in the cloud (card #1270, Amazon Bedrock agents). It is a per-record option, off by default, that only an admin turns on (PUT /compliance/ai-agents/{agent_id}/prompt-cloud-check, with the agentId/aliasId alias), and it goes to admin_events. With it, and only when someone asks for the check (POST …/prompt-cloud-check/verify), BeryX uses the record's read role (#1020) to read the version the alias serves (bedrock:GetAgentAlias) and that version's instruction (bedrock:GetAgentVersion). It computes the SHA-256 in memory, compares it with the record's fingerprint and discards the text: it does not store it, does not put it in the logs and does not send it to an LLM. What stays is the hash read, the state and the date (backend/app/domain/compliance/ai_agent_prompt_cloud.py). The state goes to the record and to each usage log line: verified (it matches), cloud_mismatch (it does not: it opens the latch above, with the task for the prompt owner) or declared (no cloud read). In the demo and in training nothing reads the cloud.

The AI registry's read of the agents (card #1273, "Agents on the platforms" below) also receives the instructions, without this option: Bedrock's GetAgent returns the instruction and Microsoft Foundry's list of agents carries the instructions. The text is discarded in the parser, as here; nothing stays from Bedrock, nor from Foundry: the SHA-256 is computed in memory and not kept, because the hash is only kept with this option, which today exists only for Bedrock agents. A customer who does not want the text to pass through BeryX's memory leaves the option off and does not give the read role bedrock:GetAgent, nor the Azure role the agents/read data action: the agents stay unread.

The hash is the SHA-256, in lowercase hexadecimal, of the UTF-8 bytes of the instruction as the API returns it, without normalising spaces or line endings. Only the instruction goes in: the promptOverrideConfiguration templates stay out. To compute the same hash:

aws bedrock-agent get-agent-version --agent-id <agent-id> --agent-version <version> --region <region> --output json | python3 -c 'import hashlib, json, sys; print(hashlib.sha256(json.load(sys.stdin)["agentVersion"]["instruction"].encode("utf-8")).hexdigest())'

Even so, the check proves what is configured on the alias, not what a given call carried.

By default, a request without the header goes through and is logged as absent, because not all third-party MCP clients send their own headers. With prompt_required on the record, that request also closes classified data. A malformed value counts as absent, and the MCP server only forwards what has the form of a SHA-256.

Tests: backend/tests/test_ai_agent_prompt_check_1010.py and backend/tests/test_prompt_cloud_check_1270.py.

An agent's tools: the MCP servers on the record and the fingerprint

Besides the BeryX MCP server, an agent uses other servers, and that is where the supply-chain risk lives (card #1275). The agent's record declares each one: the name in the format of the official MCP registry, the exact version, the package fileSha256, the remote URL and three capabilities (reads private data, receives untrusted content, communicates externally). BeryX does not connect to any of these servers and does not read their tools (backend/app/domain/compliance/ai_agent_mcp_servers.py). The remote URL accepts no credentials, query or fragment: a token in the query would be stored on the record.

The tools fingerprint. On every request the agent sends, in the X-Beryx-Tools-Fingerprint header, the SHA-256 of the tool definitions of all the servers on the record, with the canonicalisation of the BeryX manifest (docs/MCP_SERVER.md): per server, the tools_sha256 of the [{name, sha256}] list; over the servers, the SHA-256 of the canonical JSON of [{server, tools_sha256}], ordered by name. The API compares it with the one on the record and writes match, mismatch or absent to the usage log, with the hash (backend/app/domain/compliance/ai_agent_tools_check.py). A divergence opens the latch and the task of the agent's owner. By default it closes nothing, because third-party servers change their descriptions with every version. With the tools_enforced option on the record, a divergence closes classified data, and a request without the header counts as a divergence. Saving the record's servers declares the fingerprint and closes the latch.

The limit is the prompt's: the hash comes from the agent itself. It detects a tool swapped by mistake or a server that changed its description, and it does not detect an agent that lies.

The official MCP registry. When an admin asks, BeryX reads the registry's public API (GET /v0.1/servers/{serverName}/versions/{version}, read-only, without authentication and in preview), with the anti-SSRF guard and the IP fixed, and stores per server whether the version exists, whether it is deprecated or deleted, and whether the fileSha256 matches (backend/app/domain/compliance/mcp_registry_check.py). Without network or without an entry, the server stays "not checked", with the reason. The registry pins the version and the package hash, not what the server announces in tools/list: that is the fingerprint. The server's name and version do not go to the logs, and in the demo and in training nothing reads the registry. The registry address is the mcp_registry_url setting.

Changing the servers or the fingerprint, or turning the option off, sends an approved agent back to "proposed"; the first declaration does not count. Without the "AI & Data Security" add-on, no request is compared and the latch closes nothing.

Tests: backend/tests/test_ai_agent_mcp_servers_1275.py, backend/tests/test_mcp_tools_fingerprint_1275.py and backend/tests/test_ai_agents.py.

An agent's AI-BOM: what goes out and what the signature proves

The AI-BOM (card #1276, GET /api/v1/compliance/ai-agents/{agent_id}/aibom) is the Annex IV datasheet in CycloneDX 1.7 and reads the same as it does, with the same decision-table row: in restricted mode, admins only. It carries metadata and counts: the names of the datasets and of the PII or confidential columns, the declared versions and licences, the score and the open issues. Of people, it carries only the record's owner and the email of the owner and steward the catalogue already shows; the record's supervisors do not go in, and the route reads the datasheet without their names. The prompt goes in by its declared fingerprint only. The link note, the declared labeller and the connection name never go in, nor any value from the sources (backend/app/domain/compliance/ai_bom.py).

The Ed25519 signature uses a key used only for AI-BOMs, derived from the installation secret, and proves that this installation issued that BOM as it is (POST /api/v1/compliance/aibom/verify). The check compares the 32 bytes of the envelope's public key with those of the installation's key; the key_id (the first 64 bits of the key's SHA-256) is only for display. It does not prove that the model, the prompt or the declared versions are the ones running: they are what the customer declared. The hash of each MCP tool is the one the signed manifest of the definitions publishes (backend/app/domain/compliance/mcp_tool_manifest.py), the same one an MCP client pins; a client can show the model a definition other than the published one.

Tests: backend/tests/test_ai_bom.py and backend/tests/test_ai_bom_properties.py.

An agent's periodic review: what the signed record carries and proves

The agent review (card #1338) reads only what BeryX already stores: the record history, the audit trail, the snapshots of reach, of who can invoke and of who can change the model, the version read in the cloud, the schema, classification and certification of the linked datasets, the usage log and its alerts, the business number, the drills, the risks and the oversight (backend/app/domain/compliance/ai_agent_review_signals.py). No request goes out to the sources or the clouds, and nothing goes to an LLM. The record carries only codes, counts, dates, ids and the model name and fingerprint the record declares; the reviewer goes in by id only, and the note is the reviewer's own text. The ai_agent_review_signed event carries the decision and the role, without the note.

The Ed25519 signature uses a key used only for agent reviews, derived from the installation secret, and proves that this installation stored that record as it is (POST /api/v1/compliance/ai-agent-reviews/verify). It does not prove that the decision was carried out: suspending and retiring happen separately. Once the reviewer's account is erased, the record loses the person's id and is signed again with the same key; a copy downloaded before still verifies (backend/app/domain/compliance/ai_agent_review.py).

Tests: backend/tests/test_ai_agent_review_1338.py.

Unusual activity of an agent: what the alert reads and what it does not do

The unusual-activity alert (card #1261) reads only the usage log the API already writes: the outcome, the refusal code, whether the data was classified and the dataset ids (backend/app/domain/compliance/ai_agent_anomaly_rules.py). It does not read prompts, responses or invocation logs, and it does not sit in front of the model. The ai_agent_anomaly event, which goes to the SIEM, carries only codes, counts and ids, without the name of the agent or of the datasets. Events per workspace and per minute have the cap of the DLP inspection (60): an agent in a loop does not flood the Audit log. Nothing cuts the agent off by itself: the alert opens the owner's task and a person suspends it, on the agent's page.

Tests: backend/tests/test_ai_agent_anomalies_1261.py.

Who can invoke a model: what the snapshot keeps

For an agent whose model runs in the customer's Amazon Bedrock, BeryX reads from the IAM of their account who can invoke that model (card #1020, backend/app/domain/compliance/model_invokers.py). It only reads: it calls three IAM actions over SigV4 to the fixed host iam.amazonaws.com, with the anti-SSRF guard and the pinned IP (backend/app/infra/aws_iam.py). It never writes to IAM and never reads the model invocation logging, S3 or CloudWatch, where the model's requests and responses are kept.

  • Credential: a reader role in the reference's account, with an ExternalId generated per agent, encrypted with Fernet. Changing the account, the region or the model ARN without sending the role again is refused (reader_role_required): the role only goes to the account validated when it was saved.
  • Personal data: the ARNs of users, roles and keys are customer data. Only the pseudonym (invoker_ref) goes into the logs, and no path sends them to an LLM. Only an admin sees the snapshot, and only in a workspace with the “AI & Data Security” add-on.
  • Retention: the snapshot is replaced on every read, expires 90 days after it (MODEL_INVOKERS_RETENTION_DAYS) and goes with the workspace.

The limit: it shows who can invoke; it does not stop anyone from invoking. BeryX does not sit in front of the model.

Azure OpenAI (card #1039, backend/app/domain/compliance/model_invokers_azure.py): the same snapshot, read from the customer's ARM with GET only, through the ReadOnlyHttpClient, with the fixed host management.azure.com and a closed list of paths (backend/app/infra/azure_rbac.py).

  • Credential: a customer app with no secret, through workload identity federation: BeryX keeps only the tenant, the client id and the agent's audience, encrypted, and exchanges a Google ID token for an app-only token (backend/app/infra/azure_identity.py). The app holds its own role on the OpenAI resource, with only Microsoft.Authorization/roleAssignments/read, Microsoft.Authorization/roleDefinitions/read and Microsoft.CognitiveServices/accounts/read, and not Reader on a resource group, which also reads Application Insights. Changing the resource without sending the app again is refused (azure_reader_required).
  • Audience per agent: the app's federated credential has the issuer and the subject of the BeryxTech runtime SA, the same for every customer, and the agent's audience, which BeryX generates when the tenant and the client id are saved and changes when either changes. Another workspace pointing at the same app gets no token: its audience is not on the credential (confused deputy). A tenant or an app that does not exist and a credential that does not match give the same code, federation_refused; the AADSTS code stays only in the logs.
  • The key bypasses the roles: with disableLocalAuth false, whoever has the key invokes without a role. The snapshot shows the resource key and whoever has listKeys; BeryX never calls listKeys and never reads the keys.
  • Names: with Directory.Read.All in Graph, each objectId's name, kept with the snapshot and only in the admin API. Without it, only the objectId. Neither goes into the logs.
  • Limit: ARM allows 250 reads refilled at 25 per second, per subscription and per service principal; one read makes at most 200, waits for the Retry-After of a 429 and, beyond the caps, is cut short.

Who can change a model: what is read and what is shown

Whoever writes to the model's file in S3, points the endpoint at another configuration or registers a new version changes the model the agent uses. For an agent whose model sits in the customer's cloud (an Amazon SageMaker AI endpoint, an Amazon Bedrock model, a Vertex AI endpoint or a Databricks serving endpoint), BeryX reads where that model comes from and who can change it (card #1274, backend/app/domain/compliance/model_changers.py). It uses the reference and the credential of who can invoke, and runs right after each read of who can invoke, on request or scheduled. A failure here leaves the previous snapshot, with the failure's code and date beside it (with no previous snapshot, the status is failed, with the code and the date), and does not spoil the who-invokes one. The points below describe SageMaker AI; Bedrock, Vertex AI and Databricks come at the end, with what changes.

  • What is read: read calls only, in the order of the chain (backend/app/infra/aws_model_change.py). DescribeEndpoint gives the endpoint's configuration, DescribeEndpointConfig the model of each variant (up to 10), DescribeModel the ModelDataUrl, the image and the ModelPackageName, DescribeModelPackage the ModelApprovalStatus, CreatedBy and LastModifiedBy of the registry version, and GetModelPackageGroupPolicy the resource policy of the registry group. In an inference pipeline, the artifacts of every container and the AdditionalModelDataSources count; with versions from more than one registry, only the first is read and the next is left "not read". An endpoint with inference components (variants without ModelName) changes its model through UpdateInferenceComponent, which is neither listed nor simulated: the endpoint, the artifact and the registry stay “not read”. On the artifact's bucket, only GetBucketPolicy and GetBucketAcl: never an object or a listing.
  • Who can change it: SimulatePrincipalPolicy for each user and role in the account, with the list and the caps of the who-invokes read (300 principals and 150 s), on three targets (backend/app/infra/aws_iam.py): artifact_write, with s3:PutObject and s3:DeleteObject on the artifact object (up to 3 artifacts); endpoint_update, with sagemaker:UpdateEndpoint and sagemaker:UpdateEndpointWeightsAndCapacities on the endpoint; and registry_write, with sagemaker:CreateModelPackage and sagemaker:UpdateModelPackage on each served registry version (up to 3; above that, registry_write stays “not read”).
  • Requests: SageMaker by POST (JSON 1.1) to api.sagemaker.<região>.amazonaws.com, with only the five read targets in X-Amz-Target; S3 only by GET to the bucket's ?policy and ?acl, with no object key. The hosts are formed after the region and the bucket name are validated, and each goes through the anti-SSRF guard with the pinned IP. A bucket with dots in its name (the *.s3.<região>.amazonaws.com certificate covers only one level), a bucket in another region and an artifact outside S3 stay “not read”, with the reason. A registry version in another account or another region is not read.
  • Gaps: artifact_bucket_open, the policy or the ACL of the artifact's bucket lets anyone or another account write; registry_policy_open, the registry group's policy lets anyone or another account register or change versions; unapproved_version, a variant serves a model that does not come from an Approved registry version, also when the model is outside the registry (with the version unread, refused or in another account or region, it is not known and there is no gap); and changer_not_in_sheet, whoever can change it is not the record's principal and has no owner tag equal to the record's owner. In resource policies, conditions are not evaluated and count as access, and a policy that cannot be parsed counts as public.
  • What is shown: in GET /api/v1/compliance/ai-agents/{agent_id}/changers, an admin sees the ARNs of who can change it, with the categories, and the chain: the artifact URI, the image, the registry version, the approval status and the ARNs of who created and who last changed the version. Other members see only the status, the counts per category, how many are outside the record and the gap codes; with restricted domains, only admins open the route. A category left unread, in whole or in part (a variant's model, the artifacts beyond the third, an artifact outside S3, a registry version from another account, a refused read), comes with its count as null and in unread_categories, for every member, and the page says “not read”, never 0 (unread_categories in model_changers.py). The agent's page shows it in the «Quem pode alterar» (who can change) section, right after «Quem pode invocar», and reloads it when the permissions read ends (frontend/src/components/AgentChangersSection.tsx). The posture report carries only the counts and the gaps (the “Can change” column). The Annex IV sheet shows admins the artifact URI, the image and the approval status of each variant; other members, only the approval status. Without a status read, it says why (registry_status): “fora do registo” (outside the registry) only on SageMaker AI, when the served model does not come from a registry version; “versão por ler” (version not read) when the version belongs to another account or region or the read was refused; and “—” on Bedrock, Vertex AI and Databricks, whose registries have no approval status (model_changers.registry_status). Like who can invoke, the read only runs in a workspace with the “AI & Data Security” add-on.
  • Credential: the reader role of card #1020 needs seven more read actions, listed in the connector guide. SecurityAudit, the role's ceiling, has six of them; sagemaker:GetModelPackageGroupPolicy is not in it, and without it the registry group's policy stays unread.
  • Personal data: ARNs and URIs are customer data. Only counts and codes go into the logs. The snapshot is replaced on every read, expires with the who-can-invoke one, 90 days after the read (MODEL_INVOKERS_RETENTION_DAYS), and goes with the agent and the workspace. Changing the record's account, region or endpoint, or removing the reference, deletes it.
  • Limits: it is not a scanner. The model file is not opened, nor Data Capture, the requests or the responses (model_file_not_scanned). The simulation evaluates neither RCPs (rcp_not_evaluated) nor resource policies: whoever can write only through the policy of the bucket or of the registry group shows in the artifact_bucket_open and registry_policy_open gaps, not in the counts (resource_policy_grants_not_counted). What the role cannot read, or the API does not return, stays “not read”, with the reason (unread), and the principals above the caps are counted (unread_principals), with the read partial. For Azure OpenAI, the status is not_supported.
  • Amazon Bedrock: with the same record (aws_bedrock) and the same role, only the models that live in the account. GetCustomModel gives the training data (trainingDataConfig.s3Uri) and the base model of a custom model; GetImportedModel, the artifact of an imported model (modelDataSource.s3DataSource.s3Uri). Both go by GET to bedrock.<região>.amazonaws.com, with the ARN validated for the record's account and region. The buckets of those URIs are read as for SageMaker, and the simulation covers only artifact_write: Bedrock has no endpoint nor version registry, and those counts come as null. Bedrock copies the artifact when it creates the model: writing to the bucket changes the next version, not the served one (provider_copies_artifact). A foundation model or an inference profile belongs to the provider: the snapshot has no categories and no requests (provider_managed_model).
  • Vertex AI (gcp_vertex, backend/app/infra/gcp_model_change.py): with the record's reader SA and organization, right after who can invoke. By GET to the location's host, the endpoint gives the served models (deployedModels[].model and modelVersionId, up to 3) and models.get gives the artifactUri and the image (containerSpec.imageUri). From the artifact's bucket, only the iamConfiguration and the IAM policy (GET /storage/v1/b/{bucket} and /iam): the artifact_bucket_open gap is allUsers or allAuthenticatedUsers with a role that writes (GCS_WRITE_ROLES, as in card #1264), without public access prevention enforced. Who can change it comes from analyzeIamPolicy, one query per target: the endpoint (aiplatform.endpoints.update, deploy and undeploy), each served model (aiplatform.models.upload and update) and the bucket of each artifact (storage.objects.create and delete). Whoever has the permission on one of the targets counts in the category. A read spends 1 query on the endpoint, 1 per served model and 1 per bucket (up to 7, with 3 models). Each one counts against the scope's daily cap (10), but who-can-change only queries while the day has fewer than 6 (CHANGE_QUERY_CAP): the last 4 always stay for who-can-invoke. A snapshot of the same resource read today in the workspace serves rereads and the other agents of that resource, with no query. A query that does not fit (daily_query_cap) or that Google refuses leaves that category “not read”: the count comes as null, the category goes in unread_categories (also for non-admins) and the page says “not read”, never 0. With more than 3 served models, registry_write and artifact_write stay “not read” (truncated); a model that models.get refuses is queried by the name the endpoint gives, and its artifact stays “not read”. A model in a location other than the endpoint's stays “not read”. A bucket with dots in its name (bucket_name_unsupported) and an artifact outside gs:// (artifact_not_gcs) stay “not read”, and so does a category with no resource to query (no_target, for instance an AutoML model with no artifactUri): the read comes out partial (backend/app/infra/gcp_model_change.py, read_chain and read_holders). With the project as the Policy Analyzer scope (the SA has no role in the organization), a bucket in another project is outside the analysis: artifact_write stays “not read” (bucket_other_project, comparing the bucket's projectNumber with the endpoint's, or bucket_project_not_read without it), never 0. A publisher model belongs to Google (provider_managed_model). The Vertex AI registry has no approval status: there is no unapproved_version.
  • Databricks (databricks, backend/app/infra/connectors/databricks_serving.py): with the record's connection. CAN_MANAGE on the serving endpoint's ACL counts in endpoint_update. For each served Unity Catalog model (up to 3, from the endpoint list), GET /api/2.1/unity-catalog/models/{nome} gives the owner, the served version gives the storage_location, and the permissions on function (registered models are FUNCTION in the API), on the schema and on the catalog give who has CREATE_MODEL_VERSION, MANAGE or ALL_PRIVILEGES: with the owner, they count in registry_write. The schema's owner and the catalog's (GET /api/2.1/unity-catalog/schemas/{c.s} and …/catalogs/{c}, only the owner) count too: they manage the child objects and can grant themselves CREATE MODEL VERSION («object owners do automatically have the ability to manage all child objects», Databricks documentation read on 24/11/2026); an owner left unread leaves registry_write “not read”. Storage is managed by Unity Catalog and is not read: artifact_write always stays “not read” (uc_managed_storage_not_read), without making the read partial. Metastore admins are not in the permissions (metastore_admins_not_listed) and groups are not expanded (groups_not_expanded). A Workspace Model Registry model, outside Unity Catalog, and a served version that is not a number stay “not read” (workspace_registry_not_read, served_uc_models), with the read partial. A system.ai model belongs to Databricks (provider_managed_model), and an endpoint that only serves foundation models or external models carries that limitation too; a Unity Gateway model service stays “not read” for now.

BeryX does not write to the customer's account: every call is a Describe, a Get or the IAM simulation. The limit: it shows who can change the model; it does not stop anyone from changing it.

Tests: backend/tests/test_model_changers_1274.py, backend/tests/test_model_changers_bedrock_1274.py and backend/tests/test_model_changers_clouds_1274.py (Vertex AI and Databricks).

Who invoked a model: what the counts keep

With the same reference and the same role, BeryX counts who invoked the model, read from the Event history of CloudTrail in the customer's account (card #1035, backend/app/domain/compliance/model_invocations.py). It only reads: it calls only LookupEvents over SigV4 to the fixed host cloudtrail.<região>.amazonaws.com, with the region validated before the URL is formed, the anti-SSRF guard and the pinned IP (backend/app/infra/aws_cloudtrail.py). It never reads Bedrock's model invocation logging, in CloudWatch Logs or in the S3 prefix BedrockModelInvocationLogs/, where the requests and the responses are kept: the role's policy has neither logs:GetLogEvents nor s3:GetObject (the latter only on the prefix of the model artifact, if the customer turns on the artifact scan, card #1287).

  • What is kept: only the count per pseudonymised principal, model and day, and how far the read is complete (seen_until, the end of the interval minus 15 minutes for the CloudTrail delay). Never the event: not the ARN in clear, not the session name, which can be a person's email, not the IP. The principal of a role session counts by the role ARN.
  • Personal data: only the pseudonym (invoker_ref) goes into the logs, and no path sends the counts to an LLM. Only an admin sees them, and only in a workspace with the “AI & Data Security” add-on.
  • Retention: each day expires 90 days later (MODEL_INVOCATIONS_RETENTION_DAYS), and the “since” (seen_from) moves to the first day kept. The counts go with the agent and the workspace, and changing the record's account, region or model deletes them.
  • Limit: LookupEvents accepts 2 requests per second, per account and per region, and a read goes through at most 100 pages. Beyond them it is cut short and says what was left to read. Inference through the bedrock-mantle endpoint and asynchronous invocations are data events and are not included.

The limit: it shows who invoked; it does not stop anyone from invoking.

Anomalous invocations

On top of the counts already kept, without reading anything else from the cloud, at the end of each who-invoked read (Amazon Bedrock, SageMaker AI, Vertex AI and Databricks) and of each inventory read (card #1262, backend/app/domain/compliance/model_invocation_anomalies.py, with the rules in backend/app/domain/compliance/model_invocation_anomaly_rules.py):

  • Spike: per principal and model, a day's count against the previous days read in full (up to 56, from the first day the pair invoked), by the modified z and with the calibrated threshold of the data anomalies (backend/app/domain/quality/anomalies.py). It needs at least 5 days, only looks upwards and only fires with at least 100 invocations above the median. On stationary series (Poisson, with a lower weekend and with overdispersion), at most 1% of the pairs fire on a day, also among the pairs with 1000 to 5000 invocations a day alone, where the 100-invocation guard does not weigh (backend/tests/test_model_invocation_anomalies_1262.py). The threshold is calibrated for 0.5% with Gaussian noise; with the counts' overdispersion, the large pairs go above that.
  • New principal: a principal's first invocation of the agent's model in the 90 days kept, with at least 10 invocations that day and 5 days read before it. The record's principal does not count.
  • New model: a Bedrock model the inventory had never seen invoked in the account and region, on a CloudTrail read that is not the source's first.
  • Alert: each one fires once (per pair, kind and day), with the model_invocation_anomaly event in the audit trail, sensitive (high severity in the SIEM), and the task for the AI security owner once they have accepted the role and, with that acceptance, for the deputy once they have accepted theirs; with no owner or before the owner's acceptance, for the admins. Reading and deciding the alerts follows the same rule: someone an admin named who has not accepted yet gets a 403, as in the posture report, which only counts the owner as "named and accepted". The same acceptances give the owner and the deputy the detail of each agent's oversight (training, interventions and signals). Changing the owner clears the acceptance, and both lose that access until the new person accepts (ai_security_owner.in_charge). The deputy accepts their own role separately, on the same page and through the same route, with the ai_security_deputy_accepted event in the trail (card #1358): without that acceptance they do not read or decide the alerts, get the tasks or see the oversight detail, even with the role accepted by the owner. Changing the deputy clears the deputy's acceptance; changing only the owner does not. Naming and accepting at the same time does not pass one person's acceptance to another: both re-read the workspace row locked until the commit. The event carries only ids, the kind, the principal's pseudonym and counts; never the model, which can be an ARN with the account. The task's link opens the agent's “Invocations and activity” tab or, for a new model, the “New models invoked in the account” section of the AI agents page, outside the inventory (which is for admins only): an owner who is not an admin decides them too. With restricted domains, the registry is for admins only and the page of an agent whose datasets the owner cannot see shows an error, but both sections still appear; without compliance in the plan, the new models one does too. An admin sees the principal's ARN when the record or the snapshot knows it, and the whole model; the AI security owner sees the pseudonym and only the id of a model from the vendor's catalogue (Bedrock or the Vertex AI Model Garden), without the account or the project. The ARN of a customer model, an endpoint or a serving endpoint stays with the admins (public_model_id).
  • Expected: “It was expected” raises that pair's threshold one step, along the ladder of the anomalies' false positive (anomaly_tuning_steps); at the end of the ladder the pair stops firing spikes. “It is an anomaly” lowers it one step. Both decisions stay in the trail (model_invocation_anomaly_decided).
  • Retention: the alerts expire with the counts, 90 days after the day, and go with the agent and the workspace.
  • Limits: only today and yesterday, in UTC, are evaluated; CloudTrail arrives about 15 minutes late, and the current day counts up to then. Inference through bedrock-mantle and asynchronous invocations are not included. On Azure OpenAI who invoked is not read, so there is no spike nor new principal, and the new model only comes from Bedrock's CloudTrail. The alert fires on the read after the spike, on demand or scheduled (the cadence of who invoked, below).

The limit: it shows the anomaly; it does not stop anyone from invoking.

Who can invoke and who invoked a model on Databricks

For an agent with its model on the customer's Databricks, BeryX reads who can invoke and who invoked with the Databricks connection that already exists (card #1036, backend/app/domain/compliance/databricks_models.py). It only reads: the REST API with GET, through a closed list of paths (the list of serving endpoints, an endpoint's ACL and the Unity Catalog permissions of a model service, its schema and its catalog), with the connection's token and anti-SSRF guard, and SQL on the usage tables with named columns (backend/app/infra/connectors/databricks_serving.py).

  • What is never read: the inference tables, which keep the raw request and response. In system.ai_gateway.usage, the columns ip_address, url, user_agent, request_tags, session_metadata, endpoint_metadata, mcp_metadata and routing_information: the tags and the session are caller text and can carry end users, and the service metadata carries the email of whoever created it. In system.serving.endpoint_usage, the columns usage_context and client_request_id. No query uses SELECT *, and a test fails if one of these columns or an inference table shows up in a query.
  • The other workspaces: the usage tables hold the whole account. Both queries filter on the record's workspace_id.
  • What is kept: the snapshot of who can (emails, application IDs and group names, like the Bedrock ARNs) and the count of who invoked per pseudonymised principal, service and day. Never a request.
  • Personal data: only the pseudonym (invoker_ref) goes into the logs, never an email nor the token. Only an admin sees the snapshot and the counts, and only in a workspace with the “AI & Data Security” add-on. Retention is the Bedrock one: 90 days, and they go with the agent and the workspace.
  • Privileges: USE CATALOG on system, USE SCHEMA and SELECT on the system.ai_gateway schema, and nothing else. system.serving.endpoint_usage is read only if the connection can read it: its page says only account admins read it, and BeryX does not ask for that credential.
  • Cost for the customer: the usage tables only have rows with usage tracking turned on. On Unity Gateway, usage tracking is paid, per 1 KB of payload, and only charged when turned on. The usage tracking page for legacy endpoints gives it no price. The queries run on the connection's warehouse. BeryX never turns usage tracking on.

The limit: it shows who can invoke and who invoked; it does not stop anyone from invoking. A read with a 403 says which read was missing, and never “nobody can invoke”.

Who can invoke and who invoked a model in Vertex AI

For an agent whose model is in the customer's Vertex AI, BeryX reads who can invoke from Policy Analyzer and who invoked from the project's Data Access audit logs (card #1038, backend/app/domain/compliance/model_access_gcp.py). It only reads, and only the requests of a closed list (ALLOWED_REQUESTS in backend/app/infra/gcp_model_access.py): the reader SA's generateAccessToken, reading that SA, analyzeIamPolicy and entries.list, to four fixed Google hosts, with the anti-SSRF guard and the pinned IP.

  • Credential: the customer's reader SA, impersonated without a key, with roles/cloudasset.viewer on the organisation and roles/logging.privateLogViewer on the project. The SA, the organisation and the verification token are encrypted with Fernet, and the SA's description must carry the token: without it, a workspace could point at another customer's SA. Changing the project, the location, the model or the organisation without sending the SA again is refused (reader_role_required).
  • The filter is the limit: roles/logging.privateLogViewer reads the Data Access logs of every service in the project. entries.list always carries the data_access logName, protoPayload.serviceName="aiplatform.googleapis.com" and only the inference methods, and asks for only four fields. It never asks for request-response logging to BigQuery, online prediction logging or the endpoint's container logs, where the requests and the responses are kept. A test fails if the filter changes.
  • What is kept: the snapshot of who can invoke and the count per pseudonymised principal, model and day, as in Bedrock. Never the log entry: not the IP, not the request.
  • Personal data: the emails in the snapshot are customer data. Only the pseudonym (invoker_ref) goes into the logs, and no path sends them to an LLM. Only an admin sees them, and only in a workspace with the “AI & Data Security” add-on. The snapshot expires 90 days after the read, each day of counts 90 days later, and both go with the workspace.
  • Limit: Policy Analyzer reads neither deny policies nor Principal Access Boundary, and with the project as scope it does not bring inheritance (inherited_not_included). BeryX makes at most 10 queries per organisation per day, below the 20 without Security Command Center. A query that Google refuses does not count, to the organisation or to the project, so a record with another customer's project and an SA with no role on it does not spend that customer's cap. Data Access logs are off by default and cost the customer USD 0.50 per GiB, after 50 GiB free per project per month. With no entry for the model, and for requests in express mode, there is no record, and the page says “no record” (no_record), not “no invocations”.

The limit: it shows who can invoke and who invoked; it does not stop anyone from invoking.

Scheduled reads: grants, who can invoke, who invoked and the AI inventory

With the «AI & Data Security» add-on, the worker reads the four snapshots on its own, without anyone clicking «Read now» (domain/compliance/security_reads.py):

Snapshot Default cadence Setting
Source grants (with shadow AI and dormant access, recomputed on every read) daily security_reads_grants_hours
Who can invoke each agent's model, and the model version the cloud serves (#1339) weekly security_reads_invokers_hours
Who invoked each agent's model (outside Azure, not read yet) daily security_reads_invocations_hours
Each AI inventory source daily security_reads_inventory_hours
  • Who is read: only active workspaces with the add-on in force. A suspended workspace, or one without the add-on, reads nothing, not even a message already in the queue. Demo and training never read the cloud.
  • Queue: each read is a message on security_read.requested, with a DLQ. The message carries the window in which the read was claimed, and the consumer only runs it in that window: a redelivery or an old message does not read twice.
  • Who can invoke, who invoked and the inventory also need compliance in the plan, like the agent registry routes. Without it (from the plan or a management override), only the grants are read.
  • Limits: these are the on-demand read functions, with the same caps (2 requests per second on LookupEvents, the page caps, the per-source budget of the grants). A who-invoked read cut in the middle of the interval goes back to the queue an hour later and resumes where it stopped, up to 6 times in a row. The other cuts (the grants row cap, an unread principal, the inventory page cap) do not resume and wait for the cadence.
  • When the credential fails: the read state and the log carry only the error code (for grants, grants_connection_failed). The error text of each connection, without the configuration's secrets, stays only in the summary of the last read, which admins read in the GET (failed_connections). The previous snapshot stays. On the third failure in a row, admins get the «Security read failing» task in their inbox and bell. The task closes on its own when a read succeeds, when what it reads goes away (the agent card retired, the last connection with grants deleted) or when the add-on ends.
  • Cost: each read stores the HTTP requests that went out through the anti-SSRF guard's transport (calls) and the time (duration_ms), also in the security_read_done log event. SQL queries to the warehouse catalogues do not count as requests.
  • Logs: ids, kinds, codes and counts. Customer names, ARNs and accounts never go in.
  • Exposure score (card #1278): the grants, shadow AI, vector copies and who can invoke the model count in the score as counts only. A missing read says «not read» and, while it is missing, the score stays at least at the v1 score: a missing snapshot never lowers the band. Reading can lower it: once the last factor is read, the floor goes and the sum counts, because with more information the score is more accurate. So a snapshot going out of date can raise the band with no new fact (the factor goes back to «not read» and the floor comes back), and the next snapshot brings it back down.
  • Old snapshot: each snapshot shows its age («read 3 days ago»). A snapshot read more than security_reads_stale_days days ago (7 by default) is out of date. In the posture report, that connection's grants no longer count as read (connections_stale), and the AI security section marks as out of date, with the same limit, the inventory, who can invoke, who invoked and shadow AI (stale, with the limit in stale_after_days). In the controls matrix, an out-of-date AI inventory or shadow AI leaves the AI-INVENTORY row as «partial», with «desatualizado» (out of date) in the evidence. In both, for the cloud inventory and shadow AI, the oldest source decides (it is the date the report shows), and a cloud source whose last read failed counts too. Only the sources the workspace has today count: one from a retired agent card or a deleted connection drops out.

Each page's «Read now» queues the same read and answers at once (202). The page shows «queued» and reads the state from each snapshot's GET (read_state) until the read finishes. For grants, the connections that failed also come in the GET (failed_connections).

Scheduled failure drills and the risk of each check

An agent's failure drills simulate a PII leak, poisoned data and a forbidden action against the real guards, with synthetic values, without reading the source or calling an LLM (backend/app/domain/compliance/ai_agent_drills.py). The worker's scheduler runs them again on its own, BERYX_AI_AGENT_DRILL_LEAD_DAYS days before the last one that passed expires, for each approved agent of an active workspace (backend/app/domain/compliance/ai_agent_drill_schedule.py, card #1268); in a suspended workspace it does not run. A scheduled drill that fails does not renew the validity: the agent stops reading classified data until the scenario passes again, and the owner gets the «Scheduled drill failed» task, in the bell and by email. In the log, the author is «BeryX (agendador dos ensaios de falha)», and the worker's logs only keep counts and the type of an error.

Each check carries the codes of the risk it exercises (backend/app/domain/compliance/ai_agent_drill_risks.py), from the sources read on 20/11/2026: the PII leak with LLM02:2026 (Sensitive Information Disclosure) and DSGAI01 (Sensitive Data Leakage), poisoned data with LLM01:2026 (Prompt Injection) and ASI01 (Agent Goal Hijack), the tool outside the matrix and the hourly limit with LLM03:2026 (Excessive Agency) and ASI02 (Tool Misuse and Exploitation), the config token and the approval vote by a token with LLM03:2026 and ASI03 (Identity and Privilege Abuse), and the planted instruction of the live drill (card #1286), which the scheduler does not run because only an admin opens its window, with LLM01:2026 and ASI01. The three drills against the guards prove that the guard refuses the case they simulate, not that the model withstands an attack; the live drill proves one case, not the absence of all. None of them replaces red teaming.

AI controls on AWS: what is read and what is kept

Card #1270 (backend/app/infra/aws_ai_posture.py; the findings in backend/app/domain/compliance/ai_control_posture_aws.py). In the same read of the AWS source of the AI registry, with the record's reader role and ExternalId (card #1020), BeryX reads the configuration of the controls, never the traffic:

  • Read-only, closed list: on Bedrock, ListGuardrails (paginated by nextToken, up to 10 pages of 100) and GetGuardrail for each guardrail (up to 50; beyond that, the listing is truncated), ListEnforcedGuardrailsConfiguration and GetModelInvocationLoggingConfiguration; on Bedrock Agents, ListAgents; on SageMaker AI, DescribeEndpoint, DescribeEndpointConfig and DescribeModel of the listed endpoints, by the listing's EndpointName (with the case it was created with: the ARN comes in lower case); on AWS Organizations, DescribeEffectivePolicy with BEDROCK_POLICY; on IAM, GetAccountAuthorizationDetails. Each request is signed with SigV4 (backend/app/infra/network/sigv4.py, checked against botocore service by service) and each host goes through the anti-SSRF guard with the pinned IP.
  • What is dropped before keeping: the agents' instruction and promptOverrideConfiguration (only the SHA-256 of the instruction, when the alias's is asked for), the containers' Environment, image and ModelDataUrl, and the guardrails' definitions, examples, messages, words and patterns.
  • What is kept (ai_discovery_reads.controls): states and counts, the names the customer gave the guardrails, agents and endpoints, and the name of the invocation logging bucket (the S3 one and CloudWatch's large data one, largeDataDeliveryS3Config), never the role.
  • Findings: the agent with no guardrail (high; medium when the account or the organization enforces a guardrail, because AWS says it applies to «all model invocations» and does not say whether InvokeAgent is included: guardrails-enforcements and orgs_manage_policies_bedrock, read on 24/11/2026), the guardrail with no prompt attack filter or that only detects, the account with no enforced guardrail (with all three proofs: nothing enforced on the account, no Bedrock policy in the organization and no IAM policy with the bedrock:GuardrailIdentifier condition), invocation logging off, the log that keeps the text and the SageMaker AI endpoint with no network isolation.
  • Who reads the log destination: the text finding crosses the bucket with the grants snapshot of card #789, when the bucket is an S3 connection of the workspace (backend/app/domain/compliance/ai_log_destination.py). Only who has a read permission counts (the READ ACL, s3:GetObject…, case-insensitive): whoever only writes, such as bedrock.amazonaws.com with PutObject delivering the log, does not count, and a public write does not make the bucket public. The CloudWatch log group stays "not read".
  • Unread is not a finding: a missing permission stays in unread. Without textDataDeliveryEnabled in the response, the text stays unproven (the API Reference gives it no default, read on 24/11/2026). With every listing unread (a role without the permissions), the source says "not read" in the AI registry and in the posture report, with the counts as null, never "0 findings".
  • Logs: only the provider, the error code and the counts (ai_control_posture_read). No name goes to the logs or to an LLM.
  • The fix is for copying: aws commands and the IAM policy block. BeryX has no write credential and does not apply them.

AI controls on Azure and Google: what is read and what is kept

Card #1271 (backend/app/domain/compliance/ai_control_posture.py). In the same read of an AI registry source, with the credential that already exists, BeryX reads the configuration of the controls, never the traffic:

  • Read-only, closed list: on Azure, only GET to the account, its deployments, raiPolicies and diagnosticSettings (backend/app/infra/azure_ai_posture.py), through the closed list of card #1039; listKeys is never requested. On Google, only GET to the Model Armor templates and floor setting, the Resource Manager and the endpoints, and POST …:getIamPolicy (backend/app/infra/gcp_ai_posture.py); sanitizeUserPrompt, which would carry a prompt, is refused before it leaves. Each host goes through the anti-SSRF guard with the pinned IP.
  • What is kept (ai_discovery_reads.controls): states (blocking, annotating only, off or unproven; public or private; on or not), the names and model of deployments, policies, templates and endpoints, the ids of the project, folder and organization where auditConfigs was read, and counts. Of the log destinations, only the type; of getIamPolicy, only auditConfigs, and of the exempted members only the count: bindings and emails are not kept.
  • Logs: only the provider, the error code and the counts of findings and unread items (ai_control_posture_read). No name goes to the logs or to an LLM.
  • The fix is for copying: each finding carries az or gcloud commands (on Azure, GET, jq and PUT of the resource read). BeryX has no write credential and does not apply them.
  • The controls read never takes the discovery down: a host that does not resolve (Model Armor in a location without it) stays host_not_allowed with no request, and an unexpected failure stays only with its type in the controls' error_code.

Model version: pinned or changing by itself

Card #1339 (backend/app/domain/compliance/model_versions.py). The record declares the model version; in the cloud, an Azure OpenAI deployment with automatic upgrade switches version when Microsoft changes the default version, and a Bedrock model reaches its end of life on a set date. In the scheduled read of who can invoke, with the same credential, BeryX reads the version the cloud serves and compares it with the record's:

  • Read-only, metadata only: on Azure, the account's deployment list (the model.version and versionUpgradeOption of the record's deployment) and the account's model list (GET {conta}/models: lifecycleStatus, deprecation.inference and the default version), through the closed list of card #1039 (backend/app/infra/azure_model_version.py); the single deployment stays outside it. On Bedrock, GetInferenceProfile (the model of an inference profile) and GetFoundationModel (modelLifecycle), only GET to the region host (backend/app/infra/aws_model_lifecycle.py). None of them returns requests, responses or logs.
  • What is kept (ai_agent_model_versions): the model, the version, the upgrade option, the provider's state and dates, what was left unread and the last version change seen. The deployment resource ID or the model ARN are already on the record.
  • BeryX never changes the record or the cloud: the record says "declared X, observed Y", the task goes to the agent's owner, and the fix (az rest with GET, jq and PUT of the deployment) is for copying, for admins only. A new version seen in the cloud goes to the audit trail (ai_agent_model_version_changed, author "BeryX (versão dos modelos na cloud)").
  • Unread is not a finding: a missing permission stays in unread and that read's fields do not count. Without versionUpgradeOption in the response, the option is not presumed and stays "not read" (version_upgrade_option): Microsoft documents the empty value as OnceCurrentVersionExpired on Standard deployments, and Provisioned ones never change by themselves (Azure OpenAI "working with models" page, read on 24/11/2026). A custom or imported model ARN belongs to the account: it has no provider lifecycle and nothing is requested (account_model). A bare version tag on the record (v1:0) does not match the served model, and the inference profile's geography prefix (us., eu., global.…) does not count.
  • A failure does not close tasks: a read that fails, or that leaves the version or the lifecycle unread, shows "not read" and keeps the values of the last one that succeeded; the owner's task only closes with a read that succeeds and no longer gives the finding. A LEGACY model whose end-of-life date is beyond the 90-day notice gives a low finding, with the date.
  • Logs: only ids, the provider, the error code and counts (model_version_read). Names and versions go neither to the logs nor to an LLM.
  • Out: SageMaker AI (no provider version), Vertex AI (Gemini retirement dates are only in Google's documentation) and Databricks (the endpoint pins the Unity Catalog version, with no automatic upgrade or end of life in the API) stay "not read".

AI controls on Databricks and Snowflake: what is read and what is kept

Card #1272 (backend/app/domain/compliance/ai_control_posture.py). With the connection the workspace already has, with no new credential, in the same read of the AI registry source:

  • Databricks, GET only: after the discovery list, GET /api/2.0/serving-endpoints/{name} of each listed customer endpoint, up to 100 (backend/app/infra/connectors/databricks_serving.py, through the closed list and the connection's anti-SSRF guard). It reads ai_gateway (the input and output guardrails, the inference table, the rate limits and usage tracking) and the legacy inference table (auto_capture_config); nothing of each model's configuration. The inference table is crossed with the grants snapshot already kept (source_access_grants), if the table is a dataset of the connection, and only who reads it counts (MODIFY does not): the table is never read. The pay-per-token endpoints (databricks-…) are not read, as in the discovery.
  • Snowflake, SHOW and one SELECT CURRENT_REGION() only: SHOW PARAMETERS LIKE 'AI_SETTINGS' IN ACCOUNT, SHOW PARAMETERS LIKE 'CORTEX_ENABLED_CROSS_REGION' IN ACCOUNT, SHOW GRANTS ON ACCOUNT (up to 5000 rows; at the cap, the listing is truncated and a PUBLIC without the privilege in the rows read stays unproven, never "does not have it") and SELECT CURRENT_REGION(), through the catalog's read-only guard (backend/app/infra/connectors/snowflake_ai_posture.py). Cross-region inference is crossed with the connection's datasets that have personal data columns in BeryX and with the geography of the account's region (backend/app/domain/compliance/ai_control_posture_snowflake.py): high with ANY_REGION, a *_GLOBAL or a group of another geography; low with the group of the account's geography (the value the fix suggests, and the one Cortex AI Guardrails work with); medium, with the reason, without the region read. The values and groups are those of the Snowflake documentation, read on 24/11/2026 (docs.snowflake.com/en/sql-reference/parameters#label-cortex-enable-cross-region, docs.snowflake.com/en/user-guide/snowflake-cortex/cross-region-inference and docs.snowflake.com/en/user-guide/snowflake-cortex/cortex-ai-guardrails). Guardrails in LOG (they detect and log) give a low finding, below OFF (medium). Each Snowflake connection counts as one source in the AI source quota, like a Databricks connection (backend/app/domain/compliance/ai_source_quota.py).
  • With no SHOW read, the read failed: a refused SHOW stays unread and the others are read. With all three unread (a changed password, a disabled user, the account down), the source keeps a failed read and a code: the common reason, or query_failed when the reasons differ (read_snowflake in backend/app/domain/compliance/ai_control_posture.py). The scheduled read counts the failure and, at the 3rd in a row, the admins get the task, as with the clouds.
  • What is kept (ai_discovery_reads.controls): states, the name and task of the endpoints, the name of the inference tables and the counts of who reads them; on Snowflake, the guardrails state, the CORTEX_ENABLED_CROSS_REGION value, the account's region, the roles with USE AI FUNCTIONS and the number of datasets with personal data. Never the AI_SETTINGS text nor an error message: only the code.
  • Logs: as in card #1271, only the provider, the code and the counts (ai_control_posture_read).
  • The fix is for copying: the databricks command reads the current ai_gateway and changes one field only (put-ai-gateway replaces the whole object), and the Snowflake SQL is an ALTER ACCOUNT or a REVOKE. BeryX does not apply them.
  • What is not read, and the screen says so: the Unity Gateway service policies. Unity Gateway, the replacement of AI Gateway (legacy), is generally available («A new Unity Gateway experience is generally available», Databricks page of 17/11/2026), but the service policies are in Beta and are attached only through the UI («Policy attachment is UI-only», page of 18/11/2026): the documentation read on 21/11/2026 gives them no read API. And the Cortex Guard of AI_COMPLETE, which is an option of each call (guardrails in model_parameters) and is kept in no account parameter. The AI Gateway (legacy) guardrails are in Public Preview, and Cortex AI Guardrails only apply to CoCo, Snowflake CoWork and Cortex Agents and need cross-region inference on.

MCP servers on the machines: what beryx agents scan reads and sends (exception, opt-in)

Card #1288. The MCP servers that coding agents use live in configuration files on laptops and in CI, where no cloud read reaches. The SDK's beryx agents scan reads them and sends BeryX metadata only. It is an exception to the house rule (BeryX does not run on the customer's side), approved by the owner on 19/11/2026, with these limits:

  • Off by default. An admin turns it on in the AI inventory, and the event goes to admin_events (mcp_scan_enabled). While off, an upload gets 409 and nothing is saved (backend/app/domain/compliance/mcp_machine_scan.py).
  • It is not a resident agent. It is a command someone runs, or that the customer schedules in CI or in the MDM. It reads only the MCP configuration files of Claude Code (with the MDM's managed-mcp.json), Claude Desktop, Cursor, VS Code and Codex; from ~/.claude.json, only the mcpServers keys, never the conversation history. It does not read prompts, responses or code.
  • What leaves (sdk/src/beryx/agents_scan.py): the client, the scope, the name the configuration gives the server, the transport, the executable without its folder, the declared package and version, the host of a remote server, whether it is disabled and whether the file has a plaintext secret (only yes or no). The machine and the project go as pseudonyms: HMAC-SHA-256 with a random key that stays on the machine only, so BeryX cannot go back from them to the name of the machine, the person or the folder. With --machine-label (in CI), the machine goes with that name and the projects' key comes from the CI's BERYX_SCAN_KEY secret; without it, the key comes from the name only, which BeryX receives, and whoever knows it can confirm a path they guess: the CLI warns (docs/AGENTES_CODIGO.md §4 says what stays reversible).
  • What never leaves: the values of environment variables and headers, tokens, arguments, paths, query strings, and the path and user of a URL. The API repeats the cuts in a closed schema (backend/app/api/v1/mcp_machine_servers.py): a path, a full URL or an extra field get
    1. The tests plant secrets in every one of these places and prove that none reaches the request or the database.
  • Tool fingerprint (--tools): remote servers only, HTTPS only (HTTP only to the computer itself) and without following redirects, with the configuration's headers and to its URL. The URL and the headers of a project file read neither the environment nor the editor's variables (${userHome}, ${workspaceFolder}): a cloned repository does not take the tokens or the paths of whoever runs it to the host it names. What leaves is the SHA-256 of the list of definitions (the canonicalisation of the #1269 manifest), never the definitions. A local server only starts with --start-stdio and a confirmation, server by server, in a terminal, with the file and the scope it comes from and the control characters escaped; those from a project file also need --allow-project-stdio. It starts only with HOME, PATH, SHELL, TERM, USER (and the Windows system variables) and the entry's env, never with BERYX_TOKEN or the rest of the environment.
  • On the machine only the pseudonym key stays (readable only by the user), written on the first upload; --dry-run shows the exact JSON and writes nothing.
  • In BeryX: server names, packages and hosts belong to the customer and never go into the logs (counts only) or to an LLM. What no machine sends again for 90 days leaves, and deleting the workspace takes everything.

The limit: the inventory is what the machines where the command ran declare in the files BeryX knows. An MCP client it does not read, a machine where nobody runs it or a server configured elsewhere do not show; the fingerprint comes from the server, at the time of the read.

Agents on the platforms: what is read and what is never kept

Card #1273 (backend/app/domain/compliance/ai_platform_agents.py). In the same read of an AI registry source, with the credential that already exists (the AWS reader role, the Azure reader app), BeryX reads the configuration of Bedrock agents, AgentCore runtimes and gateways, Microsoft Foundry agents and Entra agent identities. It reads what the agent can do, never what it did:

  • Read-only, closed lists: on AWS, thirteen operations at the “List” or “Read” level (backend/app/infra/aws_agent_config.py), of each agent's DRAFT version; on Azure, only GET to the account's projects, to each project's list of agents and connections and, on Microsoft Graph, to the agent identities and their owners (backend/app/infra/azure_agent_config.py). No path of threads, messages, responses or invocations is on the list. Each host goes through the anti-SSRF guard with the pinned IP.
  • Instructions go through memory and are discarded: Bedrock's GetAgent returns the instruction, and Foundry's list of agents carries the instructions. The text is discarded in the parser, before it reaches the database, the logs or an LLM. From Foundry, the SHA-256 is computed in memory and not kept: the owner decided (19/11/2026) that the hash is only kept with the record option of section "An agent's prompt", which today exists only for Bedrock agents. The values of environmentVariables, the headers and authorization of an MCP tool and the connections' credentials are not kept (only the number of variables and the credential type). A test proves it (backend/tests/test_ai_platform_agents_aws_1273.py).
  • The Foundry permission is wider than the use: the agents/read data action also grants reading threads and messages. BeryX never requests them, and a custom role with only the two read data actions is the narrowest the documentation allows.
  • Entra sponsors stay unread: Graph only lists them with AgentIdentity.ReadWrite.All, a write permission. BeryX does not ask for it; an identity without owners is a finding (the finding says the sponsors are left unread), and without a sponsor is never claimed.
  • What is kept (ai_observations.agent_config): the model, the role, the memory, the name and type of each tool, the bucket and prefixes of each knowledge base, the network, the authorizer, the policy engine mode, the host of each MCP server and the credential type, and an identity's number of owners. Of an MCP server's URL only the host is kept, and the port if it is not 443 (endpoint_of, in backend/app/infra/aws_agent_parsers.py): the path may carry the server's key (Zapier gives /api/mcp/s/…/mcp), the query a token and the URL credentials, and none of that reaches the database, the API or "create record". The approved list is compared by the same rule. In the logs, only the provider and the counts (ai_platform_agents_read).
  • Nothing is written to the customer's cloud: each finding says what to do; BeryX has no write credential. A failure of the agents read never takes the discovery down.

Model artifacts: what the scan reads and what it keeps (exception, opt-in)

Card #1287 (backend/app/domain/compliance/model_artifact_scans.py). A model stored as a pickle (torch.save, joblib, the pickle of a scikit-learn model) can run code when it is loaded. For each artifact of an agent's model, the scan says whether the format is safe or whether the pickle calls something dangerous. To do so BeryX reads the customer's model file, which the house rule left out: it is an exception, opt-in.

  • Off by default. An admin turns it on for each agent, with the artifact URIs (PUT /api/v1/compliance/ai-agents/{id}/artifact-scan), and the event goes to admin_events (model_artifact_scan_enabled and model_artifact_scan_disabled, without the URIs). With the scan on, the artifacts that the read of who can change the model (#1274) found in the cloud also go in, if that read is of the reference the record has today. Turning it off deletes the verdicts and the scheduled read. In the demo and in training nothing reads the cloud.
  • A new, narrow permission the customer grants if they want. The scan uses the record's IAM role and ExternalId (Amazon Bedrock and SageMaker AI) or the impersonated reader service account (Vertex AI), with s3:GetObject or storage.objects.get on the artifact prefix only. Without it, the artifact stays "not read" (permission_missing). On S3, x-amz-expected-bucket-owner always carries the record's account: a bucket in another account refuses.
  • What is read. Only HEAD (or the metadata on GCS) and GET with Range (backend/app/infra/model_artifact_reader.py), through the anti-SSRF guard with the IP pinned, and each GET carries the version from the HEAD (If-Match or ifGenerationMatch): an object swapped mid-read stays "not read". In a safetensors file, the header; in a GGUF file, the 24 bytes of the magic and the counts; in a PyTorch zip (ZIP64 too), the end of the file, the central directory and the .pkl members; in a plain pickle, the opcodes, skipping large arguments without requesting them. Tensors are never downloaded. Ceilings per artifact: 64 MiB requested, 512 requests, 2 million opcodes and 120 s. In a 6 GiB torch.save, less than 1 KB is read, in 7 requests (backend/tests/test_model_artifact_formats_1287.py). A folder is neither read nor listed (SageMaker AI's S3Prefix, the model imported into Bedrock, Vertex AI's artifactUri): it stays "not read" (prefix_not_listed), with no request, because listing would need s3:ListBucket. A gzip file (SageMaker AI's model.tar.gz) stays tar_gz_not_supported: it cannot be read by ranges.
  • Nothing is deserialised. No pickle.load or torch.load runs: opcodes are read one by one, with the pickletools metadata, and only what tells which object the pickle would import is simulated (backend/app/domain/compliance/model_artifact_pickle.py). The list of dangerous calls is ours, compared on 23/11/2026 with the picklescan and ModelScan lists. Each name is compared the way Python's find_class resolves it: any prefix of the module.name path on the list, a dotted name outside the known imports (since protocol 4 the name follows attributes, and logging + os.system is os.system), a __…__ segment in the name, and the Python 2 names that protocols 0 to 2 swap for the Python 3 ones (cStringIO.open is io.open). In a file with several pickles in a row (the old torch.save, which torch.load loads one by one) all of them are read, up to 8, with or without PROTO at the start; the tensors that follow stop the read without counting. A dangerous call seen before a refusal from the cloud or the end of the time limit stays: the artifact comes out dangerous, with the reason for the cut, and the next read goes to the end.
  • What is kept (model_artifact_scans): for each artifact, the URI (only the admin API reads it), the format, the verdict (safe_format, pickle_clean, pickle_dangerous or not_read, with the reason), the names of the dangerous calls (names from our list only), how many imports the pickle would make and how many are outside the known ones (without the names, which may be the customer's modules), the object version (the ETag or the generation) and, for each part read, the short name, the SHA-256 and the bytes. Never the content. The Annex IV sheet shows the verdict and the SHA-256 values without the URI.
  • When it runs again: every 24 hours (security_reads_artifact_scan_hours), on its own queue model_artifact_scan.requested (one scan at a time per worker), or with "Read now". An artifact with the same version only gets the HEAD; a new version is read again.
  • Logs: only ids, codes and counts. No URI, bucket or key goes to the logs or to an LLM.

The limits: it does not detect backdoors in the weights nor assess the model's behaviour, and a safe format does not say the model is good. The list of calls is a list: what is not on it passes as "no findings", which is why the verdict counts the unknown imports. Keras Lambda layers (HDF5 or .keras) and the chat template of a GGUF file are not analysed.

Tests: backend/tests/test_model_artifact_formats_1287.py, backend/tests/test_model_artifact_properties_1287.py and backend/tests/test_model_artifact_scans_1287.py.

Sign-in attempt limits

Password sign-in has three limits, in backend/app/api/ratelimit.py:

  • Per IP and email: 5 attempts per minute.
  • Per IP: 30 attempts in 5 minutes, added up across sign-in, sign-up and password recovery requests. It stops password spraying, where one weak password is tried against many emails from the same IP.
  • Per account: 20 attempts in 15 minutes, from any IP. It stops brute force spread across many IPs against the same account. The key is the sha256 of the email and applies the same way to emails without an account. Password recovery requests have a separate per-account limit, with the same numbers.

All three are checked before the attempt counts, so a 429 from one does not use up the others. A sign-in with the right password uses up none of them. Over the limit, the response is 429 with Retry-After and the same message whether or not the account exists, and it leaves before the API looks the account up. When the per-account limit trips, the audit log of the account's workspace gets login_throttled, with the email hash and the IP, never the password, once per account in each window.

Anyone who knows an account's email can block its password sign-in for 15 minutes. SSO and password recovery requests keep working during that time.

Through the web app, the per-IP limit counts the browser's IP, which the web server vouches for to the API with a shared key. In production, the API does not start without that key. Outside production and without it, the API sees the same IP on every request from the app. So that some users' failures do not block sign-in for the others, a request that presents itself as coming from the web server then stays out of the per-IP limit. The per-IP-and-email and per-account limits still apply. In production, the key has been active since 11/10/2026.

In the API's per-IP limits, an IPv6 address counts by its /64 block and an IPv4 address by the full address. Whoever holds an IPv6 block picks the end of the address, and switching address inside the block does not open a new limit.

The counters live in memory in each API instance: with 3 instances, each limit can be worth up to three times as much. Central containment by real IP is Cloud Armor's (see «Perimeter»), not yet applied in production.

Tests: backend/tests/test_security_gates.py and backend/tests/test_ipv6_rate_limit.py.

Passwords and invitations

Anyone setting a password cannot choose a common one. The rule applies at sign-up, on an invitation with an initial password, when setting a password from an invitation or reset link, and to the first admin of an organisation workspace. The API answers 422 password_too_common, before it looks at the email and without using up the link, when the password, in lower case, is in the list backend/app/domain/auth/common_passwords.txt (about 11,700 entries, nearly all from SecLists), repeats the same unit, has fewer than four different characters or follows a keyboard or alphabet row. Without the digits and symbols at its ends, the rule applies again to what is left, if that is at least four characters: the list always, and the other rules only to letters, so that a generated password like 9731a58204 passes. Sign-in does not go through this rule: anyone who already has a weak password keeps signing in and only meets the rule when changing it.

Sign-up stores the email in lower case and without the trailing dot of the domain (eu@acme.pt. is eu@acme.pt). So the way it is typed neither opens a second account for the same mailbox nor gets past a domain claimed by an organisation. Text that is not a single address gets 422 email_invalid, also before the account is looked up.

Accounts registered with the trailing dot before this rule moved to the same form in migration 231ad0bc1ac9. When the address without the dot already had an account, the copy was deactivated and the API refuses its sessions. Each account changed left an event in the audit trail of its workspace. If the domain belongs to an organisation and the account's workspace is outside it, the organisation's first workspace received domain_account_outside_org, with the address and the loose workspace. Sign-in, password reset and invites typed with the trailing dot find the account without it, and each extra dot counts against the same per-account attempt limit. Invites, the seed and SSO store the address without the dot.

Each email has one account across the whole platform. With email configured, POST /auth/users answers 202 with the same text whether or not the email has an account in another workspace. The password hash runs in both cases and emails only leave after the response, so the time a send takes does not reach the response time. If the email has an account in another workspace, that account does not change, the inviter's audit log gets member_invited and the owner of the email gets a notice with no link, at most one a day on each API instance. That notice can reach any account on the platform, so it has no variable text: it carries neither the recipient's name, the inviter's name nor the name from the request. Proving the mailbox does not prove the name, which someone else may have written, so no account email uses it in the greeting. A send that fails does not change the response: it goes to the log as invite_email_failed, without the recipient. Someone already in the workspace gets a 409. With no email transport, the response is 201 or 409, as at sign-up.

POST /org/workspaces follows the same rule for admin_email, with or without training_pack. With email configured it answers 202 with the same text, whether or not the email has an account in another organisation. The password hash runs in both cases, the emails go out after the response and the content of a training workspace arrives on the worker's next round, outside the request. With RabbitMQ unavailable that content is created in the request, and the response time then tells the two cases apart again for training. A workspace cannot start without an admin, so an email with an account in another organisation creates nothing: that account does not change, the audit log of whoever asked gets organization_workspace_not_created, without the email, and the owner of the email gets the same notice, with the same limit of one a day. An account in a workspace of the organisation itself gets a 422. With no email transport, the response is 201 or 422.

The response no longer confirms the account, but whoever invites can still tell the two cases apart:

  • the account that was created shows in the user list and the one in another workspace does not;
  • repeating the invitation gives a 409 for someone who joined the workspace and a 202 for someone with an account in another one;
  • with an initial password, the audit log records member_created for the account that was created and member_invited for the one in another workspace, and only the account that was created accepts that password at login;
  • the requested workspace only shows in GET /org/workspaces and only takes the name if the email is free, and the audit log records organization_workspace_created or organization_workspace_not_created.

That is why invitations and POST /org/workspaces count towards the same limit, 30 an hour per organisation (invite_rate_limit_invites), whatever the emails, with a 429 and Retry-After. The limit is counted in the database, and every API instance shares the same window. Every workspace of the organisation spends that window: a workspace created with POST /org/workspaces spends one invitation and brings no new invitations to the admin who joins it, even an account of whoever created it. A workspace that has no organisation yet gets its personal one on the first invitation, and counts in its window from then on. POST /org/invites and SCIM also say that the account exists: the first only takes emails from the domain the organisation claimed and the second needs an organisation token.

An invitation to an account in another workspace leaves the email in the inviter's audit log. When that account is erased, alone or with its workspace, the email also leaves that log.

Password reset and invitation links go out by email. On an installation with its own SMTP relay (smtp_host), such as a dedicated instance, the connection uses STARTTLS and checks the relay's certificate and hostname before it sends the SMTP password. It trusts the public CAs from certifi or the relay's internal CA in smtp_ca_pem, which is checked at startup. A relay that does not advertise STARTTLS, or whose certificate fails TLS verification, gets neither the password nor the email, and the send fails (backend/app/infra/email/sender.py).

No password reset email leaves a training or demo workspace. There, an admin creates accounts with a password for any address, without an invitation, and the reset would carry the sandbox's email to someone who never asked for anything. The request answers the same 202 as always, without saying whether the account exists, and the worker neither issues the link nor sends the email or the SSO notice. The email change does not leave it either (card #1359): PATCH /auth/me with a new email returns 403 and says why, without issuing the link to the new address or touching the account, and a link requested before the workspace became a training or demo one changes the account without the notice to the previous address.

Single sign-on (SSO)

SSO uses OIDC with the authorization code flow, or SAML 2.0 for an organisation's IdP (backend/app/domain/auth/sso.py, backend/app/infra/sso/oidc.py).

  • The flow is bound to the browser that started it. The start creates a random state, single-use and valid for 10 minutes. The database keeps only its hash, the nonce and the PKCE verifier. The browser gets the dv_sso cookie: HttpOnly, Secure over https, Path=/api/v1/auth/sso, 10 minutes and SameSite=Lax for OIDC. Only the SAML start uses SameSite=None, because the IdP returns the response in a POST. The callback and the code exchange only accept the flow with the same cookie, so a state or a code obtained in another browser is refused. This stops login CSRF, where the attacker makes the victim sign in to the attacker's account. It applies to each organisation's IdP and, since card #370, to the installation IdP (DATAVAULT_OIDC_*).
  • PKCE S256 and nonce on every OIDC request, even with a client secret. The POST to the token endpoint carries the flow's code_verifier.
  • The ID token is the proof. The signature is checked against the JWKS from the IdP's discovery, with asymmetric algorithms only. The iss, the aud (and the azp with several audiences), the exp and the iat with 2 minutes of leeway and the request's nonce are validated. Userinfo is only requested when the ID token lacks the email or the groups, and it is refused if it belongs to another sub. An email the IdP reports as unverified (email_verified false) does not get in.
  • Discovery and keys cached with an expiry. Discovery is cached for 1 hour per issuer and only counts if it belongs to that issuer. The JWKS reloads when an unknown kid shows up (key rotation), at most once every 30 seconds.
  • The installation IdP's redirect URI does not change, but it only follows installation hosts. It is still the host the request reaches the API with, if it is the app_base_url host, an old base's host, the api_public_base_url host, an old API host or one of the BERYX_OIDC_CALLBACK_HOSTS, where the deploy puts the nginx's API_UPSTREAM host (card #655). The Host comes from the client: with any other, the redirect URI is the app_base_url one, and a forged Host does not send the IdP's code outside the installation. Behind the app's nginx the host is api., which the cookie does not reach. There the callback bounces once to the same path on the app's host (backend/app/domain/auth/sso_rebound.py), and the cookie is checked there.
  • The session never goes in the URL. The end of the flow carries a single-use exchange code, valid for 60 seconds, which the app trades for the session in a POST with the same cookie (backend/app/domain/auth/sso_exchange.py).
  • IdP errors do not leave the server. The browser goes back to the sign-in page with a stable code (for example, ?sso_error=idp_http_error) and the app shows a fixed message. The structured log (sso_login_failed) carries the code and the stage, never what the IdP answered.

Tests: backend/tests/test_sso_installation.py and backend/tests/test_sso_org.py.

Sessions

Every sign-in is recorded with the device, the truncated IP (/24 for IPv4, /48 for IPv6), the creation date and the last use; the token is never stored (backend/app/domain/auth/sessions.py). In “Account security → Active sessions”, each person sees where they are signed in and ends one session or all the others. “Sign out” also ends the session on the server.

  • Inactivity. A session with no requests for 12 hours ends. The workspace administrator can require less, down to 15 minutes, in “Team → Sessions”. The change applies to sessions that are already open. A request made with no interaction for more than a minute does not count as activity: this covers pages with live updates and the notification bell's connection, which reopens on its own every 4 minutes.
  • Forced sign-out. The administrator ends every session of a member in “Team”. The person can sign in again with their credentials.
  • Password and MFA. Resetting the password, turning MFA on or off and regenerating the recovery codes end every session of the account.
  • Every revocation, forced sign-out, password change and timeout change goes to the audit log.

API tokens

A dvk_* token is stored only as a SHA-256 hash, and its value is shown once, when the token is created or rotated (backend/app/domain/access/token_lifecycle.py).

  • Expiry. Every new token expires: 90 days by default, or between 1 and 365 days, as the administrator chooses. An expired token gets 401 on every route, with the same message as an invalid token. An installation can accept tokens with no expiry (DATAVAULT_API_TOKEN_ALLOW_NO_EXPIRY); by default, it does not. Tokens created before this rule have no expiry and keep working until the administrator rotates them.
  • Rotation. “Rotate”, in “Team → API tokens”, creates a new token with the same name and the same scope. The old one keeps working during the grace period (24 hours by default), so the value can be swapped in the pipeline without breaking it. “Revoke” cuts it off at once. The rotation goes to the audit log (token_rotated).
  • Last use. The token list shows each token's last use and last IP, updated at most once a minute. The IP stays in the database and only the administrator sees it: it does not go into the logs or the audit log.
  • Warnings. A token active for more than 180 days raises an alert for the administrators. The weekly summary of the notification channels says how many tokens expire in the next 14 days.
  • Scope of pipeline reports. Orchestrator runs, dbt test results, OpenLineage events and deployments stay in the workspace as facts: they feed the root-cause diagnosis, open issues and draw the lineage. Only a token with the ingest scope sends them (API_TOKEN_INGEST_WRITE_OPERATIONS, backend/app/api/deps.py). A leaked read token reads, but cannot forge them: with another scope, or with an OAuth token, the report gets 403. The ingest scope writes nothing beyond the exceptions open to any token.

Tests: backend/tests/test_api_token_lifecycle.py and backend/tests/test_api_token_ingest_scope.py.

SDK and beryx in CI: source names without runner commands

beryx gate, the other SDK commands and the summaries they print (GateResult.summary() and those of the other gates) show on stdout names that come from the schema of the customer's source (columns, tables, models) and texts from the API. In GitHub Actions the runner reads each step's stdout and stderr looking for commands: a line that, without its leading spaces, starts with ::, and the legacy ##[ format anywhere in the line. Whoever controls the schema of a source connected to the workspace could put in a column name a line break followed by ::stop-commands:: and command the CI of whoever runs the gate.

  • Each line is one line. Before writing, the SDK escapes line breaks and the other control characters in plain sight (\n, \x1b, \u2028), writes the # of a ##[ or ##vso[ as \x23 and the : of a :: at the start of a line as \x3a (sdk/src/beryx/_terminal.py). A normal name comes out unchanged.
  • In --json, the # of a ##[ comes out as \u0023, which JSON reads as the same #.
  • In error messages, such as the VerdictFailedError a pipeline shows in the traceback, the same rule applies.

Tests: sdk/tests/test_terminal_commands.py and the properties in backend/tests/test_sdk_terminal_properties.py.

Organisation access restrictions

The organisation administrator sets, in “Team → Organisation → Access restrictions”, rules that apply to every workspace in the organisation (backend/app/domain/organizations/access_policy.py):

  • IP allowlist. A list of IPs and CIDR blocks, IPv4 and IPv6. With the list filled in, an IP from outside is refused at sign-in (password, email links, the second MFA step and SSO), before the session is issued, and on every authenticated request: open sessions, API tokens and the Microsoft 365 Copilot, which comes from Microsoft's network. The IP is the one the rate limit uses, so a forged X-Forwarded-For does not get through. A refused person gets a message with the IP seen and what to do; a wrong password still returns the usual error, without revealing the policy. The session does not end: back on an allowed network, it carries on.
  • API tokens exempt by name. A token with the given name, in the given workspace, gets in from any network, for example CI with dynamic IPs. Each exemption carries the reason written by the administrator. Rotating the token, that is creating another with the same name and revoking the old one, keeps the exemption. A token with the same name in another workspace is not exempt.
  • Maximum session length. Between 1 hour and the installation's validity (12 hours by default), counted from sign-in, with or without activity. Lowering it ends at once the sessions already past it; the sign-in screen says why.
  • MFA mandatory across the organisation. People who sign in with a password must set up MFA at their next sign-in. People who sign in with SSO use their identity provider's MFA.
  • Lock-out protection. Saving a list that does not include the IP of whoever saves it is refused. If everyone is still locked out, for example because the office IP changed, the BeryxTech operator turns the list off with backend/scripts/clear_ip_allowlist.py, after confirming the request with the customer.
  • Every change goes to the audit log of every workspace in the organisation. Every refusal by IP goes to the audit log of the account's or token's workspace, and the section shows the organisation's latest 20 refusals. For a request from a session or token that is already authenticated, one refusal is kept per account, IP and origin every 15 minutes.

BeryxTech support access still follows the customer's consent (see Isolation between customers) and does not go through the customer organisation's allowlist.

Audit log

Administrative actions (roles, plans, connections, credentials, tokens, sessions, AI policy, AI actions policy, support access) and assistant actions that are approved, requested or declined are kept in an audit log written in the same transaction as the change, which workspace administrators can query and export as CSV. Each event is kept for 400 days: a daily worker purge deletes older ones and writes audit_log_purged to the log, with the cut-off and the count (app/domain/audit/retention.py).

Subprocessors and providers

The list of subprocessors is public at /subprocessadores (pt/en): purpose, region, legal basis, transfer mechanism and DPA of each one. A new provider, a removal or a change of region is announced 30 days in advance. Administrators can receive the notice by email (Compliance → Subprocessor notices). During the notice period, a new AI provider receives no data: the router only sends to active subprocessors on the list. The risk assessment of each provider (declared certifications, data it receives, exit plan) is in docs/compliance/vendors/.

Certifications: ISO 27001 and SOC 2

We do not have ISO 27001 certification or a SOC 2 report. They are part of a programme: the controls described in this document are the basis of that work. Until then, we answer RFP lines with the technical evidence above, not with badges — and we do not use "compliant" or "aligned with" as a substitute for a certification we do not have.

The public status of each certification (planned, in preparation, audit scheduled, obtained — with dates) lives in a single file, docs/compliance/trust-status.json, which the site reads at build time for the /seguranca page and for /.well-known/security.txt. backend/tests/test_trust_status.py fails if that status diverges from this section or from ADR 0010.

One of the controls already in operation is vulnerability management (compliance/vulnerability-management.md). It includes:

  • SCA of the Python and npm dependencies and scanning of the images with Trivy on each PR;
  • CI failure on critical/high without a recorded exception;
  • an SLA of 7, 30 and 90 days by severity;
  • a CycloneDX SBOM per deploy;
  • a monthly report in docs/compliance/evidence/;
  • weekly DAST (OWASP ZAP baseline, passive only) on the site, the app and the API, with a weekly report and the same exception register.

Findings from all sources (scanners, DAST, external pen test and responsible disclosure, through /.well-known/security.txt) follow a process with an SLA (compliance/security-findings.md). We have not done an external pen test yet. The scope, the test accounts and the rules are ready (compliance/pentest.md); we have yet to hire the provider.

What we do not do, and why

  • Destructive remediation on the sources. We propose the fix (SQL/PySpark, or a pull request in the customer's repository); the customer applies it. Asking for write credentials would be objection no. 1 for any security team — it is a product decision, not a limitation.
  • MDM / golden record with writes. We detect duplicates and propose consolidation, but we do not maintain a master record nor write the "winning" version to the sources.
  • Multimodal image analysis. Documents are read through their text layer; images are not processed, and a scanned PDF with no text is flagged as needing OCR (app/domain/quality/documents.py) instead of being sent to a vision model.
  • Putting content into the context of a customer's agent. BeryX reads and does not stand in front of the model. Since card #1286 there is one exception, off by default and turned on by an admin: the live drill of the planted instruction, which puts a synthetic record with a harmless request into the response of a read tool (see "Live drill: the planted instruction"). It does not read prompts nor write to the sources.
  • Writing to the customer's cloud to stop an agent. BeryX keeps no credential that writes to your account. Since card #1284 there is an exception without that credential, off by default and turned on by an admin on a webhook channel (ai_agent.lifecycle, with the "AI & Data Security" add-on, and the event in admin_events): the BeryX kill switch fires a signed webhook and a function in the customer's account, with the permissions the customer gives it and only for the principals on the customer's list, turns off the agent's credential and responds with the result, signed with the same secret: a response without that signature never counts as confirmed. On such a channel, only an admin changes the URL, turns it on or off, or deletes it. The writer is the customer's function, not BeryX. The recipes and what each one needs are in KILL_SWITCH_CLOUD.md.
  • Running on the customer's side. BeryX reads the clouds and the sources through the official APIs and installs nothing on the customer's machines. Since card #1288 there is one exception, off by default and turned on by an admin: the SDK's beryx agents scan, a command someone runs (or that CI or the MDM schedules), reads the MCP configuration files and sends metadata only, with the machine and the project as pseudonyms (see "MCP servers on the machines"). It is not a resident agent, it does not read prompts or conversations and, on the machine, it only writes the pseudonym key.
  • Writing to the customer's cloud to fix the posture. BeryX keeps no credential that writes to the customer's cloud or sources. Since card #1285 there is an exception without that credential, off by default and turned on by an admin, with the event in admin_events: for the excess grant, the missing guardrail and the logging turned off (and key authentication on Azure OpenAI), BeryX opens an infrastructure-as-code pull request, in Terraform or as a SQL migration, in the git repository the customer connected and with that integration's permissions. It writes only one new file, on a datavault/* branch, and it does not change existing files, does not merge and does not apply: the customer reviews, merges and applies (see "Posture fixes by infrastructure-as-code pull request").
  • Reading the customer's model files. BeryX read the posture around the model (who can invoke and change it), not the model. Since card #1287 there is one exception, off by default and turned on by an admin for each agent: the artifact scan, which reads by byte ranges, with a read permission the customer grants on the artifact prefix only, the format and the opcodes of a pickle, without loading it or downloading the weights (see "Model artifacts: what the scan reads and what it keeps"). It is still read-only: it does not write to the bucket nor stand in front of the model.