Skip to content

Main - #14

Merged
kite-pp merged 4 commits into
developfrom
main
Jul 17, 2026
Merged

Main#14
kite-pp merged 4 commits into
developfrom
main

Conversation

@kite-pp

@kite-pp kite-pp commented Jul 17, 2026

Copy link
Copy Markdown
Collaborator

📝 개요

🔗 관련 이슈

🎯 주요 변경 사항

📸 사진

✅ PR 체크리스트

  • 관련 이슈를 연결했습니다.
  • 구현 범위와 변경 이유를 설명했습니다.
  • 로컬 테스트(uvicorn 구동 또는 테스트 코드)를 통과했습니다.
  • API 변경 사항이 있다면 Swagger / API 명세에 반영했습니다.
  • 민감 정보(API Key, 시크릿 키 등)가 코드·로그·테스트 데이터에 포함되지 않았습니다.
  • 프론트엔드 또는 메인 백엔드(Spring)에 영향을 주는 응답 스키마 또는 Enum 변경이 있다면 팀에 공유했습니다.
  • 병합(Merge) 전 작업 브랜치를 삭제하지 않았습니다.

Summary by CodeRabbit

  • New Features

    • Added SMS phishing analysis through the /analyze endpoint.
    • Analysis now returns risk grade, score, tone, evidence, and detection status.
    • Added Gemini-powered text analysis with safe, suspicious, dangerous, and unknown outcomes.
    • Added sandbox analysis with representative mock results and safe fallbacks.
  • Documentation

    • Updated local environment variable examples with Gemini API and model settings.
  • Tests

    • Added coverage for risk grading, mock analysis, and missing API key handling.

kite-pp and others added 4 commits July 17, 2026 15:43
문자 메시지의 어조와 근거를 분석해 위험도를 판정하는 Gemini 연동을 추가하고,
/analyze 엔드포인트가 이를 사용하도록 연결. API 실패 시 SAFE로 오탐되지 않도록
fail-closed(UNKNOWN 등급) 정책을 적용하고, 채점 재현성을 위해 temperature를 낮춤.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
문자 메시지의 어조와 근거를 분석해 위험도를 판정하는 Gemini 연동을 추가하고,
/analyze 엔드포인트가 이를 사용하도록 연결. API 실패 시 SAFE로 오탐되지 않도록
fail-closed(UNKNOWN 등급) 정책을 적용하고, 채점 재현성을 위해 temperature를 낮춤.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
feat: Gemini 기반 문자 어조/근거 분석 파이프라인 추가
@kite-pp
kite-pp merged commit e47013b into develop Jul 17, 2026
1 check was pending
@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 497d5dde-cf49-4bd9-abb7-3ba694891454

📥 Commits

Reviewing files that changed from the base of the PR and between 663a9d1 and 920aae7.

📒 Files selected for processing (7)
  • README.md
  • app/dto/request.py
  • app/router/analyze.py
  • app/service/security/gemini_text_analyzer.py
  • app/service/security/mock_provider.py
  • requirements.txt
  • tests/security/test_gemini_text_analyzer.py

📝 Walkthrough

Walkthrough

Adds Gemini-backed SMS text analysis with mock fixtures, risk grading, fail-closed error handling, a validated /analyze request model, endpoint integration, environment documentation, dependency support, and tests.

Changes

Gemini text analysis flow

Layer / File(s) Summary
Text analysis engine and sandbox behavior
app/service/security/gemini_text_analyzer.py, app/service/security/mock_provider.py, tests/security/test_gemini_text_analyzer.py, requirements.txt, README.md
Gemini configuration, structured analysis, risk grading, error handling, mock text results, dependency support, environment examples, and async tests are added.
Analyze request and endpoint integration
app/dto/request.py, app/router/analyze.py
The endpoint accepts AnalyzeRequest, analyzes its message with Gemini, derives smishing_detected from the grade, and returns text and placeholder URL analysis.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Client
  participant AnalyzeEndpoint
  participant GeminiAnalyzer
  participant MockProvider
  participant GeminiAPI
  Client->>AnalyzeEndpoint: POST /analyze with message
  AnalyzeEndpoint->>GeminiAnalyzer: analyze_text_with_gemini(message)
  alt Mock mode
    GeminiAnalyzer->>MockProvider: get_mock_text_analysis_data(message)
    MockProvider-->>GeminiAnalyzer: mocked analysis
  else Gemini mode
    GeminiAnalyzer->>GeminiAPI: generateContent request
    GeminiAPI-->>GeminiAnalyzer: structured analysis JSON
  end
  GeminiAnalyzer-->>AnalyzeEndpoint: normalized result
  AnalyzeEndpoint-->>Client: text_analysis and smishing_detected
Loading

Possibly related PRs

Suggested labels: feat

Suggested reviewers: pearseona

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch main

Comment @coderabbitai help to get the list of available commands.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant