Skip to content

[BUG] GitHub repo targets scan as blackbox — source-aware skills not preloaded #884

Description

@timhaines

Describe the bug

A repository target is cloned into /workspace/<subdir> and included in the list returned by collect_local_sources() (strix/interface/utils.py:1268), exactly like a local_code target. But the two whitebox checks test only type == "local_code", so scanning a GitHub repo — alone or alongside a domain — runs with is_whitebox=False:

  • strix/core/runner.py:211 (inlined) gates skills: neither coordination/source_aware_whitebox nor custom/source_aware_sast is preloaded (strix/agents/prompt.py:47-49). Although the agent can load custom/source_aware_sast on demand, coordination/* is in _INTERNAL_SKILL_CATEGORIES, so coordination/source_aware_whitebox is unavailable through load_skill.
  • strix/interface/utils.py:1247 (is_whitebox_scan) feeds telemetry: both posthog.py:70 and scarf.py:72 record the scan as blackbox.

Meanwhile the agent has full source in the workspace, diff-scoping already drives off that same local_sources list (main.py:996-1003), and report/state.py:489-493 reads cloned_repo_path to stamp commitSha/branch into SARIF. The rest of the codebase treats a cloned repo as source-in-hand.

Both docs/quickstart.mdx:63 and docs/usage/cli.mdx:105 document this invocation as "white-box testing".

Bisects to 1e641e5 (Apr 25), which replaced bool(args.local_sources) with a type == "local_code" check — that covers the first branch of collect_local_sources but not the repository / cloned_repo_path one. Working as expected before that (e78c931, Mar 31); broken on main since April 25.

To Reproduce

  1. strix -t https://github.com/org/repo -t https://your-app.com
  2. The repo is cloned into /workspace/repo and the agent can read it.
  3. The root agent's resolved skills contain neither custom/source_aware_sast nor coordination/source_aware_whitebox.
  4. Equivalently, this minimal reproduction demonstrates the underlying predicate mismatch without running a scan:
from strix.interface.utils import collect_local_sources, is_whitebox_scan

targets = [{"type": "repository", "details": {"cloned_repo_path": "/clone", "workspace_subdir": "repo"}}]
print(bool(collect_local_sources(targets)))  # True  — source is in the workspace
print(is_whitebox_scan(targets))             # False — but not treated as whitebox

Expected behavior

Any target that puts source in the workspace counts as a whitebox scan, so a repo (or repo + domain) target preloads the source-aware skills and reports as whitebox — matching the documented multi-target white-box examples. If excluding repository is deliberate, that's worth documenting, since the docs examples, diff-scoping, and SARIF provenance all currently assume otherwise.

Screenshots

N/A

System Information:

  • OS: macOS (Darwin 24.6.0)
  • Strix Version or Commit: 1.3.1 / 8157ccb
  • Python Version: 3.14.2 (repro is version-independent — pure dict inspection)
  • LLM Used: N/A — deterministic config-resolution bug, independent of provider

Additional context

Impact is partial rather than total: the white-box sections of system_prompt.jinja are unconditional, and scan_modes/*.md carry a "Whitebox (source available)" block that always loads — so the agent keeps some source-aware direction, just not the dedicated skills.

Opening a PR shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions