Skip to content

Support files as targets/seeds/blacklist in presets#2996

Merged
liquidsec merged 4 commits into
3.0from
files-as-targets-presets
Apr 2, 2026
Merged

Support files as targets/seeds/blacklist in presets#2996
liquidsec merged 4 commits into
3.0from
files-as-targets-presets

Conversation

@liquidsec

@liquidsec liquidsec commented Mar 27, 2026

Copy link
Copy Markdown
Collaborator

Preset YAML files now support file paths in target, seeds, and blacklist fields — the same way the CLI does with -t targets.txt.

target:
  - targets.txt
  - extra.evilcorp.com
blacklist:
  - /home/user/blacklist.txt
  • File paths are resolved via the existing PresetPath mechanism, which already tracks the preset file's directory
  • Relative paths are found in the preset's directory (and subdirectories), then CWD
  • Absolute paths are checked directly
  • Literal targets and file paths can be mixed freely
  • Non-existent filenames are kept as literal targets

Closes #1559

@github-actions

github-actions Bot commented Mar 28, 2026

Copy link
Copy Markdown
Contributor

📊 Performance Benchmark Report

Comparing 3.0 (baseline) vs files-as-targets-presets (current)

📈 Detailed Results (All Benchmarks)

📋 Complete results for all benchmarks - includes both significant and insignificant changes

🧪 Test Name 📏 Base 📏 Current 📈 Change 🎯 Status
Bloom Filter Dns Mutation Tracking Performance 4.21ms 4.28ms +1.6%
Bloom Filter Large Scale Dns Brute Force 17.53ms 17.69ms +0.9%
Large Closest Match Lookup 342.41ms 336.53ms -1.7%
Realistic Closest Match Workload 178.75ms 179.33ms +0.3%
Event Memory Medium Scan 1776 B/event 1776 B/event +0.0%
Event Memory Large Scan 1760 B/event 1760 B/event +0.0%
Event Validation Full Scan Startup Small Batch 369.20ms 369.70ms +0.1%
Event Validation Full Scan Startup Large Batch 520.38ms 516.47ms -0.8%
Make Event Autodetection Small 24.95ms 24.80ms -0.6%
Make Event Autodetection Large 252.36ms 250.76ms -0.6%
Make Event Explicit Types 10.60ms 10.58ms -0.2%
Excavate Single Thread Small 3.437s 3.391s -1.4%
Excavate Single Thread Large 8.703s 8.668s -0.4%
Excavate Parallel Tasks Small 3.663s 3.609s -1.5%
Excavate Parallel Tasks Large 6.855s 6.764s -1.3%
Is Ip Performance 3.17ms 3.14ms -0.8%
Make Ip Type Performance 11.41ms 11.31ms -0.9%
Mixed Ip Operations 4.48ms 4.47ms -0.2%
Memory Use Web Crawl 259.3 MB 260.3 MB +0.4%
Memory Use Subdomain Enum 19.3 MB 19.3 MB +0.0%
Scan Throughput 100 7.924s 7.837s -1.1%
Scan Throughput 1000 38.627s 36.571s -5.3%
Typical Queue Shuffle 62.52µs 61.16µs -2.2%
Priority Queue Shuffle 689.63µs 702.79µs +1.9%

🎯 Performance Summary

No significant performance changes detected (all changes <10%)


🐍 Python Version 3.11.15

@codecov

codecov Bot commented Mar 28, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 98.80952% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91%. Comparing base (6b359ac) to head (ec7a50e).
⚠️ Report is 5 commits behind head on 3.0.

Files with missing lines Patch % Lines
bbot/scanner/preset/path.py 93% 1 Missing ⚠️
Additional details and impacted files
@@          Coverage Diff          @@
##             3.0   #2996   +/-   ##
=====================================
+ Coverage     91%     91%   +1%     
=====================================
  Files        440     440           
  Lines      37230   37313   +83     
=====================================
+ Hits       33711   33795   +84     
+ Misses      3519    3518    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TheTechromancer

Copy link
Copy Markdown
Contributor

We have a pre-existing mechanism for preset paths, PresetPath.

@liquidsec

Copy link
Copy Markdown
Collaborator Author

@TheTechromancer

Refactored to use PresetPath instead of custom resolution logic. Added a find_file() method because the existing find() is hardcoded for .yaml/.yml extensions and can't resolve target list files like targets.txt. It reuses the same search path infrastructure, just without the YAML-specific extension matching.

@liquidsec liquidsec merged commit 07ea250 into 3.0 Apr 2, 2026
18 checks passed
@liquidsec liquidsec mentioned this pull request Jun 9, 2026
@ausmaster ausmaster deleted the files-as-targets-presets branch June 11, 2026 01:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants