Skip to content

Commit 56ad7cf

Browse files
committed
refining
1 parent b4b3921 commit 56ad7cf

2 files changed

Lines changed: 21 additions & 1 deletion

File tree

lib/asrfacet_rb/output/base_formatter.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,8 @@ def recommendations_for(payload)
153153
recommendations << "Review the fault-isolation notes before trusting the run as complete, because one or more engines degraded or were skipped."
154154
end
155155

156-
if integrity_report(payload)[:status].to_s != "ok"
156+
integrity_status = integrity_report(payload)[:status].to_s
157+
if %w[warning critical].include?(integrity_status)
157158
recommendations << "Resolve the framework integrity findings before the next run so missing files or write-path issues do not distort results."
158159
end
159160

spec/output/cli_formatter_spec.rb

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,23 @@
4444
expect(output).to include("Scan Overview", "Subdomains", "HTTP Exposure")
4545
end.not_to output(/currently set width|vertical orientation/i).to_stderr
4646
end
47+
48+
it "does not recommend integrity remediation when no integrity status is present" do
49+
formatter = described_class.new
50+
store = ASRFacet::ResultStore.new
51+
store.add(:subdomains, "scanme.nmap.org")
52+
53+
payload = {
54+
store: store,
55+
top_assets: [],
56+
summary: store.summary,
57+
meta: {
58+
generated_at: Time.now.utc.iso8601,
59+
output_directory: "C:/tmp/asrfacet"
60+
}
61+
}
62+
63+
output = formatter.format(payload)
64+
expect(output).not_to include("Resolve the framework integrity findings before the next run")
65+
end
4766
end

0 commit comments

Comments
 (0)