Hide PII from Claude Code with a scoped Snowflake role

Watch a scoped AI role and masking view keep raw customer PII away from Claude Code in Snowflake.

Who it's for: Data professionals who connect Claude Code to Snowflake and work with sensitive data.

The problem: Through an MCP server or CLI, the AI uses whatever role you authenticate as, so Claude Code can read anything you can and send it to the AI provider. In an IBM report, 97% of organizations with breaches of AI models or applications lacked proper AI access controls.

The build moves PII behind a curated view with salted hashes and has Claude Code sign in as a user with only the AI agent role.

Takeaways:

  • Keep sensitive data in a schema the AI role cannot reach.
  • Salt hashes so known emails cannot be matched.
  • Give the AI its own user so secondary roles cannot widen its reach.
  • None of this stops prompt injection.

Resources