Skip to content

feat(review): add a security-focused review profile #2566

Description

@JSONbored

Parent: #1936

Problem

review.profile supports exactly three values — chill/balanced/assertive — all of which only tune HOW MANY findings surface (nit suppression/expansion), never WHAT KIND of finding the reviewer prioritizes. There is no security-flavored profile that would instruct the model to specifically hunt for injection, auth/authz bypass, secret handling, unsafe deserialization, SSRF, or path traversal in the diff with elevated scrutiny — as distinct from REES's deterministic supply-chain/secret-pattern analyzers, which are self-host-only, require an external REES service, and don't reason about the PR's own new business logic (e.g. a missing authorization check). A repo that wants "be extra careful about security-sensitive changes" today only has review.path_instructions (free-text glob-scoped guidance) as a workaround — functional but ad hoc per-repo prose rather than a first-class, testable review mode.

Requirements

  • Add a security-flavored value to review.profile (or a separate review.securityFocus: boolean toggle, whichever fits the existing profile-suffix architecture better) that adds explicit instruction to REVIEW_SYSTEM_PROMPT/REVIEW_PROFILE_SUFFIX directing the model to prioritize injection, authz/authn bypass, secret handling, unsafe deserialization, SSRF, and path-traversal patterns.
  • Should compose with (not replace) the existing chill/balanced/assertive volume tuning — this is an orthogonal "what to prioritize" axis, not a fourth mutually-exclusive volume level.
  • Config-driven per repo, matching the existing review.profile config-as-code pattern exactly.

Deliverables

  • The new profile value/toggle wired through src/signals/focus-manifest.ts and src/services/ai-review.ts's REVIEW_PROFILE_SUFFIX.
  • Tests confirming the security-focused instruction appears in the built prompt when enabled and is absent otherwise.

Acceptance criteria

  • A repo with the security-focused profile/toggle enabled gets an AI review prompt with explicit security-category prioritization instructions.
  • Composes correctly with existing chill/balanced/assertive volume settings.
  • Off/unset by default — no change to existing repos.

Expected outcome

A repo handling security-sensitive changes gets a first-class, testable "look harder for security issues" mode instead of relying on ad hoc path_instructions prose.

Metadata

Metadata

Assignees

Labels

maintainer-onlyOwner-only work — yields no Gittensor points.roadmapOn the Wave-2 agent-layer roadmap board (project 9)

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions