oh-my-customcode 0.31.0 → 0.31.1

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "oh-my-customcode",
3
- "version": "0.31.0",
3
+ "version": "0.31.1",
4
4
  "description": "Batteries-included agent harness for Claude Code",
5
5
  "type": "module",
6
6
  "bin": {
@@ -4,6 +4,7 @@ description: Expert Go developer for writing idiomatic, performant Go code. Use
4
4
  model: sonnet
5
5
  memory: project
6
6
  effort: high
7
+ soul: true
7
8
  skills:
8
9
  - go-best-practices
9
10
  tools:
@@ -0,0 +1,21 @@
1
+ ---
2
+ agent: lang-golang-expert
3
+ version: 1.0.0
4
+ ---
5
+
6
+ ## Personality
7
+ - Direct and concise — lead with the answer, explain after
8
+ - Always provide runnable code examples, never pseudo-code
9
+ - Treat Go idioms as non-negotiable (Effective Go is gospel)
10
+
11
+ ## Style
12
+ - Error handling first — check errors before happy path
13
+ - Prefer stdlib over third-party when possible
14
+ - Name variables for clarity, not brevity (userCount > uc)
15
+ - Use table-driven tests as default test pattern
16
+
17
+ ## Anti-patterns
18
+ - Never use interface{}/any without a compelling reason
19
+ - Avoid init() functions — explicit initialization preferred
20
+ - No global mutable state
21
+ - Avoid premature abstraction — 3 concrete cases before extracting
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: sys-memory-keeper
3
- description: Use when you need to manage session memory persistence using claude-mem, save context before compaction, restore context on session start, query past memories, or perform session-end dual-system auto-save
3
+ description: Use when you need to manage session memory persistence via native auto-memory, save context before compaction, restore context on session start, collect session summaries, or perform session-end memory operations
4
4
  model: sonnet
5
5
  memory: project
6
6
  effort: medium
@@ -47,12 +47,19 @@ Provider: claude-mem | Collection: claude_memories | Archive: ~/.claude-mem/arch
47
47
  When triggered by session-end signal from orchestrator:
48
48
 
49
49
  1. **Collect** session summary: completed tasks, key decisions, open items
50
- 2. **Save to claude-mem** (if available): `mcp__plugin_claude-mem_mcp-search__save_memory` with project name, session date, and summary
51
- 3. **Verify episodic-memory** (if available): `mcp__plugin_episodic-memory_episodic-memory__search` to confirm session is indexed
52
- 4. **Report** results to orchestrator: saved/skipped/failed per system
50
+ 2. **Extract behaviors**: analyze conversation for repeated user preferences
51
+ - Communication patterns (verbosity, format, language preferences)
52
+ - Workflow patterns (tool usage, review habits, branching conventions)
53
+ - Domain priorities (security-first, performance-first, etc.)
54
+ - New behaviors → `[confidence: low]` in `## Behaviors` section
55
+ - Existing behaviors observed again → promote confidence level
56
+ - Contradicted behaviors → flag for review or demote
57
+ 3. **Update native auto-memory** (MEMORY.md) with session learnings + behaviors
58
+ 4. **Return formatted summary** to orchestrator for MCP persistence (claude-mem, episodic-memory)
59
+
60
+ > **Note**: MCP tools (claude-mem, episodic-memory) are orchestrator-scoped and cannot be called from subagents. The orchestrator handles MCP saves directly after receiving the formatted summary.
53
61
 
54
62
  ### Failure Handling
55
63
 
56
- - claude-mem unavailableskip, report warning
57
- - episodic-memory unavailable skip, report warning
58
- - Both unavailable → warn orchestrator, do not block session end
64
+ - MEMORY.md update failure → report error to orchestrator
65
+ - MCP persistence is orchestrator's responsibility — not handled here
@@ -30,6 +30,7 @@ escalation: # Model escalation policy (optional)
30
30
  enabled: true # Enable auto-escalation advisory
31
31
  path: haiku → sonnet → opus # Escalation sequence
32
32
  threshold: 2 # Failures before advisory
33
+ soul: true # Enable SOUL.md identity injection
33
34
  isolation: worktree # Run in isolated git worktree
34
35
  background: true # Run in background
35
36
  maxTurns: 10 # Max conversation turns
@@ -64,6 +65,54 @@ When `escalation.enabled: true`, the model-escalation hooks will track outcomes
64
65
 
65
66
  When enabled: first 200 lines of MEMORY.md loaded into system prompt.
66
67
 
68
+ ## Soul Identity
69
+
70
+ Optional per-agent identity layer that separates personality/style from capabilities.
71
+
72
+ | Aspect | Location | Purpose |
73
+ |--------|----------|---------|
74
+ | Capabilities | `.claude/agents/{name}.md` | WHAT the agent does |
75
+ | Identity | `.claude/agents/souls/{name}.soul.md` | HOW the agent communicates |
76
+
77
+ ### Soul File Format
78
+
79
+ Location: `.claude/agents/souls/{name}.soul.md`
80
+
81
+ ```yaml
82
+ ---
83
+ agent: {agent-name} # Must match agent filename
84
+ version: 1.0.0
85
+ ---
86
+ ```
87
+
88
+ Sections: `## Personality`, `## Style`, `## Anti-patterns`
89
+
90
+ ### Activation
91
+
92
+ 1. Agent frontmatter includes `soul: true`
93
+ 2. Routing skill reads `souls/{name}.soul.md` at spawn time (Step 5)
94
+ 3. Soul content prepended to agent prompt as identity context
95
+ 4. Missing soul file → graceful fallback (no error)
96
+
97
+ ### Precedence
98
+
99
+ Behavioral memory observations (R011) override soul defaults when they conflict. Behaviors are user-specific; souls are template defaults.
100
+
101
+ ## Artifact Output Convention
102
+
103
+ Skills that produce significant output can persist results to local storage.
104
+
105
+ **Location**: `.claude/outputs/sessions/{YYYY-MM-DD}/{skill-name}-{HHmmss}.md`
106
+
107
+ **Format**: Metadata header with `skill`, `date`, `query` fields, followed by skill output content.
108
+
109
+ **Rules**:
110
+ - Opt-in per skill — not mandatory
111
+ - The final subagent in the skill's pipeline writes the artifact (R010 compliance)
112
+ - Skills create the directory (`mkdir -p`) before writing
113
+ - `.claude/outputs/` is git-untracked (under `.claude/` gitignore)
114
+ - No indexing required — date-based directory browsing is sufficient
115
+
67
116
  ## Separation of Concerns
68
117
 
69
118
  | Location | Purpose | Contains |
@@ -74,6 +123,42 @@ When enabled: first 200 lines of MEMORY.md loaded into system prompt.
74
123
 
75
124
  Agent body: purpose, capabilities overview, workflow. NOT detailed instructions or reference docs.
76
125
 
126
+ ## Skill Frontmatter
127
+
128
+ Location: `.claude/skills/{name}/SKILL.md`
129
+
130
+ ### Required Fields
131
+
132
+ ```yaml
133
+ name: skill-name # Unique identifier (kebab-case)
134
+ description: Brief desc # One-line summary
135
+ ```
136
+
137
+ ### Optional Fields
138
+
139
+ ```yaml
140
+ context: fork # Forked context for isolated execution
141
+ version: 1.0.0 # Semantic version
142
+ user-invocable: false # Whether user can invoke directly
143
+ disable-model-invocation: true # Prevent model from auto-invoking
144
+ ```
145
+
146
+ ### Context Fork Criteria
147
+
148
+ Use `context: fork` for skills that orchestrate multi-agent workflows. Cap at **10 total** across the project.
149
+
150
+ | Use `context: fork` | Do NOT use `context: fork` |
151
+ |---------------------|---------------------------|
152
+ | Routing skills (secretary, dev-lead, etc.) | Best-practices skills |
153
+ | Workflow orchestration (DAG, pipelines) | Hook/command skills |
154
+ | Multi-agent coordination patterns | Single-agent reference skills |
155
+ | Task decomposition/planning | External tool integrations |
156
+
157
+ Current skills with `context: fork` (8/10 cap):
158
+ - secretary-routing, dev-lead-routing, de-lead-routing, qa-lead-routing
159
+ - dag-orchestration, task-decomposition, worker-reviewer-pipeline
160
+ - pipeline-guards
161
+
77
162
  ## Naming
78
163
 
79
164
  | Type | Pattern | Example |
@@ -71,6 +71,58 @@ Memory entries in MEMORY.md should include confidence annotations to distinguish
71
71
  [any] → contradicted by evidence → demoted or removed
72
72
  ```
73
73
 
74
+ ## Behavioral Memory
75
+
76
+ MEMORY.md supports an optional `## Behaviors` section for tracking user interaction preferences and workflow patterns.
77
+
78
+ ### Behaviors Section Format
79
+
80
+ ```markdown
81
+ ## Behaviors [confidence: medium]
82
+ - User prefers concise responses — 3 sentences max
83
+ - Commit messages always include issue number
84
+ - Security-first review perspective
85
+
86
+ ## Behavior Lifecycle
87
+ - New observation → [confidence: low]
88
+ - Seen in 2+ sessions → [confidence: medium]
89
+ - User-confirmed → [confidence: high]
90
+ - Contradicted → demote or remove
91
+ ```
92
+
93
+ ### What Counts as a Behavior
94
+
95
+ | Category | Examples |
96
+ |----------|---------|
97
+ | Communication | Verbosity preference, language, format |
98
+ | Workflow | Tool preferences, review habits, branching patterns |
99
+ | Domain priority | Security-first, performance-first, simplicity-first |
100
+
101
+ ### What Does NOT Count as a Behavior
102
+
103
+ - Facts about the codebase (use existing sections)
104
+ - One-time instructions (ephemeral, not persistent)
105
+ - Tool configuration (belongs in CLAUDE.md or settings)
106
+
107
+ ### Extraction Guidelines
108
+
109
+ sys-memory-keeper extracts behavioral patterns at session end:
110
+ 1. Analyze conversation for repeated user preferences
111
+ 2. New behaviors start at `[confidence: low]`
112
+ 3. Promote on repeated observation across sessions
113
+ 4. Demote or remove when contradicted
114
+
115
+ ### Budget Management
116
+
117
+ Behaviors share the 200-line MEMORY.md budget with facts. When approaching the limit:
118
+ 1. Prune `[confidence: low]` behaviors first
119
+ 2. Then prune `[confidence: medium]` behaviors
120
+ 3. `[confidence: high]` behaviors are never auto-pruned
121
+
122
+ ### Precedence
123
+
124
+ Behavioral memory observations override soul defaults (R006 Soul Identity) when they conflict. Behaviors are user-specific and session-derived; souls are template defaults.
125
+
74
126
  ### Rules
75
127
 
76
128
  | Rule | Detail |
@@ -73,6 +73,29 @@ For **new pipeline code**, **DAG scaffolding**, or **SQL model generation**:
73
73
  ### Step 3: Expert Selection
74
74
  Route to appropriate DE expert based on tool/framework detection.
75
75
 
76
+ ### Step 4: Ontology-RAG Enrichment (R019)
77
+
78
+ After agent selection, enrich the spawned agent's prompt with ontology context:
79
+
80
+ 1. Call `get_agent_for_task(original_query)` via MCP
81
+ 2. Extract `suggested_skills` from response
82
+ 3. If `suggested_skills` non-empty, prepend to spawned agent prompt:
83
+ `"Ontology context suggests these skills may be relevant: {suggested_skills}"`
84
+ 4. On MCP failure: skip silently, proceed with unmodified prompt
85
+
86
+ **This step is advisory only — it never changes which agent is selected.**
87
+
88
+ ### Step 5: Soul Injection
89
+
90
+ If the selected agent has `soul: true` in its frontmatter:
91
+
92
+ 1. Read `.claude/agents/souls/{agent-name}.soul.md`
93
+ 2. If file exists, prepend soul content to the agent's prompt:
94
+ `"Identity context:\n{soul content}\n\n---\n\n"`
95
+ 3. If file doesn't exist → skip silently (no error, no injection)
96
+
97
+ **This step runs after ontology-RAG enrichment. Soul content is identity context, not capability instructions.**
98
+
76
99
  ## Command Routing
77
100
 
78
101
  ```
@@ -262,7 +285,7 @@ Delegate to mgr-creator with context:
262
285
  keywords: extracted tool names
263
286
  file_patterns: detected config patterns
264
287
  skills: auto-discover from .claude/skills/
265
- guides: auto-discover from guides/
288
+ guides: auto-discover from templates/guides/
266
289
  ```
267
290
 
268
291
  **Examples of dynamic creation triggers:**
@@ -107,6 +107,29 @@ For **new file creation**, **boilerplate**, or **test code generation**:
107
107
  ### Step 3: Expert Agent Selection
108
108
  Route to appropriate language/framework expert based on file extension and keyword mapping.
109
109
 
110
+ ### Step 4: Ontology-RAG Enrichment (R019)
111
+
112
+ After agent selection, enrich the spawned agent's prompt with ontology context:
113
+
114
+ 1. Call `get_agent_for_task(original_query)` via MCP
115
+ 2. Extract `suggested_skills` from response
116
+ 3. If `suggested_skills` non-empty, prepend to spawned agent prompt:
117
+ `"Ontology context suggests these skills may be relevant: {suggested_skills}"`
118
+ 4. On MCP failure: skip silently, proceed with unmodified prompt
119
+
120
+ **This step is advisory only — it never changes which agent is selected.**
121
+
122
+ ### Step 5: Soul Injection
123
+
124
+ If the selected agent has `soul: true` in its frontmatter:
125
+
126
+ 1. Read `.claude/agents/souls/{agent-name}.soul.md`
127
+ 2. If file exists, prepend soul content to the agent's prompt:
128
+ `"Identity context:\n{soul content}\n\n---\n\n"`
129
+ 3. If file doesn't exist → skip silently (no error, no injection)
130
+
131
+ **This step runs after ontology-RAG enrichment. Soul content is identity context, not capability instructions.**
132
+
110
133
  ## Routing Rules
111
134
 
112
135
  Multi-language: detect all languages, route to parallel experts (max 4). Single-language: route to matching expert. Cross-layer (frontend + backend): multiple experts in parallel.
@@ -126,7 +149,7 @@ Delegate to mgr-creator with context:
126
149
  keywords: extracted from user input
127
150
  file_patterns: detected extensions
128
151
  skills: auto-discover from .claude/skills/
129
- guides: auto-discover from guides/
152
+ guides: auto-discover from templates/guides/
130
153
  ```
131
154
 
132
155
  **Examples of dynamic creation triggers:**
@@ -32,6 +32,19 @@ Review code for best practices using language-specific expert agents.
32
32
  4. Analyze code against best practices
33
33
  5. Generate review report
34
34
  ```
35
+ 6. **Artifact persistence** (optional): Review agent saves findings to:
36
+ ```
37
+ .claude/outputs/sessions/{YYYY-MM-DD}/dev-review-{HHmmss}.md
38
+ ```
39
+ With metadata header:
40
+ ```markdown
41
+ ---
42
+ skill: dev-review
43
+ date: {ISO-8601 with timezone}
44
+ query: "{original user query}"
45
+ ---
46
+ ```
47
+ The review agent creates the directory and writes the artifact before returning results (R010 compliance).
35
48
 
36
49
  ## Agent Selection
37
50
 
@@ -44,6 +44,29 @@ quality_analysis → qa-planner + qa-engineer (parallel)
44
44
  full_qa_cycle → all agents (sequential)
45
45
  ```
46
46
 
47
+ ### Ontology-RAG Enrichment (R019)
48
+
49
+ After agent selection, enrich the spawned agent's prompt with ontology context:
50
+
51
+ 1. Call `get_agent_for_task(original_query)` via MCP
52
+ 2. Extract `suggested_skills` from response
53
+ 3. If `suggested_skills` non-empty, prepend to spawned agent prompt:
54
+ `"Ontology context suggests these skills may be relevant: {suggested_skills}"`
55
+ 4. On MCP failure: skip silently, proceed with unmodified prompt
56
+
57
+ **This step is advisory only — it never changes which agent is selected.**
58
+
59
+ ### Step 5: Soul Injection
60
+
61
+ If the selected agent has `soul: true` in its frontmatter:
62
+
63
+ 1. Read `.claude/agents/souls/{agent-name}.soul.md`
64
+ 2. If file exists, prepend soul content to the agent's prompt:
65
+ `"Identity context:\n{soul content}\n\n---\n\n"`
66
+ 3. If file doesn't exist → skip silently (no error, no injection)
67
+
68
+ **This step runs after ontology-RAG enrichment. Soul content is identity context, not capability instructions.**
69
+
47
70
  ## Routing Rules
48
71
 
49
72
  ### 1. Test Planning
@@ -293,7 +316,7 @@ Delegate to mgr-creator with context:
293
316
  type: qa-engineer
294
317
  keywords: extracted testing terms
295
318
  skills: auto-discover from .claude/skills/
296
- guides: auto-discover from guides/
319
+ guides: auto-discover from templates/guides/
297
320
  ```
298
321
 
299
322
  **Examples of dynamic creation triggers:**
@@ -45,7 +45,7 @@ Batch 2: T5, T6, T7, T8 (Integration + Comparative)
45
45
  Batch 3: T9, T10 (Innovation)
46
46
  ```
47
47
 
48
- ### Phase 2: Cross-Verification Loop (min 2, max 5 rounds)
48
+ ### Phase 2: Cross-Verification Loop (min 2, max 30 rounds)
49
49
 
50
50
  ```
51
51
  Team findings ──→ opus 4.6 verification ──→ codex-exec xhigh verification
@@ -60,7 +60,7 @@ Each round:
60
60
  3. **Contradiction resolution**: Reconcile divergent findings between teams and verifiers
61
61
  4. **Convergence check**: All major claims verified with no outstanding contradictions → proceed
62
62
 
63
- Convergence expected by round 3. Hard stop at round 5.
63
+ Convergence expected by round 3. Hard stop at round 30.
64
64
 
65
65
  ### Phase 3: Synthesis
66
66
 
@@ -71,8 +71,21 @@ Convergence expected by round 3. Hard stop at round 5.
71
71
  ### Phase 4: Output
72
72
 
73
73
  1. Structured markdown report (see Output Format below)
74
- 2. GitHub issue auto-created with findings
75
- 3. Action items with effort estimates
74
+ 2. **Artifact persistence**: The Phase 4 synthesis agent (opus) writes the report to:
75
+ ```
76
+ .claude/outputs/sessions/{YYYY-MM-DD}/research-{HHmmss}.md
77
+ ```
78
+ With metadata header:
79
+ ```markdown
80
+ ---
81
+ skill: research
82
+ date: {ISO-8601 with timezone}
83
+ query: "{original user query}"
84
+ ---
85
+ ```
86
+ The agent creates the directory (`mkdir -p`) before writing. This is a subagent operation (R010 compliance).
87
+ 3. GitHub issue auto-created with findings
88
+ 4. Action items with effort estimates
76
89
 
77
90
  ## Execution Rules
78
91
 
@@ -53,6 +53,29 @@ todo → sys-naggy
53
53
  batch → multiple (parallel)
54
54
  ```
55
55
 
56
+ ### Ontology-RAG Enrichment (R019)
57
+
58
+ After agent selection, enrich the spawned agent's prompt with ontology context:
59
+
60
+ 1. Call `get_agent_for_task(original_query)` via MCP
61
+ 2. Extract `suggested_skills` from response
62
+ 3. If `suggested_skills` non-empty, prepend to spawned agent prompt:
63
+ `"Ontology context suggests these skills may be relevant: {suggested_skills}"`
64
+ 4. On MCP failure: skip silently, proceed with unmodified prompt
65
+
66
+ **This step is advisory only — it never changes which agent is selected.**
67
+
68
+ ### Step 5: Soul Injection
69
+
70
+ If the selected agent has `soul: true` in its frontmatter:
71
+
72
+ 1. Read `.claude/agents/souls/{agent-name}.soul.md`
73
+ 2. If file exists, prepend soul content to the agent's prompt:
74
+ `"Identity context:\n{soul content}\n\n---\n\n"`
75
+ 3. If file doesn't exist → skip silently (no error, no injection)
76
+
77
+ **This step runs after ontology-RAG enrichment. Soul content is identity context, not capability instructions.**
78
+
56
79
  ## Routing Rules
57
80
 
58
81
  ### 1. Single Task Routing
@@ -186,7 +186,7 @@ project/
186
186
  | +-- rules/ # Global rules (R000-R018)
187
187
  | +-- hooks/ # Hook scripts (memory, HUD)
188
188
  | +-- contexts/ # Context files (ecomode)
189
- +-- guides/ # Reference docs (23 topics)
189
+ +-- guides/ # Reference docs (25 topics)
190
190
  ```
191
191
 
192
192
  ## Orchestration
@@ -186,7 +186,7 @@ project/
186
186
  | +-- rules/ # 전역 규칙 (R000-R018)
187
187
  | +-- hooks/ # 훅 스크립트 (메모리, HUD)
188
188
  | +-- contexts/ # 컨텍스트 파일 (ecomode)
189
- +-- guides/ # 레퍼런스 문서 (23 토픽)
189
+ +-- guides/ # 레퍼런스 문서 (25 토픽)
190
190
  ```
191
191
 
192
192
  ## 오케스트레이션
@@ -0,0 +1,120 @@
1
+ # Flutter Security Guide
2
+
3
+ > Reference: OWASP Mobile Top 10 (2024), Flutter Official Documentation
4
+
5
+ ## OWASP Mobile Top 10 Mapping
6
+
7
+ ### M1 — Improper Credential Usage
8
+
9
+ - Never hardcode API keys, tokens, or credentials in source code
10
+ - Backend proxy pattern: route ALL sensitive API calls through server
11
+ - `--dart-define-from-file=.env` is for NON-SECRET build config only (values are extractable from binary)
12
+ - Credential rotation: implement token refresh with `dio` interceptor
13
+ - OAuth2 flow: use `flutter_appauth` for PKCE-based authentication
14
+
15
+ ### M2 — Inadequate Supply Chain Security
16
+
17
+ - Run `dart pub audit` before every release to check for known vulnerabilities
18
+ - Pin exact versions in `pubspec.yaml` for production (`package: 1.2.3` not `package: ^1.2.3`)
19
+ - Verify package publisher on pub.dev (look for verified publisher badge)
20
+ - Review transitive dependencies: `dart pub deps --style=compact`
21
+ - Avoid packages with no recent updates (> 12 months without commits)
22
+
23
+ ### M3 — Insecure Authentication/Authorization
24
+
25
+ - Biometric authentication: `local_auth` package with `BiometricType.fingerprint` / `BiometricType.face`
26
+ - Session management: implement token expiry checking before API calls
27
+ - JWT client-side validation: verify `exp`, `aud`, `iss` claims before using tokens
28
+ - Re-authentication: require biometric/PIN for sensitive operations (payment, profile changes)
29
+ - Deep link auth: validate authentication state before processing deep link navigation
30
+
31
+ ### M4 — Insufficient Input/Output Validation
32
+
33
+ - Validate ALL deep link URI parameters with RegExp allowlists
34
+ - Sanitize user input before displaying in WebView (`flutter_inappwebview`)
35
+ - Use `Uri.parse()` with try-catch, never trust raw string URLs
36
+ - Output encoding: escape HTML entities when rendering user content
37
+ - Form validation: use `TextFormField` validators, never trust client-side validation alone
38
+
39
+ ### M5 — Insecure Communication
40
+
41
+ - Certificate pinning (SPKI): use `dio` with custom `SecurityContext`
42
+ - Extract SPKI hash: `openssl s_client -connect host:443 | openssl x509 -pubkey | openssl pkey -pubin -outform DER | openssl dgst -sha256 -binary | base64`
43
+ - Include backup pins for certificate rotation
44
+ - Android: `network_security_config.xml` with `cleartextTrafficPermitted=false`
45
+ - iOS: ATS enabled (`NSAllowsArbitraryLoads=false`), never override in production
46
+
47
+ ### M6 — Inadequate Privacy Controls
48
+
49
+ - Request minimum platform permissions (camera, location, contacts)
50
+ - iOS: provide usage description strings in Info.plist for every permission
51
+ - Android: use runtime permissions, respect "Don't ask again"
52
+ - Data minimization: only collect and store data that is necessary
53
+ - GDPR/CCPA: implement data export and deletion capabilities
54
+
55
+ ### M7 — Insufficient Binary Protections
56
+
57
+ - Release builds: `flutter build --obfuscate --split-debug-info=debug-info/`
58
+ - Store debug symbols securely for crash reporting (Crashlytics, Sentry)
59
+ - Android ProGuard: configure `android/app/proguard-rules.pro`
60
+ - Note: `--obfuscate` does NOT apply to `flutter build web` (JS minification is the web equivalent)
61
+ - Anti-tampering: consider `flutter_jailbreak_detection` for integrity checks
62
+
63
+ ### M8 — Security Misconfiguration
64
+
65
+ - Android: set `android:debuggable="false"` in release manifest
66
+ - Android: set `android:allowBackup="false"` to prevent ADB data extraction
67
+ - iOS: enable data protection with `NSFileProtectionComplete`
68
+ - Remove all debug logging in release: guard with `kDebugMode`
69
+ - Firebase: secure `google-services.json` / `GoogleService-Info.plist` (add to .gitignore)
70
+
71
+ ### M9 — Insecure Data Storage
72
+
73
+ - Sensitive data: `flutter_secure_storage` v10+ (iOS Keychain / Android EncryptedSharedPreferences)
74
+ - iOS: `IOSOptions(accessibility: KeychainAccessibility.first_unlock_this_device)`
75
+ - Android: `AndroidOptions(encryptedSharedPreferences: true)`
76
+ - Web WARNING: `flutter_secure_storage` uses localStorage on Web (XSS vulnerable) — use HttpOnly cookies or in-memory storage
77
+ - Never use `SharedPreferences` for tokens, PII, or credentials
78
+ - Screenshot protection: Android `FLAG_SECURE` via `flutter_windowmanager`
79
+
80
+ ### M10 — Insufficient Cryptography
81
+
82
+ - Use `pointycastle` or `cryptography` package for custom crypto operations
83
+ - Avoid: MD5, SHA-1, DES, ECB mode, hardcoded IVs/keys
84
+ - Prefer: AES-256-GCM for symmetric, RSA-OAEP or ECDSA for asymmetric
85
+ - Key storage: always delegate to platform Keychain/Keystore, never store in app data
86
+ - Random number generation: use `Random.secure()` for security-sensitive values
87
+
88
+ ## Platform-Specific Security
89
+
90
+ ### iOS
91
+
92
+ - Keychain with Secure Enclave: `IOSOptions(useSecureEnclave: true)` for high-value data
93
+ - ATS enforcement: never add `NSAllowsArbitraryLoads` exception for production
94
+ - Jailbreak detection: `flutter_jailbreak_detection` package
95
+
96
+ ### Android
97
+
98
+ - Keystore-backed encryption via `EncryptedSharedPreferences`
99
+ - Network security config: pin certificates, block cleartext
100
+ - Root detection: `flutter_jailbreak_detection` or `safe_device`
101
+ - `allowBackup=false` in AndroidManifest.xml
102
+
103
+ ### Web
104
+
105
+ - CSP headers: configure on the server hosting Flutter web app
106
+ - Avoid storing sensitive data in localStorage or sessionStorage
107
+ - Use HttpOnly, Secure, SameSite cookies for authentication tokens
108
+ - XSS prevention: sanitize all user-generated content before rendering
109
+
110
+ ## Package Recommendations
111
+
112
+ | Category | Package | Notes |
113
+ |----------|---------|-------|
114
+ | Secure Storage | `flutter_secure_storage` | Keychain/Keystore, v10+; Web: localStorage (XSS risk) |
115
+ | OAuth2 / PKCE | `flutter_appauth` | PKCE-based auth flows |
116
+ | Biometrics | `local_auth` | Fingerprint, Face ID |
117
+ | HTTP (pinning) | `dio` | Custom `SecurityContext` for certificate pinning |
118
+ | Crypto | `cryptography` | AES-GCM, RSA-OAEP, ECDSA |
119
+ | Integrity check | `flutter_jailbreak_detection` | Root/jailbreak detection |
120
+ | Screenshot protect | `flutter_windowmanager` | Android `FLAG_SECURE` |
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.31.0",
2
+ "version": "0.31.1",
3
3
  "lastUpdated": "2026-03-09T00:00:00.000Z",
4
4
  "components": [
5
5
  {