MTProxy for Telegram on Rust + Tokio
This report summarizes scanner evidence for telemt/telemt, a Rust project with 5,772 GitHub stars. SynthScan examined 261,833 lines of code across 860 source files, recording 207 pattern matches distributed across 9 syntactic categories. The legacy adjusted pattern signal is 1.6 (Low pattern signal); it is not an authorship estimate.
Use the findings to ask whether maintainers can explain intent, verify dependencies, simplify unnecessary scaffolding, and focus review effort. Risk Payload v1 adds ownership, supply-chain, over-engineering, and review-effort vectors when available. These are prompts for human verification, not probabilities, security findings, or measured maintenance costs.
Use each vector to guide manual verification of the underlying findings.
Payload schema: 1.0.0 · Engine: 2.0.0 · Scoring: heuristic-density-v1 · Scan date: 2026-10-31.
Can maintainers explain intent, assumptions, and trade-offs? 108 finding(s).
Are imports declared and package/API names verified? 9 finding(s).
Are wrappers, guards, and repeated structures necessary? 94 finding(s).
Which changes need focused human review? 207 finding(s).
This chart tracks the legacy adjusted pattern score across scan runs. Changes can reflect source changes, scan coverage, or detector/scoring versions; they do not measure AI adoption or prove that a team refactored code. Compare runs only when their scoring versions are compatible. The dashed line tracks the raw pattern-hit count.
Groups findings by configured severity weight. Severity is not a confidence estimate, security rating, or proof that a package is missing. Verify imports against the project's manifests and inspect each finding in its local design context.
This horizontal bar chart shows where configured pattern scores accumulate across directories. Treat the bars as locations to inspect, not as evidence of authorship or code quality. Use the file-level findings to decide whether a directory needs a focused ownership, dependency, complexity, or review check.
The scanner identified 207 distinct pattern matches across 9 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a detector match to inspect in context. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the configured finding weight (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — legacy comment-context matches receive a ×1.5 score weight. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier under the legacy scoring model.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM⚡ | tools/telemt_api.py | 177 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tools/telemt_api.py | 179 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tools/telemt_api.py | 189 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tools/telemt_api.py | 191 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tools/telemt_api.py | 201 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tools/telemt_api.py | 203 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tools/telemt_api.py | 284 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tools/telemt_api.py | 286 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tools/telemt_api.py | 296 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tools/telemt_api.py | 298 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tools/telemt_api.py | 429 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tools/telemt_api.py | 431 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM⚡ | tools/telemt_api.py | 439 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM⚡ | tools/telemt_api.py | 441 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tools/telemt_api.py | 23 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tools/telemt_api.py | 25 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tools/telemt_api.py | 42 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tools/telemt_api.py | 44 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tools/telemt_api.py | 57 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tools/telemt_api.py | 59 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tools/telemt_api.py | 87 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | tools/telemt_api.py | 89 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | tools/telemt_api.py | 217 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | tools/telemt_api.py | 219 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | tools/telemt_api.py | 245 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | tools/telemt_api.py | 247 | # ------------------------------------------------------------------ | COMMENT |
| MEDIUM | tools/telemt_api.py | 456 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | tools/telemt_api.py | 458 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | .github/workflows/release.yml | 63 | # ========================== | COMMENT |
| MEDIUM | .github/workflows/release.yml | 65 | # ========================== | COMMENT |
| MEDIUM | .github/workflows/release.yml | 174 | # ========================== | COMMENT |
| MEDIUM | .github/workflows/release.yml | 176 | # ========================== | COMMENT |
| MEDIUM | .github/workflows/release.yml | 310 | # ========================== | COMMENT |
| MEDIUM | .github/workflows/release.yml | 312 | # ========================== | COMMENT |
| MEDIUM | .github/workflows/release.yml | 343 | # ========================== | COMMENT |
| MEDIUM | .github/workflows/release.yml | 345 | # ========================== | COMMENT |
| MEDIUM | src/proxy/relay.rs | 290 | // ── Combine split halves into bidirectional streams ────────────── | COMMENT |
| MEDIUM | src/proxy/relay.rs | 308 | // ── Watchdog: activity timeout + periodic rate logging ────────── | COMMENT |
| MEDIUM | src/proxy/relay.rs | 328 | // ── Activity timeout ──────────────────────────────────── | COMMENT |
| MEDIUM | src/proxy/relay.rs | 342 | // ── Periodic rate logging ─────────────────────────────── | COMMENT |
| MEDIUM | src/proxy/relay.rs | 365 | // ── Run bidirectional copy + watchdog concurrently ─────────────── | COMMENT |
| MEDIUM | src/proxy/relay.rs | 401 | // ── Clean shutdown ────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/proxy/relay.rs | 407 | // ── Final logging ─────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/proxy/tests/adaptive_buffers_security_tests.rs | 13 | // ── Positive / Lifecycle ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/proxy/tests/adaptive_buffers_security_tests.rs | 55 | // ── Edge Cases ────────────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/proxy/tests/adaptive_buffers_security_tests.rs | 94 | // ── Stale Entry Handling ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/proxy/tests/adaptive_buffers_security_tests.rs | 139 | // ── Cardinality Attack / Unbounded Growth ─────────────────────────────── | COMMENT |
| MEDIUM | src/proxy/tests/adaptive_buffers_security_tests.rs | 188 | // ── Key Length Validation ──────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/proxy/tests/adaptive_buffers_security_tests.rs | 246 | // ── Concurrent Access Safety ──────────────────────────────────────────── | COMMENT |
| MEDIUM | src/proxy/tests/adaptive_buffers_security_tests.rs | 305 | // ── TOCTOU: Concurrent seed + record race ─────────────────────────────── | COMMENT |
| MEDIUM | src/proxy/tests/adaptive_buffers_security_tests.rs | 355 | // ── Fuzz: Random keys ────────────────────────────────────────────────── | COMMENT |
| MEDIUM | src/proxy/tests/adaptive_buffers_security_tests.rs | 428 | // ── me_flush_policy_for_tier ──────────────────────────────────────────── | COMMENT |
| MEDIUM | …proxy/tests/masking_lognormal_timing_security_tests.rs | 9 | // ── Positive: all samples within configured envelope ──────────────────── | COMMENT |
| MEDIUM | …proxy/tests/masking_lognormal_timing_security_tests.rs | 28 | // ── Statistical: median near geometric mean ───────────────────────────── | COMMENT |
| MEDIUM | …proxy/tests/masking_lognormal_timing_security_tests.rs | 53 | // ── Edge: degenerate floor == ceiling returns exactly that value ───────── | COMMENT |
| MEDIUM | …proxy/tests/masking_lognormal_timing_security_tests.rs | 67 | // ── Edge: floor > ceiling (misconfiguration) clamps safely ────────────── | COMMENT |
| MEDIUM | …proxy/tests/masking_lognormal_timing_security_tests.rs | 79 | // ── Edge: floor == 1, ceiling == 1 ────────────────────────────────────── | COMMENT |
| MEDIUM | …proxy/tests/masking_lognormal_timing_security_tests.rs | 88 | // ── Edge: floor == 1, ceiling very large ──────────────────────────────── | COMMENT |
| MEDIUM | …proxy/tests/masking_lognormal_timing_security_tests.rs | 107 | // ── Adversarial: extreme sigma (floor very close to ceiling) ──────────── | COMMENT |
| MEDIUM | …proxy/tests/masking_lognormal_timing_security_tests.rs | 126 | // ── Adversarial: u64::MAX ceiling does not overflow ────────────────────── | COMMENT |
| 27 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | config.toml | 1 | ### Telemt Based Config.toml | COMMENT |
| LOW | …tions/self-explanatory-code-commenting.instructions.md | 101 | COMMENT | |
| LOW | src/cli.rs | 1 | //! CLI commands: --init (fire-and-forget setup), daemon options, subcommands | COMMENT |
| LOW | src/crypto/aes.rs | 1 | //! AES encryption implementations | COMMENT |
| LOW | src/crypto/hash.rs | 1 | //! Cryptographic hash functions | COMMENT |
| LOW | src/tls_front/types.rs | 141 | #[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Default)] | COMMENT |
| LOW | src/tls_front/types.rs | 161 | Fallback, | COMMENT |
| LOW | src/proxy/relay.rs | 1 | //! Bidirectional Relay — poll-based, no head-of-line blocking | COMMENT |
| LOW | src/proxy/relay.rs | 21 | //! Old (select! + write_all — BLOCKING): | COMMENT |
| LOW | src/proxy/relay.rs | 41 | //! - No head-of-line blocking: slow client download doesn't block uploads | COMMENT |
| LOW | src/proxy/relay.rs | 101 | /// ## API compatibility | COMMENT |
| LOW | src/proxy/relay.rs | 361 | prev_s2c = s2c; | COMMENT |
| LOW | …y/tests/middle_relay_tiny_frame_debt_security_tests.rs | 101 | // Intermediate and secure transport debt behavior. | COMMENT |
| LOW | src/proxy/tests/direct_relay_security_tests.rs | 41 | COMMENT | |
| LOW | src/proxy/relay/io.rs | 21 | COMMENT | |
| LOW | src/proxy/relay/io/combined.rs | 1 | use std::io; | COMMENT |
| LOW | src/config/hot_reload.rs | 1 | //! Hot-reload: watches the config file via inotify (Linux) / FSEvents (macOS) | COMMENT |
| LOW | src/config/load.rs | 101 | /// Main runtime configuration loaded from TOML. | COMMENT |
| LOW | src/config/load.rs | 141 | #[serde(default)] | COMMENT |
| LOW | src/config/types/access.rs | 21 | /// Global per-user TCP connection limit applied when a user has no | COMMENT |
| LOW | src/config/types/access.rs | 41 | /// "unlimited" for that direction. Limits are amortized: a relay quantum | COMMENT |
| LOW | src/config/types/censorship.rs | 1 | use super::*; | COMMENT |
| LOW | src/config/types/censorship.rs | 161 | #[serde(default = "default_server_hello_delay_min_ms")] | COMMENT |
| LOW | src/config/types/censorship.rs | 181 | /// Applied only when `serverhello_compact` is enabled. | COMMENT |
| LOW | src/config/types/censorship.rs | 201 | /// When enabled, masking may shape some backend-silent timeout paths and | COMMENT |
| LOW | src/config/types/censorship.rs | 221 | pub mask_shape_above_cap_blur_max_bytes: usize, | COMMENT |
| LOW | src/config/types/logging.rs | 101 | #[serde(default)] | COMMENT |
| LOW | src/config/types/web.rs | 61 | /// Public-site fallback used for requests that are not authenticated WEB traffic. | COMMENT |
| LOW | src/config/types/web.rs | 81 | } | COMMENT |
| LOW | src/config/types/web.rs | 101 | pub profiles: Vec<WebProfileConfig>, | COMMENT |
| LOW | src/config/types/web.rs | 121 | pub carrier_batch_bytes: usize, | COMMENT |
| LOW | src/config/types/web.rs | 141 | #[serde(default = "default_web_pending_items_per_lane")] | COMMENT |
| LOW | src/config/types/web.rs | 161 | /// Process-wide concurrently collected request body ceiling. | COMMENT |
| LOW | src/config/types/web.rs | 181 | pub max_stream_handshakes: usize, | COMMENT |
| LOW | src/config/types/web.rs | 201 | #[serde(default = "default_web_control_bytes_global")] | COMMENT |
| LOW | src/config/types/web.rs | 221 | /// Maximum static snapshot bytes, charged once per source group. | COMMENT |
| LOW | src/config/types/web.rs | 321 | #[serde(default = "default_web_stream_first_byte_secs")] | COMMENT |
| LOW | src/config/types/web.rs | 341 | /// Post-commit observation interval required before learning succeeds. | COMMENT |
| LOW | src/config/types/web.rs | 361 | pub carrier_negotiation_deadlines_secs: [u64; 4], | COMMENT |
| LOW | src/config/types/web.rs | 421 | #[derive(Debug, Clone, Copy, Default, PartialEq, Eq, Serialize, Deserialize)] | COMMENT |
| LOW | src/config/types/web.rs | 441 | pub enabled: bool, | COMMENT |
| LOW | src/config/types/web.rs | 461 | #[serde(default)] | COMMENT |
| LOW | src/config/types/server.rs | 241 | /// Client-facing TCP MSS preset or custom value for all TCP listeners. | COMMENT |
| LOW | src/config/types/server.rs | 261 | pub proxy_protocol_header_timeout_ms: u64, | COMMENT |
| LOW | src/config/types/server.rs | 341 | /// Maximum idle wait in seconds for the first client byte before handshake parsing starts. | COMMENT |
| LOW | src/config/types/server.rs | 401 | #[derive(Debug, Clone, Serialize, Deserialize)] | COMMENT |
| LOW | src/config/types/server.rs | 421 | #[serde(default = "default_synlimit_hitcount")] | COMMENT |
| LOW | src/config/types/server.rs | 441 | /// IP address or hostname to announce in proxy links. | COMMENT |
| LOW | src/config/types/web_debug.rs | 21 | #[derive(Debug, Clone, PartialEq, Eq, Serialize, Deserialize)] | COMMENT |
| LOW | src/config/types/policies.rs | 101 | COMMENT | |
| LOW | src/config/types/general.rs | 1 | use super::*; | COMMENT |
| LOW | src/config/types/general.rs | 21 | /// Path to proxy-secret binary file (auto-downloaded if absent). | COMMENT |
| LOW | src/config/types/general.rs | 41 | #[serde(default)] | COMMENT |
| LOW | src/config/types/general.rs | 61 | /// Desired size of active Middle-Proxy writer pool. | COMMENT |
| LOW | src/config/types/general.rs | 81 | /// Keepalive interval in seconds. | COMMENT |
| LOW | src/config/types/general.rs | 101 | #[serde(default = "default_me_route_channel_capacity")] | COMMENT |
| LOW | src/config/types/general.rs | 121 | /// `0` disables timed coalescing. | COMMENT |
| LOW | src/config/types/general.rs | 141 | /// | COMMENT |
| LOW | src/config/types/general.rs | 161 | /// Enable per-IP forensic observation buckets for scanners and handshake failures. | COMMENT |
| LOW | src/config/types/general.rs | 181 | #[serde(default = "default_warmup_step_delay_ms")] | COMMENT |
| 39 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | src/config/load/decoy_dns/tests.rs | 197 | assert!(parsed.config.web.decoy_dns.origins.is_empty()); | CODE |
| CRITICAL | src/api/config_edit/decoy_dns_tests.rs | 75 | assert_eq!(prepared.desired_config.web.decoy_dns.origins.len(), 1); | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | src/synlimit_control/pf_runtime_tests.rs | 56 | #[ignore = "requires native FreeBSD PF and VNET test harness"] | COMMENT |
| MEDIUM | src/transport/socket/fragmented_send_wire_tests.rs | 212 | #[ignore = "requires privileged netns/veth packet-capture harness"] | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/dc.py | 3 | CODE | |
| LOW | tools/telemt_api.py | 13 | CODE | |
| LOW | tools/telemt_api.py | 17 | CODE | |
| LOW | tools/telemt_api.py | 18 | CODE | |
| LOW | tools/telemt_api.py | 18 | CODE | |
| LOW | tools/telemt_api.py | 18 | CODE | |
| LOW | tools/tlsearch.py | 12 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/telemt_api.py | 269 | def runtime_connections_summary(self) -> APIResponse: | CODE |
| LOW | tools/tlsearch.py | 125 | def decode_supported_versions(data: list[int]) -> str: | CODE |
| LOW | …tions/self-explanatory-code-commenting.instructions.md | 97 | function calculateCompoundInterest(principal, rate, time, compoundFrequency = 1) { | CODE |
| LOW | src/web/bridge/diagnostic.js | 31 | function documentUnloadedBeforeHello(){report('document_unloaded_before_hello')} | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/telemt_api.py | 135 | except Exception: | CODE |
| LOW | tools/aesdiag.py | 316 | except Exception as e: | CODE |
| LOW | tools/tlsearch.py | 387 | except Exception as e: # noqa: BLE001 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/aesdiag.py | 106 | CODE | |
| LOW | tools/tlsearch.py | 190 | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | tools/aesdiag.py | 222 | # Check if the extra bytes after hs_plain in decrypted are all zero (zero padding) | COMMENT |