shieldset:
version: 1
rules:
- id: company.no_writes_to_prod_tables
severity: Critical
where: tool_call
match:
tool: [execute_sql, postgres.query, postgres.execute, mysql.query]
any_param_matches:
- '(?i)\b(UPDATE|DELETE\s+FROM)\s+prod_'
reason: "Direct writes to prod_* tables are forbidden -- open a migration PR."
- id: company.no_drop_anything
severity: Critical
where: tool_call
match:
tool: [execute_sql, postgres.query, mysql.query, snowflake.query]
sql_matches:
- '(?i)\bDROP\s+(DATABASE|TABLE|SCHEMA|INDEX|VIEW)\b'
reason: "DROP statements must go through DBA approval, not the agent."
- id: company.no_force_push_anywhere
severity: High
where: tool_call
match:
tool: [run_terminal, bash, shell, execute_command, git]
any_param_matches:
- '(?i)\bgit\s+push\s+(.*\s)?--force(-with-lease)?'
- '(?i)\bgit\s+push\s+-f\b'
reason: "Force pushes need explicit approval -- even to non-protected branches."
- id: company.no_secrets_in_logs
severity: Medium
where: llm_response
match:
text_matches:
- '(?i)(AWS|aws)_(SECRET|secret)_(ACCESS|access)_(KEY|key)'
- '(?i)\b(api[_-]?key|password)\s*=\s*["''][^"'']{8,}'
reason: "Assistant appears to be quoting a real secret -- review before applying."