You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat(hooks): block inline DB mutations across any CLI tool (v1.20.0)
Rebased onto main (was branched off 378471f, pre-1.17.0 through 1.19.0).
Squashed the 10 original feature/fix commits onto current main, bumped
version label from 1.17.0 to 1.20.0 to avoid collision with the existing
[1.17.0] warn-greptile-review-extraction-by-created-at release.
What this PR ships (unchanged from original PR #25 plan):
Six new `inline-db-mutation-*` rules extending the scripts-not-DB
discipline beyond Moodle/SSH to every DB CLI:
- inline-db-mutation-mysql
- inline-db-mutation-psql
- inline-db-mutation-sqlite
- inline-db-mutation-mongo
- inline-db-mutation-redis
- inline-db-mutation-gcloud-sql
Plus the `disable_if_repo_file` rule-schema field (per-repo opt-out
via a sentinel file under repo root) and a shared `db-mutation-rule`
bypass marker.
Greptile-PR-#25 fixes preserved:
- mysql/psql short-option-no-space (-e"...", --execute="...")
- mongo --eval with whitespace inside the quoted JS
- gcloud --project=PROD sql ... (equals-bound global flags)
- disable_if_repo_file walks up to repo root via .git marker
Greptile re-review fix (this rebase):
- inline-db-mutation-gcloud-sql now also catches SPACE-separated global
flags (`--project my-prod`, `--configuration prod`,
`--impersonate-service-account svc@host`, `--account user@host`,
`--region us-central1`, etc.). Pattern relaxed from a strict
`(--?flag(=value)?[[:space:]])*` chain to a generic
`([^[:space:]]+[[:space:]]+)*` token-then-space loop; false-positive
risk bounded by the literal `sql[[:space:]]+(import|export)[[:space:]]+(sql|csv|bak)`
tail. Added 8 new test cases (6 block, 2 allow).
Tests: 297 / 297 pass (test-hooks.sh), 5 / 5 pass (test-sentinel-walkup.sh).
Created by Claude Code on behalf of @lapc506
"description": "The disciplined dev lifecycle — implement issues, review PRs, sync releases, test E2E, manage sessions, and stash secrets via OS-native prompts. One plugin to make no mistakes.",
6
6
"owner": {
7
7
"name": "Luis Andres Pena Castillo",
@@ -11,7 +11,7 @@
11
11
{
12
12
"name": "make-no-mistakes",
13
13
"description": "Dev lifecycle orchestrator: disciplined Linear issue execution with worktree isolation, PR review with Greptile gating, team release sync, E2E test generation and execution, test suite previewer, security pentesting, MoSCoW + RICE prioritization, cross-platform secret stash via OS-native GUI prompts (zenity / kdialog / osascript / Get-Credential), and session management. 18 commands, 6 auto-activating skills, 2 specialized agents.",
Copy file name to clipboardExpand all lines: .claude-plugin/plugin.json
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,6 @@
1
1
{
2
2
"name": "make-no-mistakes",
3
-
"version": "1.19.0",
3
+
"version": "1.20.0",
4
4
"description": "The disciplined dev lifecycle — implement issues, review PRs, sync releases, test E2E, manage sessions, stash secrets, and enforce manifest-driven tool-call hooks. One plugin to make no mistakes.",
-`inline-db-mutation-mysql` / `-psql` / `-sqlite` / `-mongo` / `-redis` / `-gcloud-sql` — blocks inline DB mutations across any CLI (`mysql -e "UPDATE..."`, `psql -c "INSERT..."`, `sqlite3 path "DROP..."`, `mongo --eval "db.x.update(...)"`, `redis-cli SET/DEL/FLUSHALL`, `gcloud sql import/export`). Forces use of a versioned script under `scripts/` or `bin/`. SELECT-only reads are never blocked. Per-rule bypass via `# hook-bypass: db-mutation-rule`; per-repo opt-out via `touch .no-make-no-mistakes-db-mutation` at the root (memory: `feedback_scripts_not_db.md`).
249
250
-`prod-ops-no-approval` — blocks `--project=*-prod` operations without explicit acknowledgement
250
251
-`destructive-db-ops` — blocks `supabase db reset|push|repair` and inline `DROP/TRUNCATE/DELETE FROM`
0 commit comments