Skip to content

Conversation

@LuD1161
Copy link
Contributor

@LuD1161 LuD1161 commented Jan 29, 2026

Summary

  • Migrate amass and subfinder components to Dynamic Args Pattern
  • Add performance optimizations to amass component to prevent system overload

Changes

Dynamic Args Pattern Migration

  • Refactored amass and subfinder to use TypeScript-based argument building
  • Follows the pattern documented in component-development.md

Amass Performance Optimizations

  • Default timeout: 15 minutes (prevents runaway scans)
  • DNS Resolvers: Configurable, defaults to fast public resolvers (Cloudflare, Google, Quad9)
  • Data Sources: Configurable, defaults to lightweight sources only (crtsh, hackertarget)
    • Excluded wayback/commoncrawl by default (can download 1GB+ per domain)
  • Recursive brute force: Disabled by default for faster scans
  • Flag fix: Changed -src to -include (correct amass v5 syntax)

Why These Changes

During testing, amass was downloading 1.36GB+ in 3 minutes even with "limited" sources, choking the system. The heavy data sources (wayback, commoncrawl) were the culprits.

Test plan

  • bun install - dependencies installed
  • bun run lint - passes (after auto-fix)
  • bun run typecheck - passes
  • bun run test - some pre-existing failures unrelated to these changes (CI passes on main)

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e6bdcd464b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@LuD1161 LuD1161 force-pushed the refactor/component-dynamic-args-pattern branch from e6bdcd4 to 31f6df4 Compare January 29, 2026 14:26
- Replace embedded shell scripts with clean shell wrapper pattern
- Add buildAmassArgs() and buildSubfinderArgs() TypeScript functions
- Use IsolatedContainerVolume for secure file I/O in both components
- Add -silent flag to amass to prevent progress bar spam
- Add passive mode parameter to amass (default: true for quick scans)
- Add new parameters to subfinder: threads, timeout, rateLimit, etc.
- Mount provider config as file instead of base64 env var in subfinder
- Move output parsing from shell to TypeScript for both components
- Update subfinder image to v2.12.0

Signed-off-by: Aseem Shrey <LuD1161@users.noreply.github.com>
- Add default 15-minute timeout to prevent runaway scans
- Add configurable DNS resolvers (Cloudflare, Google, Quad9 defaults)
- Add configurable data sources, default to lightweight sources only
- Exclude wayback/commoncrawl by default (can download 1GB+ per domain)
- Disable recursive brute force by default for faster scans
- Fix -src flag to -include (correct amass v5 syntax)

These optimizations prevent system overload from excessive network I/O
while maintaining useful subdomain enumeration capabilities.

Signed-off-by: Aseem Shrey <LuD1161@users.noreply.github.com>
Security tools like amass and subfinder can exit non-zero when some
data sources fail or rate-limit, but still produce valid partial
results. Previously, this would throw ContainerError and lose all
output.

Changes:
- Include stdout in ContainerError details (runner.ts)
- Catch ContainerError in amass/subfinder and extract partial output
- Log warning when preserving partial results

This restores the prior behavior where partial results were returned
instead of failing the entire workflow.

Signed-off-by: Aseem Shrey <LuD1161@users.noreply.github.com>
@LuD1161 LuD1161 force-pushed the refactor/component-dynamic-args-pattern branch from ffae783 to 4c0b3a5 Compare January 29, 2026 15:08
@LuD1161 LuD1161 merged commit 38492dc into main Jan 29, 2026
3 checks passed
@LuD1161 LuD1161 deleted the refactor/component-dynamic-args-pattern branch January 29, 2026 15:10
LuD1161 added a commit that referenced this pull request Jan 29, 2026
…s-pattern

refactor(worker): migrate amass/subfinder to Dynamic Args Pattern with perf optimizations
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