@northbridge-security/secureai 0.1.13

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.
Files changed (50) hide show
  1. package/.claude/README.md +122 -0
  2. package/.claude/commands/architect/clean.md +978 -0
  3. package/.claude/commands/architect/kiss.md +762 -0
  4. package/.claude/commands/architect/review.md +704 -0
  5. package/.claude/commands/catchup.md +90 -0
  6. package/.claude/commands/code.md +115 -0
  7. package/.claude/commands/commit.md +1218 -0
  8. package/.claude/commands/cover.md +1298 -0
  9. package/.claude/commands/fmea.md +275 -0
  10. package/.claude/commands/kaizen.md +312 -0
  11. package/.claude/commands/pr.md +503 -0
  12. package/.claude/commands/todo.md +99 -0
  13. package/.claude/commands/worktree.md +738 -0
  14. package/.claude/commands/wrapup.md +103 -0
  15. package/LICENSE +183 -0
  16. package/README.md +108 -0
  17. package/dist/cli.js +75634 -0
  18. package/docs/agents/devops-reviewer.md +889 -0
  19. package/docs/agents/kiss-simplifier.md +1088 -0
  20. package/docs/agents/typescript.md +8 -0
  21. package/docs/guides/README.md +109 -0
  22. package/docs/guides/agents.clean.arch.md +244 -0
  23. package/docs/guides/agents.clean.arch.ts.md +1314 -0
  24. package/docs/guides/agents.gotask.md +1037 -0
  25. package/docs/guides/agents.markdown.md +1209 -0
  26. package/docs/guides/agents.onepassword.md +285 -0
  27. package/docs/guides/agents.sonar.md +857 -0
  28. package/docs/guides/agents.tdd.md +838 -0
  29. package/docs/guides/agents.tdd.ts.md +1062 -0
  30. package/docs/guides/agents.typesript.md +1389 -0
  31. package/docs/guides/github-mcp.md +1075 -0
  32. package/package.json +130 -0
  33. package/packages/secureai-cli/src/cli.ts +21 -0
  34. package/tasks/README.md +880 -0
  35. package/tasks/aws.yml +64 -0
  36. package/tasks/bash.yml +118 -0
  37. package/tasks/bun.yml +738 -0
  38. package/tasks/claude.yml +183 -0
  39. package/tasks/docker.yml +420 -0
  40. package/tasks/docs.yml +127 -0
  41. package/tasks/git.yml +1336 -0
  42. package/tasks/gotask.yml +132 -0
  43. package/tasks/json.yml +77 -0
  44. package/tasks/markdown.yml +95 -0
  45. package/tasks/onepassword.yml +350 -0
  46. package/tasks/security.yml +102 -0
  47. package/tasks/sonar.yml +437 -0
  48. package/tasks/template.yml +74 -0
  49. package/tasks/vscode.yml +103 -0
  50. package/tasks/yaml.yml +121 -0
@@ -0,0 +1,285 @@
1
+ # 1Password Integration Guide for AI Agents
2
+
3
+ This guide provides AI agents with essential information for secure credential management using 1Password. All AI development tools in this ecosystem use 1Password via MCP servers, ensuring credentials are never exposed to AI agents directly.
4
+
5
+ ## Target Audience
6
+
7
+ This guide is for AI agents operating within:
8
+
9
+ - **Claude Code** - Anthropic's CLI assistant
10
+ - **Cursor IDE** - AI-first code editor
11
+ - **Codex CLI** - OpenAI command-line interface
12
+
13
+ Users of the ai-toolkit should have 1Password configured for secure credential management.
14
+
15
+ ## Security Model
16
+
17
+ ### Why 1Password + MCP
18
+
19
+ **Problem**: AI agents need access to external services (APIs, databases) but should never see actual credentials.
20
+
21
+ **Solution**: MCP servers handle credential injection at runtime:
22
+
23
+ 1. Configuration files contain `op://` references (not actual secrets)
24
+ 2. 1Password CLI resolves references when MCP servers start
25
+ 3. AI agents interact via MCP tools - never see the actual API keys
26
+ 4. Biometric authentication required for credential access
27
+
28
+ ### Credential Protection
29
+
30
+ **AI agents are blocked from:**
31
+
32
+ - Reading MCP configuration files containing credentials
33
+ - Executing commands that would expose credentials
34
+ - Accessing `~/.claude/.credentials.json` or similar files
35
+
36
+ **This protection is enforced via `~/.claude/settings.json` deny rules.**
37
+
38
+ ## Installation & Setup
39
+
40
+ ### Prerequisites
41
+
42
+ 1. **1Password Desktop App** (version 8.0+)
43
+ - Download from: https://1password.com/downloads
44
+ - Sign in to your 1Password account
45
+ - Enable biometric unlock (Touch ID / Windows Hello)
46
+
47
+ 2. **1Password CLI**
48
+ - macOS: `brew install 1password-cli`
49
+ - Linux: See https://developer.1password.com/docs/cli/get-started
50
+ - Windows: `winget install AgileBits.1PasswordCLI`
51
+
52
+ 3. **Enable CLI Integration**
53
+ - 1Password → Settings → Developer
54
+ - Enable "Integrate with 1Password CLI"
55
+ - Enable "Connect with 1Password CLI"
56
+
57
+ ### Configure MCP Servers with 1Password
58
+
59
+ **Use ai-toolkit installer** (recommended):
60
+
61
+ ```bash
62
+ ai-toolkit install -t claude
63
+ ```
64
+
65
+ This command:
66
+
67
+ - Configures Task Master MCP with `op://` references
68
+ - Configures GitHub MCP with `op://` references
69
+ - Sets up credential protection in `~/.claude/settings.json`
70
+ - Installs security hooks to prevent credential exposure
71
+
72
+ **What gets configured** (`~/.claude/` managed by Claude MCP):
73
+
74
+ ```json
75
+ {
76
+ "mcpServers": {
77
+ "task-master-ai": {
78
+ "command": "npx",
79
+ "args": ["-y", "task-master-ai"],
80
+ "env": {
81
+ "ANTHROPIC_API_KEY": "op://Private/Anthropic/API Key",
82
+ "PERPLEXITY_API_KEY": "op://Private/Perplexity/API Key"
83
+ }
84
+ },
85
+ "github-mcp": {
86
+ "command": "npx",
87
+ "args": ["-y", "@github/github-mcp-server"],
88
+ "env": {
89
+ "GITHUB_PERSONAL_ACCESS_TOKEN": "op://Private/GitHub/API Token (Read-Only)/token"
90
+ }
91
+ }
92
+ }
93
+ }
94
+ ```
95
+
96
+ ### Store Credentials in 1Password
97
+
98
+ **Required items in 1Password:**
99
+
100
+ | Item Name | Vault | Field | Purpose |
101
+ | ---------- | ------- | --------------------------- | -------------------------------- |
102
+ | Anthropic | Private | API Key | Claude models for Task Master |
103
+ | Perplexity | Private | API Key | Research features in Task Master |
104
+ | GitHub | Private | API Token (Read-Only)/token | GitHub MCP access |
105
+
106
+ **Creating items in 1Password:**
107
+
108
+ 1. Open 1Password
109
+ 2. Click "+" → API Credential
110
+ 3. Set Title: `Anthropic` (or service name)
111
+ 4. Set Vault: `Private`
112
+ 5. Add field: `API Key` with your actual key value
113
+ 6. Save
114
+
115
+ **op:// reference format:**
116
+
117
+ ```text
118
+ op://[vault]/[item]/[field]
119
+
120
+ Examples:
121
+ op://Private/Anthropic/API Key
122
+ op://Private/GitHub/API Token (Read-Only)/token
123
+ op://Development/PostgreSQL/connection_string
124
+ ```
125
+
126
+ ## For AI Agents
127
+
128
+ ### What You CAN Do
129
+
130
+ - Use MCP tools normally (credentials handled automatically)
131
+ - Call `mcp__task_master_ai__*` tools
132
+ - Call `mcp__github_mcp__*` tools
133
+ - Request installation via `ai-toolkit install`
134
+
135
+ ### What You CANNOT Do
136
+
137
+ - Read MCP configuration files
138
+ - Execute `claude mcp get` (exposes credentials)
139
+ - Read `~/.claude/.credentials.json`
140
+ - Access environment files with credentials
141
+ - Use CLI commands that require manual credential setup
142
+
143
+ ### When MCP is Not Available
144
+
145
+ **Do NOT fall back to CLI with manual credentials.**
146
+
147
+ Instead, guide the user to configure MCP properly:
148
+
149
+ ```text
150
+ The Task Master MCP server is not available.
151
+
152
+ To configure it:
153
+ 1. Run: ai-toolkit install -t claude
154
+ 2. Ensure 1Password is unlocked
155
+ 3. Restart Claude Code
156
+
157
+ This will securely configure Task Master with your API keys from 1Password.
158
+ ```
159
+
160
+ ### Checking MCP Status
161
+
162
+ ```javascript
163
+ // Check if MCP server is available
164
+ // This is safe - doesn't expose credentials
165
+ const servers = await bash("claude mcp list");
166
+
167
+ // Check for specific server
168
+ if (servers.stdout.includes("task-master-ai")) {
169
+ // MCP is available, use it
170
+ await mcp__task_master_ai__next_task({ projectRoot: "/path/to/project" });
171
+ } else {
172
+ // Guide user to install
173
+ console.log("Task Master MCP not configured. Run: ai-toolkit install -t claude");
174
+ }
175
+ ```
176
+
177
+ ## Troubleshooting
178
+
179
+ ### MCP Server Won't Start
180
+
181
+ **Symptom**: `claude mcp list` shows server but tools fail
182
+
183
+ **Cause**: 1Password not unlocked or credentials not found
184
+
185
+ **Solution**:
186
+
187
+ 1. Ensure 1Password desktop app is open
188
+ 2. Unlock 1Password (biometric or password)
189
+ 3. Verify items exist: `op item get "Anthropic" --vault "Private"`
190
+ 4. Restart Claude Code
191
+
192
+ ### Credential Reference Not Found
193
+
194
+ **Symptom**: MCP server fails with "item not found"
195
+
196
+ **Cause**: op:// reference doesn't match 1Password item
197
+
198
+ **Solution**:
199
+
200
+ 1. Check exact item name in 1Password
201
+ 2. Check exact field name (case-sensitive)
202
+ 3. Check vault name
203
+ 4. Update MCP configuration via `ai-toolkit install`
204
+
205
+ ### Permission Denied
206
+
207
+ **Symptom**: "Permission denied" when accessing 1Password
208
+
209
+ **Cause**: CLI not integrated with desktop app
210
+
211
+ **Solution**:
212
+
213
+ 1. Open 1Password → Settings → Developer
214
+ 2. Enable "Integrate with 1Password CLI"
215
+ 3. Try again
216
+
217
+ ### Biometric Unlock Fails
218
+
219
+ **Symptom**: Touch ID / Windows Hello not working
220
+
221
+ **Solution**:
222
+
223
+ 1. Lock and unlock 1Password manually
224
+ 2. Re-enable biometric: Settings → Security → Unlock
225
+ 3. Sign out and sign back in to CLI: `op signout && op signin`
226
+
227
+ ## Security Best Practices
228
+
229
+ ### DO
230
+
231
+ - Use `ai-toolkit install` for configuration
232
+ - Keep 1Password desktop app running
233
+ - Use biometric unlock for convenience and security
234
+ - Use separate vaults for different environments (Dev/Prod)
235
+ - Rotate API keys periodically (1Password handles reference updates)
236
+
237
+ ### DON'T
238
+
239
+ - Manually edit MCP configuration with raw credentials
240
+ - Copy API keys to clipboard for pasting
241
+ - Store credentials in `.env` files (use `op://` references)
242
+ - Share master password via insecure channels
243
+ - Commit any file containing actual credentials
244
+
245
+ ## op:// Reference Format
246
+
247
+ ### Syntax
248
+
249
+ ```text
250
+ op://[vault-name/]item-name[/section-name]/field-name
251
+ ```
252
+
253
+ ### Components
254
+
255
+ - **vault-name** (optional): Vault containing the item. Defaults to "Private" if omitted.
256
+ - **item-name** (required): Name or UUID of the 1Password item
257
+ - **section-name** (optional): Section within the item
258
+ - **field-name** (required): Field name to retrieve
259
+
260
+ ### Examples
261
+
262
+ ```bash
263
+ # Basic (default vault)
264
+ op://database/password
265
+
266
+ # With vault
267
+ op://Private/API Keys/token
268
+
269
+ # With section
270
+ op://Production/AWS/Access Keys/access_key_id
271
+
272
+ # Spaces in names (URL-encoded)
273
+ op://Private/My%20API%20Keys/my%20token
274
+ ```
275
+
276
+ ## External Resources
277
+
278
+ - **1Password CLI Reference**: https://developer.1password.com/docs/cli/
279
+ - **Secret References Guide**: https://developer.1password.com/docs/cli/secrets-reference-syntax
280
+ - **SSH Agent Setup**: https://developer.1password.com/docs/ssh/
281
+ - **AI Toolkit Documentation**: See `docs/1password.md` for complete integration guide
282
+
283
+ ---
284
+
285
+ **For AI Agents**: Never attempt to read or expose credentials. Always use MCP tools which handle credential injection securely. If MCP is not configured, guide users to run `ai-toolkit install`.