Class: Aidp::Watch::Reviewers::SecurityReviewer

Inherits:
BaseReviewer
  • Object
show all
Defined in:
lib/aidp/watch/reviewers/security_reviewer.rb

Overview

Security Reviewer - focuses on security vulnerabilities and risks

Constant Summary collapse

PERSONA_NAME =
"Security Specialist"
FOCUS_AREAS =
[
  "Injection vulnerabilities (SQL, command, XSS, etc.)",
  "Authentication and authorization flaws",
  "Sensitive data exposure",
  "Insecure deserialization",
  "Security misconfiguration",
  "Insufficient logging and monitoring",
  "Insecure dependencies",
  "Secrets and credentials in code",
  "Input validation and sanitization",
  "OWASP Top 10 vulnerabilities"
].freeze

Instance Attribute Summary

Attributes inherited from BaseReviewer

#focus_areas, #persona_name, #provider_name

Instance Method Summary collapse

Methods inherited from BaseReviewer

#initialize

Constructor Details

This class inherits a constructor from Aidp::Watch::Reviewers::BaseReviewer

Instance Method Details

#review(pr_data:, files:, diff:) ⇒ Object



24
25
26
27
28
29
30
31
32
# File 'lib/aidp/watch/reviewers/security_reviewer.rb', line 24

def review(pr_data:, files:, diff:)
  user_prompt = build_security_prompt(pr_data: pr_data, files: files, diff: diff)
  findings = analyze_with_provider(user_prompt)

  {
    persona: PERSONA_NAME,
    findings: findings
  }
end