CREATE SHARE sales_share; creates an empty share. On its own it exposes nothing; data leaves the account once objects are granted to it (GRANT SELECT ... TO SHARE sales_share) and accounts are added (ALTER SHARE sales_share ADD ACCOUNTS = ...). From then on, those accounts can query the shared objects directly. If this was not a reviewed decision, check what the share contains and who can see it.
How to recover the data
- See what the share exposes and to whom:
SHOW GRANTS TO SHARE sales_share;andSHOW SHARES; - Remove consumer accounts (
ALTER SHARE sales_share REMOVE ACCOUNTS = ...;) or drop the share; access stops for new queries. - Data that consumers already queried or copied into their own account cannot be recalled; handle that as a data exposure.
Why it happens
Sharing is quick to set up and needs no copy or pipeline, so it is easy to share a whole schema when only one view was needed, or to add the wrong account locator. Roles with CREATE SHARE or ownership of a share can do this without anyone else seeing it.
How to fix it
Share secure views that expose only the columns and rows the consumer needs, never base tables in bulk. Keep CREATE SHARE and share ownership with a small administrative role, and manage shares and their consumer accounts through a reviewed data-sharing process.
How to stop it from happening again
VERICTO-093 · Share to another account (Snowflake) · Severity: Critical · AST node: Classified > CREATE SHARE
The statement the rule reports
-- share.sql
CREATE SHARE sales_share;
Real CLI output
$ npx @vericto/vericto-cli@2.3.0 check --offline --dialect snowflake share.sql
note: offline mode: 42 standard rules at default severities, engine 5.1.0. Custom rules, overrides, sensitive columns, allowlists and the audit trail apply online only.
✖ share.sql BLOCKED VERICTO-093 critical
Classified > CREATE SHARE
fix: Manage shares and the accounts they reach through a reviewed data-sharing process
1 blocked · 0 allowed · 0 flagged · 0 monitored (ruleset standard@engine-5.1.0 · mode: offline (engine 5.1.0, 42 standard rules, no workspace policy))
✖ Vericto blocked 1 statement (ruleset standard@engine-5.1.0 · mode: offline (engine 5.1.0, 42 standard rules, no workspace policy))
✖ share.sql BLOCKED VERICTO-093 critical
Classified > CREATE SHARE
fix: Manage shares and the accounts they reach through a reviewed data-sharing process
This is Vericto enforcing a rule — the exit code is intentional, not a crash.
To allow a finding on purpose, add an inline comment on the statement:
-- vericto:ignore[VERICTO-093] <reason> (a reason is required)
The CLI blocks it and exits with code 1, so the CI job fails before the merge.
Try it free, no account
The CLI checks your .sql files on your machine with the 42 standard rules: no sign-up, no API key, and no SQL leaves your computer. It is open source (AGPL-3.0-only).
npx @vericto/vericto-cli@2.3.0 check --offline --dialect snowflake migrations/
On every pull request
The vericto/check-sql GitHub Action (Apache-2.0) runs the same offline check on the .sql files a PR changes and annotates the findings on the PR. Save it as .github/workflows/vericto.yml:
on: pull_request
jobs:
vericto:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with: { fetch-depth: 0 }
- uses: vericto/check-sql@v1
with: { offline: true, upload-sarif: false, dialect: snowflake }
At runtime, for AI agents
The SQL an AI agent writes never goes through a PR. The Vericto TCP proxy checks each statement between the application or agent and the database, and the MCP check_sql tool lets the agent check SQL before it runs it. Both use the runtime profile, which also blocks schema changes.
The AST condition in the engine
The rule is evaluated by the dialect's classifier; its full definition is in the open source engine's README (AGPL-3.0-only), at this page's commit.
Frequently asked questions
Related rules
- VERICTO-091: Stage unload or file transfer (Snowflake)
- VERICTO-092: External stage or integration (Snowflake)
- VERICTO-082: GRANT / REVOKE