.agents/skills/secure/SKILL.md
Apply Row Level Security (RLS) and Column Level Security (CLS) policies
npx skillsauth add starlake-ai/starlake-skills secureInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Applies Row Level Security (RLS) and Column Level Security (CLS) policies defined in your table configurations. Security policies control which users or groups can see which rows and columns.
starlake secure [options]
--domains <value>: Comma-separated list of domains to apply security (default: all)--tables <value>: Comma-separated list of tables to apply security (default: all)--accessToken <value>: Access token for authentication (e.g. GCP)--options k1=v1,k2=v2: Substitution arguments--scheduledDate <value>: Scheduled date for the job, format: yyyy-MM-dd'T'HH:mm:ss.SSSZ--reportFormat <value>: Report output format: console, json, or htmlSecurity policies are defined in table configuration files:
Filter rows based on user/group membership:
# In table.sl.yml
table:
rls:
- name: "USA only"
predicate: "country = 'USA'"
grants:
- "group:usa_team"
- name: "Recent data"
predicate: "order_date > CURRENT_DATE - INTERVAL 90 DAY"
grants:
- "user:[email protected]"
Restrict access to sensitive columns:
# In table.sl.yml
table:
attributes:
- name: "email"
type: "string"
accessPolicy: "PII"
- name: "credit_card"
type: "string"
accessPolicy: "SENSITIVE"
Grant table-level permissions:
# In table.sl.yml
table:
acl:
- role: "roles/bigquery.dataViewer"
grants:
- "user:[email protected]"
- "group:[email protected]"
- "serviceAccount:[email protected]"
Privacy transformations are applied during data loading to protect sensitive fields. Configure per attribute:
attributes:
- name: "ssn"
type: "string"
privacy: "HIDE" # Never stored — column is dropped
- name: "email"
type: "string"
privacy: "SHA256" # One-way hash
- name: "ip_address"
type: "string"
privacy: "MD5" # Anonymize
- name: "phone"
type: "string"
privacy: "AES" # Reversible encryption
| Type | Description | Reversible |
|---|---|---|
| HIDE | Column is completely removed from output | N/A |
| MD5 | MD5 hash of the value | No |
| SHA1 | SHA-1 hash of the value | No |
| SHA256 | SHA-256 hash of the value | No |
| SHA512 | SHA-512 hash of the value | No |
| AES | AES encryption (requires encryption key) | Yes |
Configure Column-Level Security policies at the application level for BigQuery:
# metadata/application.sl.yml
application:
accessPolicies:
apply: true
location: EU
taxonomy: RGPD
This enables BigQuery Data Catalog policy tags. Attributes with accessPolicy will be tagged accordingly, restricting column access to authorized users.
starlake secure
starlake secure --domains starbake
starlake secure --domains starbake --tables customers,orders
development
Design SQL transformations for data pipelines with quality checks and dependency management. Use when the user says "design transforms" or "create SQL transformations".
devops
Plan and track sprint progress for data pipeline implementation. Use when the user says "sprint planning" or "plan data sprint".
testing
Analyze data sources in depth: schema, quality, volume, and extraction strategy. Use when the user says "analyze data source" or "profile this data source".
data-ai
Design Starlake-compatible table schemas with types, constraints, privacy, and expectations. Use when the user says "design schema" or "create table definition".