{
  "schema": "teum-report-1",
  "name": "[샘플] 계정 서비스 · AI만 발견",
  "run_id": "R-043",
  "source_sha256": "846d59f6b1bff51dc490b950ff3eb590d3e583075f43d82d6cdea3f6f20bca0a",
  "input_kind": "code",
  "source": {
    "fullName": "teum-sample/accounts",
    "commitSha": "afeca685de9e98c29383fcd5128530668043c00a",
    "ref": "main",
    "path": "",
    "selectedFiles": 9,
    "totalFiles": 9,
    "excludedFiles": 0
  },
  "website": null,
  "status": "partial",
  "created_at": "2026-10-10T23:00:00.000Z",
  "engine_versions": {
    "semgrep": "1.178.0",
    "gitleaks": "8.30.1",
    "osv": "api-v1",
    "typescript_flow": "teum-typescript-flow-0.6",
    "typescript_authorization": "teum-typescript-authorization-0.9",
    "typescript_server_data": "teum-typescript-server-data-0.1",
    "typescript_local": "teum-typescript-local-0.2",
    "native_toolchain": "0a2d98c38b4beb858229562b36fea48702146c93729605f729d878c15de69f75",
    "native_validation": "d6b19c64c8894d3448810d18bbe8b4d37386800b8521eb8a396cb58c486d2a69",
    "native_policy_revision": null
  },
  "rules_sha256": "5c8d9e43567aca4f912b85374839eef54916d70415713b91080cddd976bf45f5",
  "ai_status": "completed",
  "review_policy": "teum-review-2026-10-03",
  "ai_review": {
    "status": "completed",
    "report": {
      "schema": "teum-repository-review-1",
      "policy_version": "teum-review-sample",
      "model": "체험용 예시 · 실제 AI 호출 없음",
      "source_sha256": "846d59f6b1bff51dc490b950ff3eb590d3e583075f43d82d6cdea3f6f20bca0a",
      "summary": "근거를 확인해 검토할 항목 3건을 남겼어요. 조회·변경 권한과 재설정 토큰의 사용 조건을 각각 확인하세요.",
      "limitations": [
        "공개 체험용 코드와 검토 예시예요. 실제 AI 호출·코드 실행·공격 재현을 수행하지 않았어요.",
        "세션 검증 미들웨어, DB 정책과 배포 설정은 제공되지 않았어요.",
        "외부 라이브러리·DB 트리거·토큰 발급 및 기존 세션 폐기 정책은 확인하지 못했어요."
      ],
      "usage": {
        "requests": 0,
        "input_tokens": 0,
        "output_tokens": 0
      },
      "coverage": {
        "available_files": 9,
        "excluded_files": 0,
        "provided_files": 8,
        "provided_lines": 44,
        "total_lines": 61,
        "supplied_bytes": 7273,
        "files": [
          {
            "path_hash": "6697aeaa900d8e5170f21a0cc0e98c0c533c4ebb15c7a17788b4b5fac529e619",
            "path": "src/accounts.ts",
            "lines": [
              1,
              2,
              3,
              4
            ]
          },
          {
            "path_hash": "f3df44af2b22c4c01a6a7a70f1c09a2815ea8c93d1acac77762fea545590cdb0",
            "path": "src/account-route.ts",
            "lines": [
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8
            ]
          },
          {
            "path_hash": "96998a2148aa3d52ad3e80303d0ad88fc43a4afd08966b5330a5657021ae52bb",
            "path": "src/session.ts",
            "lines": [
              1,
              2,
              3
            ]
          },
          {
            "path_hash": "724f334a2b47a5e7cbcab252ce04fc232071d0bc058c96ed6fd4ac96e5dff308",
            "path": "src/database.ts",
            "lines": [
              1,
              2
            ]
          },
          {
            "path_hash": "248ec50f84308b93508694104399e054557d9335b712e479bda100feaaced45d",
            "path": "src/profile.ts",
            "lines": [
              1,
              2,
              3,
              4
            ]
          },
          {
            "path_hash": "bef134758c798bbbd0a43b09de714e00179270756295496b1b4bf16b2a7586b5",
            "path": "src/profile-route.ts",
            "lines": [
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9
            ]
          },
          {
            "path_hash": "7fa79373a1f5dc481be25a2df0f8a26bbaea0f51ea1c7daab1eecee9ad019a78",
            "path": "src/password-reset.ts",
            "lines": [
              1,
              2,
              3,
              4,
              5,
              6
            ]
          },
          {
            "path_hash": "d4943bd37dae3d90399b27908e527103d77c845ce9905b7b003dca4d11a3511f",
            "path": "src/password-reset-route.ts",
            "lines": [
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8
            ]
          }
        ]
      },
      "verification_coverage": {
        "available_files": 9,
        "excluded_files": 0,
        "provided_files": 8,
        "provided_lines": 37,
        "total_lines": 61,
        "supplied_bytes": 3915,
        "files": [
          {
            "path_hash": "6697aeaa900d8e5170f21a0cc0e98c0c533c4ebb15c7a17788b4b5fac529e619",
            "path": "src/accounts.ts",
            "lines": [
              2,
              3,
              4
            ]
          },
          {
            "path_hash": "f3df44af2b22c4c01a6a7a70f1c09a2815ea8c93d1acac77762fea545590cdb0",
            "path": "src/account-route.ts",
            "lines": [
              3,
              4,
              5,
              6,
              7,
              8
            ]
          },
          {
            "path_hash": "96998a2148aa3d52ad3e80303d0ad88fc43a4afd08966b5330a5657021ae52bb",
            "path": "src/session.ts",
            "lines": [
              1,
              2,
              3
            ]
          },
          {
            "path_hash": "724f334a2b47a5e7cbcab252ce04fc232071d0bc058c96ed6fd4ac96e5dff308",
            "path": "src/database.ts",
            "lines": [
              1,
              2
            ]
          },
          {
            "path_hash": "248ec50f84308b93508694104399e054557d9335b712e479bda100feaaced45d",
            "path": "src/profile.ts",
            "lines": [
              2,
              3,
              4
            ]
          },
          {
            "path_hash": "bef134758c798bbbd0a43b09de714e00179270756295496b1b4bf16b2a7586b5",
            "path": "src/profile-route.ts",
            "lines": [
              3,
              4,
              5,
              6,
              7,
              8,
              9
            ]
          },
          {
            "path_hash": "7fa79373a1f5dc481be25a2df0f8a26bbaea0f51ea1c7daab1eecee9ad019a78",
            "path": "src/password-reset.ts",
            "lines": [
              2,
              3,
              4,
              5,
              6
            ]
          },
          {
            "path_hash": "d4943bd37dae3d90399b27908e527103d77c845ce9905b7b003dca4d11a3511f",
            "path": "src/password-reset-route.ts",
            "lines": [
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8
            ]
          }
        ]
      },
      "review_checks": [],
      "scope_gaps": {
        "not_read_files": 1,
        "partial_files": 0,
        "excluded_files": 0,
        "files": [
          {
            "path_hash": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
            "path": "app/api/accounts/route.ts",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 17
          }
        ],
        "omitted_files": 0
      },
      "findings": [
        {
          "title": "다른 사용자의 계정이 조회될 수 있어요",
          "category": "authorization",
          "severity": "medium",
          "confidence": "high",
          "attack_path": "로그인한 사용자가 요청의 params.id에 다른 계정의 ID를 넣어요. 호출부는 로그인한 사용자의 ID를 함께 전달하지만 account 함수는 계정 ID로만 조회해요. 소유자를 확인하지 않은 조회 결과가 응답에 담길 수 있어요.",
          "prerequisites": [
            "이 요청 경로가 실제 서비스에 연결돼 있어야 해요.",
            "요청한 사용자에게 유효한 세션과 다른 계정의 ID가 있어야 해요.",
            "상위 미들웨어나 DB 정책에서 계정 소유자를 따로 제한하지 않아야 해요."
          ],
          "impact": "다른 사용자의 계정 정보가 응답에 포함될 수 있어요. 실제 반환 필드와 데이터의 민감도는 확인하지 못했어요.",
          "evidence": [
            {
              "file_id": "6697aeaa900d8e5170f21a0cc0e98c0c533c4ebb15c7a17788b4b5fac529e619",
              "start_line": 2,
              "end_line": 4,
              "quote": "export async function account(id, userId) {\n  return db.account.findUnique({ where: { id } });\n}",
              "role": "sink",
              "path": "src/accounts.ts"
            },
            {
              "file_id": "f3df44af2b22c4c01a6a7a70f1c09a2815ea8c93d1acac77762fea545590cdb0",
              "start_line": 3,
              "end_line": 8,
              "quote": "export async function GET(request, { params }) {\n  const user = await requireSession(request);\n  if (!user) return new Response('Unauthorized', { status: 401 });\n  const row = await account(params.id, user.id);\n  return Response.json(row);\n}",
              "role": "entry",
              "path": "src/account-route.ts"
            },
            {
              "file_id": "96998a2148aa3d52ad3e80303d0ad88fc43a4afd08966b5330a5657021ae52bb",
              "start_line": 1,
              "end_line": 3,
              "quote": "export async function requireSession(request) {\n  return request.verifiedSession?.user ?? null;\n}",
              "role": "control",
              "path": "src/session.ts"
            },
            {
              "file_id": "724f334a2b47a5e7cbcab252ce04fc232071d0bc058c96ed6fd4ac96e5dff308",
              "start_line": 1,
              "end_line": 2,
              "quote": "import { client } from 'database-client';\nexport const db = client;",
              "role": "flow",
              "path": "src/database.ts"
            }
          ],
          "counterevidence": [
            "세션이 없으면 401을 반환해요. 로그인 없이 접근하는 문제와는 구분해야 해요.",
            "호출부에서 user.id를 전달해도 조회 함수가 사용하지 않으면 소유자 제한이 되지 않아요.",
            "외부 데이터 클라이언트나 DB의 추가 권한 제한은 이 코드만으로 확인할 수 없어요."
          ],
          "fix": "계정 ID와 로그인한 사용자의 ID를 함께 조회 조건에 넣으세요. 기존 ORM과 반환 형식을 유지해야 한다면 조회 뒤 row.ownerId와 userId를 비교하고, 소유자가 다르거나 결과가 없을 때 null을 반환하세요.",
          "checks": [
            "본인 계정 조회는 기존 응답을 유지하나요?",
            "사용자 A의 세션으로 B의 계정을 요청하면 데이터가 노출되지 않나요?",
            "세션이 없으면 401, 존재하지 않는 ID에는 기존 응답을 반환하나요?",
            "실제 미들웨어와 DB 정책을 포함한 테스트에서도 사용자별 구분이 유지되나요?"
          ],
          "limitations": [
            "라우트 등록과 배포 설정을 확인하지 못해 실제 접근 가능 여부는 알 수 없어요.",
            "DB 정책과 반환 필드, 계정 ID의 입수 가능성은 추가로 확인해야 해요."
          ],
          "id": "AI-0000000000000001",
          "verification": "세션이 없는 요청은 401로 거절돼요. 다만 유효한 세션이 있는 사용자의 요청에서는 params.id가 account로 전달되고, 함께 전달된 userId는 조회 조건에 쓰이지 않아요. 반환 전에도 소유자를 대조하는 코드는 보이지 않아 검토 대상으로 남겼어요. 이 흐름만으로 운영 환경의 취약점을 확정하지는 않아요. 데이터 클라이언트가 자동으로 소유자 조건을 넣거나 DB 정책으로 접근을 제한할 가능성은 추가로 확인해야 해요. 실제 배포 경로와 반환 데이터, 다른 계정 ID를 얻을 수 있는지도 확인하지 못했어요. 수정할 때는 기존 반환 계약을 유지하면서 row.ownerId와 userId가 일치하는 경우에만 결과를 반환하세요. 이 설명은 체험용 예시이며 코드 실행이나 실제 요청 재현을 수행한 결과는 아니에요.",
          "code_changes": [
            {
              "file_id": "6697aeaa900d8e5170f21a0cc0e98c0c533c4ebb15c7a17788b4b5fac529e619",
              "start_line": 2,
              "end_line": 4,
              "before": "export async function account(id, userId) {\n  return db.account.findUnique({ where: { id } });\n}",
              "after": "export async function account(id, userId) {\n  const row = await db.account.findUnique({ where: { id } });\n  if (!row || row.ownerId !== userId) return null;\n  return row;\n}",
              "path": "src/accounts.ts"
            }
          ]
        },
        {
          "title": "프로필 입력이 권한 필드까지 바꿀 수 있어요",
          "category": "authorization",
          "severity": "high",
          "confidence": "medium",
          "attack_path": "로그인한 사용자의 JSON 입력이 updateProfile을 거쳐 ORM의 data에 그대로 전달돼요. 변경 가능한 필드를 제한하지 않아 역할 같은 보호 필드도 입력으로 전달될 수 있어요.",
          "prerequisites": [
            "프로필 변경 경로가 실제로 연결돼 있어야 해요.",
            "ORM 모델에 역할 등 사용자가 직접 바꾸면 안 되는 필드가 있어야 해요.",
            "상위 검증이나 DB 정책에서 보호 필드 변경을 차단하지 않아야 해요."
          ],
          "impact": "일반 사용자가 본인 계정의 권한이나 인증 관련 값을 바꿀 수 있어요. 실제 수정 가능한 필드는 DB 스키마와 정책을 확인해야 해요.",
          "evidence": [
            {
              "file_id": "248ec50f84308b93508694104399e054557d9335b712e479bda100feaaced45d",
              "start_line": 2,
              "end_line": 4,
              "quote": "export async function updateProfile(userId, input) {\n  return db.user.update({ where: { id: userId }, data: input });\n}",
              "role": "sink",
              "path": "src/profile.ts"
            },
            {
              "file_id": "bef134758c798bbbd0a43b09de714e00179270756295496b1b4bf16b2a7586b5",
              "start_line": 3,
              "end_line": 9,
              "quote": "export async function PATCH(request) {\n  const user = await requireSession(request);\n  if (!user) return new Response('Unauthorized', { status: 401 });\n  const input = await request.json();\n  await updateProfile(user.id, input);\n  return new Response(null, { status: 204 });\n}",
              "role": "entry",
              "path": "src/profile-route.ts"
            },
            {
              "file_id": "96998a2148aa3d52ad3e80303d0ad88fc43a4afd08966b5330a5657021ae52bb",
              "start_line": 1,
              "end_line": 3,
              "quote": "export async function requireSession(request) {\n  return request.verifiedSession?.user ?? null;\n}",
              "role": "control",
              "path": "src/session.ts"
            },
            {
              "file_id": "724f334a2b47a5e7cbcab252ce04fc232071d0bc058c96ed6fd4ac96e5dff308",
              "start_line": 1,
              "end_line": 2,
              "quote": "import { client } from 'database-client';\nexport const db = client;",
              "role": "flow",
              "path": "src/database.ts"
            }
          ],
          "counterevidence": [
            "세션 확인과 user.id 조건으로 다른 사용자 행의 변경은 제한해요. 본인 행의 보호 필드 변경은 별도 문제예요.",
            "ORM이나 DB가 보호 필드 갱신을 거절할 가능성은 남아 있어요."
          ],
          "fix": "사용자가 바꿀 수 있는 필드만 새 객체에 담고 타입·길이를 검사하세요. 아래 예시는 표시 이름만 허용해요. 역할·권한 변경은 별도로 권한을 확인하는 서버 경로에서 처리하세요.",
          "checks": [
            "표시 이름 변경과 204 응답이 유지되나요?",
            "역할·사용자 ID·인증 관련 필드를 추가해도 저장되지 않나요?",
            "빈 이름·잘못된 타입·너무 긴 이름을 기존 오류 응답 규칙으로 처리하나요?",
            "관리자의 권한 변경 경로는 별도 권한 검사와 기록을 유지하나요?"
          ],
          "limitations": [
            "실제 사용자 모델의 필드와 DB 권한 정책을 확인하지 못했어요.",
            "상위 입력 검증과 오류 응답 매핑, 라우트 등록 여부는 추가 확인이 필요해요."
          ],
          "id": "AI-0000000000000003",
          "verification": "요청 본문을 읽는 위치부터 ORM data까지 필드 선택이나 검증이 없어요. 조회 조건의 사용자 ID는 서버 세션에서 얻지만, 어떤 필드를 바꿀 수 있는지는 제한하지 않아요. 모델과 DB 정책이 제공되지 않아 실제 권한 상승으로 확정하지는 않아요.",
          "code_changes": [
            {
              "file_id": "248ec50f84308b93508694104399e054557d9335b712e479bda100feaaced45d",
              "start_line": 2,
              "end_line": 4,
              "before": "export async function updateProfile(userId, input) {\n  return db.user.update({ where: { id: userId }, data: input });\n}",
              "after": "export async function updateProfile(userId, input) {\n  const displayName = typeof input?.displayName === 'string' ? input.displayName.trim() : '';\n  if (!displayName || displayName.length > 80) throw new Error('Invalid display name');\n  return db.user.update({ where: { id: userId }, data: { displayName } });\n}",
              "path": "src/profile.ts"
            }
          ]
        },
        {
          "title": "사용한 비밀번호 재설정 토큰이 다시 쓰일 수 있어요",
          "category": "lifecycle",
          "severity": "medium",
          "confidence": "high",
          "attack_path": "재설정 토큰의 해시로 레코드를 찾고 만료를 확인한 뒤 비밀번호를 변경해요. 성공한 토큰을 삭제하거나 사용 처리하지 않아 만료 전 같은 토큰으로 다시 변경할 수 있는 흐름이에요.",
          "prerequisites": [
            "사용한 토큰이 만료되기 전에 다시 제출될 수 있어야 해요.",
            "호출부나 DB 트리거에서 토큰을 별도로 폐기하지 않아야 해요.",
            "토큰과 새 비밀번호를 받는 경로가 실제 서비스에 연결돼 있어야 해요."
          ],
          "impact": "이미 사용한 재설정 링크가 남아 있으면 계정 비밀번호가 다시 바뀔 수 있어요. 동시 요청에서 토큰 사용을 한 번으로 제한하는지도 확인해야 해요.",
          "evidence": [
            {
              "file_id": "7fa79373a1f5dc481be25a2df0f8a26bbaea0f51ea1c7daab1eecee9ad019a78",
              "start_line": 2,
              "end_line": 6,
              "quote": "export async function resetPassword(tokenHash, passwordHash) {\n  const reset = await db.passwordReset.findUnique({ where: { tokenHash } });\n  if (!reset || reset.expiresAt <= new Date()) throw new Error('Invalid token');\n  await db.user.update({ where: { id: reset.userId }, data: { passwordHash } });\n}",
              "role": "sink",
              "path": "src/password-reset.ts"
            },
            {
              "file_id": "d4943bd37dae3d90399b27908e527103d77c845ce9905b7b003dca4d11a3511f",
              "start_line": 3,
              "end_line": 8,
              "quote": "export async function POST(request) {\n  const { token, password } = await request.json();\n  if (typeof token !== 'string' || typeof password !== 'string') return new Response('Invalid input', { status: 400 });\n  await resetPassword(hashToken(token), await hashPassword(password));\n  return new Response(null, { status: 204 });\n}",
              "role": "entry",
              "path": "src/password-reset-route.ts"
            },
            {
              "file_id": "d4943bd37dae3d90399b27908e527103d77c845ce9905b7b003dca4d11a3511f",
              "start_line": 1,
              "end_line": 2,
              "quote": "import { resetPassword } from './password-reset';\nimport { hashToken, hashPassword } from 'auth-crypto';",
              "role": "control",
              "path": "src/password-reset-route.ts"
            },
            {
              "file_id": "724f334a2b47a5e7cbcab252ce04fc232071d0bc058c96ed6fd4ac96e5dff308",
              "start_line": 1,
              "end_line": 2,
              "quote": "import { client } from 'database-client';\nexport const db = client;",
              "role": "flow",
              "path": "src/database.ts"
            }
          ],
          "counterevidence": [
            "토큰의 존재와 만료는 확인하고, 호출부는 원문 대신 해시를 전달해요.",
            "외부 해시 함수의 구현이나 DB 트리거가 추가 방어를 제공하는지는 확인하지 못했어요."
          ],
          "fix": "토큰의 유효성과 일회 사용을 DB에서 함께 제한하세요. 아래 예시는 만료 조건을 포함한 삭제가 정확히 한 행일 때만 같은 트랜잭션에서 비밀번호를 바꿔요. 갱신 실패 시 삭제도 롤백돼야 해요.",
          "checks": [
            "유효한 새 토큰으로 한 번만 비밀번호가 바뀌나요?",
            "사용한 토큰·만료된 토큰·없는 토큰을 거절하나요?",
            "같은 토큰의 동시 요청 중 하나만 성공하나요?",
            "비밀번호 저장 실패 시 토큰 삭제가 함께 롤백되나요?",
            "기존 세션 폐기와 비밀번호 정책도 별도 기준대로 적용되나요?"
          ],
          "limitations": [
            "DB 트리거·격리 수준과 외부 해시 함수의 구현은 제공되지 않았어요.",
            "토큰 발급·전달·로그 보관 및 기존 세션 폐기 정책은 검토 범위 밖이에요."
          ],
          "id": "AI-0000000000000004",
          "verification": "만료 검사 이후 비밀번호 갱신만 수행하며 토큰을 소비하는 쓰기가 없어요. 호출부도 성공 뒤 토큰을 폐기하지 않아요. 단순히 조회 후 사용 표시만 추가하면 동시 요청이 함께 통과할 수 있으므로 조건부 삭제와 비밀번호 변경을 하나의 트랜잭션으로 묶는 예시를 제공해요. 실제 DB 격리 수준과 트리거는 별도 확인이 필요해요.",
          "code_changes": [
            {
              "file_id": "7fa79373a1f5dc481be25a2df0f8a26bbaea0f51ea1c7daab1eecee9ad019a78",
              "start_line": 2,
              "end_line": 6,
              "before": "export async function resetPassword(tokenHash, passwordHash) {\n  const reset = await db.passwordReset.findUnique({ where: { tokenHash } });\n  if (!reset || reset.expiresAt <= new Date()) throw new Error('Invalid token');\n  await db.user.update({ where: { id: reset.userId }, data: { passwordHash } });\n}",
              "after": "export async function resetPassword(tokenHash, passwordHash) {\n  return db.$transaction(async (tx) => {\n    const reset = await tx.passwordReset.findUnique({ where: { tokenHash } });\n    if (!reset) throw new Error('Invalid token');\n    const consumed = await tx.passwordReset.deleteMany({ where: { tokenHash, expiresAt: { gt: new Date() } } });\n    if (consumed.count !== 1) throw new Error('Invalid token');\n    await tx.user.update({ where: { id: reset.userId }, data: { passwordHash } });\n  });\n}",
              "path": "src/password-reset.ts"
            }
          ]
        }
      ],
      "dismissed_count": 0,
      "uncertain_count": 0
    }
  },
  "ai_workflow": [
    {
      "candidate_id": "AI-0000000000000001",
      "workflow_state": "open"
    },
    {
      "candidate_id": "AI-0000000000000003",
      "workflow_state": "reviewing"
    },
    {
      "candidate_id": "AI-0000000000000004",
      "workflow_state": "open"
    }
  ],
  "stages": [
    {
      "kind": "static",
      "status": "completed",
      "coverage": {
        "files": [
          {
            "path": "src/accounts.ts",
            "path_hash": "6697aeaa900d8e5170f21a0cc0e98c0c533c4ebb15c7a17788b4b5fac529e619"
          },
          {
            "path": "src/account-route.ts",
            "path_hash": "f3df44af2b22c4c01a6a7a70f1c09a2815ea8c93d1acac77762fea545590cdb0"
          },
          {
            "path": "src/session.ts",
            "path_hash": "96998a2148aa3d52ad3e80303d0ad88fc43a4afd08966b5330a5657021ae52bb"
          },
          {
            "path": "src/database.ts",
            "path_hash": "724f334a2b47a5e7cbcab252ce04fc232071d0bc058c96ed6fd4ac96e5dff308"
          },
          {
            "path": "src/profile.ts",
            "path_hash": "248ec50f84308b93508694104399e054557d9335b712e479bda100feaaced45d"
          },
          {
            "path": "src/profile-route.ts",
            "path_hash": "bef134758c798bbbd0a43b09de714e00179270756295496b1b4bf16b2a7586b5"
          },
          {
            "path": "src/password-reset.ts",
            "path_hash": "7fa79373a1f5dc481be25a2df0f8a26bbaea0f51ea1c7daab1eecee9ad019a78"
          },
          {
            "path": "src/password-reset-route.ts",
            "path_hash": "d4943bd37dae3d90399b27908e527103d77c845ce9905b7b003dca4d11a3511f"
          },
          {
            "path": "app/api/accounts/route.ts",
            "path_hash": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914"
          }
        ],
        "excluded": []
      },
      "error_code": null
    },
    {
      "kind": "secrets",
      "status": "completed",
      "coverage": {
        "files": [
          {
            "path": "src/accounts.ts",
            "path_hash": "6697aeaa900d8e5170f21a0cc0e98c0c533c4ebb15c7a17788b4b5fac529e619"
          },
          {
            "path": "src/account-route.ts",
            "path_hash": "f3df44af2b22c4c01a6a7a70f1c09a2815ea8c93d1acac77762fea545590cdb0"
          },
          {
            "path": "src/session.ts",
            "path_hash": "96998a2148aa3d52ad3e80303d0ad88fc43a4afd08966b5330a5657021ae52bb"
          },
          {
            "path": "src/database.ts",
            "path_hash": "724f334a2b47a5e7cbcab252ce04fc232071d0bc058c96ed6fd4ac96e5dff308"
          },
          {
            "path": "src/profile.ts",
            "path_hash": "248ec50f84308b93508694104399e054557d9335b712e479bda100feaaced45d"
          },
          {
            "path": "src/profile-route.ts",
            "path_hash": "bef134758c798bbbd0a43b09de714e00179270756295496b1b4bf16b2a7586b5"
          },
          {
            "path": "src/password-reset.ts",
            "path_hash": "7fa79373a1f5dc481be25a2df0f8a26bbaea0f51ea1c7daab1eecee9ad019a78"
          },
          {
            "path": "src/password-reset-route.ts",
            "path_hash": "d4943bd37dae3d90399b27908e527103d77c845ce9905b7b003dca4d11a3511f"
          },
          {
            "path": "app/api/accounts/route.ts",
            "path_hash": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914"
          }
        ],
        "excluded": []
      },
      "error_code": null
    },
    {
      "kind": "dependencies",
      "status": "unsupported",
      "coverage": {
        "files": [],
        "excluded": []
      },
      "error_code": "dependency_files_missing"
    },
    {
      "kind": "flow",
      "status": "partial",
      "coverage": {
        "supplied_files": 9,
        "parsed_files": 9,
        "entrypoints": 1,
        "visited_files": 1,
        "steps": 117,
        "calls": 1,
        "mode": "native_analysis",
        "engine_version": "teum-typescript-flow-0.6",
        "files": [
          {
            "path": "src/accounts.ts",
            "path_hash": "6697aeaa900d8e5170f21a0cc0e98c0c533c4ebb15c7a17788b4b5fac529e619"
          },
          {
            "path": "src/account-route.ts",
            "path_hash": "f3df44af2b22c4c01a6a7a70f1c09a2815ea8c93d1acac77762fea545590cdb0"
          },
          {
            "path": "src/session.ts",
            "path_hash": "96998a2148aa3d52ad3e80303d0ad88fc43a4afd08966b5330a5657021ae52bb"
          },
          {
            "path": "src/database.ts",
            "path_hash": "724f334a2b47a5e7cbcab252ce04fc232071d0bc058c96ed6fd4ac96e5dff308"
          },
          {
            "path": "src/profile.ts",
            "path_hash": "248ec50f84308b93508694104399e054557d9335b712e479bda100feaaced45d"
          },
          {
            "path": "src/profile-route.ts",
            "path_hash": "bef134758c798bbbd0a43b09de714e00179270756295496b1b4bf16b2a7586b5"
          },
          {
            "path": "src/password-reset.ts",
            "path_hash": "7fa79373a1f5dc481be25a2df0f8a26bbaea0f51ea1c7daab1eecee9ad019a78"
          },
          {
            "path": "src/password-reset-route.ts",
            "path_hash": "d4943bd37dae3d90399b27908e527103d77c845ce9905b7b003dca4d11a3511f"
          },
          {
            "path": "app/api/accounts/route.ts",
            "path_hash": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914"
          }
        ],
        "unknowns": 33,
        "policy_state": "absent"
      },
      "error_code": null
    },
    {
      "kind": "authorization",
      "status": "partial",
      "coverage": {
        "supplied_files": 9,
        "parsed_files": 9,
        "entrypoints": 0,
        "visited_files": 0,
        "steps": 0,
        "calls": 0,
        "mode": "native_analysis",
        "engine_version": "teum-typescript-authorization-0.9",
        "files": [
          {
            "path": "src/accounts.ts",
            "path_hash": "6697aeaa900d8e5170f21a0cc0e98c0c533c4ebb15c7a17788b4b5fac529e619"
          },
          {
            "path": "src/account-route.ts",
            "path_hash": "f3df44af2b22c4c01a6a7a70f1c09a2815ea8c93d1acac77762fea545590cdb0"
          },
          {
            "path": "src/session.ts",
            "path_hash": "96998a2148aa3d52ad3e80303d0ad88fc43a4afd08966b5330a5657021ae52bb"
          },
          {
            "path": "src/database.ts",
            "path_hash": "724f334a2b47a5e7cbcab252ce04fc232071d0bc058c96ed6fd4ac96e5dff308"
          },
          {
            "path": "src/profile.ts",
            "path_hash": "248ec50f84308b93508694104399e054557d9335b712e479bda100feaaced45d"
          },
          {
            "path": "src/profile-route.ts",
            "path_hash": "bef134758c798bbbd0a43b09de714e00179270756295496b1b4bf16b2a7586b5"
          },
          {
            "path": "src/password-reset.ts",
            "path_hash": "7fa79373a1f5dc481be25a2df0f8a26bbaea0f51ea1c7daab1eecee9ad019a78"
          },
          {
            "path": "src/password-reset-route.ts",
            "path_hash": "d4943bd37dae3d90399b27908e527103d77c845ce9905b7b003dca4d11a3511f"
          },
          {
            "path": "app/api/accounts/route.ts",
            "path_hash": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914"
          }
        ],
        "unknowns": 1,
        "policy_state": "absent"
      },
      "error_code": null
    },
    {
      "kind": "server_data",
      "status": "not_applicable",
      "coverage": {
        "mode": "native_analysis",
        "engine_version": "teum-typescript-server-data-0.1",
        "files": [
          {
            "path": "src/accounts.ts",
            "path_hash": "6697aeaa900d8e5170f21a0cc0e98c0c533c4ebb15c7a17788b4b5fac529e619"
          },
          {
            "path": "src/account-route.ts",
            "path_hash": "f3df44af2b22c4c01a6a7a70f1c09a2815ea8c93d1acac77762fea545590cdb0"
          },
          {
            "path": "src/session.ts",
            "path_hash": "96998a2148aa3d52ad3e80303d0ad88fc43a4afd08966b5330a5657021ae52bb"
          },
          {
            "path": "src/database.ts",
            "path_hash": "724f334a2b47a5e7cbcab252ce04fc232071d0bc058c96ed6fd4ac96e5dff308"
          },
          {
            "path": "src/profile.ts",
            "path_hash": "248ec50f84308b93508694104399e054557d9335b712e479bda100feaaced45d"
          },
          {
            "path": "src/profile-route.ts",
            "path_hash": "bef134758c798bbbd0a43b09de714e00179270756295496b1b4bf16b2a7586b5"
          },
          {
            "path": "src/password-reset.ts",
            "path_hash": "7fa79373a1f5dc481be25a2df0f8a26bbaea0f51ea1c7daab1eecee9ad019a78"
          },
          {
            "path": "src/password-reset-route.ts",
            "path_hash": "d4943bd37dae3d90399b27908e527103d77c845ce9905b7b003dca4d11a3511f"
          },
          {
            "path": "app/api/accounts/route.ts",
            "path_hash": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914"
          }
        ],
        "unknowns": 0,
        "policy_state": "not_configured"
      },
      "error_code": "server_data_not_applicable"
    },
    {
      "kind": "ai",
      "status": "completed",
      "coverage": {
        "mode": "repository_review",
        "available_files": 9,
        "excluded_files": 0,
        "provided_files": 8,
        "provided_lines": 44,
        "total_lines": 61,
        "supplied_bytes": 7273,
        "files": [
          {
            "path_hash": "6697aeaa900d8e5170f21a0cc0e98c0c533c4ebb15c7a17788b4b5fac529e619",
            "path": "src/accounts.ts",
            "lines": [
              1,
              2,
              3,
              4
            ]
          },
          {
            "path_hash": "f3df44af2b22c4c01a6a7a70f1c09a2815ea8c93d1acac77762fea545590cdb0",
            "path": "src/account-route.ts",
            "lines": [
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8
            ]
          },
          {
            "path_hash": "96998a2148aa3d52ad3e80303d0ad88fc43a4afd08966b5330a5657021ae52bb",
            "path": "src/session.ts",
            "lines": [
              1,
              2,
              3
            ]
          },
          {
            "path_hash": "724f334a2b47a5e7cbcab252ce04fc232071d0bc058c96ed6fd4ac96e5dff308",
            "path": "src/database.ts",
            "lines": [
              1,
              2
            ]
          },
          {
            "path_hash": "248ec50f84308b93508694104399e054557d9335b712e479bda100feaaced45d",
            "path": "src/profile.ts",
            "lines": [
              1,
              2,
              3,
              4
            ]
          },
          {
            "path_hash": "bef134758c798bbbd0a43b09de714e00179270756295496b1b4bf16b2a7586b5",
            "path": "src/profile-route.ts",
            "lines": [
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8,
              9
            ]
          },
          {
            "path_hash": "7fa79373a1f5dc481be25a2df0f8a26bbaea0f51ea1c7daab1eecee9ad019a78",
            "path": "src/password-reset.ts",
            "lines": [
              1,
              2,
              3,
              4,
              5,
              6
            ]
          },
          {
            "path_hash": "d4943bd37dae3d90399b27908e527103d77c845ce9905b7b003dca4d11a3511f",
            "path": "src/password-reset-route.ts",
            "lines": [
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8
            ]
          }
        ]
      },
      "error_code": null
    }
  ],
  "native_analysis": {
    "archive_sha256": "846d59f6b1bff51dc490b950ff3eb590d3e583075f43d82d6cdea3f6f20bca0a",
    "input_sha256": "fdd91016335a0b088bddd209ce55843156f84a9427db64d9f870065ae4679517",
    "toolchain_sha256": "0a2d98c38b4beb858229562b36fea48702146c93729605f729d878c15de69f75",
    "validation_sha256": "d6b19c64c8894d3448810d18bbe8b4d37386800b8521eb8a396cb58c486d2a69",
    "files": [
      {
        "path": "src/accounts.ts",
        "path_hash": "6697aeaa900d8e5170f21a0cc0e98c0c533c4ebb15c7a17788b4b5fac529e619"
      },
      {
        "path": "src/account-route.ts",
        "path_hash": "f3df44af2b22c4c01a6a7a70f1c09a2815ea8c93d1acac77762fea545590cdb0"
      },
      {
        "path": "src/session.ts",
        "path_hash": "96998a2148aa3d52ad3e80303d0ad88fc43a4afd08966b5330a5657021ae52bb"
      },
      {
        "path": "src/database.ts",
        "path_hash": "724f334a2b47a5e7cbcab252ce04fc232071d0bc058c96ed6fd4ac96e5dff308"
      },
      {
        "path": "src/profile.ts",
        "path_hash": "248ec50f84308b93508694104399e054557d9335b712e479bda100feaaced45d"
      },
      {
        "path": "src/profile-route.ts",
        "path_hash": "bef134758c798bbbd0a43b09de714e00179270756295496b1b4bf16b2a7586b5"
      },
      {
        "path": "src/password-reset.ts",
        "path_hash": "7fa79373a1f5dc481be25a2df0f8a26bbaea0f51ea1c7daab1eecee9ad019a78"
      },
      {
        "path": "src/password-reset-route.ts",
        "path_hash": "d4943bd37dae3d90399b27908e527103d77c845ce9905b7b003dca4d11a3511f"
      },
      {
        "path": "app/api/accounts/route.ts",
        "path_hash": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914"
      }
    ],
    "policy": {
      "state": "absent",
      "revision": null,
      "enforcement": "unverified"
    },
    "origin": "analysis",
    "schema": "teum-native-analysis-2",
    "components": {
      "flow": {
        "engine_version": "teum-typescript-flow-0.6",
        "status": "partial",
        "error_code": null,
        "coverage": {
          "supplied_files": 9,
          "parsed_files": 9,
          "entrypoints": 1,
          "visited_files": 1,
          "steps": 117,
          "calls": 1
        },
        "candidates": [],
        "relations": [],
        "unknowns": [
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 1,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "724f334a2b47a5e7cbcab252ce04fc232071d0bc058c96ed6fd4ac96e5dff308",
              "path": "src/database.ts",
              "line": 1,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "d4943bd37dae3d90399b27908e527103d77c845ce9905b7b003dca4d11a3511f",
              "path": "src/password-reset-route.ts",
              "line": 2,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 3,
              "column": 191,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 3,
              "column": 191,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 3,
              "column": 16,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 3,
              "column": 16,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 4,
              "column": 28,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 4,
              "column": 28,
              "role": "evidence"
            }
          },
          {
            "reason": "exception_flow",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 4,
              "column": 22,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 5,
              "column": 16,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 6,
              "column": 7,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 6,
              "column": 36,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 6,
              "column": 62,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 6,
              "column": 62,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 7,
              "column": 14,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 7,
              "column": 14,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 10,
              "column": 19,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 10,
              "column": 19,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 11,
              "column": 26,
              "role": "evidence"
            }
          },
          {
            "reason": "exception_flow",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 11,
              "column": 20,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 12,
              "column": 7,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 12,
              "column": 30,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 12,
              "column": 30,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 13,
              "column": 16,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 14,
              "column": 21,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 14,
              "column": 21,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 15,
              "column": 7,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 15,
              "column": 25,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 15,
              "column": 41,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 15,
              "column": 41,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 16,
              "column": 10,
              "role": "evidence"
            }
          },
          {
            "reason": "exception_flow",
            "location": {
              "file_id": "c76f307b7dbb03a8e2a3d1cc2225f67974121f31e719be2480559b6c666f7914",
              "path": "app/api/accounts/route.ts",
              "line": 2,
              "column": 1,
              "role": "evidence"
            }
          }
        ]
      },
      "authorization": {
        "engine_version": "teum-typescript-authorization-0.9",
        "status": "partial",
        "error_code": null,
        "coverage": {
          "supplied_files": 9,
          "parsed_files": 9,
          "entrypoints": 0,
          "visited_files": 0,
          "steps": 0,
          "calls": 0
        },
        "candidates": [],
        "relations": [],
        "unknowns": [
          {
            "reason": "authorization_policy_missing",
            "location": null
          }
        ]
      },
      "server_data": {
        "engine_version": "teum-typescript-server-data-0.1",
        "status": "not_applicable",
        "error_code": "server_data_not_applicable",
        "coverage": {},
        "candidates": [],
        "relations": [],
        "unknowns": [],
        "policy_state": "not_configured",
        "rls_enforcement": "unverified",
        "field_sensitivity": "unclassified",
        "entries": []
      }
    }
  },
  "findings": [],
  "comparison": [],
  "limitations": "국소 JS·TS·Python 규칙·비밀정보 패턴과, 점검 범위에 기록된 의존성 취약점 대조 결과입니다. 미지원·미점검 영역과 실행 검증을 포함한 전체 안전을 보증하지 않습니다.",
  "sample": true
}