DATA OPS

Pre-Scan Migration PRs for PII Columns Before Merge

On every pull request touching SQL migration files, parses added columns, classifies them for PII, and posts a blocking review comment requiring a tagging plan before merge.

CategoryData Ops
Enginesim
Difficultyadvanced
Triggerwebhook
Steps5
Setup~25 min

How it runs

The automated pipeline, trigger to output.

  • TriggerGitHub PR opened on migration filesGitHubGitHub
  • ActionFetch PR diff and parse new columnsGitHubGitHub
  • ActionClassify columns for PII with OpenAIOpenAI
  • LogicBranch on unclassified high-confidence PII
  • OutputPost review comment on GitHub PRGitHubGitHub

What it does

When a pull request adds or modifies database migration files, this workflow extracts the columns being created, classifies each one for likely PII, and writes a review comment back on the PR. If high-confidence PII columns are introduced without a documented classification, it flags the PR so the author addresses governance before the change ever reaches the warehouse.

When to use it

Use it to shift PII review left — catching sensitive columns at code review instead of after they ship to Snowflake or BigQuery. It's ideal for teams that want governance enforced in the same place engineers already work.

How it works

  1. 1A GitHub pull-request webhook triggers on PRs that touch migration paths.
  2. 2Fetch the PR diff and parse `ADD COLUMN` / `CREATE TABLE` statements to extract new column names and types.
  3. 3An OpenAI classifier scores each column for PII type and confidence.
  4. 4A logic branch decides: clean PRs get an approving note, PRs with unclassified high-confidence PII get flagged.
  5. 5Post the findings as a structured review comment listing each flagged column and the required next step back on the GitHub PR.

Set it up

What you configure once, before turning it on.

  1. 1
    Connect GitHubRepos, issues, pull requests, actions.
  2. 2
    Connect OpenAIModels, embeddings, files.
  3. 3
    Set each agent's modelWe leave models unset so you pick the tier — fast + cheap, or top-quality.
  4. 4
    Tune it to your dataEdit the prompts, filters, and field mappings so it matches how your team works.
  5. 5
    Test, then turn it onRun once against a sample, confirm the output, then enable the trigger.

Run this workflow in your colony.

14-day trial. No DevOps. No Sales call. Provisioned in under a minute.