Skip to content

[Security] A09: 보안 로깅 및 모니터링 구현 필요 #7

@serithemage

Description

@serithemage

OWASP 카테고리

  • A09:2025 - Security Logging & Alerting Failures

심각도

🟡 Medium

현황

에러 로깅 및 모니터링 없음

발견된 문제

1. 에러 로깅 없음

// backend/lambda/src/index.ts:128-138
} catch {
  return {
    statusCode: 500,
    body: JSON.stringify({ message: 'Internal server error' }),
  };  // 로깅 없음!
}

2. CloudWatch Alarms 없음

  • 이상 탐지 알림 미설정
  • 보안 이벤트 감지 불가

3. 요청 로깅 없음

  • API 호출 감사 추적 불가
  • 보안 사고 시 분석 어려움

4. API Gateway 액세스 로깅 미활성화

영향받는 파일

  • backend/lambda/src/index.ts
  • backend/lib/todo-app-stack.ts
  • terraform/main.tf

권장 조치

  1. Lambda에서 구조화된 로깅
    console.error(JSON.stringify({
      level: 'error',
      message: error.message,
      stack: error.stack,
      requestId: context.awsRequestId
    }));
  2. CloudWatch Alarms 설정
    • 5xx 에러율
    • Lambda 에러
    • 비정상 트래픽
  3. API Gateway 액세스 로깅 활성화
  4. CloudWatch Insights 쿼리 작성

참고

Metadata

Metadata

Assignees

No one assigned

    Labels

    mediumMedium prioritysecuritySecurity related issues

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions