Skip to content

Feature: CreateSecret 시크릿 자동 감지 연결 #70

Description

@doyeonk429

📝 기능 설명

CreateSecretFeaturedetectedServices / serviceCandidates state가 이미 존재하고 View에서도 소비하고 있지만, 감지 엔진이 wiring되지 않아 동작하지 않는 상태다. DetectionClient를 신설하고 실제 DetectSecretUseCaseImpl까지 연결한다.

DetectSecretUseCase.execute는 동기 순수 함수이므로 async/throws 없이 간단히 래핑한다.

✅ 작업 목록

DetectionClient.swift 신설 (DVPresentation/Dependencies)

  • @DependencyClient 매크로, detect: @Sendable (_ value: SensitiveString) -> DetectionResult
  • testValue, previewValue (.none 반환) 추가
  • DependencyValues extension 추가

DetectionClient+Live.swift 신설 (Devault/Composition/Dependencies)

  • DetectSecretUseCaseImpl() 기본 init으로 래핑 (LiveStorage 참조 불필요)

CreateSecretFeature 감지 wiring

  • @Dependency(\.detectionClient) var detectionClient 추가
  • .binding catch-all에서 primaryDetectionValue / primaryDetectionFieldID 기반으로 감지 호출
  • serviceCandidates / detectedServices 갱신 (content case별 primary 필드 자동 추출)
content case 감지 트리거 필드
.apiKeyToken f.value
.database f.linkString
.sshKey f.privateKey
.sslTlsCertificate f.certificate
.serviceAccount f.credentialJSON
.envSet f.envContent
나머지 감지 불필요

SecretMetaFields detection 헬퍼

  • primaryDetectionValue computed property 추가
  • primaryDetectionFieldID computed property 추가

🔗 참고 링크

docs/PLAN_CreateSecret_Live.md — Step 3, 4, 5

Metadata

Metadata

Assignees

Labels

✨ Feature새로운 기능 개발

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions