Skip to content
This repository was archived by the owner on Jan 2, 2026. It is now read-only.

Commit 5329529

Browse files
zircoteclaude
andcommitted
fix: address critical and high priority code review findings
MAXALL code review remediation implementing 10 fixes: Security: - fix(capture): implement non-blocking lock with timeout (CRIT-001) - fix(capture): add O_NOFOLLOW to prevent symlink attacks (HIGH-005) - fix(capture): restrict lock file permissions to 0o600 (MED-001) - fix(git_ops): add 30s timeout to subprocess calls (HIGH-001) Data Integrity: - fix(index): add missing repo_path to insert_batch (CRIT-002) Concurrency: - fix(index): add threading.Lock for thread-safe operations (HIGH-011) - fix(index): enable SQLite WAL mode for concurrent access (MED-005) - fix(registry): implement double-checked locking pattern (HIGH-012) Documentation: - docs: add SECURITY.md with vulnerability reporting (HIGH-014) - docs: add CHANGELOG.md with version history (MED-022) All 1806 tests pass. Ruff and mypy checks clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 192e48f commit 5329529

9 files changed

Lines changed: 816 additions & 584 deletions

File tree

CHANGELOG.md

Lines changed: 155 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,155 @@
1+
# Changelog
2+
3+
All notable changes to this project will be documented in this file.
4+
5+
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7+
8+
## [Unreleased]
9+
10+
### Security
11+
- Fix TOCTOU race condition in file locking with O_NOFOLLOW flag
12+
- Add subprocess timeout (30s) to prevent indefinite hangs
13+
- Restrict lock file permissions to 0o600
14+
- Add thread-safe locking to ServiceRegistry and IndexService
15+
16+
### Fixed
17+
- Fix missing `repo_path` in batch insert operations
18+
- Fix blocking lock acquisition with timeout mechanism
19+
20+
### Added
21+
- Enable SQLite WAL mode for better concurrent access
22+
- Add SECURITY.md with vulnerability reporting process
23+
- Add CHANGELOG.md
24+
25+
## [0.9.1] - 2025-12-24
26+
27+
### Fixed
28+
- Add .DS_Store to gitignore
29+
30+
### Changed
31+
- Update guidance builder tests to match new templates
32+
33+
## [0.9.0] - 2025-12-24
34+
35+
### Added
36+
- Pyright type checker configuration
37+
- Project hooks for Python code quality (format, lint, typecheck)
38+
39+
### Fixed
40+
- Use project-specific index path in status and validate commands
41+
- Correct byte counting in batch content parsing
42+
43+
### Changed
44+
- Strengthen memory block guidance with balanced requirements
45+
46+
## [0.8.0] - 2025-12-22
47+
48+
### Added
49+
- Comprehensive tests for hook_utils and session_analyzer
50+
- API Reference documentation
51+
- Environment variables documentation
52+
- Command help documentation
53+
54+
### Fixed
55+
- Address code review findings for performance and quality
56+
- Address GitHub Copilot code review feedback
57+
- Fix unused variables and redundant imports
58+
59+
### Changed
60+
- Simplify ServiceRegistry by removing over-engineering
61+
- Archive code review artifacts to docs/code-review/
62+
63+
## [0.7.1] - 2025-12-21
64+
65+
### Fixed
66+
- Update dependencies for ARM64 compatibility
67+
68+
## [0.7.0] - 2025-12-21
69+
70+
### Added
71+
- Auto-configure git notes sync on session start
72+
- Research paper on git-native semantic memory for LLM agents
73+
74+
## [0.6.2] - 2025-12-20
75+
76+
### Fixed
77+
- Minor bug fixes
78+
79+
## [0.6.1] - 2025-12-20
80+
81+
### Added
82+
- Rotating file logging
83+
- Increased capture limits
84+
85+
## [0.6.0] - 2025-12-19
86+
87+
### Changed
88+
- Replace ANSI colors with unicode block markers for terminal output
89+
90+
## [0.5.4] - 2025-12-19
91+
92+
### Added
93+
- Colored ::: block markers for terminal output
94+
95+
## [0.5.3] - 2025-12-19
96+
97+
### Fixed
98+
- Remove duplicate hooks reference from plugin manifest
99+
100+
## [0.5.2] - 2025-12-19
101+
102+
### Fixed
103+
- Complete hook-based memory capture with block markers
104+
105+
## [0.5.1] - 2025-12-19
106+
107+
### Added
108+
- Enhanced auto-capture across all hook events
109+
110+
## [0.5.0] - 2025-12-19
111+
112+
### Added
113+
- Enable hooks by default
114+
- Enhanced memory capture system
115+
116+
## [0.4.1] - 2025-12-18
117+
118+
### Fixed
119+
- Add --python flag to uv pip install for correct venv targeting
120+
121+
## [0.4.0] - 2025-12-18
122+
123+
### Added
124+
- Release workflow targets to Makefile
125+
126+
### Changed
127+
- Replace Python bootstrap with bash shell wrapper for hook venv management
128+
129+
### Fixed
130+
- Correct plugin.json path in bumpversion config
131+
- Add explanatory comments to remaining bare exception handlers
132+
- Address GitHub Copilot code review findings
133+
134+
## [0.3.1] - 2025-12-17
135+
136+
### Fixed
137+
- Initial stable release with core memory capture functionality
138+
139+
[Unreleased]: https://github.com/zircote/git-notes-memory-manager/compare/v0.9.1...HEAD
140+
[0.9.1]: https://github.com/zircote/git-notes-memory-manager/compare/v0.9.0...v0.9.1
141+
[0.9.0]: https://github.com/zircote/git-notes-memory-manager/compare/v0.8.0...v0.9.0
142+
[0.8.0]: https://github.com/zircote/git-notes-memory-manager/compare/v0.7.1...v0.8.0
143+
[0.7.1]: https://github.com/zircote/git-notes-memory-manager/compare/v0.7.0...v0.7.1
144+
[0.7.0]: https://github.com/zircote/git-notes-memory-manager/compare/v0.6.2...v0.7.0
145+
[0.6.2]: https://github.com/zircote/git-notes-memory-manager/compare/v0.6.1...v0.6.2
146+
[0.6.1]: https://github.com/zircote/git-notes-memory-manager/compare/v0.6.0...v0.6.1
147+
[0.6.0]: https://github.com/zircote/git-notes-memory-manager/compare/v0.5.4...v0.6.0
148+
[0.5.4]: https://github.com/zircote/git-notes-memory-manager/compare/v0.5.3...v0.5.4
149+
[0.5.3]: https://github.com/zircote/git-notes-memory-manager/compare/v0.5.2...v0.5.3
150+
[0.5.2]: https://github.com/zircote/git-notes-memory-manager/compare/v0.5.1...v0.5.2
151+
[0.5.1]: https://github.com/zircote/git-notes-memory-manager/compare/v0.5.0...v0.5.1
152+
[0.5.0]: https://github.com/zircote/git-notes-memory-manager/compare/v0.4.1...v0.5.0
153+
[0.4.1]: https://github.com/zircote/git-notes-memory-manager/compare/v0.4.0...v0.4.1
154+
[0.4.0]: https://github.com/zircote/git-notes-memory-manager/compare/v0.3.1...v0.4.0
155+
[0.3.1]: https://github.com/zircote/git-notes-memory-manager/releases/tag/v0.3.1

SECURITY.md

Lines changed: 88 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,88 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
| Version | Supported |
6+
| ------- | ------------------ |
7+
| 0.9.x | :white_check_mark: |
8+
| < 0.9 | :x: |
9+
10+
## Reporting a Vulnerability
11+
12+
We take security vulnerabilities seriously. If you discover a security issue, please report it responsibly.
13+
14+
### How to Report
15+
16+
**DO NOT** open a public GitHub issue for security vulnerabilities.
17+
18+
Instead, please report vulnerabilities via one of these methods:
19+
20+
1. **GitHub Security Advisories** (Preferred)
21+
- Navigate to the [Security tab](../../security/advisories) of this repository
22+
- Click "Report a vulnerability"
23+
- Provide a detailed description
24+
25+
2. **Email**
26+
- Send details to the repository maintainers
27+
- Use the subject line: `[SECURITY] git-notes-memory vulnerability report`
28+
29+
### What to Include
30+
31+
Please include the following in your report:
32+
33+
- **Description**: Clear explanation of the vulnerability
34+
- **Impact**: What an attacker could achieve
35+
- **Affected versions**: Which versions are vulnerable
36+
- **Steps to reproduce**: Detailed reproduction steps
37+
- **Proof of concept**: Code or commands demonstrating the issue (if possible)
38+
- **Suggested fix**: Your recommendations (if any)
39+
40+
### Response Timeline
41+
42+
- **Acknowledgment**: Within 48 hours of report
43+
- **Initial assessment**: Within 7 days
44+
- **Fix timeline**: Depends on severity
45+
- Critical: 7 days
46+
- High: 14 days
47+
- Medium: 30 days
48+
- Low: 60 days
49+
50+
### Disclosure Policy
51+
52+
- We will coordinate disclosure timing with the reporter
53+
- Credit will be given to reporters (unless they prefer anonymity)
54+
- We follow responsible disclosure practices
55+
56+
## Security Considerations
57+
58+
### Data Storage
59+
60+
- Memories are stored as git notes in your local repository
61+
- SQLite index is stored in `~/.local/share/memory-plugin/` by default
62+
- Sensitive data in memories is your responsibility to manage
63+
64+
### Best Practices
65+
66+
1. **Avoid storing secrets**: Do not capture API keys, passwords, or credentials as memories
67+
2. **Review before sharing**: If sharing repositories with memories, review note contents first
68+
3. **Secure your repository**: Standard git security practices apply
69+
4. **Lock file permissions**: Lock files are created with 0o600 permissions
70+
71+
### Known Security Features
72+
73+
- Input validation on namespaces, summaries, and content
74+
- Path traversal prevention in git operations
75+
- No shell=True in subprocess calls
76+
- File locking with timeout protection
77+
- O_NOFOLLOW flag prevents symlink attacks on lock files
78+
79+
## Security Audit
80+
81+
This project underwent a security review on 2025-12-24 as part of the MAXALL code review process. Key findings were addressed:
82+
83+
- TOCTOU race condition mitigated with O_NOFOLLOW
84+
- Subprocess timeouts added to prevent hangs
85+
- Lock file permissions restricted to 0o600
86+
- Thread safety added to service registry
87+
88+
For the full security assessment, see `docs/code-review/2025/12/24/CODE_REVIEW.md`.

0 commit comments

Comments
 (0)