@xano/developer-mcp 2.3.0-beta.2 → 2.3.0-beta.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +6 -4
- package/dist/cli_docs/topics/policy.js +11 -10
- package/dist/meta_api_docs/topics/history.js +6 -4
- package/dist/meta_api_docs/topics/policy.js +14 -9
- package/dist/meta_api_docs/topics/workflows.js +1 -1
- package/dist/tools/validate_xanoscript.js +5 -4
- package/dist/xanoscript.js +1 -1
- package/dist/xanoscript_docs/README.md +2 -1
- package/dist/xanoscript_docs/docs_index.json +6 -0
- package/dist/xanoscript_docs/policies.md +202 -62
- package/dist/xanoscript_docs/policy-templates.md +267 -0
- package/dist/xanoscript_docs/survival.md +1 -1
- package/dist/xanoscript_docs/working.md +1 -1
- package/package.json +2 -2
|
@@ -0,0 +1,267 @@
|
|
|
1
|
+
# Policy templates
|
|
2
|
+
|
|
3
|
+
The platform's starting points for a new policy, and its recipes for goals that take several, from the check catalogue this documentation was generated from. The instance's own catalogue is authoritative and can differ by platform version: `GET /api:meta/workspace/{id}/policy/check` serves it as `templates`, `recipes` and `not_checkable`, `xano policy catalogue` prints it, and the Xano MCP's `xano_list_policy_checks` returns it with `detail: "full"`. The `policies` topic describes each template field.
|
|
4
|
+
|
|
5
|
+
## Using a template
|
|
6
|
+
|
|
7
|
+
- **Prefer a template.** Before writing a new policy, look for a template that covers the request, and when one fits, start from it rather than inventing a key and rules: use its key (with a free `-2`, `-3`… suffix when the branch already has that key), its title, its summary as the `statement`, its severity and its rules, and keep `active = true` with `enforcement = "advisory"`. Then change only what the request asks for. When a recipe covers the goal, follow it (see Recipes): it names the templates to create, in order, and the rules to add.
|
|
8
|
+
- **Fill every need.** "Fill" names the parameter paths each rule leaves empty (one of them is enough where they are joined by "or"). The example shows a value that fits: the template's own, else the check's catalogue example. It is a hint, never a value to copy, so fill each need with the workspace's own names.
|
|
9
|
+
- **Checks** names the checks the template's rules use; read a check's parameters, and the goals each one serves, in the `policies` topic's check catalogue.
|
|
10
|
+
- **Frameworks** names the framework tags a template carries, a second way to find it. Framework tags point to templates on related topics. They don't make a workspace compliant, and Xano doesn't track changes to these frameworks.
|
|
11
|
+
- With the CLI, `xano policy create --template <id>` creates the policy from the instance's template.
|
|
12
|
+
|
|
13
|
+
## Access control
|
|
14
|
+
|
|
15
|
+
| Template | Key | Severity | Title | Checks | Fill | Frameworks |
|
|
16
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
17
|
+
| `endpoints_need_login` | `AUTH-010` | critical | Endpoints require login | `object.auth_required` | _nothing_ | SOC 2, HIPAA |
|
|
18
|
+
| `own_records_only` | `AUTH-020` | critical | Users only reach their own records | `db.where_constraint_required`, `db.write_from_input_forbidden` | R1: `field` (e.g. `"user_id"`); R2: `fields` (e.g. `["user_id"]`) | SOC 2, HIPAA |
|
|
19
|
+
| `no_self_promotion` | `AUTH-030` | critical | Users can't make themselves admin | `db.write_from_input_forbidden` | _nothing_ | SOC 2, HIPAA |
|
|
20
|
+
| `public_endpoints_harmless` | `AUTH-003` | high | Public endpoints can't change data | `stack.statement_forbidden` | _nothing_ | |
|
|
21
|
+
| `admin_endpoints_check_role` | `AUTH-002` | critical | Admin endpoints check the caller's role | `object.statement_required` | `functions` (e.g. `["require_admin"]`) | SOC 2, HIPAA |
|
|
22
|
+
| `tokens_expire` | `SEC-014` | high | Login tokens expire within an hour | `statement.param_bound` | R2: `max` (e.g. `3600`) | SOC 2, HIPAA |
|
|
23
|
+
| `writes_check_first` | `BIZ-001` | high | Endpoints check the caller before writing | `stack.statement_order` | _nothing_ | |
|
|
24
|
+
| `protected_endpoints_run_middleware` | `AUTH-040` | high | Protected endpoints run your auth middleware | `object.middleware_required` | `middleware` (e.g. `["access_context"]`) | |
|
|
25
|
+
| `one_auth_table` | `AUTH-050` | medium | Users sign in through one auth table | `table.auth_table_rules` | _nothing_ | |
|
|
26
|
+
|
|
27
|
+
## Data protection
|
|
28
|
+
|
|
29
|
+
| Template | Key | Severity | Title | Checks | Fill | Frameworks |
|
|
30
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
31
|
+
| `no_pii_in_responses` | `DATA-010` | high | Endpoints don't return personal data | `db.output_fields_forbidden` | `fields` (e.g. `["ssn","user.password_hash"]`) | SOC 2, HIPAA, GDPR, PCI DSS |
|
|
32
|
+
| `sensitive_tables_need_login` | `CONF-010` | critical | Sensitive tables are only reached by logged-in endpoints | `object.tagged_table_access` | `table_tags` (e.g. `["phi"]`) | SOC 2, HIPAA, GDPR |
|
|
33
|
+
| `sensitive_fields_marked` | `CONF-011` | high | Sensitive fields are marked sensitive | `table.field_attribute_required` | `field_names` (e.g. `["ssn","dob"]`) | SOC 2, HIPAA, GDPR, PCI DSS |
|
|
34
|
+
| `confidential_tables_tagged` | `CONF-012` | medium | Tables holding confidential data are tagged | `table.tag_required` | `field_names` (e.g. `["notes","diagnosis"]`) | |
|
|
35
|
+
| `views_hide_sensitive` | `CONF-013` | medium | Saved views hide sensitive fields | `table.view_hide_required` | _nothing_ | SOC 2, HIPAA |
|
|
36
|
+
| `no_sensitive_data_in_logs` | `LOG-001` | high | Logs don't contain request, user or secret data | `statement.expression_rule` | _nothing_ | SOC 2, HIPAA, GDPR, PCI DSS |
|
|
37
|
+
| `audit_log_protected` | `RET-001` | high | Only the audit function writes the audit log | `workspace.object_required`, `table.write_location_restricted` | R1: `names` (e.g. `["audit_log"]`); R2: `restricted_tables` (e.g. `["audit_log"]`), `allowed_functions` (e.g. `["record_audit_event"]`) | SOC 2, HIPAA |
|
|
38
|
+
| `retained_data_cleaned_up` | `RET-002` | medium | Retained data has a cleanup task | `table.coverage_required` | `tags` (e.g. `["retained"]`) | SOC 2, GDPR |
|
|
39
|
+
|
|
40
|
+
## Secrets
|
|
41
|
+
|
|
42
|
+
| Template | Key | Severity | Title | Checks | Fill | Frameworks |
|
|
43
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
44
|
+
| `no_secrets_in_code` | `SEC-012` | critical | No secrets are hardcoded | `literal.credential_shape` | _nothing_ | SOC 2, PCI DSS |
|
|
45
|
+
|
|
46
|
+
## Integrations
|
|
47
|
+
|
|
48
|
+
| Template | Key | Severity | Title | Checks | Fill | Frameworks |
|
|
49
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
50
|
+
| `approved_vendors_only` | `VND-001` | high | Data only goes to approved vendors | `outbound.vendor_allowlist` | `hosts` (e.g. `["api.stripe.com",".example.com"]`) or `providers` (e.g. `["aws","openai"]`) | SOC 2, HIPAA, GDPR, PCI DSS |
|
|
51
|
+
| `tls_verification_on` | `SEC-011` | high | External requests verify TLS certificates | `statement.param_forbidden` | _nothing_ | SOC 2, HIPAA, PCI DSS |
|
|
52
|
+
| `external_calls_handle_errors` | `LOG-010` | medium | External calls handle their own failures | `statement.containment` | _nothing_ | |
|
|
53
|
+
| `requests_have_timeout` | `SEC-013` | medium | External requests time out quickly | `statement.param_bound` | _nothing_ | |
|
|
54
|
+
|
|
55
|
+
## Reliability
|
|
56
|
+
|
|
57
|
+
| Template | Key | Severity | Title | Checks | Fill | Frameworks |
|
|
58
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
59
|
+
| `no_destructive_sql` | `SEC-010` | high | No table truncation or raw SQL | `stack.statement_forbidden` | _nothing_ | |
|
|
60
|
+
| `middleware_surfaces_errors` | `LOG-011` | medium | Middleware doesn't swallow errors | `object.settings_forbidden` | _nothing_ | |
|
|
61
|
+
| `reads_are_paged` | `PERF-001` | medium | Endpoints never return every row | `statement.param_bound` | _nothing_ | |
|
|
62
|
+
| `get_endpoints_only_read` | `API-010` | medium | GET endpoints only read | `stack.statement_forbidden` | _nothing_ | |
|
|
63
|
+
| `inputs_validated` | `VAL-001` | medium | Endpoint inputs are typed and bounded | `object.input_rules`, `object.unused_input_forbidden` | _nothing_ | |
|
|
64
|
+
| `triggers_write_elsewhere` | `RET-010` | medium | Trigger writes don't silently skip other triggers or re-fire themselves | `trigger.write_trigger_effects` | _nothing_ | |
|
|
65
|
+
|
|
66
|
+
## Testing
|
|
67
|
+
|
|
68
|
+
| Template | Key | Severity | Title | Checks | Fill | Frameworks |
|
|
69
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
70
|
+
| `endpoints_have_tests` | `CHG-001` | low | Endpoints are tested | `object.test_coverage`, `test.assertion_required` | _nothing_ | SOC 2 |
|
|
71
|
+
|
|
72
|
+
## Conventions
|
|
73
|
+
|
|
74
|
+
| Template | Key | Severity | Title | Checks | Fill | Frameworks |
|
|
75
|
+
| --- | --- | --- | --- | --- | --- | --- |
|
|
76
|
+
| `functions_snake_case` | `CONV-010` | low | Functions are snake_case | `object.naming` | _nothing_ | |
|
|
77
|
+
| `fields_snake_case` | `CONV-011` | low | Fields are snake_case with <table>_id links | `object.naming` | _nothing_ | |
|
|
78
|
+
| `endpoint_paths_versioned` | `CONV-012` | low | Endpoint paths are versioned kebab-case | `object.naming` | _nothing_ | |
|
|
79
|
+
| `function_arguments_snake_case` | `CONV-013` | low | Function arguments are snake_case | `object.naming` | _nothing_ | |
|
|
80
|
+
| `agreed_tag_vocabulary` | `CONV-020` | low | Tags come from the agreed vocabulary | `object.tag_vocabulary` | `allowed_tags` (e.g. `["pii","phi","pci","public"]`) | |
|
|
81
|
+
| `tags_kebab_case` | `CONV-021` | low | Tags are kebab-case | `object.tag_vocabulary` | _nothing_ | |
|
|
82
|
+
| `owner_team_tagged` | `CONV-022` | low | APIs, functions and tasks name an owner team | `object.tag_required` | `tag_set` (e.g. `["team-billing","team-growth","team-platform"]`) | |
|
|
83
|
+
| `tables_classified` | `CONV-023` | low | Every table is classified | `object.tag_required` | `tag_set` (e.g. `["public","internal","confidential","restricted"]`) | |
|
|
84
|
+
| `ai_tools_described` | `CONV-030` | low | AI tools and their inputs are described | `object.description_required` | _nothing_ | |
|
|
85
|
+
| `endpoints_stay_short` | `CONV-040` | low | Endpoints and functions stay short | `stack.size_limit` | _nothing_ | |
|
|
86
|
+
| `shallow_nesting` | `CONV-041` | low | Stacks nest at most 3 levels deep | `stack.size_limit` | _nothing_ | |
|
|
87
|
+
| `no_leftover_code` | `CONV-050` | low | No leftover code | `stack.disabled_statement_forbidden`, `object.unused_input_forbidden`, `stack.unused_variable_forbidden` | _nothing_ | |
|
|
88
|
+
| `tables_have_listed_fields` | `CONV-060` | low | Every table has the listed fields | `table.field_attribute_required` | `field_names` (e.g. `["updated_at","tenant_id"]`) | |
|
|
89
|
+
|
|
90
|
+
## Recipes
|
|
91
|
+
|
|
92
|
+
A recipe covers a goal that takes several templates, such as protecting payment card data. Nothing creates a recipe: do what it asks first, create each of its templates as its own policy in the order given, then put its own rules together in one policy of your own, filling what each needs. It ends with what no rule in it can see; say so when the request reaches that far. The catalogue serves them as `recipes`.
|
|
93
|
+
|
|
94
|
+
Framework tags point to templates on related topics. They don't make a workspace compliant, and Xano doesn't track changes to these frameworks.
|
|
95
|
+
|
|
96
|
+
### Protect health data
|
|
97
|
+
|
|
98
|
+
`protect_health_data` · HIPAA. Tables holding health data are tagged and marked, reached only by logged-in callers who record each access, kept out of responses, logs and saved views, and sent only to approved vendors over verified TLS.
|
|
99
|
+
|
|
100
|
+
Keywords: health, phi, ephi, patient, medical, clinical, diagnosis, hipaa, healthcare.
|
|
101
|
+
|
|
102
|
+
First:
|
|
103
|
+
|
|
104
|
+
- Choose one tag for tables holding health data (such as phi) and add it to them: CONF-010 and the access-record rule judge nothing until a table carries it. Use the same tag as CONF-012's tag, so a new table with those fields is caught.
|
|
105
|
+
- List the fields that hold health data by exact name (diagnosis, dob, ssn) for CONF-011, CONF-012 and DATA-010.
|
|
106
|
+
- Write one function that records each access, passing the logged-in user (such as log_phi_access), and name it in the access-record rule.
|
|
107
|
+
- Approve the vendors that may receive health data (hosts, providers) for VND-001.
|
|
108
|
+
|
|
109
|
+
Templates, in order, one policy each:
|
|
110
|
+
|
|
111
|
+
1. `confidential_tables_tagged` (`CONF-012`): Tables holding confidential data are tagged
|
|
112
|
+
2. `sensitive_fields_marked` (`CONF-011`): Sensitive fields are marked sensitive
|
|
113
|
+
3. `sensitive_tables_need_login` (`CONF-010`): Sensitive tables are only reached by logged-in endpoints
|
|
114
|
+
4. `no_pii_in_responses` (`DATA-010`): Endpoints don't return personal data
|
|
115
|
+
5. `no_sensitive_data_in_logs` (`LOG-001`): Logs don't contain request, user or secret data
|
|
116
|
+
6. `views_hide_sensitive` (`CONF-013`): Saved views hide sensitive fields
|
|
117
|
+
7. `approved_vendors_only` (`VND-001`): Data only goes to approved vendors
|
|
118
|
+
8. `tls_verification_on` (`SEC-011`): External requests verify TLS certificates
|
|
119
|
+
9. `audit_log_protected` (`RET-001`): Only the audit function writes the audit log
|
|
120
|
+
|
|
121
|
+
Rules no template covers, together in one policy of your own:
|
|
122
|
+
|
|
123
|
+
- Objects reaching health tables always record the access: `object.statement_required` with `{"placement":"unconditional"}`. Fill `functions`, `reaching_table_tags`.
|
|
124
|
+
|
|
125
|
+
No rule here can see: People and training; Access reviews and change approvals; Runtime data and copies between environments; Infrastructure and network (see What no check can see).
|
|
126
|
+
|
|
127
|
+
### Protect payment card data
|
|
128
|
+
|
|
129
|
+
`protect_card_data` · PCI DSS. No table stores a card number or security code, card details go only to your payment processor over verified TLS, and its keys, your logs and your responses keep card data out of sight.
|
|
130
|
+
|
|
131
|
+
Keywords: card, credit card, payment, pan, cvv, cardholder, pci, checkout, stripe, tokenization.
|
|
132
|
+
|
|
133
|
+
First:
|
|
134
|
+
|
|
135
|
+
- Send card details straight to your payment processor and keep only its token, so no table needs a card field: the card-field rule reports any table that declares one.
|
|
136
|
+
- Approve your processor's hosts (such as api.stripe.com) for VND-001.
|
|
137
|
+
- Keep the processor's keys in environment variables: SEC-012 reports one written in code.
|
|
138
|
+
- List the card-adjacent fields you do store (card_last4, billing_address) for CONF-011 and DATA-010.
|
|
139
|
+
|
|
140
|
+
Templates, in order, one policy each:
|
|
141
|
+
|
|
142
|
+
1. `no_secrets_in_code` (`SEC-012`): No secrets are hardcoded
|
|
143
|
+
2. `approved_vendors_only` (`VND-001`): Data only goes to approved vendors
|
|
144
|
+
3. `tls_verification_on` (`SEC-011`): External requests verify TLS certificates
|
|
145
|
+
4. `sensitive_fields_marked` (`CONF-011`): Sensitive fields are marked sensitive
|
|
146
|
+
5. `no_pii_in_responses` (`DATA-010`): Endpoints don't return personal data
|
|
147
|
+
6. `no_sensitive_data_in_logs` (`LOG-001`): Logs don't contain request, user or secret data
|
|
148
|
+
|
|
149
|
+
Rules no template covers, together in one policy of your own:
|
|
150
|
+
|
|
151
|
+
- Card numbers and security codes are never stored: `table.field_attribute_required` with `{"field_names":["card_number","cvv","cvc","pan"],"forbidden":true}`.
|
|
152
|
+
|
|
153
|
+
No rule here can see: People and training; Access reviews and change approvals; Runtime data and copies between environments; Infrastructure and network (see What no check can see).
|
|
154
|
+
|
|
155
|
+
### Erase and expire personal data
|
|
156
|
+
|
|
157
|
+
`personal_data_erasure` · GDPR. Tables holding personal data are cleaned up on a schedule and reached by one function that erases a person's records, and personal fields stay marked and out of responses and logs.
|
|
158
|
+
|
|
159
|
+
Keywords: erasure, right to be forgotten, delete my data, retention, personal data, purge, dsar, privacy, gdpr, anonymise.
|
|
160
|
+
|
|
161
|
+
First:
|
|
162
|
+
|
|
163
|
+
- Tag the tables to clean up on a schedule (such as retained) for RET-002, and the tables holding personal data (such as personal) for the erasure rule: both judge only tagged tables.
|
|
164
|
+
- Write one function that erases a person's records and tag it (such as erasure); name that tag in the erasure rule. Add db.edit or db.patch to its statements where a table is anonymised rather than deleted.
|
|
165
|
+
- Choose each table's retention period inside its cleanup task: no rule reads the age it deletes at.
|
|
166
|
+
- List the personal fields by exact name for CONF-011 and DATA-010.
|
|
167
|
+
|
|
168
|
+
Templates, in order, one policy each:
|
|
169
|
+
|
|
170
|
+
1. `retained_data_cleaned_up` (`RET-002`): Retained data has a cleanup task
|
|
171
|
+
2. `sensitive_fields_marked` (`CONF-011`): Sensitive fields are marked sensitive
|
|
172
|
+
3. `no_pii_in_responses` (`DATA-010`): Endpoints don't return personal data
|
|
173
|
+
4. `no_sensitive_data_in_logs` (`LOG-001`): Logs don't contain request, user or secret data
|
|
174
|
+
|
|
175
|
+
Rules no template covers, together in one policy of your own:
|
|
176
|
+
|
|
177
|
+
- The erasure function reaches every personal-data table: `table.coverage_required` with `{"referenced_by":{"object_kinds":["function"],"statements":["db.del","db.bulk.delete"]}}`. Fill `tags`, `referenced_by.tags`.
|
|
178
|
+
|
|
179
|
+
No rule here can see: Retention age; Runtime data and copies between environments; People and training (see What no check can see).
|
|
180
|
+
|
|
181
|
+
### Keep code easy to review
|
|
182
|
+
|
|
183
|
+
`code_review_basics`. External calls handle their failures, endpoints are tested, endpoints and functions stay short and page their reads, no leftover code remains, and functions say what they do. Naming conventions are a separate choice: see the Conventions templates.
|
|
184
|
+
|
|
185
|
+
Keywords: code review, review, quality, clean code, maintainable, lint, best practice, tests, readable, error handling, breaking prod, juniors.
|
|
186
|
+
|
|
187
|
+
First:
|
|
188
|
+
|
|
189
|
+
- Tag large legacy endpoints and functions (such as legacy) and list the tag in CONV-040's except_tags until they are split.
|
|
190
|
+
|
|
191
|
+
Templates, in order, one policy each:
|
|
192
|
+
|
|
193
|
+
1. `external_calls_handle_errors` (`LOG-010`): External calls handle their own failures
|
|
194
|
+
2. `endpoints_have_tests` (`CHG-001`): Endpoints are tested
|
|
195
|
+
3. `endpoints_stay_short` (`CONV-040`): Endpoints and functions stay short
|
|
196
|
+
4. `no_leftover_code` (`CONV-050`): No leftover code
|
|
197
|
+
5. `reads_are_paged` (`PERF-001`): Endpoints never return every row
|
|
198
|
+
|
|
199
|
+
Rules no template covers, together in one policy of your own:
|
|
200
|
+
|
|
201
|
+
- Functions say what they do: `object.description_required` with `{"object_kinds":["function"],"min_length":20}`.
|
|
202
|
+
|
|
203
|
+
No rule here can see: Access reviews and change approvals; People and training (see What no check can see).
|
|
204
|
+
|
|
205
|
+
### Record who changed what
|
|
206
|
+
|
|
207
|
+
`audit_changes` · SOC 2, HIPAA. Every edit and delete of the tables you name calls one audit function, only that function writes the audit log, and nothing edits or deletes an audit entry.
|
|
208
|
+
|
|
209
|
+
Keywords: audit, audit trail, who changed, change history, history, tamper, accountability, activity log, log changes.
|
|
210
|
+
|
|
211
|
+
First:
|
|
212
|
+
|
|
213
|
+
- Create the audit log table (such as audit_log) and one function that writes an entry, passing the logged-in user (such as record_audit_event), for RET-001 and the audit rules.
|
|
214
|
+
- Name the tables whose changes are audited, by exact name, in each audit rule.
|
|
215
|
+
|
|
216
|
+
Templates, in order, one policy each:
|
|
217
|
+
|
|
218
|
+
1. `audit_log_protected` (`RET-001`): Only the audit function writes the audit log
|
|
219
|
+
|
|
220
|
+
Rules no template covers, together in one policy of your own:
|
|
221
|
+
|
|
222
|
+
- Edits of audited tables call the audit function: `object.statement_required` with `{"placement":"unconditional","when":{"statement":"db.edit"}}`. Fill `functions`, `when.tables`.
|
|
223
|
+
- Patches of audited tables call the audit function: `object.statement_required` with `{"placement":"unconditional","when":{"statement":"db.patch"}}`. Fill `functions`, `when.tables`.
|
|
224
|
+
- Deletes from audited tables call the audit function: `object.statement_required` with `{"placement":"unconditional","when":{"statement":"db.del"}}`. Fill `functions`, `when.tables`.
|
|
225
|
+
- Audit entries are never edited or deleted: `table.write_location_restricted` with `{"statements":["db.edit","db.patch","db.add_or_edit","db.del","db.truncate","db.bulk.update","db.bulk.patch","db.bulk.delete"]}`. Fill `restricted_tables`.
|
|
226
|
+
|
|
227
|
+
No rule here can see: Access reviews and change approvals; Runtime data and copies between environments; Retention age (see What no check can see).
|
|
228
|
+
|
|
229
|
+
### Keep AI calls affordable and agents safe
|
|
230
|
+
|
|
231
|
+
`ai_cost_and_agent_safety`. AI calls stay out of loops, reads are paged, agents use approved model providers, AI tools are described and cannot delete records, and deletes and emails wait for an approval check.
|
|
232
|
+
|
|
233
|
+
Keywords: ai, llm, agent, cost, spend, tokens, mcp, tool, openai, anthropic, runaway, approval, human in the loop.
|
|
234
|
+
|
|
235
|
+
First:
|
|
236
|
+
|
|
237
|
+
- Approve the model providers your agents may use (openai, anthropic) and the hosts AI calls may reach, for VND-001.
|
|
238
|
+
- Write one function that checks a person approved the action (such as require_approval), call it before each delete and email, and name it in the approval rule.
|
|
239
|
+
|
|
240
|
+
Templates, in order, one policy each:
|
|
241
|
+
|
|
242
|
+
1. `approved_vendors_only` (`VND-001`): Data only goes to approved vendors
|
|
243
|
+
2. `reads_are_paged` (`PERF-001`): Endpoints never return every row
|
|
244
|
+
3. `requests_have_timeout` (`SEC-013`): External requests time out quickly
|
|
245
|
+
4. `ai_tools_described` (`CONV-030`): AI tools and their inputs are described
|
|
246
|
+
|
|
247
|
+
Rules no template covers, together in one policy of your own:
|
|
248
|
+
|
|
249
|
+
- AI calls are not made inside loops: `statement.containment` with `{"statements":["ai.agent.run","ai.external.mcp.tool.run"],"must_not_be_inside":["foreach","for","while"]}`.
|
|
250
|
+
- AI tools cannot delete records: `stack.statement_forbidden` with `{"statements":["db.del","db.bulk.delete","db.truncate"],"object_kinds":["tool"]}`.
|
|
251
|
+
- Deletes and emails wait for an approval check: `stack.statement_order` with `{"after":["db.del","db.bulk.delete","util.send_email"]}`. Fill `before.functions`.
|
|
252
|
+
|
|
253
|
+
No rule here can see: Spend caps; Agent tool allowlists; Task retries; Runtime data and copies between environments (see What no check can see).
|
|
254
|
+
|
|
255
|
+
## What no check can see
|
|
256
|
+
|
|
257
|
+
Policies read the workspace's stored definitions. A request about any of these goes beyond them: say so plainly, and cover what a check can see with a template or a rule. The catalogue serves them as `not_checkable`.
|
|
258
|
+
|
|
259
|
+
- **People and training** (`people_and_training`): Who works on the workspace, their background checks and their security training are about people; policies read object definitions only. Keywords: training, employee, staff, background check, onboarding, offboarding, awareness, people.
|
|
260
|
+
- **Access reviews and change approvals** (`access_reviews_and_approvals`): Reviewing who can reach the workspace, and who approved a change, happens outside the definitions; a blocking policy can hold a merge but cannot see who signed it off. Keywords: access review, approval, approver, sign off, change approval, peer review, four eyes, reviewer, separation of duties.
|
|
261
|
+
- **Runtime data and copies between environments** (`runtime_data`): Policies read stored definitions, never the records in tables, what a request sent or stored, or data copied between branches, environments or tenants. Keywords: runtime, actual data, records, payload, production data, test data, copy data, environment, staging, backup, export.
|
|
262
|
+
- **Infrastructure and network** (`infrastructure`): Hosting, network segmentation, encryption at rest, backups, vulnerability scans and penetration tests are controls of Xano or your hosting provider, not workspace definitions. Keywords: network, firewall, segmentation, encryption at rest, backup, penetration test, vulnerability scan, hosting, infrastructure.
|
|
263
|
+
- **Spend caps** (`spend_caps`): No check reads what AI calls or vendors cost, or caps spend, yet; a rule can keep AI calls out of loops and reads paged. Keywords: spend, cost cap, budget, billing, token usage, usage cap, quota, rate of spend.
|
|
264
|
+
- **Task retries** (`task_retries`): Tasks have no retry setting a check could read, so how often a failed task runs again is not checked yet. Keywords: retry, retries, backoff, failed task, rerun, dead letter.
|
|
265
|
+
- **Retention age** (`retention_age`): A check confirms a cleanup task deletes from each retained table, but not yet how old a record is when it goes: the age lives in the task's own query. Keywords: retention period, how long, days, age, expire after, keep for, retention schedule.
|
|
266
|
+
- **Agent tool allowlists** (`agent_tool_allowlists`): No check limits which tools an AI agent or MCP server may expose yet; a rule can forbid statements inside tools. Keywords: tool allowlist, agent tools, mcp tools, which tools, toolset, tool permissions.
|
|
267
|
+
- **Scope by endpoint path prefix** (`path_prefix_scope`): A rule selects endpoints by tag, API group, verb or auth, not yet by a path prefix such as /admin: tag those endpoints or their API group instead. Keywords: path prefix, /admin, url prefix, route prefix, path starts with, endpoint path.
|
|
@@ -158,7 +158,7 @@ input {
|
|
|
158
158
|
|
|
159
159
|
### Workspace policies
|
|
160
160
|
|
|
161
|
-
If the project has a `policies/` folder, the branch has governance policies. Keep to the active
|
|
161
|
+
If the project has a `policies/` folder, the branch has governance policies. Keep to the active blocking ones while you write code (their findings block merges), then evaluate after changing code: `xano policy evaluate`, the `policy_check` a `xano workspace push` returns, or `xano_evaluate_policies`. `topic: "policies"` has the details.
|
|
162
162
|
|
|
163
163
|
### Available Topics
|
|
164
164
|
|
|
@@ -653,7 +653,7 @@ var $msg { value = ($status|to_text) ~ ": " ~ ($data|json_encode) }
|
|
|
653
653
|
|
|
654
654
|
## Workspace policies
|
|
655
655
|
|
|
656
|
-
If the project has a `policies/` folder, the branch has governance policies. Keep to the active
|
|
656
|
+
If the project has a `policies/` folder, the branch has governance policies. Keep to the active blocking ones while you write code (their findings block merges), then evaluate after changing code: `xano policy evaluate`, the `policy_check` a `xano workspace push` returns, or `xano_evaluate_policies`. `topic: "policies"` has the details.
|
|
657
657
|
|
|
658
658
|
## Topic Index
|
|
659
659
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xano/developer-mcp",
|
|
3
|
-
"version": "2.3.0-beta.
|
|
3
|
+
"version": "2.3.0-beta.4",
|
|
4
4
|
"description": "MCP server and library for Xano development - XanoScript validation, Meta API, Run API, and CLI documentation",
|
|
5
5
|
"mcpName": "io.github.xano-inc/xano-developer-mcp",
|
|
6
6
|
"type": "module",
|
|
@@ -63,7 +63,7 @@
|
|
|
63
63
|
"license": "MIT",
|
|
64
64
|
"dependencies": {
|
|
65
65
|
"@modelcontextprotocol/sdk": "^1.26.0",
|
|
66
|
-
"@xano/xanoscript-language-server": "^12.
|
|
66
|
+
"@xano/xanoscript-language-server": "^12.21.0",
|
|
67
67
|
"minimatch": "^10.1.2",
|
|
68
68
|
"zod": "^4.0.0"
|
|
69
69
|
},
|