Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion strix/core/inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ def build_root_task(scan_config: dict[str, Any]) -> str:
if deleted:
parts.append(f"- {label}: {deleted} deleted file(s) are context-only")

task = " ".join(parts)
task = "\n".join(parts)
if user_instructions:
task = f"{task}\n\nSpecial instructions: {user_instructions}"
return task
Expand Down
14 changes: 14 additions & 0 deletions tests/test_inputs.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,20 @@ def test_build_root_task_web_application_with_instructions() -> None:
assert "Special instructions: Focus on auth." in task


def test_build_root_task_multiple_targets_are_newline_separated() -> None:
config = {
"targets": [
{"type": "web_application", "details": {"target_url": "https://a.example.com"}},
{"type": "web_application", "details": {"target_url": "https://b.example.com"}},
],
}
task = build_root_task(config)

assert "\n- https://a.example.com" in task
assert "\n- https://b.example.com" in task
assert "https://a.example.com - https://b.example.com" not in task


def test_build_root_task_diff_scope() -> None:
config = {
"targets": [],
Expand Down