Benign ruby 49,534 installs Download

bitfab 0.61.0

“Client library for sending function execution spans to the Bitfab API. Provides automatic tracing with nested span support.”

Contains an unbounded block loopUses Base64 module
SHA-25646176eb97ca8182780edd01a99f315dec6d994d2dbd3c3c2f1f5d0206f696f71

Evidence

Source allocates a megabyte-sized buffer replay_memory.rb · lines 3–15
3:7e "open3"
4
5module Bitfab
6 class ReplayMemoryThrottle
7 MIB = 1024 * 1024
8 MAX_SWAP_USED_RATIO = 0.85
9 CRITICAL_PRESSURE_LEVEL = 4
10 CRITICAL_STALL_PERCENT = 10.0
11 STALL_FILES = ["/sys/fs/cgroup/memory.pressure", "/proc/pressure/memory"].freeze
12 attr_reader :condition
13
14 def self.pressure_critical_from_level(raw)
15 level = Integer(raw.to_s.strip, ex
Source changes DNS label casing replay_memory.rb · lines 26–28
26:47].include?(ENV.fetch("BITFAB_REPLAY_MEMORY_THROTTLE", "").strip.downcase)
27 @initial_budget = env_bytes("BITFAB_REPLAY_CHILD_MEMORY_MB", 2048 * MIB)
28 @floor = env_bytes("BITFAB_REPLAY_MEMORY_
Get memory info from /proc/meminfo replay_memory.rb · lines 72–78
72:50>= @floor
73 end
74
75 def memory_snapshot
76 if File.file?("/proc/meminfo")
77 fields = File.read("/proc/meminfo").scan(/^(\w+):\s+(\d+)/).to_h.transform_values { |value| value.to_i * 1024 }
78 total = fields["SwapTotal"
HTTP status, check-in, or heartbeat route replay_memory.rb · lines 95–99
95:6ef resident_bytes(pid)
96 value = if File.file?("/proc/#{pid}/status")
97 File.read("/proc/#{pid}/status")[/^VmRSS:\s+(\d+)/, 1]
98 else
99 read_command("ps", "-o", "rss=", "-p", pid.
LLM output-token count field baml.rb · lines 3–14
3:7e "json"
4
5module Bitfab
6 module BAML
7 ALLOWED_ENV_KEYS = %w[OPENAI_API_KEY].freeze
8 COLLECTOR_FIELDS = %i[logs last usage function_name log_type timing calls selected_call tags
9 selected http_request http_response provider client_name input_tokens output_tokens
10 cached_input_tokens start_time_utc_ms duration_ms url method headers body status].freeze
11
12 module_function
13
14 def lo

Showing the top 5 files — 5 more files (58 regions) not shown.

No evidence locations were recorded for this file. Raw result

Keyboard shortcuts on this page: j for the next sample, k for the previous one, x to go back to the feed, d to download the original bytes, r to re-queue the sample for analysis.