Status: Draft Target Version: 5.0 Objective: Transform Ultimate Bug Scanner (UBS) from a "powerful but noisy" tool into a "high-precision, agent-native" quality assurance partner.
Based on detailed feedback from 6 distinct AI agents across various tech stacks (iOS, Python, Mixed, Rust), this plan outlines the roadmap to address common pain points: Noise, False Positives, Integration Friction, and Configuration Overhead.
The #1 complaint was excessive noise from dependencies, build artifacts, and non-source files.
Problem: Agents reported scans taking 20+ minutes and generating 1000+ warnings by scanning venv, node_modules, vendor, and build dirs.
Solution:
- Centralized Ignore Logic: Move exclusion logic from individual language modules to the core
ubsrunner. - Hardened Defaults: Enforce strict default ignores for:
- Deps:
node_modules,venv,.venv,env,site-packages,vendor,bundle,.gem,target(Rust),go/pkg. - Builds:
dist,build,out,DerivedData,.gradle,.pytest_cache,__pycache__. - Docs/Config:
*.plist(prevents DTD noise),*.lock,*.json(prevent regex false matches on data).
- Deps:
- Mechanism: Ensure these are passed to
rg(glob ignores) andfind(prune) consistently across ALL modules.
Problem: Security rules (e.g., assert usage, hardcoded values) flag valid patterns in test files, creating noise.
Solution:
- Test Detection: Identify test files (
*_test.go,test_*.py,*.spec.ts,tests/). - Rule Scoping: Modify language modules to automatically suppress specific rules (like
B101/Asserts) when scanning identified test contexts.
Regex is fast but brittle. Agents complained about Swift ! negation being flagged as force-unwraps and Python variables looking like secrets.
Problem: Regex cannot distinguish between if !isValid (negation) and value! (unwrap), or config = "$VAR" (shell var) vs secrets.
Solution:
- Deprecate Regex for Ambiguous Syntax: Identify high-noise regex patterns and replace them with
ast-greprules. - Priorities:
- Swift: Migrate force-unwrap detection to AST to distinguish negation.
- Python: Migrate secret detection to AST to verify assignment context.
- Rust: Better distinction between safe
unwrap()(in tests/examples) and unsafe ones.
Problem: Agents cannot suppress a single false positive without configuring global excludes. Solution:
- Standardize Comments: Support inline ignores consistent with widely used linters.
- Format:
# ubs:ignore [rule-id]or// ubs:ignore.
- Format:
- Implementation: Update the unified runner to post-process findings and filter out lines containing these markers if the underlying tool doesn't support it.
Agents struggle to parse output when ASCII banners or logs mix with JSON.
Problem: "ASCII art banner breaks naive json.load". Agents need pure data streams. Solution:
- Stream Separation: When
--format=jsonis active:- STDOUT: MUST contain ONLY the valid JSON payload.
- STDERR: All banners, progress logs, debug info, and ASCII art go here.
- Structure: Ensure the root JSON object contains a
statusfield and asummaryobject for easier parsing.
Problem: "Too many issues to fix at once." Agents working on legacy code need to see only the problems they introduced. Solution:
- First-Class Baseline: Enhance
--comparisonto be more prominent.ubs --save-baseline .ubs-baseline.jsonubs --diff-only(automatically compares against saved baseline).
- Output: In Diff Mode, report ONLY new findings.
Problem: Full repo scans are too slow for "pre-commit" checks in large repos. Solution:
- Git Integration: Add a
--stagedor--changedflag.ubs --staged: Automatically runsgit diff --name-only --cachedand passes those files to scanners.- Optimization: Skip project-wide analysis steps (like unused code) when in this mode.
Agents requested "Library vs App" modes and easier config management.
Problem: Passing CLI flags (--exclude=...) every time is brittle for agents.
Solution:
- Config File: Support
.ubs.conf(YAML/TOML) orpyproject.tomlconfiguration.- Allow defining excludes, enabled languages, and rule overrides persistently.
Problem: "One size fits all" doesn't work for throwaway scripts vs. high-assurance libraries. Solution:
- Profiles:
--profile=strict(Library/Production): Fail on warnings, no TODOs allowed.--profile=loose(Prototype/Script): Ignore TODOs, allow some print statements, focus only on CRITICAL security/crash bugs.
To ensure these changes effectively address the feedback, we will add a Reflexive Test Suite:
- The "Venv" Test: Create a dummy
venvwith buggy code and ensure UBS ignores it by default. - The "JSON" Test: Run
ubs --format=json | jq .to verify zero stdout pollution. - The "Test-In-Test" Test: Place an assert in a
test_*.pyfile and ensure it does not trigger a warning.