evan188199-tech
50f8ccbaa4
feat: split knowledge sync - add GitHub source sync ( #903 )
...
* feat(knowledge): add GitHub source sync
* fix(github-sync): contain downloaded paths inside the KB raw dir
Destinations were built as `raw_dir / rel` where `rel` is derived from the
GitHub tree/compare response — remote input. Two shapes escaped: a `..`
segment, and an absolute path, which is the quieter one because
`Path("/kb") / "/etc/x"` is `/etc/x`, silently discarding the base. The only
filters in the way checked the file extension and the glob, so a matching
path would have been written — and, on the removal branch, deleted — outside
the knowledge base.
git rejects both shapes in tree entries today, so this is defence in depth
rather than a live exploit; a downloader still should not delegate to the
remote the question of where it writes. One `_contained_dest` seam now guards
the full-sync write, the incremental write, and the removal, and logs what it
refused.
---------
Co-authored-by: XZH <cto@xzh.ai >
Co-authored-by: Frank <bingxizhao@novix.science >
2026-08-24 16:55:47 +08:00
..
2026-06-17 10:50:44 +08:00
2026-06-14 17:43:13 +02:00
2026-06-22 15:22:53 +02:00
2026-06-20 21:12:56 +08:00
2026-05-22 21:09:22 +08:00
2026-07-19 16:56:34 +08:00
2026-06-20 23:57:21 +08:00
2026-06-14 17:43:13 +02:00
2026-08-20 14:15:53 +08:00
2026-08-17 11:22:26 +08:00
2026-05-02 20:16:07 +08:00
2026-08-20 00:16:44 +08:00
2026-07-24 03:06:58 +08:00
2026-08-02 13:23:45 +08:00
2026-08-02 13:23:45 +08:00
2026-08-02 13:23:45 +08:00
2026-06-17 00:56:27 +08:00
2026-06-13 21:10:57 +08:00
2026-08-17 11:22:26 +08:00
2026-07-31 00:25:48 +08:00
2026-08-02 13:23:45 +08:00
2026-03-13 20:42:16 +08:00
2026-05-21 18:08:22 +08:00
2026-04-20 19:46:41 +08:00
2026-05-01 01:39:08 +08:00
2026-08-13 00:02:42 +08:00
2026-08-13 18:49:48 +08:00
2026-05-01 01:39:08 +08:00
2026-08-17 11:22:26 +08:00
2026-01-23 01:42:25 +08:00
2026-01-07 10:53:01 +08:00
2026-07-19 16:56:34 +08:00
2026-03-13 01:47:38 +08:00
2026-08-17 01:12:05 +08:00
2026-08-12 17:28:56 +08:00
2026-08-17 11:22:26 +08:00
2026-06-17 00:56:27 +08:00
2026-08-24 16:55:47 +08:00
2026-08-24 16:55:47 +08:00
2026-06-11 20:03:34 +08:00
2026-08-17 11:22:26 +08:00
2026-08-09 22:18:22 +08:00
2026-08-17 11:22:26 +08:00
2026-08-22 01:36:30 +08:00
2026-07-19 01:38:06 +08:00
2026-08-12 17:06:47 +08:00
2026-05-21 18:06:14 +08:00
2026-07-31 00:25:48 +08:00
2026-08-02 13:23:45 +08:00
2026-07-31 00:25:48 +08:00
2026-06-17 00:56:27 +08:00
2026-08-19 23:52:33 +08:00
2026-04-30 23:41:58 +08:00
2026-08-20 14:15:53 +08:00
2026-04-24 22:36:32 +08:00
2026-05-13 21:36:07 +08:00
2026-08-06 19:19:45 +08:00
2026-06-18 00:22:48 +08:00
2026-08-24 16:34:29 +08:00
2026-08-20 14:15:53 +08:00
2026-08-19 17:34:52 +08:00
2026-04-20 00:33:33 +08:00
2026-06-11 20:03:34 +08:00
2026-06-17 00:56:27 +08:00
2026-04-23 19:29:16 +08:00
2026-06-14 17:43:13 +02:00
2026-07-29 01:56:12 +08:00
2026-05-21 18:07:39 +08:00
2026-05-21 18:07:39 +08:00
2026-07-24 17:14:41 +08:00
2026-08-20 14:15:53 +08:00
2026-08-20 14:15:53 +08:00
2026-08-20 14:15:53 +08:00
2026-08-20 14:15:53 +08:00
2026-08-20 14:15:53 +08:00
2026-08-20 14:15:53 +08:00
2026-08-19 17:34:52 +08:00
2026-08-13 18:49:48 +08:00
2026-08-17 11:22:26 +08:00
2026-08-17 11:22:26 +08:00
2026-05-21 18:08:22 +08:00
2026-04-23 19:29:16 +08:00
2026-08-21 15:58:26 +08:00
2026-08-12 16:11:35 +08:00
2026-08-20 00:56:34 +08:00
2026-08-03 21:45:40 +08:00
2026-08-17 09:57:56 +08:00
2026-08-19 17:34:52 +08:00
2026-08-09 22:18:22 +08:00
2026-05-03 16:35:52 +08:00
2026-06-18 00:22:48 +08:00
2026-08-19 17:34:52 +08:00
2026-08-16 23:48:21 +08:00
2026-08-17 00:04:21 +08:00
2026-07-31 00:25:48 +08:00
2026-04-23 19:29:16 +08:00
2026-06-11 20:03:34 +08:00
2026-04-24 22:36:32 +08:00
2026-05-21 18:06:14 +08:00
2026-05-13 21:36:07 +08:00
2026-07-31 00:25:48 +08:00
2026-07-24 18:16:04 +08:00
2026-08-20 00:29:48 +08:00
2026-05-13 21:36:07 +08:00
2026-08-19 17:34:52 +08:00
2026-07-19 01:38:06 +08:00
2026-05-12 02:20:30 +08:00
2026-05-21 18:06:14 +08:00
2026-08-24 16:51:49 +08:00
2026-08-20 14:15:53 +08:00