Skip to content

Commit 316b2c5

Browse files
committed
IM TIRED
1 parent 9dacd88 commit 316b2c5

13 files changed

Lines changed: 717 additions & 16 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Execution ownership stays intentionally strict: the scheduler owns orchestration
3333
execution helpers run work, and engines do not create their own competing
3434
control loops.
3535

36-
The current README reflects the latest verified release-style test run on April 7, 2026: `bundle exec rake` completed successfully, including `43 examples, 0 failures`, CLI smoke checks, web-session smoke checks, local lab smoke checks, installer smoke checks, and a clean gem build.
36+
The current README reflects the latest verified release-style test run on April 7, 2026: `bundle exec rake` completed successfully, including `49 examples, 0 failures`, CLI smoke checks, web-session smoke checks, local lab smoke checks, installer smoke checks, and a clean gem build.
3737

3838
## Authorized Use
3939

docs/publishing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ Verified in the repository before README refresh:
2424
Latest verified suite result:
2525

2626
- `bundle exec rake` completed successfully
27-
- `43 examples, 0 failures`
27+
- `49 examples, 0 failures`
2828

2929
## Release Checklist
3030

lib/asrfacet_rb.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@
1717
require_relative "asrfacet_rb/config"
1818
require_relative "asrfacet_rb/logger"
1919
require_relative "asrfacet_rb/core/thread_safe"
20+
require_relative "asrfacet_rb/core/warning_filter"
21+
ASRFacet::Core::WarningFilter.install!
2022
require_relative "asrfacet_rb/core/error_reporter"
2123
require_relative "asrfacet_rb/core/integrity_checker"
2224
require_relative "asrfacet_rb/core/deduplicator"

lib/asrfacet_rb/busters/base_buster.rb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,17 @@ def self.plugin_type
2626
def run
2727
raise NotImplementedError, "Subclasses must implement #run"
2828
end
29+
30+
protected
31+
32+
def bounded_queue_size(workers, multiplier: 4, minimum: 16)
33+
count = workers.to_i
34+
count = 1 unless count.positive?
35+
size = count * multiplier.to_i
36+
size = minimum.to_i if size < minimum.to_i
37+
size
38+
rescue StandardError
39+
minimum.to_i.positive? ? minimum.to_i : 16
40+
end
2941
end
3042
end

lib/asrfacet_rb/busters/dir_buster.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def initialize(base_url, wordlist, extensions: [], filter_codes: [404], workers:
2929
def run
3030
results = []
3131
seen = Set.new
32-
pool = ASRFacet::ThreadPool.new(@workers)
32+
pool = ASRFacet::ThreadPool.new(@workers, queue_size: bounded_queue_size(@workers))
3333

3434
File.foreach(@wordlist).lazy.each do |line|
3535
word = line.to_s.strip

lib/asrfacet_rb/busters/dns_buster.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def initialize(domain, wordlist, workers: 100)
2727

2828
def run
2929
results = []
30-
pool = ASRFacet::ThreadPool.new(@workers)
30+
pool = ASRFacet::ThreadPool.new(@workers, queue_size: bounded_queue_size(@workers))
3131

3232
File.foreach(@wordlist).lazy.each do |line|
3333
word = line.to_s.strip.downcase

lib/asrfacet_rb/busters/vhost_buster.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ def initialize(domain, base_url: nil, wordlist:, workers: 40)
2828
def run
2929
baseline = probe_baseline
3030
results = []
31-
pool = ASRFacet::ThreadPool.new(@workers)
31+
pool = ASRFacet::ThreadPool.new(@workers, queue_size: bounded_queue_size(@workers))
3232

3333
File.foreach(@wordlist).lazy.each do |line|
3434
word = line.to_s.strip.downcase
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# SPDX-License-Identifier: Proprietary
2+
#
3+
# ASRFacet-Rb: Attack Surface Reconnaissance Framework
4+
# Copyright (c) 2026 voltsparx
5+
#
6+
# Author: voltsparx
7+
# Repository: https://github.com/voltsparx/ASRFacet-Rb
8+
# Contact: voltsparx@gmail.com
9+
# License: See LICENSE file in the project root
10+
#
11+
# This file is part of ASRFacet-Rb and is subject to the terms
12+
# and conditions defined in the LICENSE file.
13+
14+
module ASRFacet
15+
module Core
16+
module WarningFilter
17+
IGNORED_PATTERNS = [
18+
/fiddle used to be loaded from the standard library/i
19+
].freeze
20+
21+
module WarningShim
22+
def warn(message, category: nil, **kwargs)
23+
text = message.to_s
24+
return if ASRFacet::Core::WarningFilter.ignore?(text)
25+
26+
super
27+
rescue StandardError
28+
nil
29+
end
30+
end
31+
32+
module_function
33+
34+
def install!
35+
return if @installed
36+
37+
Warning.singleton_class.prepend(WarningShim)
38+
@installed = true
39+
rescue StandardError
40+
nil
41+
end
42+
43+
def ignore?(message)
44+
text = message.to_s
45+
IGNORED_PATTERNS.any? { |pattern| pattern.match?(text) }
46+
rescue StandardError
47+
false
48+
end
49+
end
50+
end
51+
end

lib/asrfacet_rb/output/cli_formatter.rb

Lines changed: 30 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def overview_section(payload)
5454
["Output Root", payload.dig(:meta, :output_directory).to_s]
5555
]
5656
narrative = summary_narrative(payload).map { |line| " - #{line}" }.join("\n")
57-
"#{heading('Scan Overview', :primary)}\n#{TTY::Table.new(rows: summary_rows).render(:unicode)}\n\nWhat It Means:\n#{narrative}"
57+
"#{heading('Scan Overview', :primary)}\n#{render_table(rows: summary_rows)}\n\nWhat It Means:\n#{narrative}"
5858
rescue StandardError
5959
""
6060
end
@@ -77,7 +77,7 @@ def findings_section(store)
7777
]
7878
end
7979

80-
"#{heading('Findings', :danger)}\n#{meaning_for('findings')}\n#{TTY::Table.new(header: ['Title', 'Severity', 'Host', 'Description', 'Recommendation'], rows: rows).render(:unicode)}"
80+
"#{heading('Findings', :danger)}\n#{meaning_for('findings')}\n#{render_table(headers: ['Title', 'Severity', 'Host', 'Description', 'Recommendation'], rows: rows)}"
8181
rescue StandardError
8282
""
8383
end
@@ -88,7 +88,7 @@ def top_assets_section(top_assets)
8888
end
8989
return "" if rows.empty?
9090

91-
"#{heading('Top Targets', :success)}\nThese assets scored highly because they expose multiple signals worth deeper manual review.\n#{TTY::Table.new(header: ['Host', 'Score', 'Matched Rules'], rows: rows).render(:unicode)}"
91+
"#{heading('Top Targets', :success)}\nThese assets scored highly because they expose multiple signals worth deeper manual review.\n#{render_table(headers: ['Host', 'Score', 'Matched Rules'], rows: rows)}"
9292
rescue StandardError
9393
""
9494
end
@@ -106,15 +106,15 @@ def artifact_section(payload)
106106
rows = artifact_rows(payload)
107107
return "" if rows.empty?
108108

109-
"#{heading('Stored Artifacts', :info)}\nThese files are kept on disk so the run can be reviewed later without rerunning the scan.\n#{TTY::Table.new(header: ['Artifact', 'Path'], rows: rows).render(:unicode)}"
109+
"#{heading('Stored Artifacts', :info)}\nThese files are kept on disk so the run can be reviewed later without rerunning the scan.\n#{render_table(headers: ['Artifact', 'Path'], rows: rows)}"
110110
rescue StandardError
111111
""
112112
end
113113

114114
def table_section(title, headers, rows, color_name, meaning)
115115
return "" if rows.empty?
116116

117-
"#{heading(title, color_name)}\n#{meaning}\n#{TTY::Table.new(header: headers, rows: rows).render(:unicode)}"
117+
"#{heading(title, color_name)}\n#{meaning}\n#{render_table(headers: headers, rows: rows)}"
118118
rescue StandardError
119119
""
120120
end
@@ -163,6 +163,31 @@ def heading(text, color_name)
163163
rescue StandardError
164164
text.to_s
165165
end
166+
167+
def render_table(headers: nil, rows:)
168+
options = {
169+
rows: rows,
170+
multiline: true,
171+
resize: true,
172+
width: preferred_table_width
173+
}
174+
options[:header] = headers if headers
175+
TTY::Table.new(**options).render(:unicode, multiline: true, resize: true, width: preferred_table_width)
176+
rescue StandardError
177+
Array(rows).map { |row| Array(row).join(" | ") }.join("\n")
178+
end
179+
180+
def preferred_table_width
181+
width = if $stdout.respond_to?(:tty?) && $stdout.tty?
182+
TTY::Screen.width
183+
else
184+
160
185+
end
186+
width = width.to_i
187+
width > 40 ? width : 160
188+
rescue StandardError
189+
160
190+
end
166191
end
167192
end
168193
end

spec/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,4 +28,4 @@ so release confidence stays high.
2828
The current repository verification flow runs through `bundle exec rake`.
2929
The latest verified RSpec result reflected in the repository is:
3030

31-
- `43 examples, 0 failures`
31+
- `49 examples, 0 failures`

0 commit comments

Comments
 (0)