Repository navigation
Expand file tree
/
Copy path.gitignore
More file actions
531 lines (460 loc) · 15.5 KB
/
Copy path.gitignore
File metadata and controls
531 lines (460 loc) · 15.5 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
# See https://help.github.com/articles/ignoring-files for more about ignoring files.
#
# If you find yourself ignoring temporary files generated by your text editor
# or operating system, you probably want to add a global ignore instead:
# git config --global core.excludesfile '~/.gitignore_global'
# Ignore bundler config.
/.bundle
# Ignore the default SQLite database.
/db/*.sqlite3
/db/*.sqlite3-journal
# Ignore all logfiles and tempfiles.
/log/*
!/log/.keep
/tmp/*
!/tmp/.keep
# Ignore uploaded files in development.
/storage/*
!/storage/.keep
# Ignore assets.
/public/assets/
# === SECURITY: Environment and Secret Files ===
# Environment files (comprehensive protection)
.env
.env.*
!.env.example
!.env.*.example
!.env.sample
!.env.template
# Rails secrets and encryption keys
config/master.key
config/credentials.yml.enc
config/credentials/
*.key
*.pem
*.p12
*.p7b
*.pfx
*.jks
*.keystore
# Session and encryption keys
.session.key
session.key
encryption.key
*session*.key
# Secret material — match by file SHAPE, not any path containing the substring
# "secret". Source code named "secret*" (e.g. Security::SecretStore, SecretFormModal)
# is NOT a secret and must stay tracked. Real secret files are caught here by shape
# and by the specific rules above/below (.env*, *.key, *.pem, credentials.yml.enc,
# .kamal/secrets, tmp/*secret*). .gitleaks.toml is the content-based backstop.
*.secret
*secret*.key
*secret*.pem
*secret*.pfx
*secret*.p12
*secret*.enc
*secret*.env
*secret*.yml
*secret*.yaml
secrets.json
# Private key material by SHAPE, per this block's rule above — NOT the bare
# substring `*private*`, which this line replaces (IMP-70a6c8b3b375). That
# pattern matched any path containing "private" anywhere, so a legitimately
# named source file was ignored with no error and no git status entry: it ate
# the first draft of server/spec/lint/extension_namespace_ratchet_spec.rb, and
# it is why `!/server/Gemfile.private` below had to exist at all.
#
# It was NOT what protects the private extensions — the anchored
# `/extensions/private/` + `extensions/private` pair below does that.
#
# MEASURED before narrowing, with `git check-ignore -v --no-index`. The
# --no-index matters: without it a TRACKED path reports "not ignored" whatever
# the rules say, so an attribution sweep run without it structurally cannot see
# rules covering tracked files. Over the 2,699 tree paths containing "private",
# exactly SEVEN were won by `*private*`:
# - extensions/private itself -> now the bare `extensions/private`
# - 5 vendored gem files under
# {server,worker}/vendor/bundle/ -> server/.gitignore:94, worker/.gitignore:4
# - 1 spec inside the extensions/system SUBMODULE, which is tracked there and
# for which a submodule's own git never consults this file. Not protected by
# this rule before, not exposed by removing it.
# No path in the tree loses protection.
#
# ACCEPTED RISK, stated because it is real and not visible in today's tree:
# `*private*` had no slash, so it also blanket-ignored any DIRECTORY whose name
# contained "private" — extensions/private-business/, server/vendor/private-thing/,
# docs/private/. That accidental second net is gone. A private extension placed
# anywhere other than extensions/private/ is now trackable, so put them there.
#
# The common key extensions (*.key *.pem *.p12 *.pfx *.jks) are already ignored
# unconditionally above; `*private*key*` covers the extension-less and .txt
# shapes those miss (privatekey.txt, private_key, private-key, privatekeys).
*.private
*private*key*
*private*keys*
*private*.gpg
*private*.asc
*.token
*.tokens
api_keys.yml
api_keys.json
credentials.json
auth.json
# Kamal deployment secrets
.kamal/secrets
.kamal/.env
kamal.env
# Docker secrets and configs
docker/secrets/
.docker/config.json
.docker/daemon.json
# Temporary secret files
tmp/*secret*
tmp/*key*
tmp/*credential*
tmp/*token*
tmp/.env*
# Database dumps with potential secrets
*.sql
*.dump
*.db
*.sqlite*
backup/
backups/
dumps/
database_backups/
# Development database files (specific SQLite files)
development.sqlite3
test.sqlite3
*.sqlite3-journal
# SSL/TLS certificates and security files
*.crt
*.cert
*.cer
*.ca-bundle
*.ca
*.ca-cert
*.chain
ssl/
certificates/
certs/
tls/
# Test credentials (generated by rails db:seed)
test-credentials.json
# Cloud provider credentials
.aws/
.gcp/
.gcloud/
.azure/
*-credentials.json
service-account.json
service-account-key.json
gcp-*.json
aws-*.json
# GitHub and CI/CD secrets
.github/secrets/
.secrets/
secrets/
secrets.yml
secrets.json
# Kubernetes secrets
k8s/secrets/
kubernetes/secrets/
*-secret.yaml
*-secret.yml
# Terraform sensitive files
*.tfvars
terraform.tfstate*
.terraform/
# HashiCorp Vault
.vault-token
# Same narrowing as the payment block below, and found by the same probe
# (IMP-01a06fa1). `vault-*` was a bare prefix glob: it ignored vault-helper.rb,
# vault-client.rb, vault-setup.md — any file whose name merely starts with
# "vault-". The token itself is named explicitly above; what remains to catch by
# shape is unseal/key material.
vault-*token*
vault-*key*
vault-*unseal*
# SSH keys and certificates
id_rsa*
id_dsa*
id_ecdsa*
id_ed25519*
*.pub
known_hosts
authorized_keys
# Payment gateway credential material — by file SHAPE, per this file's rule at
# :54-58, NOT by the vendor name alone (IMP-01a06fa1). This block used to read
# `stripe_*` / `paypal_*` / `*_stripe_*` / `*_paypal_*`, which is the same
# substring overreach `*private*` was narrowed out of in IMP-70a6c8b3b375: a
# leading-segment glob matches any path segment starting with the vendor name,
# so stripe_service.rb, stripe_webhooks_controller.rb, stripe_client_spec.rb,
# docs/guides/stripe_integration.md and handle_stripe_webhook.rb were all
# silently unaddable — no error, no git status entry, the file simply never
# became trackable.
#
# LATENT, never triggered: the billing code lives under extensions/private/,
# which its own anchored rule ignores, so nothing was ever eaten. It would have
# fired the moment any payment-adjacent file landed in core — which is exactly
# how the `*private*` case presented (it ate a spec file's first draft).
#
# Two tokens, no extension gate, mirroring `*private*key*` above: a credential
# file names the vendor AND what it holds. A source file naming the vendor
# alone does not.
*stripe*key*
*stripe*secret*
*stripe*credential*
*stripe*.env
*paypal*key*
*paypal*secret*
*paypal*credential*
*paypal*.env
# Ignore node_modules
node_modules/
/node_modules
# Extension frontend symlinks (created by scripts/setup-extension-frontend-symlinks.sh).
# These are symlinks not directories, so they don't match the `node_modules/`
# trailing-slash rule above.
extensions/*/frontend/node_modules
# Ignore compiled assets
/public/packs
/public/packs-test
/public/assets
# Logs and operational files (consolidated)
*.log
*.log.*
logs/
log/
npm-debug.log*
yarn-debug.log*
yarn-error.log*
*.pid
*.pid.lock
# Ignore yarn files
.pnp
.pnp.js
# Coverage directories and test reports (consolidated)
coverage/
.coverage/
/coverage/
.nyc_output
.nyc_output/
test-results/
cypress/screenshots/
cypress/videos/
cypress/downloads/
spec/reports/
junit.xml
# Playwright
playwright-report/
playwright/.cache/
e2e/.auth/
blob-report/
# Dependency directories
jspm_packages/
# Optional npm cache directory
.npm
# Optional eslint cache
.eslintcache
# Microbundle cache
.rpt2_cache/
.rts2_cache_cjs/
.rts2_cache_es/
.rts2_cache_umd/
# Optional REPL history
.node_repl_history
# Output of 'npm pack'
*.tgz
# Yarn Integrity file
.yarn-integrity
# Ignore parcel-bundler cache
.cache
.parcel-cache
# Ignore Next.js build output
.next
# Ignore Nuxt.js build / generate output
.nuxt
dist
# Ignore Gatsby files
.cache/
/public
# Ignore Vuepress build output
.vuepress/dist
# Ignore Serverless directories
.serverless/
# Ignore FuseBox cache
.fusebox/
# Ignore DynamoDB Local files
.dynamodb/
# Ignore TernJS port file
.tern-port
# Claude Flow system metrics and cache
.claude-flow/
# Claude Code worktrees (temporary isolated git worktrees from agent execution)
.claude/worktrees/
.claude/*.lock
# Per-machine Claude Code settings — absolute local paths, machine-specific MCP
# endpoints, and per-operator permission grants. Never shared; .claude/settings.json
# is the committable one.
.claude/settings.local.json
# Operator break-glass tooling. Deliberately unversioned: this repo mirrors to a
# public GitHub remote, and the script encodes maintainer-local infrastructure
# (specific vmid, operator account, sudoers path) — the kind of detail CLAUDE.md
# keeps in CLAUDE.local.md rather than the public tree. Its canonical home is the
# Proxmox host it runs on.
scripts/breakglass.sh
# Claude Code agent skeletons. The CANONICAL set (.claude/agents/powernode/,
# generated from the global seeded agents by `rails claude:sync_agents`) IS
# committed — it is environment-independent (slug-keyed, no per-install ids) and
# freshness-gated by scripts/check-claude-agents-fresh.sh. Only an ACCOUNT's own
# export (ACCOUNT_ID=... — clones and local agents) is per-checkout and ignored.
.claude/agents/powernode-local/
# MCP configuration (generated per-environment via: scripts/manage-proxy-hosts.sh generate-mcp)
.mcp.json
# IDE and editor files (consolidated)
.vscode/
.idea/
*.iml
*.ipr
*.iws
.idea/dataSources.xml
.idea/dataSources.ids
.idea/sqlDataSources.xml
# Terminal multiplexer (personal dev config)
.tmux.conf
*.tmux.conf
# OS generated files
.DS_Store
.DS_Store?
._*
.Spotlight-V100
.Trashes
ehthumbs.db
Thumbs.db
# Backup and temporary files (consolidated)
*.bak
*.backup
*.old
*.orig
*.rej
*.swp
*.swo
.*.swp
.*.swo
*.tmp
*.temp
*.un~
*~
.#*
\#*\#
\#*#
# Archive files that might contain sensitive data
*.tar.gz
*.zip
*.7z
*.rar
exports/
export.json
export.csv
# Defunct swarm tooling (replaced by MCP shared memory)
.swarm/
# Security scan reports (generated locally)
security-reports/
# Auto-generated docs — split policy:
# TRACKED (committed): mcp-tools.md (sourced from static code registry,
# regenerated manually via mcp:generate_tool_catalog)
# IGNORED (local-only): skills, knowledge-base, knowledge-graph, learnings,
# todo — DB-backed, regenerated nightly by
# AiKnowledgeDocSyncJob, account-specific. Querying
# the live state via MCP is the right read path.
# See docs/reference/auto/manifest.yml for the regeneration map. Every
# tracked auto-gen file carries an <!-- AUTO-GENERATED --> header enforced
# by docs/.verify/check-auto-gen-headers.sh — never hand-edit.
docs/reference/auto/skills.md
docs/reference/auto/knowledge-base.md
docs/reference/auto/knowledge-graph.md
docs/reference/auto/learnings.md
docs/reference/auto/todo.md
# RSpec auto-generated example files
worker/spec/examples.txt
# Ad-hoc test scripts with potential secrets
server/scripts/test_*.sh
server/scripts/trigger_*.sh
# Test output artifacts
**/rspec_results.json
# Per-host extension enable/disable state (written by admin "Toggle Extension")
config/extensions_state.json
# Private/custom extensions live under extensions/private/ (added manually by
# maintainers). Never committed — this repo publishes to a PUBLIC GitHub mirror.
#
# THIS ANCHORED RULE IS THE PROTECTION, on its own. An older comment here said
# "the *private* security rule above already ignores it", which was misleading
# in both directions: that rule was a bare substring match in the SECRET-material
# block (so it also ate ordinary source files named "private*"), and this line is
# what actually wins for every path under the directory. `*private*` was narrowed
# to key shapes in IMP-70a6c8b3b375; the measurement and the one risk that
# narrowing accepts are recorded at that rule.
# server/spec/lint/gitignore_substring_overreach_spec.rb pins both halves so
# neither can regress.
/extensions/private/
# Non-directory form as well. A trailing-slash pattern matches DIRECTORIES only,
# so if extensions/private is ever a SYMLINK (git sees a non-directory) the rule
# above does not fire and the link entry itself becomes trackable — committing
# the private extension's NAME, which the Gate-#9 note below treats as disclosure
# in its own right. The old `*private*` covered this by accident; this does it on
# purpose.
extensions/private
# Maintainer-local notes (never committed to the public repo)
/CLAUDE.local.md
# Gate-#9 grandfather entries whose PATH is inside extensions/private/. The tracked
# baseline beside it is published to the PUBLIC mirror, where such a path would
# disclose a private extension's name and internal layout. Written by
# scripts/generate-core-purity-baseline.sh; read by the hook and the scan mirror.
/.claude/hooks/core-purity-baseline.local.txt
# Grandfathered console.warn/console.error sites in PRIVATE extensions, read by
# scripts/list-console-sites.sh's consumers (the console-log-check.sh hook and the
# frontend-console check in scripts/pattern-validation.sh). Same reason as the
# core-purity local ledger above: the entries are private-extension paths, which is
# exactly what must not reach the public mirror. Written by
# scripts/generate-console-log-baseline.sh. Absent => those sites read as new.
/.claude/hooks/console-log-baseline.local.txt
# Private-extension half of the deep-relative-import ledger read by
# scripts/pattern-validation.sh. It names private extension PATHS, which a tracked
# file may not, so the split mirrors the console-log and core-purity ledgers above.
# Absent => a private tree's existing sites read as new, which is the correct signal
# for a maintainer who has those extensions on disk.
/.claude/hooks/deep-relative-import-baseline.local.txt
# Deployment-local identifier list read by scripts/checks/deployment-identifier-check.sh
# (and its edit-time hook). It names THIS deployment's hostnames / IP ranges / VM ids,
# which is exactly what the guard keeps out of the public mirror — so the list itself
# can never be tracked. One extended regex per line. Absent => the guard is a no-op.
/.claude/hooks/deployment-identifiers.local.txt
# Deployment-local operator docs. Markdown here is authored locally and pushed into
# THIS deployment's platform knowledge (`rails ai:seed_deployment_knowledge`, tag
# deployment-<slug>); git never sees it. Convention:
# docs/contributing/conventions/deployment-knowledge.md
/docs/operations/local/
# Deployment-local landing configuration and the worktree lane ledger (scripts/landing.env.example
# is the tracked, placeholder-only template). Never commit anything under here.
/scripts/local/
# Private-mode bundle lock (declares private-extension PATH gems — never commit; see server/Gemfile.private)
/server/Gemfile.private.lock
# The private-mode Gemfile itself IS committed (tiny; just flips the discovery
# flag). Un-ignore it: `*.private` above matches it by extension. This negation
# predates that narrowing — it existed because the broader `*private*` caught it
# — and is still load-bearing, so do not drop it as leftover.
!/server/Gemfile.private
# Runtime-generated maintenance page: MaintenanceController writes it when
# maintenance mode is enabled and deletes it when disabled. Not a source file.
/server/public/maintenance.html
# Worker-generated report artifacts (regenerable; may contain PII in real deployments)
worker/storage/
# ui-smoke generated reports (regenerated each run)
scripts/ui-smoke/last-report.*
# Platform-memory digest cache + its throttle stamp (IMP-de4ca2d3f7c5) — generated, per-machine
/.claude/hooks/platform-memory-digest.local.md
/.claude/hooks/platform-memory-digest.local.stamp
/.claude/hooks/platform-memory-digest.local.stamp.lock
# Build identity written at build time (module build / Docker build)
BUILD_INFO.json