Skip to content

feat(phase1): Runtime Defense Plane 이벤트 파이프라인 구현#1

Merged
ORI-MORI merged 2 commits intodevfrom
feature/phase1-event-pipeline
Apr 8, 2026
Merged

feat(phase1): Runtime Defense Plane 이벤트 파이프라인 구현#1
ORI-MORI merged 2 commits intodevfrom
feature/phase1-event-pipeline

Conversation

@ORI-MORI
Copy link
Copy Markdown
Collaborator

@ORI-MORI ORI-MORI commented Apr 8, 2026

Summary

Phase 1 (Runtime Defense Plane)의 핵심 컴포넌트를 구현합니다.

  • target-app: 의도적 취약점 3개(SQLi/XSS/Path Traversal)를 포함한 Flask 앱 제작
  • runtime-defense-controller: FastAPI 기반 이벤트 파이프라인 구현
    • ModSecurity / Falco 어댑터 (adapter pattern)
    • CWE 확정 매핑 (7개 공격 유형)
    • 소스코드 위치 매핑 (ConfigMap 기반)
    • 컨텍스트 패키지 생성 → Redis 이중 전달 (Pub/Sub + List 큐)
    • 능동 대응 3단계 (Rate Limit → IP 차단 → 엔드포인트 비활성화)
  • K8s 매니페스트: target-app Deployment/Service, ModSecurity Ingress, runtime-defense Deployment/Service, route-map ConfigMap
  • ModSecurity WAF: Ingress Controller ConfigMap에 OWASP CRS 차단 모드 활성화
  • Phase 2 연동 가이드: Redis 수신 방법, 컨텍스트 스키마, 코드 예시 문서화

변경 파일 목록

경로 설명
services/target-app/* 취약 Flask 앱 (신규)
services/runtime-defense/src/* 이벤트 파이프라인 전체 모듈 (신규)
services/runtime-defense/tests/* 테스트 7개 파일, 36 cases (신규)
kubernetes/environments/production/* deployment, ingress, runtime-defense, route-map (수정/신규)
kubernetes/service-mesh/ingress/configmap.yaml ModSecurity WAF 설정 (신규)
docs/phase2-integration-guide.md Phase 2 연동 가이드 (신규)
.gitignore Python 캐시/가상환경 제외 추가

Test Plan

  • pytest 36/36 passed (adapters, normalizer, cwe_mapping, source_mapper, context_builder, redis_publisher, defense)
  • Docker build 확인 (target-app, runtime-defense)
  • K8s 클러스터 배포 후 curl 공격 시뮬레이션 → 컨텍스트 생성 확인
  • Redis 큐 수신 확인 (BRPOP elden:phase2:context:queue)

@ORI-MORI ORI-MORI merged commit d05dfde into dev Apr 8, 2026
7 checks passed
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