ARTEX/traffic
BaaRai ed87a573d2 security: generate the initial CA ourselves so go-mitmproxy never creates files
go-mitmproxy (cert.NewSelfSignCA) found no key, generated one for 200 to 350 ms, then wrote the three CA files with os.Create by path: a symlink, hard link or directory planted in _ca meanwhile made it create or overwrite files outside the data directory, a window inside NewProxy that no check before the call can see.

traffic.Open now creates the CA itself (loadCA, same certificate template and file format as go-mitmproxy) under the verified _ca root, each file with O_CREATE|O_EXCL|O_NOFOLLOW at its final name (key 0600, certificates 0644), never overwriting an existing file and using an existing CA as it is. go-mitmproxy gets the loaded CA through Options.NewCaFunc and no longer receives CaRootPath, so it never opens _ca: not even its own fallback, which creates the CA by path again whenever its load finds no key.
2026-12-01 19:03:32 +01:00
..
hookvm fix(hookvm): charge a ReplaceAll result before building it 2026-11-24 23:21:32 +00:00
rewrite test(rewrite): cover exported API, NoteError, nil-header and status-parse edges 2026-11-21 17:08:23 -05:00
archive.go feat(traffic): archive v2 rewrite provenance and traffic list filter (P3.3b2b2) 2026-11-20 08:03:04 +01:00
archive_test.go feat(traffic): archive v2 rewrite provenance and traffic list filter (P3.3b2b2) 2026-11-20 08:03:04 +01:00
blob_perm_test.go security: follow-up hardening for the upload and capture fixes 2026-11-22 09:10:59 +01:00
blobrange_test.go fix(traffic): bound BlobRange without overflowing int64 2026-11-18 17:22:13 +01:00
ca.go security: generate the initial CA ourselves so go-mitmproxy never creates files 2026-12-01 19:03:32 +01:00
ca_lockdown_fd_test.go security: check the traffic dir, _ca and CA files before go-mitmproxy writes them 2026-12-01 18:25:03 +01:00
ca_perm_test.go security(agent): confine the file tools and close the executor review 2026-11-20 05:35:54 +01:00
ca_race_test.go test: calibrated race inside the first traffic.Open, and the LockDownKeyDir race matrix 2026-12-01 19:03:32 +01:00
ca_test.go security: generate the initial CA ourselves so go-mitmproxy never creates files 2026-12-01 19:03:32 +01:00
cakey_other.go security: generate the initial CA ourselves so go-mitmproxy never creates files 2026-12-01 19:03:32 +01:00
cakey_unix.go security: generate the initial CA ourselves so go-mitmproxy never creates files 2026-12-01 19:03:32 +01:00
encoding.go fix(traffic): anchor traffic_search port matching and ignore host case 2026-11-28 10:00:56 +01:00
encoding_test.go fix(traffic): check the response head before decoding in traffic_get 2026-11-29 16:32:52 -05:00
evidence.go feat(agent,traffic,server): add constant-gate detector, gate_constant intent guard, and sweep handoff 2026-11-28 03:03:19 +01:00
evidence_search_test.go Tie fact evidence to recorded activity and proxy captures 2026-11-21 09:50:45 +00:00
external.go chore(logs): keep the tags and read the slog level 2026-11-23 22:25:32 +01:00
external_test.go fix(traffic): reject CR/LF in ingested methods and headers 2026-11-18 22:41:42 +01:00
fts_queue.go synthetic main: +#543 2026-11-26 23:24:31 +01:00
fts_queue_test.go synthetic main: +#543 2026-11-26 23:24:31 +01:00
har.go fix(traffic): HAR 1.2 compliance, round-trip IDs, aligned caps, params/cookies, userinfo redaction 2026-11-20 14:33:57 +01:00
har_test.go fix(traffic): HAR 1.2 compliance, round-trip IDs, aligned caps, params/cookies, userinfo redaction 2026-11-20 14:33:57 +01:00
host_ts_index_test.go synthetic main: +#540 2026-11-26 23:24:33 +01:00
meta_test.go fix(traffic): return id and ts from /api/traffic/exchange (#647) 2026-11-28 19:24:53 +01:00
pace.go fix(traffic): never send a plain-HTTP request on another host's connection 2026-11-30 23:54:03 +01:00
pace_test.go feat(traffic): pace Bash requests at the capture proxy 2026-11-15 00:57:13 +01:00
passthrough_test.go Expire a MITM passthrough mark after one minute. 2026-11-17 13:04:37 -05:00
proxy_test.go fix(traffic): 流量录制代理默认只监听 127.0.0.1,避免默认开放代理暴露 (#129) (#130) 2026-09-16 09:36:32 +08:00
raw_tcp.go chore(logs): keep the tags and read the slog level 2026-11-23 22:25:32 +01:00
raw_udp.go feat(traffic): record SOCKS5 UDP datagrams in SQLite raw_udp_datagrams with blob refs 2026-11-20 23:13:10 +01:00
reclaim_test.go synthetic main: +#543 2026-11-26 23:24:31 +01:00
replay.go feat(traffic): per-replay rewrite-rule toggle and RewriteStats API (P3.3b2b1) 2026-11-20 05:25:35 +01:00
replay_rewrite_adversarial_test.go test(traffic): adversarial coverage for the replay rewrite toggle 2026-11-20 05:48:34 +01:00
replay_rewrite_test.go feat(traffic): per-replay rewrite-rule toggle and RewriteStats API (P3.3b2b1) 2026-11-20 05:25:35 +01:00
replay_test.go Treat an expired passthrough mark as intercepted again, and say what the window costs. 2026-11-17 15:58:24 -05:00
rewrite_flow.go chore(logs): keep the tags and read the slog level 2026-11-23 22:25:32 +01:00
rewrite_flow_test.go chore: migrate log.Printf to slog in traffic/, egress/, enrich/ and evidence/ 2026-11-22 18:27:47 -05:00
rewrite_hooks.go feat(traffic): integrate opt-in Go tampering hooks after rewrite rules with exchange_rewrites trace 2026-11-21 00:48:27 +01:00
rewrite_hooks_test.go feat(traffic): integrate opt-in Go tampering hooks after rewrite rules with exchange_rewrites trace 2026-11-21 00:48:27 +01:00
separate_client_test.go fix(traffic): never send a plain-HTTP request on another host's connection 2026-11-30 23:54:03 +01:00
socks5.go synthetic main: +#575 2026-11-26 23:24:38 +01:00
socks5_auth_test.go synthetic main: +#575 2026-11-26 23:24:38 +01:00
socks5_test.go fix(traffic): atomic temp+rename raw TCP blob spill and document SOCKS5 proxy caveats 2026-11-20 22:44:20 +01:00
socks5_udp.go chore(logs): keep the tags and read the slog level 2026-11-23 22:25:32 +01:00
socks5_udp_test.go test: stabilize the UDP control-close test and the sealed hook test 2026-11-21 01:00:52 +01:00
stream.go Merge branch 'main' into chore/slog-migration-v2 2026-11-23 22:58:53 +01:00
stream_direction_test.go fix(web): reset stream filters and exclude warning rows from counts 2026-11-23 10:26:56 +09:00
stream_test.go fix(traffic): bound stream message pages, spill before the transaction, seconds timestamps 2026-11-16 08:21:38 +01:00
traffic.go security: generate the initial CA ourselves so go-mitmproxy never creates files 2026-12-01 19:03:32 +01:00
traffic_store_test.go fix(traffic): anchor traffic_search port matching and ignore host case 2026-11-28 10:00:56 +01:00
traffic_test.go fix(traffic): anchor traffic_search port matching and ignore host case 2026-11-28 10:00:56 +01:00
transparent.go chore(logs): keep the tags and read the slog level 2026-11-23 22:25:32 +01:00
transparent_linux.go feat(traffic): add opt-in Linux IPv4 transparent TCP listener (SO_ORIGINAL_DST) 2026-11-20 22:52:50 +01:00
transparent_linux_test.go test(traffic): add transparent TCP unit, policy, store, and Linux iptables REDIRECT tests 2026-11-20 22:52:51 +01:00
transparent_other.go feat(traffic): add opt-in Linux IPv4 transparent TCP listener (SO_ORIGINAL_DST) 2026-11-20 22:52:50 +01:00
transparent_test.go test(traffic): add transparent TCP unit, policy, store, and Linux iptables REDIRECT tests 2026-11-20 22:52:51 +01:00
upgrade_test.go Translate all Chinese text to English 2026-10-08 23:14:34 +02:00