failproofai 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +3 -3
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_head.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_index.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +2 -2
- package/.next/standalone/.next/server/app/_not-found.rsc +15 -15
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/_not-found.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/_not-found.segments/_index.segment.rsc +10 -10
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found.segment.rsc +3 -3
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +15 -15
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/index.segments/_head.segment.rsc +4 -4
- package/.next/standalone/.next/server/app/index.segments/_index.segment.rsc +10 -10
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +8 -8
- package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0g72weg._.js +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_0z7w.hh._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__092s1ta._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__09icjsf._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0g.lg8b._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0h..k-e._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0bo8s~-._.js → [root-of-the-server]__0lty_fo._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0okos0k._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__03kiqd5._.js → [root-of-the-server]__0v1egkj._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w6l33k._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__11pa2ra._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__12t-wym._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_10lm7or._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_0xerkr6._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_0q-m0y-._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/pages/404.html +2 -2
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +9 -9
- package/.next/standalone/.next/static/chunks/{03oepxbqx6o8~.js → 0b2_069x5qnxg.js} +2 -2
- package/.next/standalone/.next/static/chunks/{02t9.s735hqyq.js → 0de3q2juhg_dr.js} +1 -1
- package/.next/standalone/.next/static/chunks/{18cl6wups7ouq.js → 0p5sfob-upg0g.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0h5kbvg~.xf.v.js → 0tw_xfxb1tto..js} +1 -1
- package/.next/standalone/.next/static/chunks/{0od..umlku4bb.js → 0uxpbrcv44lga.js} +1 -1
- package/.next/standalone/.next/static/chunks/0xjz3w.yw5tza.js +1 -0
- package/.next/standalone/.next/static/chunks/{0xbwzy4dl87-0.js → 0y-bi_mp2rv4l.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0cwft44dh9bww.js → 11zlh73ggln0w.js} +1 -1
- package/.next/standalone/CHANGELOG.md +5 -0
- package/.next/standalone/dist/cli.mjs +4 -8
- package/.next/standalone/docs/ar/built-in-policies.mdx +100 -129
- package/.next/standalone/docs/ar/cli/install-policies.mdx +10 -11
- package/.next/standalone/docs/ar/cli/remove-policies.mdx +10 -12
- package/.next/standalone/docs/built-in-policies.mdx +3 -30
- package/.next/standalone/docs/cli/install-policies.mdx +0 -1
- package/.next/standalone/docs/cli/remove-policies.mdx +0 -1
- package/.next/standalone/docs/de/built-in-policies.mdx +65 -92
- package/.next/standalone/docs/de/cli/install-policies.mdx +3 -4
- package/.next/standalone/docs/de/cli/remove-policies.mdx +3 -4
- package/.next/standalone/docs/docs.json +5 -0
- package/.next/standalone/docs/es/built-in-policies.mdx +66 -93
- package/.next/standalone/docs/es/cli/install-policies.mdx +4 -5
- package/.next/standalone/docs/es/cli/remove-policies.mdx +4 -5
- package/.next/standalone/docs/fr/built-in-policies.mdx +83 -110
- package/.next/standalone/docs/fr/cli/install-policies.mdx +11 -12
- package/.next/standalone/docs/fr/cli/remove-policies.mdx +2 -3
- package/.next/standalone/docs/he/built-in-policies.mdx +131 -160
- package/.next/standalone/docs/he/cli/install-policies.mdx +14 -15
- package/.next/standalone/docs/he/cli/remove-policies.mdx +13 -14
- package/.next/standalone/docs/hi/built-in-policies.mdx +168 -197
- package/.next/standalone/docs/hi/cli/install-policies.mdx +10 -11
- package/.next/standalone/docs/hi/cli/remove-policies.mdx +13 -14
- package/.next/standalone/docs/it/built-in-policies.mdx +83 -110
- package/.next/standalone/docs/it/cli/install-policies.mdx +12 -13
- package/.next/standalone/docs/it/cli/remove-policies.mdx +5 -6
- package/.next/standalone/docs/ja/built-in-policies.mdx +119 -146
- package/.next/standalone/docs/ja/cli/install-policies.mdx +12 -13
- package/.next/standalone/docs/ja/cli/remove-policies.mdx +8 -9
- package/.next/standalone/docs/ko/built-in-policies.mdx +80 -107
- package/.next/standalone/docs/ko/cli/install-policies.mdx +10 -11
- package/.next/standalone/docs/ko/cli/remove-policies.mdx +2 -3
- package/.next/standalone/docs/pt-br/built-in-policies.mdx +46 -73
- package/.next/standalone/docs/pt-br/cli/install-policies.mdx +5 -6
- package/.next/standalone/docs/pt-br/cli/remove-policies.mdx +11 -12
- package/.next/standalone/docs/ru/built-in-policies.mdx +107 -132
- package/.next/standalone/docs/ru/cli/install-policies.mdx +10 -10
- package/.next/standalone/docs/ru/cli/remove-policies.mdx +13 -14
- package/.next/standalone/docs/tr/built-in-policies.mdx +106 -131
- package/.next/standalone/docs/tr/cli/install-policies.mdx +14 -15
- package/.next/standalone/docs/tr/cli/remove-policies.mdx +7 -8
- package/.next/standalone/docs/vi/built-in-policies.mdx +73 -100
- package/.next/standalone/docs/vi/cli/install-policies.mdx +17 -18
- package/.next/standalone/docs/vi/cli/remove-policies.mdx +11 -12
- package/.next/standalone/docs/zh/built-in-policies.mdx +77 -104
- package/.next/standalone/docs/zh/cli/install-policies.mdx +4 -5
- package/.next/standalone/docs/zh/cli/remove-policies.mdx +8 -9
- package/.next/standalone/package.json +1 -1
- package/.next/standalone/server.js +1 -1
- package/.next/standalone/src/hooks/builtin-policies.ts +0 -4
- package/dist/cli.mjs +4 -8
- package/package.json +1 -1
- package/src/hooks/builtin-policies.ts +0 -4
- package/.next/standalone/.next/static/chunks/0e2uz2g026ckb.js +0 -1
- /package/.next/standalone/.next/static/{En9eEShUkUjgeYbY9v6Gy → LayjxQulxIcNH19Lqgjbf}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{En9eEShUkUjgeYbY9v6Gy → LayjxQulxIcNH19Lqgjbf}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{En9eEShUkUjgeYbY9v6Gy → LayjxQulxIcNH19Lqgjbf}/_ssgManifest.js +0 -0
|
@@ -1,59 +1,59 @@
|
|
|
1
1
|
---
|
|
2
|
-
title:
|
|
3
|
-
description: "30
|
|
2
|
+
title: Built-in Policies
|
|
3
|
+
description: "सभी 30 built-in policies जो agent failure modes को catch करते हैं"
|
|
4
4
|
icon: shield
|
|
5
5
|
---
|
|
6
6
|
|
|
7
|
-
failproofai 30
|
|
7
|
+
failproofai 30 built-in policies के साथ आता है जो common agent failure modes को catch करते हैं। प्रत्येक policy एक specific hook event type और tool name पर fire होती है। नौ policies parameters स्वीकार करती हैं जो आपको code लिखे बिना उनके behavior को tune करने देती हैं। चार workflow policies एक commit → push → PR → CI pipeline को enforce करती हैं जिसे Claude को stop करने से पहले पूरा करना होता है।
|
|
8
8
|
|
|
9
9
|
---
|
|
10
10
|
|
|
11
|
-
##
|
|
11
|
+
## Overview
|
|
12
12
|
|
|
13
|
-
|
|
13
|
+
Policies को categories में grouped किया गया है:
|
|
14
14
|
|
|
15
|
-
|
|
|
15
|
+
| Category | Policies | Hook type |
|
|
16
16
|
|----------|----------|-----------|
|
|
17
|
-
| [
|
|
18
|
-
| [
|
|
19
|
-
| [
|
|
20
|
-
| [
|
|
17
|
+
| [Dangerous commands](#dangerous-commands) | block-sudo, block-rm-rf, block-curl-pipe-sh, block-failproofai-commands | PreToolUse |
|
|
18
|
+
| [Secrets (sanitizers)](#secrets-sanitizers) | sanitize-jwt, sanitize-api-keys, sanitize-connection-strings, sanitize-private-key-content, sanitize-bearer-tokens | PostToolUse |
|
|
19
|
+
| [Environment](#environment) | block-env-files, protect-env-vars | PreToolUse |
|
|
20
|
+
| [File access](#file-access) | block-read-outside-cwd, block-secrets-write | PreToolUse |
|
|
21
21
|
| [Git](#git) | block-push-master, block-work-on-main, block-force-push, warn-git-amend, warn-git-stash-drop, warn-all-files-staged | PreToolUse |
|
|
22
|
-
| [
|
|
23
|
-
| [
|
|
24
|
-
| [
|
|
22
|
+
| [Database](#database) | warn-destructive-sql, warn-schema-alteration | PreToolUse |
|
|
23
|
+
| [Warnings](#warnings) | warn-large-file-write, warn-package-publish, warn-background-process, warn-global-package-install | PreToolUse |
|
|
24
|
+
| [Workflow](#workflow) | require-commit-before-stop, require-push-before-stop, require-pr-before-stop, require-ci-green-before-stop | Stop |
|
|
25
25
|
|
|
26
|
-
- **`block-`** —
|
|
27
|
-
- **`warn-`** —
|
|
28
|
-
- **`sanitize-`** —
|
|
29
|
-
- **`require-`** —
|
|
26
|
+
- **`block-`** — agent को proceed करने से रोकता है।
|
|
27
|
+
- **`warn-`** — agent को additional context देता है ताकि वह self-correct कर सके।
|
|
28
|
+
- **`sanitize-`** — tool output से sensitive data को scrub करता है इससे पहले कि agent को दिया जाए।
|
|
29
|
+
- **`require-`** — Stop event को block करता है जब तक conditions पूरी न हो जाएं।
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
33
|
<Tip>
|
|
34
|
-
|
|
34
|
+
हर policy `policyParams` में एक optional `hint` field को support करती है। Hint को deny या instruct message में append किया जाता है जो Claude देखता है, actionable guidance देते हुए बिना policy code को modify किए। Built-in, custom, और convention policies के साथ काम करता है। विस्तार के लिए [Configuration → hint](/hi/configuration#hint-cross-cutting) देखें।
|
|
35
35
|
</Tip>
|
|
36
36
|
|
|
37
37
|
---
|
|
38
38
|
|
|
39
|
-
##
|
|
39
|
+
## Dangerous commands
|
|
40
40
|
|
|
41
|
-
|
|
41
|
+
Agents को उन operations से रोकें जो undo करने में मुश्किल हैं या host system को damage कर सकते हैं।
|
|
42
42
|
|
|
43
43
|
### `block-sudo`
|
|
44
44
|
|
|
45
|
-
|
|
46
|
-
|
|
45
|
+
**Event:** PreToolUse (Bash)
|
|
46
|
+
**Default:** किसी भी `sudo` command को deny करता है।
|
|
47
47
|
|
|
48
|
-
|
|
48
|
+
Invocations को block करता है जिनमें `sudo` keyword शामिल होता है। Pattern matching को shell operator injection के through bypass को रोकने के लिए raw string पर नहीं, parsed command tokens पर किया जाता है।
|
|
49
49
|
|
|
50
|
-
|
|
50
|
+
**Parameters:**
|
|
51
51
|
|
|
52
|
-
|
|
|
52
|
+
| Param | Type | Default | Description |
|
|
53
53
|
|-------|------|---------|-------------|
|
|
54
|
-
| `allowPatterns` | `string[]` | `[]` |
|
|
54
|
+
| `allowPatterns` | `string[]` | `[]` | Exact command prefixes जो permitted हैं। प्रत्येक entry को parsed argv tokens के against match किया जाता है। |
|
|
55
55
|
|
|
56
|
-
|
|
56
|
+
**Example:**
|
|
57
57
|
|
|
58
58
|
```json
|
|
59
59
|
{
|
|
@@ -65,26 +65,26 @@ failproofai 30 बिल्ट-इन पॉलिसीज़ के साथ
|
|
|
65
65
|
}
|
|
66
66
|
```
|
|
67
67
|
|
|
68
|
-
इस
|
|
68
|
+
इस config के साथ, `sudo systemctl status nginx` को allow किया जाता है, लेकिन `sudo rm /etc/hosts` को deny किया जाता है।
|
|
69
69
|
|
|
70
70
|
<Note>
|
|
71
|
-
|
|
71
|
+
Patterns को raw command string पर नहीं, parsed tokens के against match किया जाता है। यह appended shell operators के through bypass को रोकता है (उदाहरण के लिए `sudo systemctl status x; rm -rf /` को `sudo systemctl status *` से match नहीं किया जाता)।
|
|
72
72
|
</Note>
|
|
73
73
|
|
|
74
74
|
---
|
|
75
75
|
|
|
76
76
|
### `block-rm-rf`
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
78
|
+
**Event:** PreToolUse (Bash)
|
|
79
|
+
**Default:** `rm -rf`, `rm -fr`, और similar recursive deletion forms को deny करता है।
|
|
80
80
|
|
|
81
|
-
|
|
81
|
+
**Parameters:**
|
|
82
82
|
|
|
83
|
-
|
|
|
83
|
+
| Param | Type | Default | Description |
|
|
84
84
|
|-------|------|---------|-------------|
|
|
85
|
-
| `allowPaths` | `string[]` | `[]` |
|
|
85
|
+
| `allowPaths` | `string[]` | `[]` | Paths जो recursively delete करने के लिए safe हैं (जैसे `/tmp`)। |
|
|
86
86
|
|
|
87
|
-
|
|
87
|
+
**Example:**
|
|
88
88
|
|
|
89
89
|
```json
|
|
90
90
|
{
|
|
@@ -100,55 +100,55 @@ failproofai 30 बिल्ट-इन पॉलिसीज़ के साथ
|
|
|
100
100
|
|
|
101
101
|
### `block-curl-pipe-sh`
|
|
102
102
|
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
**Event:** PreToolUse (Bash)
|
|
104
|
+
**Default:** `curl <url> | bash`, `curl <url> | sh`, `wget <url> | bash`, और similar patterns को deny करता है।
|
|
105
105
|
|
|
106
|
-
कोई
|
|
106
|
+
कोई parameters नहीं।
|
|
107
107
|
|
|
108
108
|
---
|
|
109
109
|
|
|
110
110
|
### `block-failproofai-commands`
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
112
|
+
**Event:** PreToolUse (Bash)
|
|
113
|
+
**Default:** उन commands को deny करता है जो failproofai को uninstall या disable करेंगे (जैसे `npm uninstall failproofai`, `failproofai policies --uninstall`)।
|
|
114
114
|
|
|
115
|
-
कोई
|
|
115
|
+
कोई parameters नहीं।
|
|
116
116
|
|
|
117
117
|
---
|
|
118
118
|
|
|
119
|
-
##
|
|
119
|
+
## Secrets (sanitizers)
|
|
120
120
|
|
|
121
|
-
|
|
121
|
+
Agents को अपने context या output में credentials leak करने से रोकें। Sanitizer policies **PostToolUse** events पर fire होती हैं। जब Claude एक Bash command run करता है, एक file read करता है, या कोई भी tool call करता है, ये policies output को inspect करती हैं इससे पहले कि वह Claude को return किया जाए। अगर secret pattern detect होता है, तो policy एक deny decision return करती है जो output को pass back होने से रोकता है।
|
|
122
122
|
|
|
123
123
|
### `sanitize-jwt`
|
|
124
124
|
|
|
125
|
-
|
|
126
|
-
|
|
125
|
+
**Event:** PostToolUse (सभी tools)
|
|
126
|
+
**Default:** JWT tokens को redact करता है (तीन base64url segments को `.` से separated)।
|
|
127
127
|
|
|
128
|
-
कोई
|
|
128
|
+
कोई parameters नहीं।
|
|
129
129
|
|
|
130
130
|
---
|
|
131
131
|
|
|
132
132
|
### `sanitize-api-keys`
|
|
133
133
|
|
|
134
|
-
|
|
135
|
-
|
|
134
|
+
**Event:** PostToolUse (सभी tools)
|
|
135
|
+
**Default:** Common API key formats को redact करता है: Anthropic (`sk-ant-`), OpenAI (`sk-`), GitHub PATs (`ghp_`), AWS access keys (`AKIA`), Stripe keys (`sk_live_`, `sk_test_`), और Google API keys (`AIza`)।
|
|
136
136
|
|
|
137
|
-
|
|
137
|
+
**Parameters:**
|
|
138
138
|
|
|
139
|
-
|
|
|
139
|
+
| Param | Type | Default | Description |
|
|
140
140
|
|-------|------|---------|-------------|
|
|
141
|
-
| `additionalPatterns` | `{ regex: string; label: string }[]` | `[]` |
|
|
141
|
+
| `additionalPatterns` | `{ regex: string; label: string }[]` | `[]` | Additional regex patterns को secrets मानने के लिए। |
|
|
142
142
|
|
|
143
|
-
|
|
143
|
+
**Example:**
|
|
144
144
|
|
|
145
145
|
```json
|
|
146
146
|
{
|
|
147
147
|
"policyParams": {
|
|
148
148
|
"sanitize-api-keys": {
|
|
149
149
|
"additionalPatterns": [
|
|
150
|
-
{ "regex": "myco_[A-Za-z0-9]{32}", "label": "MyCo
|
|
151
|
-
{ "regex": "pat_[0-9a-f]{40}", "label": "
|
|
150
|
+
{ "regex": "myco_[A-Za-z0-9]{32}", "label": "MyCo internal API key" },
|
|
151
|
+
{ "regex": "pat_[0-9a-f]{40}", "label": "Internal PAT" }
|
|
152
152
|
]
|
|
153
153
|
}
|
|
154
154
|
}
|
|
@@ -159,71 +159,71 @@ failproofai 30 बिल्ट-इन पॉलिसीज़ के साथ
|
|
|
159
159
|
|
|
160
160
|
### `sanitize-connection-strings`
|
|
161
161
|
|
|
162
|
-
|
|
163
|
-
|
|
162
|
+
**Event:** PostToolUse (सभी tools)
|
|
163
|
+
**Default:** Database connection strings को redact करता है जिनमें embedded credentials होते हैं (जैसे `postgresql://user:password@host/db`)।
|
|
164
164
|
|
|
165
|
-
कोई
|
|
165
|
+
कोई parameters नहीं।
|
|
166
166
|
|
|
167
167
|
---
|
|
168
168
|
|
|
169
169
|
### `sanitize-private-key-content`
|
|
170
170
|
|
|
171
|
-
|
|
172
|
-
|
|
171
|
+
**Event:** PostToolUse (सभी tools)
|
|
172
|
+
**Default:** PEM blocks को redact करता है (`-----BEGIN PRIVATE KEY-----`, `-----BEGIN RSA PRIVATE KEY-----`, आदि)।
|
|
173
173
|
|
|
174
|
-
कोई
|
|
174
|
+
कोई parameters नहीं।
|
|
175
175
|
|
|
176
176
|
---
|
|
177
177
|
|
|
178
178
|
### `sanitize-bearer-tokens`
|
|
179
179
|
|
|
180
|
-
|
|
181
|
-
|
|
180
|
+
**Event:** PostToolUse (सभी tools)
|
|
181
|
+
**Default:** `Authorization: Bearer <token>` headers को redact करता है जहां token 20 या उससे ज्यादा characters है।
|
|
182
182
|
|
|
183
|
-
कोई
|
|
183
|
+
कोई parameters नहीं।
|
|
184
184
|
|
|
185
185
|
---
|
|
186
186
|
|
|
187
|
-
##
|
|
187
|
+
## Environment
|
|
188
188
|
|
|
189
|
-
|
|
189
|
+
Agents द्वारा sensitive environment configuration को read या expose किए जाने से बचाएं।
|
|
190
190
|
|
|
191
191
|
### `block-env-files`
|
|
192
192
|
|
|
193
|
-
|
|
194
|
-
|
|
193
|
+
**Event:** PreToolUse (Bash, Read)
|
|
194
|
+
**Default:** `.env` files को read करने को deny करता है जैसे `cat .env`, `.env` को file path के रूप में `Read` tool calls, आदि।
|
|
195
195
|
|
|
196
|
-
`.envrc` या अन्य
|
|
196
|
+
`.envrc` या अन्य environment-adjacent files को block नहीं करता — केवल exactly `.env` नाम की files।
|
|
197
197
|
|
|
198
|
-
कोई
|
|
198
|
+
कोई parameters नहीं।
|
|
199
199
|
|
|
200
200
|
---
|
|
201
201
|
|
|
202
202
|
### `protect-env-vars`
|
|
203
203
|
|
|
204
|
-
|
|
205
|
-
|
|
204
|
+
**Event:** PreToolUse (Bash)
|
|
205
|
+
**Default:** उन commands को deny करता है जो environment variables को print करते हैं: `printenv`, `env`, `echo $VAR`।
|
|
206
206
|
|
|
207
|
-
कोई
|
|
207
|
+
कोई parameters नहीं।
|
|
208
208
|
|
|
209
209
|
---
|
|
210
210
|
|
|
211
|
-
##
|
|
211
|
+
## File access
|
|
212
212
|
|
|
213
|
-
|
|
213
|
+
Agents को project boundaries के अंदर काम करने और sensitive files से दूर रहने के लिए रखें।
|
|
214
214
|
|
|
215
215
|
### `block-read-outside-cwd`
|
|
216
216
|
|
|
217
|
-
|
|
218
|
-
|
|
217
|
+
**Event:** PreToolUse (Read, Bash)
|
|
218
|
+
**Default:** Current working directory (project root) के बाहर files को read करने को deny करता है।
|
|
219
219
|
|
|
220
|
-
|
|
220
|
+
**Parameters:**
|
|
221
221
|
|
|
222
|
-
|
|
|
222
|
+
| Param | Type | Default | Description |
|
|
223
223
|
|-------|------|---------|-------------|
|
|
224
|
-
| `allowPaths` | `string[]` | `[]` |
|
|
224
|
+
| `allowPaths` | `string[]` | `[]` | Absolute path prefixes जो permitted हैं भले ही cwd के बाहर हों। |
|
|
225
225
|
|
|
226
|
-
|
|
226
|
+
**Example:**
|
|
227
227
|
|
|
228
228
|
```json
|
|
229
229
|
{
|
|
@@ -239,16 +239,16 @@ failproofai 30 बिल्ट-इन पॉलिसीज़ के साथ
|
|
|
239
239
|
|
|
240
240
|
### `block-secrets-write`
|
|
241
241
|
|
|
242
|
-
|
|
243
|
-
|
|
242
|
+
**Event:** PreToolUse (Write, Edit)
|
|
243
|
+
**Default:** Private keys और certificates के लिए commonly used files में writes को deny करता है: `id_rsa`, `id_ed25519`, `*.key`, `*.pem`, `*.p12`, `*.pfx`।
|
|
244
244
|
|
|
245
|
-
|
|
245
|
+
**Parameters:**
|
|
246
246
|
|
|
247
|
-
|
|
|
247
|
+
| Param | Type | Default | Description |
|
|
248
248
|
|-------|------|---------|-------------|
|
|
249
|
-
| `additionalPatterns` | `string[]` | `[]` |
|
|
249
|
+
| `additionalPatterns` | `string[]` | `[]` | Additional filename patterns (glob-style) को block करने के लिए। |
|
|
250
250
|
|
|
251
|
-
|
|
251
|
+
**Example:**
|
|
252
252
|
|
|
253
253
|
```json
|
|
254
254
|
{
|
|
@@ -264,20 +264,20 @@ failproofai 30 बिल्ट-इन पॉलिसीज़ के साथ
|
|
|
264
264
|
|
|
265
265
|
## Git
|
|
266
266
|
|
|
267
|
-
|
|
267
|
+
Accidental pushes, force-pushes, और branch mistakes को रोकें जो undo करने में मुश्किल हैं।
|
|
268
268
|
|
|
269
269
|
### `block-push-master`
|
|
270
270
|
|
|
271
|
-
|
|
272
|
-
|
|
271
|
+
**Event:** PreToolUse (Bash)
|
|
272
|
+
**Default:** `git push origin main` और `git push origin master` को deny करता है।
|
|
273
273
|
|
|
274
|
-
|
|
274
|
+
**Parameters:**
|
|
275
275
|
|
|
276
|
-
|
|
|
276
|
+
| Param | Type | Default | Description |
|
|
277
277
|
|-------|------|---------|-------------|
|
|
278
|
-
| `protectedBranches` | `string[]` | `["main", "master"]` |
|
|
278
|
+
| `protectedBranches` | `string[]` | `["main", "master"]` | Branch names जिन्हें directly push नहीं किया जा सकता। |
|
|
279
279
|
|
|
280
|
-
|
|
280
|
+
**Example:**
|
|
281
281
|
|
|
282
282
|
```json
|
|
283
283
|
{
|
|
@@ -290,36 +290,36 @@ failproofai 30 बिल्ट-इन पॉलिसीज़ के साथ
|
|
|
290
290
|
```
|
|
291
291
|
|
|
292
292
|
<Tip>
|
|
293
|
-
सभी
|
|
293
|
+
सभी branches में push करने की allow करने के लिए (effectively इस policy को `enabledPolicies` से remove किए बिना disable करने के लिए), `protectedBranches: []` set करें।
|
|
294
294
|
</Tip>
|
|
295
295
|
|
|
296
296
|
---
|
|
297
297
|
|
|
298
298
|
### `block-work-on-main`
|
|
299
299
|
|
|
300
|
-
|
|
301
|
-
|
|
300
|
+
**Event:** PreToolUse (Bash)
|
|
301
|
+
**Default:** `main` या `master` branches को directly checkout करने को deny करता है।
|
|
302
302
|
|
|
303
|
-
|
|
303
|
+
**Parameters:**
|
|
304
304
|
|
|
305
|
-
|
|
|
305
|
+
| Param | Type | Default | Description |
|
|
306
306
|
|-------|------|---------|-------------|
|
|
307
|
-
| `protectedBranches` | `string[]` | `["main", "master"]` |
|
|
307
|
+
| `protectedBranches` | `string[]` | `["main", "master"]` | Branch names जिन्हें directly checkout नहीं किया जा सकता। |
|
|
308
308
|
|
|
309
309
|
---
|
|
310
310
|
|
|
311
311
|
### `block-force-push`
|
|
312
312
|
|
|
313
|
-
|
|
314
|
-
|
|
313
|
+
**Event:** PreToolUse (Bash)
|
|
314
|
+
**Default:** `git push --force` और `git push -f` को deny करता है।
|
|
315
315
|
|
|
316
|
-
कोई
|
|
316
|
+
कोई policy-specific parameters नहीं। Cross-cutting [`hint`](/hi/configuration#hint-cross-cutting) का उपयोग करके alternatives suggest करें:
|
|
317
317
|
|
|
318
318
|
```json
|
|
319
319
|
{
|
|
320
320
|
"policyParams": {
|
|
321
321
|
"block-force-push": {
|
|
322
|
-
"hint": "अपने
|
|
322
|
+
"hint": "अपने current HEAD से एक नई branch बनाएं (जैसे `git checkout -b <new-branch>`) और इसके बजाय उसे push करें।"
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
325
|
}
|
|
@@ -329,69 +329,69 @@ failproofai 30 बिल्ट-इन पॉलिसीज़ के साथ
|
|
|
329
329
|
|
|
330
330
|
### `warn-git-amend`
|
|
331
331
|
|
|
332
|
-
|
|
333
|
-
|
|
332
|
+
**Event:** PreToolUse (Bash)
|
|
333
|
+
**Default:** Claude को carefully proceed करने के लिए instruct करता है जब `git commit --amend` run करता है। Command को block नहीं करता।
|
|
334
334
|
|
|
335
|
-
कोई
|
|
335
|
+
कोई parameters नहीं।
|
|
336
336
|
|
|
337
337
|
---
|
|
338
338
|
|
|
339
339
|
### `warn-git-stash-drop`
|
|
340
340
|
|
|
341
|
-
|
|
342
|
-
|
|
341
|
+
**Event:** PreToolUse (Bash)
|
|
342
|
+
**Default:** Claude को confirm करने के लिए instruct करता है `git stash drop` run करने से पहले। Command को block नहीं करता।
|
|
343
343
|
|
|
344
|
-
कोई
|
|
344
|
+
कोई parameters नहीं।
|
|
345
345
|
|
|
346
346
|
---
|
|
347
347
|
|
|
348
348
|
### `warn-all-files-staged`
|
|
349
349
|
|
|
350
|
-
|
|
351
|
-
|
|
350
|
+
**Event:** PreToolUse (Bash)
|
|
351
|
+
**Default:** Claude को review करने के लिए instruct करता है कि वह क्या stage कर रहा है जब `git add -A` या `git add .` run करता है। Command को block नहीं करता।
|
|
352
352
|
|
|
353
|
-
कोई
|
|
353
|
+
कोई parameters नहीं।
|
|
354
354
|
|
|
355
355
|
---
|
|
356
356
|
|
|
357
|
-
##
|
|
357
|
+
## Database
|
|
358
358
|
|
|
359
|
-
|
|
359
|
+
Destructive SQL operations को execute होने से पहले catch करें आपके database के against।
|
|
360
360
|
|
|
361
361
|
### `warn-destructive-sql`
|
|
362
362
|
|
|
363
|
-
|
|
364
|
-
|
|
363
|
+
**Event:** PreToolUse (Bash)
|
|
364
|
+
**Default:** Claude को confirm करने के लिए instruct करता है `DROP TABLE`, `DROP DATABASE`, या `DELETE` (बिना `WHERE` clause के) containing SQL run करने से पहले।
|
|
365
365
|
|
|
366
|
-
कोई
|
|
366
|
+
कोई parameters नहीं।
|
|
367
367
|
|
|
368
368
|
---
|
|
369
369
|
|
|
370
370
|
### `warn-schema-alteration`
|
|
371
371
|
|
|
372
|
-
|
|
373
|
-
|
|
372
|
+
**Event:** PreToolUse (Bash)
|
|
373
|
+
**Default:** Claude को confirm करने के लिए instruct करता है `ALTER TABLE` statements run करने से पहले।
|
|
374
374
|
|
|
375
|
-
कोई
|
|
375
|
+
कोई parameters नहीं।
|
|
376
376
|
|
|
377
377
|
---
|
|
378
378
|
|
|
379
|
-
##
|
|
379
|
+
## Warnings
|
|
380
380
|
|
|
381
|
-
|
|
381
|
+
Agents को potentially risky लेकिन non-destructive operations से पहले extra context दें।
|
|
382
382
|
|
|
383
383
|
### `warn-large-file-write`
|
|
384
384
|
|
|
385
|
-
|
|
386
|
-
|
|
385
|
+
**Event:** PreToolUse (Write)
|
|
386
|
+
**Default:** Claude को confirm करने के लिए instruct करता है 1024 KB से बड़ी files write करने से पहले।
|
|
387
387
|
|
|
388
|
-
|
|
388
|
+
**Parameters:**
|
|
389
389
|
|
|
390
|
-
|
|
|
390
|
+
| Param | Type | Default | Description |
|
|
391
391
|
|-------|------|---------|-------------|
|
|
392
|
-
| `thresholdKb` | `number` | `1024` |
|
|
392
|
+
| `thresholdKb` | `number` | `1024` | File size threshold kilobytes में जिसके ऊपर warning issue की जाती है। |
|
|
393
393
|
|
|
394
|
-
|
|
394
|
+
**Example:**
|
|
395
395
|
|
|
396
396
|
```json
|
|
397
397
|
{
|
|
@@ -404,78 +404,78 @@ failproofai 30 बिल्ट-इन पॉलिसीज़ के साथ
|
|
|
404
404
|
```
|
|
405
405
|
|
|
406
406
|
<Note>
|
|
407
|
-
|
|
407
|
+
Hook handler payloads पर 1 MB stdin limit को enforce करता है। इस policy को small content के साथ test करने के लिए, `thresholdKb` को 1024 से well below value पर set करें।
|
|
408
408
|
</Note>
|
|
409
409
|
|
|
410
410
|
---
|
|
411
411
|
|
|
412
412
|
### `warn-package-publish`
|
|
413
413
|
|
|
414
|
-
|
|
415
|
-
|
|
414
|
+
**Event:** PreToolUse (Bash)
|
|
415
|
+
**Default:** Claude को confirm करने के लिए instruct करता है `npm publish` run करने से पहले।
|
|
416
416
|
|
|
417
|
-
कोई
|
|
417
|
+
कोई parameters नहीं।
|
|
418
418
|
|
|
419
419
|
---
|
|
420
420
|
|
|
421
421
|
### `warn-background-process`
|
|
422
422
|
|
|
423
|
-
|
|
424
|
-
|
|
423
|
+
**Event:** PreToolUse (Bash)
|
|
424
|
+
**Default:** Claude को careful रहने के लिए instruct करता है जब `nohup`, `&`, `disown`, या `screen` के through background processes launch करते हैं।
|
|
425
425
|
|
|
426
|
-
कोई
|
|
426
|
+
कोई parameters नहीं।
|
|
427
427
|
|
|
428
428
|
---
|
|
429
429
|
|
|
430
430
|
### `warn-global-package-install`
|
|
431
431
|
|
|
432
|
-
|
|
433
|
-
|
|
432
|
+
**Event:** PreToolUse (Bash)
|
|
433
|
+
**Default:** Claude को confirm करने के लिए instruct करता है `npm install -g`, `yarn global add`, या `pip install` (virtual environment के बिना) run करने से पहले।
|
|
434
434
|
|
|
435
|
-
कोई
|
|
435
|
+
कोई parameters नहीं।
|
|
436
436
|
|
|
437
437
|
---
|
|
438
438
|
|
|
439
|
-
## AI
|
|
439
|
+
## AI behavior
|
|
440
440
|
|
|
441
|
-
|
|
441
|
+
Detect करें जब agents stuck हो जाएं या unexpectedly behave करें।
|
|
442
442
|
|
|
443
443
|
### `warn-repeated-tool-calls`
|
|
444
444
|
|
|
445
|
-
|
|
446
|
-
|
|
445
|
+
**Event:** PreToolUse (सभी tools)
|
|
446
|
+
**Default:** Claude को reconsider करने के लिए instruct करता है जब same tool को 3+ times identical parameters के साथ call किया जाता है — एक common sign कि agent loop में stuck है।
|
|
447
447
|
|
|
448
|
-
कोई
|
|
448
|
+
कोई parameters नहीं।
|
|
449
449
|
|
|
450
450
|
---
|
|
451
451
|
|
|
452
|
-
##
|
|
452
|
+
## Workflow
|
|
453
453
|
|
|
454
|
-
एक
|
|
454
|
+
एक disciplined end-of-session workflow को enforce करें। ये policies **Stop** event पर fire होती हैं और Claude को stop करने को deny करती हैं जब तक कि प्रत्येक condition पूरी न हो जाए। वे एक natural dependency chain follow करते हैं: commit → push → PR → CI। अगर एक policy deny करती है, तो chain में later policies को skip किया जाता है (deny short-circuits)।
|
|
455
455
|
|
|
456
|
-
सभी
|
|
456
|
+
सभी workflow policies **fail-open** हैं: अगर required tool available नहीं है (जैसे `gh` installed नहीं, no git remote), policy एक informational message के साथ allow करती है जो explain करता है कि check को क्यों skip किया गया।
|
|
457
457
|
|
|
458
458
|
### `require-commit-before-stop`
|
|
459
459
|
|
|
460
|
-
|
|
461
|
-
|
|
460
|
+
**Event:** Stop
|
|
461
|
+
**Default:** Uncommitted changes (modified, staged, या untracked files) होने पर stopping को deny करता है। Working directory clean होने पर informational message return करता है।
|
|
462
462
|
|
|
463
|
-
कोई
|
|
463
|
+
कोई parameters नहीं।
|
|
464
464
|
|
|
465
465
|
---
|
|
466
466
|
|
|
467
467
|
### `require-push-before-stop`
|
|
468
468
|
|
|
469
|
-
|
|
470
|
-
|
|
469
|
+
**Event:** Stop
|
|
470
|
+
**Default:** Unpushed commits होने पर या जब current branch के पास no remote tracking branch हो तो stopping को deny करता है। अगर जरूरत पड़े तो tracking branch बनाने के लिए `git push -u` suggest करता है। अगर no remote configured है तो fail open होता है।
|
|
471
471
|
|
|
472
|
-
|
|
472
|
+
**Parameters:**
|
|
473
473
|
|
|
474
|
-
|
|
|
474
|
+
| Param | Type | Default | Description |
|
|
475
475
|
|-------|------|---------|-------------|
|
|
476
|
-
| `remote` | `string` | `"origin"` |
|
|
476
|
+
| `remote` | `string` | `"origin"` | Remote name जिसे push करना है। |
|
|
477
477
|
|
|
478
|
-
|
|
478
|
+
**Example:**
|
|
479
479
|
|
|
480
480
|
```json
|
|
481
481
|
{
|
|
@@ -491,66 +491,37 @@ failproofai 30 बिल्ट-इन पॉलिसीज़ के साथ
|
|
|
491
491
|
|
|
492
492
|
### `require-pr-before-stop`
|
|
493
493
|
|
|
494
|
-
|
|
495
|
-
|
|
494
|
+
**Event:** Stop
|
|
495
|
+
**Default:** जब current branch के लिए कोई pull request exist न हो, या जब existing PR closed/merged हो तो stopping को deny करता है। Claude को `gh pr create` के साथ PR बनाने के लिए instruct करता है।
|
|
496
496
|
|
|
497
|
-
कोई
|
|
497
|
+
कोई parameters नहीं।
|
|
498
498
|
|
|
499
499
|
<Note>
|
|
500
|
-
इस
|
|
501
|
-
|
|
502
|
-
यदि `gh` इंस्टॉल नहीं है या प्रमाणित नहीं है, तो पॉलिसी fail open करती है और Claude को कारण की रिपोर्ट करती है।
|
|
500
|
+
इस policy को [GitHub CLI](https://cli.github.com/) (`gh`) को installed और authenticated होना आवश्यक है।
|
|
501
|
+
`gh auth login` को एक personal access token के साथ run करें जिसके पास `repo` scope हो pull requests के लिए read access के लिए। अगर `gh` installed नहीं है या authenticated नहीं है, तो policy fail open होती है और reason को Claude को report करती है।
|
|
503
502
|
</Note>
|
|
504
503
|
|
|
505
504
|
---
|
|
506
505
|
|
|
507
506
|
### `require-ci-green-before-stop`
|
|
508
507
|
|
|
509
|
-
|
|
510
|
-
|
|
508
|
+
**Event:** Stop
|
|
509
|
+
**Default:** जब CI checks current branch पर failing या still running हों तो stopping को deny करता है। GitHub Actions workflow runs और third-party bot checks (जैसे CodeRabbit, SonarCloud, Codecov) दोनों को check करता है। `skipped` conclusions को success मानता है। सभी checks pass होने पर informational message return करता है।
|
|
511
510
|
|
|
512
|
-
कोई
|
|
511
|
+
कोई parameters नहीं।
|
|
513
512
|
|
|
514
513
|
<Note>
|
|
515
|
-
इस
|
|
516
|
-
Actions
|
|
517
|
-
यदि `gh` इंस्टॉल नहीं है या प्रमाणित नहीं है, तो पॉलिसी fail open करती है और Claude को कारण की रिपोर्ट करती है।
|
|
514
|
+
इस policy को [GitHub CLI](https://cli.github.com/) (`gh`) को installed और authenticated होना आवश्यक है।
|
|
515
|
+
`gh auth login` को एक personal access token के साथ run करें जिसके पास `repo` scope हो Actions workflow runs और Checks API के लिए read access के लिए। अगर `gh` installed नहीं है या authenticated नहीं है, तो policy fail open होती है और reason को Claude को report करती है।
|
|
518
516
|
</Note>
|
|
519
517
|
|
|
520
518
|
---
|
|
521
519
|
|
|
522
|
-
## बीटा पॉलिसीज़
|
|
523
|
-
|
|
524
|
-
कुछ पॉलिसीज़ को `beta` के रूप में चिह्नित किया गया है और डिफ़ॉल्ट रूप से इंस्टॉल नहीं हैं। बीटा पॉलिसीज़ में मोटे किनारे या झूठे पॉज़िटिव हो सकते हैं। वे भविष्य की रिलीज़ में स्थिर में स्नातक होते हैं।
|
|
525
|
-
|
|
526
|
-
**वर्तमान बीटा पॉलिसीज़:**
|
|
527
|
-
|
|
528
|
-
- `require-commit-before-stop` — रुकने से पहले सभी परिवर्तन कमिट करें
|
|
529
|
-
- `require-push-before-stop` — सभी कमिट्स को रिमोट में पुश करें
|
|
530
|
-
- `require-pr-before-stop` — ब्रांच के लिए PR मौजूद होना सुनिश्चित करें
|
|
531
|
-
- `require-ci-green-before-stop` — सभी CI चेक्स पास होने चाहिए
|
|
532
|
-
|
|
533
|
-
साथ में, ये एक **commit → push → PR → CI** वर्कफ़्लो को लागू करते हैं।
|
|
534
|
-
|
|
535
|
-
सभी बीटा पॉलिसीज़ इंस्टॉल करने के लिए:
|
|
536
|
-
|
|
537
|
-
```bash
|
|
538
|
-
failproofai policies --install --beta
|
|
539
|
-
```
|
|
540
|
-
|
|
541
|
-
या विशिष्ट वर्कफ़्लो पॉलिसीज़ इंस्टॉल करें:
|
|
542
|
-
|
|
543
|
-
```bash
|
|
544
|
-
failproofai policies --install require-commit-before-stop require-push-before-stop require-pr-before-stop require-ci-green-before-stop
|
|
545
|
-
```
|
|
546
|
-
|
|
547
|
-
कौन सी पॉलिसीज़ बीटा फ़्लैग ले जाती हैं यह देखने के लिए `failproofai policies` चलाएँ।
|
|
548
|
-
|
|
549
520
|
---
|
|
550
521
|
|
|
551
|
-
##
|
|
522
|
+
## Individual policies को disable करना
|
|
552
523
|
|
|
553
|
-
अपने
|
|
524
|
+
अपने config में `enabledPolicies` से एक specific policy को remove करें, या dashboard के Policies tab में इसे toggle off करें।
|
|
554
525
|
|
|
555
526
|
```json
|
|
556
527
|
{
|
|
@@ -561,4 +532,4 @@ failproofai policies --install require-commit-before-stop require-push-before-st
|
|
|
561
532
|
}
|
|
562
533
|
```
|
|
563
534
|
|
|
564
|
-
`enabledPolicies` में
|
|
535
|
+
Policies जो `enabledPolicies` में listed नहीं हैं, run नहीं होती हैं, भले ही उनके लिए `policyParams` entries exist करें।
|