{
  "schema": "teum-report-1",
  "name": "[샘플] 결제 서비스 · 규칙 + AI",
  "run_id": "R-042",
  "source_sha256": "00c855b4325fb88eb58e525f81f4349d3f7e8df81f093df61a1820b4eee3ca5e",
  "input_kind": "code",
  "source": {
    "fullName": "teum-sample/checkout",
    "commitSha": "eea55f12dbe389192acb02aaac74a0aa366003dc",
    "ref": "main",
    "path": "",
    "selectedFiles": 27,
    "totalFiles": 27,
    "excludedFiles": 0
  },
  "website": null,
  "status": "partial",
  "created_at": "2026-10-11T01: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": "1"
  },
  "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": "00c855b4325fb88eb58e525f81f4349d3f7e8df81f093df61a1820b4eee3ca5e",
      "summary": "근거를 확인해 검토할 항목 4건을 남겼어요. 조회·변경 권한과 재설정 토큰의 사용 조건을 각각 확인하세요.",
      "limitations": [
        "공개 체험용 코드와 검토 예시예요. 실제 AI 호출·코드 실행·공격 재현을 수행하지 않았어요.",
        "청구서 행 전체를 화면에 넘기는 코드는 확인했어요. 테이블 스키마가 없어 민감한 열까지 전달되는지는 판단을 보류했어요.",
        "세션 검증 미들웨어, DB 정책과 배포 설정은 제공되지 않았어요.",
        "외부 라이브러리·DB 트리거·토큰 발급 및 기존 세션 폐기 정책은 확인하지 못했어요."
      ],
      "usage": {
        "requests": 0,
        "input_tokens": 0,
        "output_tokens": 0
      },
      "coverage": {
        "available_files": 27,
        "excluded_files": 0,
        "provided_files": 11,
        "provided_lines": 61,
        "total_lines": 369,
        "supplied_bytes": 10008,
        "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": "82a4c9a1ac78091e12845c9b08a9adb3a3af2984bf0235d751020be1d8bd5571",
            "path": "src/invoices.ts",
            "lines": [
              1,
              2,
              3,
              4
            ]
          },
          {
            "path_hash": "f22d8a41458ec0206a820d3a4f75d4f0e5b7689eab192d4e165eaabde27d4a75",
            "path": "src/invoice-route.ts",
            "lines": [
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8
            ]
          },
          {
            "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
            ]
          },
          {
            "path_hash": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
            "path": "app/invoices/page.tsx",
            "lines": [
              6,
              7,
              8,
              9,
              10
            ]
          }
        ]
      },
      "verification_coverage": {
        "available_files": 27,
        "excluded_files": 0,
        "provided_files": 11,
        "provided_lines": 49,
        "total_lines": 369,
        "supplied_bytes": 5398,
        "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": "82a4c9a1ac78091e12845c9b08a9adb3a3af2984bf0235d751020be1d8bd5571",
            "path": "src/invoices.ts",
            "lines": [
              2,
              3,
              4
            ]
          },
          {
            "path_hash": "f22d8a41458ec0206a820d3a4f75d4f0e5b7689eab192d4e165eaabde27d4a75",
            "path": "src/invoice-route.ts",
            "lines": [
              3,
              4,
              5,
              6,
              7,
              8
            ]
          },
          {
            "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
            ]
          },
          {
            "path_hash": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
            "path": "app/invoices/page.tsx",
            "lines": [
              8,
              9,
              10
            ]
          }
        ]
      },
      "review_checks": [
        {
          "hypothesis_id": "hypothesis-1",
          "status": "unresolved",
          "reason": "청구서 행 전체를 화면에 넘기는 코드는 확인했어요. 테이블 스키마가 없어 민감한 열까지 전달되는지는 판단을 보류했어요.",
          "evidence": [
            {
              "file_id": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
              "start_line": 8,
              "end_line": 10,
              "quote": "  const { data: row } = await db.from('invoices').select('*').eq('owner_id', claims.sub).single();\n  if (!row) return null;\n  return <Panel record={row} />;",
              "role": "control"
            }
          ],
          "question": "화면으로 넘긴 청구서 행에 결제 비밀정보가 있나요?"
        }
      ],
      "scope_gaps": {
        "not_read_files": 16,
        "partial_files": 1,
        "excluded_files": 0,
        "files": [
          {
            "path_hash": "4d999ef4f90292f29994d233e95363e5d29968bb86b65d997f0eac0ded12a91e",
            "path": "src/users/user.repository.ts",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 43
          },
          {
            "path_hash": "d5cfad084289d1504e5322be173d5f5af9b85f4f90316b440e269218e18bc457",
            "path": "src/auth/auth.module.ts",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 18
          },
          {
            "path_hash": "c146567d4a2b1fd92539552644c6e5de3f73722af7741f3b9e6d93adfcc3b887",
            "path": "src/auth/session.config.ts",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 13
          },
          {
            "path_hash": "d4f5c5fe74533129c76dcb6a3c9ee68c385897fab99772342cc24e7ef4781eaa",
            "path": "src/orders/order-view.ts",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 81
          },
          {
            "path_hash": "ae6f23e9c3bfea12fdaedf237198c890e852d933a8c8752f200f10c166ff85ee",
            "path": "config/service.yaml",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 12
          },
          {
            "path_hash": "b29cdf8840b4d933091336a300992c735dfa2d152662740871372c2083e22d71",
            "path": "workers/notify.py",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 21
          },
          {
            "path_hash": "4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552",
            "path": "requirements.txt",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 2
          },
          {
            "path_hash": "133662cd8b51cddebeccd472f59f3f9b6ea577e8a11af3008474c20fcab1b2b8",
            "path": "src/auth/redirect.ts",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 14
          },
          {
            "path_hash": "c288ec74708ab39fb6490b324f416da37a7cb815b4475fc0daa1bb10aa5a4a84",
            "path": "src/documents/download.ts",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 23
          },
          {
            "path_hash": "c5988e58cf73c0683ecb2cc7ac490c638e74dbbaf1b00926420d05ac42098145",
            "path": "src/auth/reset-token.ts",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 7
          },
          {
            "path_hash": "58262b36a2a22c2f2fb7d87345e8ced65d3d00b6c2a0ab454437782c59b99205",
            "path": "src/auth/verify-token.ts",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 11
          },
          {
            "path_hash": "782a4c1dee04a87bab7db5a397a0c33f9e350418770326081b978434b223c34b",
            "path": "workers/import_config.py",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 16
          },
          {
            "path_hash": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
            "path": "app/api/invoices/route.ts",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 16
          },
          {
            "path_hash": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
            "path": "app/api/invoices/receipt/route.ts",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 17
          },
          {
            "path_hash": "9b43036be92111f03f203f4ac7985d565917eef3849431e3100117c8c79d0326",
            "path": "lib/database.ts",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 6
          },
          {
            "path_hash": "595853ae7208b1282e7e987bda17d82683158c852c8cdef80d7111f531b3ba97",
            "path": "app/invoices/panel.tsx",
            "reason": "not_read",
            "provided_lines": 0,
            "total_lines": 2
          },
          {
            "path_hash": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
            "path": "app/invoices/page.tsx",
            "reason": "partial_read",
            "provided_lines": 5,
            "total_lines": 11
          }
        ],
        "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": "로그인한 사용자가 params.id로 청구서를 선택해요. 호출부는 청구서 ID만 invoice 함수에 전달해요. 조회 함수는 소유자를 확인하지 않고 결과를 반환해요.",
          "prerequisites": [
            "이 요청 경로가 실제 서비스에 연결돼 있어야 해요.",
            "요청한 사용자에게 유효한 세션과 다른 사용자의 청구서 ID가 있어야 해요.",
            "상위 미들웨어나 DB 정책에서 청구서 소유자를 따로 제한하지 않아야 해요."
          ],
          "impact": "다른 사용자의 청구서 정보가 노출될 수 있어요. 응답에 포함되는 금액·개인정보 항목은 실제 스키마를 확인해야 해요.",
          "evidence": [
            {
              "file_id": "82a4c9a1ac78091e12845c9b08a9adb3a3af2984bf0235d751020be1d8bd5571",
              "start_line": 2,
              "end_line": 4,
              "quote": "export async function invoice(id) {\n  return db.invoice.findUnique({ where: { id } });\n}",
              "role": "sink",
              "path": "src/invoices.ts"
            },
            {
              "file_id": "f22d8a41458ec0206a820d3a4f75d4f0e5b7689eab192d4e165eaabde27d4a75",
              "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 invoice(params.id);\n  return Response.json(row);\n}",
              "role": "entry",
              "path": "src/invoice-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": [
            "세션 확인으로 비로그인 요청은 차단해요.",
            "청구서 ID가 추측하기 어려워도 소유자 검사를 대신할 수는 없어요."
          ],
          "fix": "두 파일을 함께 수정하세요. invoice 함수에서 소유자를 확인하고, 호출부에서는 로그인한 사용자의 ID를 함께 전달하세요. 아래 예시는 소유자가 다르거나 청구서가 없으면 null을 반환해요. 실제 서비스의 응답 규칙에 맞춰 확인하세요.",
          "checks": [
            "본인 청구서는 정상적으로 조회되나요?",
            "다른 사용자의 청구서 ID를 넣으면 데이터가 노출되지 않나요?",
            "모든 invoice 호출부가 로그인한 사용자의 ID를 전달하나요?",
            "세션이 없으면 401, 존재하지 않는 ID에는 기존 응답을 반환하나요?"
          ],
          "limitations": [
            "라우트 등록과 배포 설정을 확인하지 못해 실제 접근 가능 여부는 알 수 없어요.",
            "DB 정책과 반환 필드, 청구서 ID의 입수 가능성은 추가로 확인해야 해요."
          ],
          "id": "AI-0000000000000002",
          "verification": "로그인 여부는 확인하지만 사용자 ID를 조회 함수에 전달하지 않아요. 조회 함수에도 소유자 확인이 없어 호출부와 조회 함수를 함께 수정하는 예시를 제공해요. DB에서 별도로 접근을 제한하는지는 확인하지 못했어요.",
          "code_changes": [
            {
              "file_id": "82a4c9a1ac78091e12845c9b08a9adb3a3af2984bf0235d751020be1d8bd5571",
              "start_line": 2,
              "end_line": 4,
              "before": "export async function invoice(id) {\n  return db.invoice.findUnique({ where: { id } });\n}",
              "after": "export async function invoice(id, userId) {\n  const row = await db.invoice.findUnique({ where: { id } });\n  if (!row || row.ownerId !== userId) return null;\n  return row;\n}",
              "path": "src/invoices.ts"
            },
            {
              "file_id": "f22d8a41458ec0206a820d3a4f75d4f0e5b7689eab192d4e165eaabde27d4a75",
              "start_line": 6,
              "end_line": 6,
              "before": "  const row = await invoice(params.id);",
              "after": "  const row = await invoice(params.id, user.id);",
              "path": "src/invoice-route.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": 1
    }
  },
  "ai_workflow": [
    {
      "candidate_id": "AI-0000000000000001",
      "workflow_state": "open"
    },
    {
      "candidate_id": "AI-0000000000000002",
      "workflow_state": "fixing"
    },
    {
      "candidate_id": "AI-0000000000000003",
      "workflow_state": "reviewing"
    },
    {
      "candidate_id": "AI-0000000000000004",
      "workflow_state": "open"
    }
  ],
  "stages": [
    {
      "kind": "static",
      "status": "completed",
      "coverage": {
        "files": [
          {
            "path": "src/users/user.repository.ts",
            "path_hash": "4d999ef4f90292f29994d233e95363e5d29968bb86b65d997f0eac0ded12a91e"
          },
          {
            "path": "src/auth/auth.module.ts",
            "path_hash": "d5cfad084289d1504e5322be173d5f5af9b85f4f90316b440e269218e18bc457"
          },
          {
            "path": "src/auth/session.config.ts",
            "path_hash": "c146567d4a2b1fd92539552644c6e5de3f73722af7741f3b9e6d93adfcc3b887"
          },
          {
            "path": "src/orders/order-view.ts",
            "path_hash": "d4f5c5fe74533129c76dcb6a3c9ee68c385897fab99772342cc24e7ef4781eaa"
          },
          {
            "path": "workers/notify.py",
            "path_hash": "b29cdf8840b4d933091336a300992c735dfa2d152662740871372c2083e22d71"
          },
          {
            "path": "src/auth/redirect.ts",
            "path_hash": "133662cd8b51cddebeccd472f59f3f9b6ea577e8a11af3008474c20fcab1b2b8"
          },
          {
            "path": "src/documents/download.ts",
            "path_hash": "c288ec74708ab39fb6490b324f416da37a7cb815b4475fc0daa1bb10aa5a4a84"
          },
          {
            "path": "src/auth/reset-token.ts",
            "path_hash": "c5988e58cf73c0683ecb2cc7ac490c638e74dbbaf1b00926420d05ac42098145"
          },
          {
            "path": "src/auth/verify-token.ts",
            "path_hash": "58262b36a2a22c2f2fb7d87345e8ced65d3d00b6c2a0ab454437782c59b99205"
          },
          {
            "path": "workers/import_config.py",
            "path_hash": "782a4c1dee04a87bab7db5a397a0c33f9e350418770326081b978434b223c34b"
          },
          {
            "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/invoices.ts",
            "path_hash": "82a4c9a1ac78091e12845c9b08a9adb3a3af2984bf0235d751020be1d8bd5571"
          },
          {
            "path": "src/invoice-route.ts",
            "path_hash": "f22d8a41458ec0206a820d3a4f75d4f0e5b7689eab192d4e165eaabde27d4a75"
          },
          {
            "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/invoices/route.ts",
            "path_hash": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67"
          },
          {
            "path": "app/api/invoices/receipt/route.ts",
            "path_hash": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5"
          },
          {
            "path": "lib/database.ts",
            "path_hash": "9b43036be92111f03f203f4ac7985d565917eef3849431e3100117c8c79d0326"
          },
          {
            "path": "app/invoices/panel.tsx",
            "path_hash": "595853ae7208b1282e7e987bda17d82683158c852c8cdef80d7111f531b3ba97"
          },
          {
            "path": "app/invoices/page.tsx",
            "path_hash": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465"
          }
        ],
        "excluded": []
      },
      "error_code": null
    },
    {
      "kind": "secrets",
      "status": "completed",
      "coverage": {
        "files": [
          {
            "path": "src/users/user.repository.ts",
            "path_hash": "4d999ef4f90292f29994d233e95363e5d29968bb86b65d997f0eac0ded12a91e"
          },
          {
            "path": "src/auth/auth.module.ts",
            "path_hash": "d5cfad084289d1504e5322be173d5f5af9b85f4f90316b440e269218e18bc457"
          },
          {
            "path": "src/auth/session.config.ts",
            "path_hash": "c146567d4a2b1fd92539552644c6e5de3f73722af7741f3b9e6d93adfcc3b887"
          },
          {
            "path": "src/orders/order-view.ts",
            "path_hash": "d4f5c5fe74533129c76dcb6a3c9ee68c385897fab99772342cc24e7ef4781eaa"
          },
          {
            "path": "config/service.yaml",
            "path_hash": "ae6f23e9c3bfea12fdaedf237198c890e852d933a8c8752f200f10c166ff85ee"
          },
          {
            "path": "workers/notify.py",
            "path_hash": "b29cdf8840b4d933091336a300992c735dfa2d152662740871372c2083e22d71"
          },
          {
            "path": "requirements.txt",
            "path_hash": "4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552"
          },
          {
            "path": "src/auth/redirect.ts",
            "path_hash": "133662cd8b51cddebeccd472f59f3f9b6ea577e8a11af3008474c20fcab1b2b8"
          },
          {
            "path": "src/documents/download.ts",
            "path_hash": "c288ec74708ab39fb6490b324f416da37a7cb815b4475fc0daa1bb10aa5a4a84"
          },
          {
            "path": "src/auth/reset-token.ts",
            "path_hash": "c5988e58cf73c0683ecb2cc7ac490c638e74dbbaf1b00926420d05ac42098145"
          },
          {
            "path": "src/auth/verify-token.ts",
            "path_hash": "58262b36a2a22c2f2fb7d87345e8ced65d3d00b6c2a0ab454437782c59b99205"
          },
          {
            "path": "workers/import_config.py",
            "path_hash": "782a4c1dee04a87bab7db5a397a0c33f9e350418770326081b978434b223c34b"
          },
          {
            "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/invoices.ts",
            "path_hash": "82a4c9a1ac78091e12845c9b08a9adb3a3af2984bf0235d751020be1d8bd5571"
          },
          {
            "path": "src/invoice-route.ts",
            "path_hash": "f22d8a41458ec0206a820d3a4f75d4f0e5b7689eab192d4e165eaabde27d4a75"
          },
          {
            "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/invoices/route.ts",
            "path_hash": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67"
          },
          {
            "path": "app/api/invoices/receipt/route.ts",
            "path_hash": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5"
          },
          {
            "path": "lib/database.ts",
            "path_hash": "9b43036be92111f03f203f4ac7985d565917eef3849431e3100117c8c79d0326"
          },
          {
            "path": "app/invoices/panel.tsx",
            "path_hash": "595853ae7208b1282e7e987bda17d82683158c852c8cdef80d7111f531b3ba97"
          },
          {
            "path": "app/invoices/page.tsx",
            "path_hash": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465"
          }
        ],
        "excluded": []
      },
      "error_code": null
    },
    {
      "kind": "dependencies",
      "status": "completed",
      "coverage": {
        "files": [
          {
            "path": "requirements.txt",
            "path_hash": "4d7c51b1efe9043e44439a949dfd92e5827321b34082903477fd04876edb7552"
          }
        ],
        "excluded": [],
        "dependency_audit": {
          "provider": "OSV",
          "npm_packages": 0,
          "pypi_packages": 1,
          "checked_at": "2026-10-11T01:00:00.000Z",
          "queried_packages": 1,
          "advisories": 1
        }
      },
      "error_code": null
    },
    {
      "kind": "flow",
      "status": "partial",
      "coverage": {
        "supplied_files": 23,
        "parsed_files": 23,
        "entrypoints": 2,
        "visited_files": 2,
        "steps": 222,
        "calls": 2,
        "mode": "native_analysis",
        "engine_version": "teum-typescript-flow-0.6",
        "files": [
          {
            "path": "src/users/user.repository.ts",
            "path_hash": "4d999ef4f90292f29994d233e95363e5d29968bb86b65d997f0eac0ded12a91e"
          },
          {
            "path": "src/auth/auth.module.ts",
            "path_hash": "d5cfad084289d1504e5322be173d5f5af9b85f4f90316b440e269218e18bc457"
          },
          {
            "path": "src/auth/session.config.ts",
            "path_hash": "c146567d4a2b1fd92539552644c6e5de3f73722af7741f3b9e6d93adfcc3b887"
          },
          {
            "path": "src/orders/order-view.ts",
            "path_hash": "d4f5c5fe74533129c76dcb6a3c9ee68c385897fab99772342cc24e7ef4781eaa"
          },
          {
            "path": "src/auth/redirect.ts",
            "path_hash": "133662cd8b51cddebeccd472f59f3f9b6ea577e8a11af3008474c20fcab1b2b8"
          },
          {
            "path": "src/documents/download.ts",
            "path_hash": "c288ec74708ab39fb6490b324f416da37a7cb815b4475fc0daa1bb10aa5a4a84"
          },
          {
            "path": "src/auth/reset-token.ts",
            "path_hash": "c5988e58cf73c0683ecb2cc7ac490c638e74dbbaf1b00926420d05ac42098145"
          },
          {
            "path": "src/auth/verify-token.ts",
            "path_hash": "58262b36a2a22c2f2fb7d87345e8ced65d3d00b6c2a0ab454437782c59b99205"
          },
          {
            "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/invoices.ts",
            "path_hash": "82a4c9a1ac78091e12845c9b08a9adb3a3af2984bf0235d751020be1d8bd5571"
          },
          {
            "path": "src/invoice-route.ts",
            "path_hash": "f22d8a41458ec0206a820d3a4f75d4f0e5b7689eab192d4e165eaabde27d4a75"
          },
          {
            "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/invoices/route.ts",
            "path_hash": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67"
          },
          {
            "path": "app/api/invoices/receipt/route.ts",
            "path_hash": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5"
          },
          {
            "path": "lib/database.ts",
            "path_hash": "9b43036be92111f03f203f4ac7985d565917eef3849431e3100117c8c79d0326"
          },
          {
            "path": "app/invoices/panel.tsx",
            "path_hash": "595853ae7208b1282e7e987bda17d82683158c852c8cdef80d7111f531b3ba97"
          },
          {
            "path": "app/invoices/page.tsx",
            "path_hash": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465"
          }
        ],
        "unknowns": 73,
        "policy_state": "bound"
      },
      "error_code": null
    },
    {
      "kind": "authorization",
      "status": "partial",
      "coverage": {
        "supplied_files": 23,
        "parsed_files": 23,
        "entrypoints": 2,
        "visited_files": 23,
        "steps": 1308,
        "calls": 25,
        "mode": "native_analysis",
        "engine_version": "teum-typescript-authorization-0.9",
        "files": [
          {
            "path": "src/users/user.repository.ts",
            "path_hash": "4d999ef4f90292f29994d233e95363e5d29968bb86b65d997f0eac0ded12a91e"
          },
          {
            "path": "src/auth/auth.module.ts",
            "path_hash": "d5cfad084289d1504e5322be173d5f5af9b85f4f90316b440e269218e18bc457"
          },
          {
            "path": "src/auth/session.config.ts",
            "path_hash": "c146567d4a2b1fd92539552644c6e5de3f73722af7741f3b9e6d93adfcc3b887"
          },
          {
            "path": "src/orders/order-view.ts",
            "path_hash": "d4f5c5fe74533129c76dcb6a3c9ee68c385897fab99772342cc24e7ef4781eaa"
          },
          {
            "path": "src/auth/redirect.ts",
            "path_hash": "133662cd8b51cddebeccd472f59f3f9b6ea577e8a11af3008474c20fcab1b2b8"
          },
          {
            "path": "src/documents/download.ts",
            "path_hash": "c288ec74708ab39fb6490b324f416da37a7cb815b4475fc0daa1bb10aa5a4a84"
          },
          {
            "path": "src/auth/reset-token.ts",
            "path_hash": "c5988e58cf73c0683ecb2cc7ac490c638e74dbbaf1b00926420d05ac42098145"
          },
          {
            "path": "src/auth/verify-token.ts",
            "path_hash": "58262b36a2a22c2f2fb7d87345e8ced65d3d00b6c2a0ab454437782c59b99205"
          },
          {
            "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/invoices.ts",
            "path_hash": "82a4c9a1ac78091e12845c9b08a9adb3a3af2984bf0235d751020be1d8bd5571"
          },
          {
            "path": "src/invoice-route.ts",
            "path_hash": "f22d8a41458ec0206a820d3a4f75d4f0e5b7689eab192d4e165eaabde27d4a75"
          },
          {
            "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/invoices/route.ts",
            "path_hash": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67"
          },
          {
            "path": "app/api/invoices/receipt/route.ts",
            "path_hash": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5"
          },
          {
            "path": "lib/database.ts",
            "path_hash": "9b43036be92111f03f203f4ac7985d565917eef3849431e3100117c8c79d0326"
          },
          {
            "path": "app/invoices/panel.tsx",
            "path_hash": "595853ae7208b1282e7e987bda17d82683158c852c8cdef80d7111f531b3ba97"
          },
          {
            "path": "app/invoices/page.tsx",
            "path_hash": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465"
          }
        ],
        "unknowns": 2,
        "policy_state": "bound"
      },
      "error_code": null
    },
    {
      "kind": "server_data",
      "status": "partial",
      "coverage": {
        "supplied_files": 23,
        "parsed_files": 23,
        "entrypoints": 1,
        "visited_files": 2,
        "steps": 51,
        "calls": 9,
        "client_bodies_analyzed": 0,
        "mode": "native_analysis",
        "engine_version": "teum-typescript-server-data-0.1",
        "files": [
          {
            "path": "src/users/user.repository.ts",
            "path_hash": "4d999ef4f90292f29994d233e95363e5d29968bb86b65d997f0eac0ded12a91e"
          },
          {
            "path": "src/auth/auth.module.ts",
            "path_hash": "d5cfad084289d1504e5322be173d5f5af9b85f4f90316b440e269218e18bc457"
          },
          {
            "path": "src/auth/session.config.ts",
            "path_hash": "c146567d4a2b1fd92539552644c6e5de3f73722af7741f3b9e6d93adfcc3b887"
          },
          {
            "path": "src/orders/order-view.ts",
            "path_hash": "d4f5c5fe74533129c76dcb6a3c9ee68c385897fab99772342cc24e7ef4781eaa"
          },
          {
            "path": "src/auth/redirect.ts",
            "path_hash": "133662cd8b51cddebeccd472f59f3f9b6ea577e8a11af3008474c20fcab1b2b8"
          },
          {
            "path": "src/documents/download.ts",
            "path_hash": "c288ec74708ab39fb6490b324f416da37a7cb815b4475fc0daa1bb10aa5a4a84"
          },
          {
            "path": "src/auth/reset-token.ts",
            "path_hash": "c5988e58cf73c0683ecb2cc7ac490c638e74dbbaf1b00926420d05ac42098145"
          },
          {
            "path": "src/auth/verify-token.ts",
            "path_hash": "58262b36a2a22c2f2fb7d87345e8ced65d3d00b6c2a0ab454437782c59b99205"
          },
          {
            "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/invoices.ts",
            "path_hash": "82a4c9a1ac78091e12845c9b08a9adb3a3af2984bf0235d751020be1d8bd5571"
          },
          {
            "path": "src/invoice-route.ts",
            "path_hash": "f22d8a41458ec0206a820d3a4f75d4f0e5b7689eab192d4e165eaabde27d4a75"
          },
          {
            "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/invoices/route.ts",
            "path_hash": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67"
          },
          {
            "path": "app/api/invoices/receipt/route.ts",
            "path_hash": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5"
          },
          {
            "path": "lib/database.ts",
            "path_hash": "9b43036be92111f03f203f4ac7985d565917eef3849431e3100117c8c79d0326"
          },
          {
            "path": "app/invoices/panel.tsx",
            "path_hash": "595853ae7208b1282e7e987bda17d82683158c852c8cdef80d7111f531b3ba97"
          },
          {
            "path": "app/invoices/page.tsx",
            "path_hash": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465"
          }
        ],
        "unknowns": 5,
        "policy_state": "not_configured"
      },
      "error_code": null
    },
    {
      "kind": "ai",
      "status": "completed",
      "coverage": {
        "mode": "repository_review",
        "available_files": 27,
        "excluded_files": 0,
        "provided_files": 11,
        "provided_lines": 61,
        "total_lines": 369,
        "supplied_bytes": 10008,
        "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": "82a4c9a1ac78091e12845c9b08a9adb3a3af2984bf0235d751020be1d8bd5571",
            "path": "src/invoices.ts",
            "lines": [
              1,
              2,
              3,
              4
            ]
          },
          {
            "path_hash": "f22d8a41458ec0206a820d3a4f75d4f0e5b7689eab192d4e165eaabde27d4a75",
            "path": "src/invoice-route.ts",
            "lines": [
              1,
              2,
              3,
              4,
              5,
              6,
              7,
              8
            ]
          },
          {
            "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
            ]
          },
          {
            "path_hash": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
            "path": "app/invoices/page.tsx",
            "lines": [
              6,
              7,
              8,
              9,
              10
            ]
          }
        ]
      },
      "error_code": null
    }
  ],
  "native_analysis": {
    "archive_sha256": "00c855b4325fb88eb58e525f81f4349d3f7e8df81f093df61a1820b4eee3ca5e",
    "input_sha256": "b4a41f2d541c89c35df70ca3462697621e8578ddb8849b2d14f75a6ca3ec2af8",
    "toolchain_sha256": "0a2d98c38b4beb858229562b36fea48702146c93729605f729d878c15de69f75",
    "validation_sha256": "d6b19c64c8894d3448810d18bbe8b4d37386800b8521eb8a396cb58c486d2a69",
    "files": [
      {
        "path": "src/users/user.repository.ts",
        "path_hash": "4d999ef4f90292f29994d233e95363e5d29968bb86b65d997f0eac0ded12a91e"
      },
      {
        "path": "src/auth/auth.module.ts",
        "path_hash": "d5cfad084289d1504e5322be173d5f5af9b85f4f90316b440e269218e18bc457"
      },
      {
        "path": "src/auth/session.config.ts",
        "path_hash": "c146567d4a2b1fd92539552644c6e5de3f73722af7741f3b9e6d93adfcc3b887"
      },
      {
        "path": "src/orders/order-view.ts",
        "path_hash": "d4f5c5fe74533129c76dcb6a3c9ee68c385897fab99772342cc24e7ef4781eaa"
      },
      {
        "path": "src/auth/redirect.ts",
        "path_hash": "133662cd8b51cddebeccd472f59f3f9b6ea577e8a11af3008474c20fcab1b2b8"
      },
      {
        "path": "src/documents/download.ts",
        "path_hash": "c288ec74708ab39fb6490b324f416da37a7cb815b4475fc0daa1bb10aa5a4a84"
      },
      {
        "path": "src/auth/reset-token.ts",
        "path_hash": "c5988e58cf73c0683ecb2cc7ac490c638e74dbbaf1b00926420d05ac42098145"
      },
      {
        "path": "src/auth/verify-token.ts",
        "path_hash": "58262b36a2a22c2f2fb7d87345e8ced65d3d00b6c2a0ab454437782c59b99205"
      },
      {
        "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/invoices.ts",
        "path_hash": "82a4c9a1ac78091e12845c9b08a9adb3a3af2984bf0235d751020be1d8bd5571"
      },
      {
        "path": "src/invoice-route.ts",
        "path_hash": "f22d8a41458ec0206a820d3a4f75d4f0e5b7689eab192d4e165eaabde27d4a75"
      },
      {
        "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/invoices/route.ts",
        "path_hash": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67"
      },
      {
        "path": "app/api/invoices/receipt/route.ts",
        "path_hash": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5"
      },
      {
        "path": "lib/database.ts",
        "path_hash": "9b43036be92111f03f203f4ac7985d565917eef3849431e3100117c8c79d0326"
      },
      {
        "path": "app/invoices/panel.tsx",
        "path_hash": "595853ae7208b1282e7e987bda17d82683158c852c8cdef80d7111f531b3ba97"
      },
      {
        "path": "app/invoices/page.tsx",
        "path_hash": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465"
      }
    ],
    "policy": {
      "state": "bound",
      "revision": 1,
      "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": 23,
          "parsed_files": 23,
          "entrypoints": 2,
          "visited_files": 2,
          "steps": 222,
          "calls": 2
        },
        "candidates": [],
        "relations": [],
        "unknowns": [
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 1,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 1,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
              "path": "app/invoices/page.tsx",
              "line": 2,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "9b43036be92111f03f203f4ac7985d565917eef3849431e3100117c8c79d0326",
              "path": "lib/database.ts",
              "line": 1,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "9b43036be92111f03f203f4ac7985d565917eef3849431e3100117c8c79d0326",
              "path": "lib/database.ts",
              "line": 2,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "d5cfad084289d1504e5322be173d5f5af9b85f4f90316b440e269218e18bc457",
              "path": "src/auth/auth.module.ts",
              "line": 1,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "58262b36a2a22c2f2fb7d87345e8ced65d3d00b6c2a0ab454437782c59b99205",
              "path": "src/auth/verify-token.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": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 3,
              "column": 191,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 3,
              "column": 191,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 3,
              "column": 16,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 3,
              "column": 16,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 4,
              "column": 28,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 4,
              "column": 28,
              "role": "evidence"
            }
          },
          {
            "reason": "exception_flow",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 4,
              "column": 22,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 5,
              "column": 16,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 6,
              "column": 7,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 6,
              "column": 36,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 6,
              "column": 62,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 6,
              "column": 62,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 7,
              "column": 14,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 7,
              "column": 14,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 10,
              "column": 19,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 10,
              "column": 19,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 11,
              "column": 26,
              "role": "evidence"
            }
          },
          {
            "reason": "exception_flow",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 11,
              "column": 20,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 12,
              "column": 7,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 12,
              "column": 30,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 12,
              "column": 30,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 13,
              "column": 16,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 14,
              "column": 21,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 14,
              "column": 21,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 15,
              "column": 7,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 15,
              "column": 25,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 15,
              "column": 41,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 15,
              "column": 41,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 16,
              "column": 10,
              "role": "evidence"
            }
          },
          {
            "reason": "exception_flow",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 2,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 3,
              "column": 191,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 3,
              "column": 191,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 3,
              "column": 16,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 3,
              "column": 16,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 4,
              "column": 28,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 4,
              "column": 28,
              "role": "evidence"
            }
          },
          {
            "reason": "exception_flow",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 4,
              "column": 22,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 5,
              "column": 16,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 6,
              "column": 7,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 6,
              "column": 36,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 6,
              "column": 62,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 6,
              "column": 62,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 7,
              "column": 14,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 7,
              "column": 14,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 10,
              "column": 19,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 10,
              "column": 19,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 11,
              "column": 26,
              "role": "evidence"
            }
          },
          {
            "reason": "exception_flow",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 11,
              "column": 20,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 12,
              "column": 7,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 12,
              "column": 30,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 12,
              "column": 30,
              "role": "evidence"
            }
          },
          {
            "reason": "unresolved_property",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 13,
              "column": 16,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 14,
              "column": 21,
              "role": "evidence"
            }
          },
          {
            "reason": "ambiguous_value",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 14,
              "column": 21,
              "role": "evidence"
            }
          },
          {
            "reason": "indirect_call",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 15,
              "column": 10,
              "role": "evidence"
            }
          },
          {
            "reason": "exception_flow",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 2,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "595853ae7208b1282e7e987bda17d82683158c852c8cdef80d7111f531b3ba97",
              "path": "app/invoices/panel.tsx",
              "line": 1,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "d5cfad084289d1504e5322be173d5f5af9b85f4f90316b440e269218e18bc457",
              "path": "src/auth/auth.module.ts",
              "line": 18,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "133662cd8b51cddebeccd472f59f3f9b6ea577e8a11af3008474c20fcab1b2b8",
              "path": "src/auth/redirect.ts",
              "line": 14,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "c5988e58cf73c0683ecb2cc7ac490c638e74dbbaf1b00926420d05ac42098145",
              "path": "src/auth/reset-token.ts",
              "line": 7,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "c146567d4a2b1fd92539552644c6e5de3f73722af7741f3b9e6d93adfcc3b887",
              "path": "src/auth/session.config.ts",
              "line": 9,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "58262b36a2a22c2f2fb7d87345e8ced65d3d00b6c2a0ab454437782c59b99205",
              "path": "src/auth/verify-token.ts",
              "line": 11,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "c288ec74708ab39fb6490b324f416da37a7cb815b4475fc0daa1bb10aa5a4a84",
              "path": "src/documents/download.ts",
              "line": 23,
              "column": 1,
              "role": "evidence"
            }
          },
          {
            "reason": "unsupported_module_effect",
            "location": {
              "file_id": "d4f5c5fe74533129c76dcb6a3c9ee68c385897fab99772342cc24e7ef4781eaa",
              "path": "src/orders/order-view.ts",
              "line": 81,
              "column": 1,
              "role": "evidence"
            }
          }
        ]
      },
      "authorization": {
        "engine_version": "teum-typescript-authorization-0.9",
        "status": "partial",
        "error_code": null,
        "coverage": {
          "supplied_files": 23,
          "parsed_files": 23,
          "entrypoints": 2,
          "visited_files": 23,
          "steps": 1308,
          "calls": 25
        },
        "candidates": [],
        "relations": [
          {
            "kind": "unknown",
            "operation": "read",
            "trace": [
              {
                "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
                "path": "app/api/invoices/receipt/route.ts",
                "line": 2,
                "column": 27,
                "role": "request"
              },
              {
                "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
                "path": "app/api/invoices/receipt/route.ts",
                "line": 4,
                "column": 22,
                "role": "verification"
              },
              {
                "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
                "path": "app/api/invoices/receipt/route.ts",
                "line": 3,
                "column": 16,
                "role": "auth_factory"
              },
              {
                "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
                "path": "app/api/invoices/receipt/route.ts",
                "line": 1,
                "column": 1,
                "role": "sdk_import"
              },
              {
                "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
                "path": "app/api/invoices/receipt/route.ts",
                "line": 5,
                "column": 16,
                "role": "actor"
              },
              {
                "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
                "path": "app/api/invoices/receipt/route.ts",
                "line": 6,
                "column": 3,
                "role": "authentication_exit"
              },
              {
                "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
                "path": "app/api/invoices/receipt/route.ts",
                "line": 8,
                "column": 26,
                "role": "request_url"
              },
              {
                "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
                "path": "app/api/invoices/receipt/route.ts",
                "line": 7,
                "column": 14,
                "role": "data_factory"
              },
              {
                "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
                "path": "app/api/invoices/receipt/route.ts",
                "line": 9,
                "column": 14,
                "role": "target"
              },
              {
                "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
                "path": "app/api/invoices/receipt/route.ts",
                "line": 11,
                "column": 20,
                "role": "query"
              },
              {
                "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
                "path": "app/api/invoices/receipt/route.ts",
                "line": 16,
                "column": 3,
                "role": "response"
              },
              {
                "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
                "path": "app/api/invoices/receipt/route.ts",
                "line": 13,
                "column": 16,
                "role": "row"
              }
            ],
            "response_states": [
              "owned"
            ]
          },
          {
            "kind": "unknown",
            "operation": "read",
            "trace": [
              {
                "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
                "path": "app/api/invoices/route.ts",
                "line": 2,
                "column": 27,
                "role": "request"
              },
              {
                "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
                "path": "app/api/invoices/route.ts",
                "line": 4,
                "column": 22,
                "role": "verification"
              },
              {
                "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
                "path": "app/api/invoices/route.ts",
                "line": 3,
                "column": 16,
                "role": "auth_factory"
              },
              {
                "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
                "path": "app/api/invoices/route.ts",
                "line": 1,
                "column": 1,
                "role": "sdk_import"
              },
              {
                "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
                "path": "app/api/invoices/route.ts",
                "line": 5,
                "column": 16,
                "role": "actor"
              },
              {
                "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
                "path": "app/api/invoices/route.ts",
                "line": 6,
                "column": 3,
                "role": "authentication_exit"
              },
              {
                "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
                "path": "app/api/invoices/route.ts",
                "line": 8,
                "column": 26,
                "role": "request_url"
              },
              {
                "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
                "path": "app/api/invoices/route.ts",
                "line": 7,
                "column": 14,
                "role": "data_factory"
              },
              {
                "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
                "path": "app/api/invoices/route.ts",
                "line": 9,
                "column": 14,
                "role": "target"
              },
              {
                "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
                "path": "app/api/invoices/route.ts",
                "line": 11,
                "column": 20,
                "role": "query"
              },
              {
                "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
                "path": "app/api/invoices/route.ts",
                "line": 15,
                "column": 3,
                "role": "response"
              },
              {
                "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
                "path": "app/api/invoices/route.ts",
                "line": 13,
                "column": 16,
                "role": "row"
              }
            ],
            "response_states": [
              "owned",
              "other"
            ]
          }
        ],
        "unknowns": [
          {
            "reason": "authorization_rls_unverified",
            "location": {
              "file_id": "aae24f2f3cf0af043816d7c002d23b62ea31d0bea87870b0a748f41dde1f0ea5",
              "path": "app/api/invoices/receipt/route.ts",
              "line": 7,
              "column": 14,
              "role": "evidence"
            }
          },
          {
            "reason": "authorization_rls_unverified",
            "location": {
              "file_id": "ad61410d75a55e3458f21418bb5f55e62e4b2583bf0c9137c3ab9dccdef16e67",
              "path": "app/api/invoices/route.ts",
              "line": 7,
              "column": 14,
              "role": "evidence"
            }
          }
        ]
      },
      "server_data": {
        "engine_version": "teum-typescript-server-data-0.1",
        "status": "partial",
        "error_code": null,
        "coverage": {
          "supplied_files": 23,
          "parsed_files": 23,
          "entrypoints": 1,
          "visited_files": 2,
          "steps": 51,
          "calls": 9,
          "client_bodies_analyzed": 0
        },
        "candidates": [],
        "relations": [],
        "unknowns": [
          {
            "reason": "server_data_call_unsupported",
            "location": {
              "file_id": "9b43036be92111f03f203f4ac7985d565917eef3849431e3100117c8c79d0326",
              "path": "lib/database.ts",
              "line": 4,
              "column": 23,
              "role": "unresolved"
            }
          },
          {
            "reason": "server_data_condition_unresolved",
            "location": {
              "file_id": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
              "path": "app/invoices/page.tsx",
              "line": 7,
              "column": 7,
              "role": "unresolved"
            }
          },
          {
            "reason": "server_data_client_body_not_analyzed",
            "location": {
              "file_id": "595853ae7208b1282e7e987bda17d82683158c852c8cdef80d7111f531b3ba97",
              "path": "app/invoices/panel.tsx",
              "line": 2,
              "column": 1,
              "role": "unresolved"
            }
          },
          {
            "reason": "server_data_policy_not_configured",
            "location": null
          },
          {
            "reason": "server_data_rls_unverified",
            "location": null
          }
        ],
        "policy_state": "not_configured",
        "rls_enforcement": "unverified",
        "field_sensitivity": "unclassified",
        "entries": [
          {
            "entry": {
              "file_id": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
              "path": "app/invoices/page.tsx",
              "line": 4,
              "column": 1,
              "role": "server_entry"
            },
            "authentications": [
              {
                "id": "d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35",
                "method": "getClaims",
                "factory": {
                  "file_id": "9b43036be92111f03f203f4ac7985d565917eef3849431e3100117c8c79d0326",
                  "path": "lib/database.ts",
                  "line": 5,
                  "column": 10,
                  "role": "sdk_factory"
                },
                "verification": {
                  "file_id": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
                  "path": "app/invoices/page.tsx",
                  "line": 6,
                  "column": 45,
                  "role": "auth_verification"
                }
              }
            ],
            "queries": [
              {
                "id": "4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a",
                "table": "invoices",
                "factory": {
                  "file_id": "9b43036be92111f03f203f4ac7985d565917eef3849431e3100117c8c79d0326",
                  "path": "lib/database.ts",
                  "line": 5,
                  "column": 10,
                  "role": "sdk_factory"
                },
                "selection": "all",
                "columns": [],
                "filters": [
                  {
                    "column": "owner_id",
                    "value_source": "getClaims_sub",
                    "authentication_id": "d4735e3a265e16eee03f59718b9b5d03019c07d8b6c51f90da3a666eec13ab35",
                    "presence_check": {
                      "file_id": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
                      "path": "app/invoices/page.tsx",
                      "line": 7,
                      "column": 17,
                      "role": "presence_check"
                    },
                    "location": {
                      "file_id": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
                      "path": "app/invoices/page.tsx",
                      "line": 8,
                      "column": 31,
                      "role": "filter"
                    }
                  }
                ],
                "single": true,
                "location": {
                  "file_id": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
                  "path": "app/invoices/page.tsx",
                  "line": 8,
                  "column": 25,
                  "role": "query"
                }
              }
            ],
            "handoffs": [
              {
                "prop": "record",
                "projection": "whole_record",
                "query_ids": [
                  "4b227777d4dd1fc61c6f884f48641d02b4d121d3fd328cb08b5531fcacdabf8a"
                ],
                "authentication_ids": [],
                "fields": [
                  "*"
                ],
                "mappings": [
                  {
                    "prop_path": "record",
                    "source_field": "*"
                  }
                ],
                "component": {
                  "file_id": "595853ae7208b1282e7e987bda17d82683158c852c8cdef80d7111f531b3ba97",
                  "path": "app/invoices/panel.tsx",
                  "line": 2,
                  "column": 1,
                  "role": "client_component"
                },
                "location": {
                  "file_id": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
                  "path": "app/invoices/page.tsx",
                  "line": 10,
                  "column": 17,
                  "role": "client_prop"
                },
                "presence_checks": [
                  {
                    "file_id": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
                    "path": "app/invoices/page.tsx",
                    "line": 7,
                    "column": 17,
                    "role": "presence_check"
                  }
                ]
              }
            ],
            "exits": [
              {
                "file_id": "9b43036be92111f03f203f4ac7985d565917eef3849431e3100117c8c79d0326",
                "path": "lib/database.ts",
                "line": 5,
                "column": 3,
                "role": "function_exit"
              },
              {
                "file_id": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
                "path": "app/invoices/page.tsx",
                "line": 7,
                "column": 25,
                "role": "function_exit"
              },
              {
                "file_id": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
                "path": "app/invoices/page.tsx",
                "line": 9,
                "column": 13,
                "role": "function_exit"
              },
              {
                "file_id": "237463960f1d92028073ba82bd7857e16da64c358d22e861bd22b886ed244465",
                "path": "app/invoices/page.tsx",
                "line": 10,
                "column": 3,
                "role": "function_exit"
              }
            ]
          }
        ]
      }
    }
  },
  "findings": [
    {
      "occurrence_id": "F-014",
      "rule_id": "teum.sql.dynamic-query",
      "engine": "semgrep",
      "severity": "medium",
      "path": "src/users/user.repository.ts",
      "start_line": 42,
      "end_line": 42,
      "masked_evidence": "  return dataSource.query(`SELECT id, email FROM users WHERE email = '${email}'`);",
      "ai_explanation": null,
      "review_criteria": "요청·저장 데이터가 SQL 문법, 셸, eval, 역직렬화에 도달하는가? 바인딩·고정 명령·안전한 파서가 이 경로를 끊는가?",
      "review_guidance": {
        "criteria": "외부 입력이 SQL 문장이나 테이블·열 이름에 합쳐지나요? 값은 매개변수로 바인딩하고 테이블·열 이름은 허용 목록으로 제한하나요?",
        "reason": "query·execute 계열 호출에서 문자열을 조합하는 패턴이에요.",
        "check": "조합한 값에 요청·파일·DB 등 외부 입력이 도달하는지, 앞에서 검증하는지 확인하세요.",
        "direction": "값은 드라이버의 매개변수로 전달하세요. 테이블·열 이름은 별도 허용 목록으로 제한하고 기존 반환값을 확인하세요."
      },
      "workflow_state": "open"
    },
    {
      "occurrence_id": "F-013",
      "rule_id": "teum.auth.jwt-hardcoded-key",
      "engine": "semgrep",
      "severity": "medium",
      "path": "src/auth/auth.module.ts",
      "start_line": 18,
      "end_line": 18,
      "masked_evidence": "jwt.sign({ sub: user.id }, '[REDACTED]', { expiresIn: '15m' });",
      "ai_explanation": null,
      "review_criteria": "비밀정보가 브라우저·로그·코드에 노출되는가? 토큰의 서명·대상·만료와 TLS 검증을 유지하는가? 가린 값의 유효성을 추측하지 않았는가?",
      "review_guidance": {
        "criteria": "고정 문자열이 운영 JWT 서명 키이며 저장소나 배포 산출물에 노출됐나요? 노출된 키를 폐기·교체하고 새 키의 보관 위치와 기존 토큰 처리 방식을 확인했나요?",
        "reason": "JWT 서명 키에 고정 문자열을 사용한 패턴이에요.",
        "check": "테스트 예제인지 운영 키인지, 저장소나 배포 산출물에 키가 노출됐는지 확인하세요.",
        "direction": "운영 키는 비밀정보 저장소로 옮기세요. 노출된 키는 코드에서 지우는 것과 별개로 폐기·교체해야 해요."
      },
      "workflow_state": "fixing"
    },
    {
      "occurrence_id": "F-009",
      "rule_id": "teum.web.cookie-secure-false",
      "engine": "semgrep",
      "severity": "low",
      "path": "src/auth/session.config.ts",
      "start_line": 9,
      "end_line": 13,
      "masked_evidence": "res.cookie('session', sessionId, {\n  httpOnly: true,\n  secure: false,\n  sameSite: 'lax',\n});",
      "ai_explanation": null,
      "review_criteria": "외부 HTML, 상태 변경 요청, 쿠키, CORS, 리다이렉트에 실제 입력 경로가 있는가? 용도와 허용 출처·정화 방식을 확인했는가?",
      "review_guidance": {
        "reason": "Express cookie·Next.js cookies.set 호출에 secure: false를 명시한 패턴이에요.",
        "check": "운영 인증 쿠키인지, HTTPS 환경에서도 같은 설정이 적용되는지 확인하세요.",
        "direction": "운영 인증 쿠키는 HTTPS와 Secure 설정을 함께 사용하고, 프록시·로그인 흐름에서 전달되는지 확인하세요.",
        "criteria": "secure: false가 운영 인증 쿠키에도 적용되나요? Secure를 켠 뒤 HTTPS·프록시 환경에서 로그인과 쿠키 전달이 정상 동작하나요?"
      },
      "workflow_state": "reviewing"
    },
    {
      "occurrence_id": "F-006",
      "rule_id": "teum.web.dynamic-html",
      "engine": "semgrep",
      "severity": "medium",
      "path": "src/orders/order-view.ts",
      "start_line": 81,
      "end_line": 81,
      "masked_evidence": "orderSummary.innerHTML = order.note;",
      "ai_explanation": null,
      "review_criteria": "외부 HTML, 상태 변경 요청, 쿠키, CORS, 리다이렉트에 실제 입력 경로가 있는가? 용도와 허용 출처·정화 방식을 확인했는가?",
      "review_guidance": {
        "reason": "innerHTML·outerHTML·HTML 삽입 API와 React의 __html 객체에 동적인 값을 사용하는 패턴이에요.",
        "check": "요청·저장 데이터 등 신뢰하지 않는 HTML이 들어오는지와 정화 처리의 적용 위치를 확인하세요.",
        "direction": "일반 텍스트는 텍스트 렌더링을 사용하세요. HTML이 꼭 필요하면 검증된 정화 도구의 허용 목록을 적용하세요.",
        "criteria": "신뢰하지 않는 요청·저장 데이터가 HTML 삽입 지점까지 도달하나요? 텍스트 렌더링이나 정화 처리가 삽입 전에 적용되고 필요한 화면 동작을 유지하나요?"
      },
      "workflow_state": "open"
    },
    {
      "occurrence_id": "F-015",
      "rule_id": "teum-secret-assignment",
      "engine": "gitleaks",
      "severity": "high",
      "path": "config/service.yaml",
      "start_line": 12,
      "end_line": 12,
      "masked_evidence": "[SECRET LINE REDACTED]",
      "ai_explanation": null,
      "review_criteria": "비밀정보가 브라우저·로그·코드에 노출되는가? 토큰의 서명·대상·만료와 TLS 검증을 유지하는가? 가린 값의 유효성을 추측하지 않았는가?",
      "review_guidance": {
        "criteria": "탐지된 문자열이 예제가 아닌 실제 운영 비밀정보인가요? 실제 노출된 값은 발급처에서 폐기·교체하고 커밋 이력과 접근 기록을 확인했나요?",
        "reason": "키·토큰·비밀번호 이름에 긴 문자열을 할당하는 패턴이에요. 실제 유효한 비밀정보인지는 확인하지 않았어요.",
        "check": "원본 파일에서 운영 값인지 예제인지 확인하세요. 원문 비밀정보를 리포트나 채팅에 붙여 넣지 마세요.",
        "direction": "실제 노출된 값이면 발급처에서 폐기·교체하고 비밀정보 저장소로 옮기세요. 커밋 이력과 접근 기록도 확인하세요."
      },
      "workflow_state": "open"
    },
    {
      "occurrence_id": "F-016",
      "rule_id": "teum.python.tls-verification-disabled",
      "engine": "semgrep",
      "severity": "medium",
      "path": "workers/notify.py",
      "start_line": 21,
      "end_line": 21,
      "masked_evidence": "requests.get(endpoint, verify=False)",
      "ai_explanation": null,
      "review_criteria": "비밀정보가 브라우저·로그·코드에 노출되는가? 토큰의 서명·대상·만료와 TLS 검증을 유지하는가? 가린 값의 유효성을 추측하지 않았는가?",
      "review_guidance": {
        "reason": "requests·HTTPX의 verify=False 또는 지원 aiohttp 커넥터·세션의 ssl=False를 지정한 패턴이에요.",
        "check": "실제 운영 클라이언트 연결에 적용되는지와 사설 CA·인증서 체인 문제를 확인하세요. 모든 옵션 변수·사용자 클라이언트 래퍼를 추적하지 않아요.",
        "direction": "인증서 검증을 켜고 필요한 CA·SSL 문맥을 지정하세요. 경고를 숨기는 것으로 검증을 대신하지 마세요.",
        "criteria": "이 설정이 운영 연결의 서버 인증서 검증을 끄나요? 필요한 CA를 적용해 잘못된 인증서는 거부하고 정상 연결은 유지하나요?"
      },
      "workflow_state": "reviewing"
    },
    {
      "occurrence_id": "F-017",
      "rule_id": "osv:GHSA-gc5v-m9x4-r6x2",
      "engine": "osv",
      "severity": "medium",
      "path": "requirements.txt",
      "start_line": 2,
      "end_line": 2,
      "masked_evidence": "PyPI · requests\n고정 버전: 2.19.1\n공개 취약점: GHSA-gc5v-m9x4-r6x2\n설치 여부·실행 경로·공격 가능성은 검증하지 않았습니다.",
      "ai_explanation": null,
      "review_criteria": null,
      "review_guidance": {
        "reason": "의존성 파일에 기록된 패키지 이름·버전이 OSV의 알려진 취약점과 일치해요. 실제 설치·배포 여부나 취약한 기능의 사용까지 확인한 것은 아니에요.",
        "check": "이 패키지가 실제 서비스에 포함되는지, OSV 원문에 기재된 영향 조건에 해당하는지 먼저 확인하세요.",
        "direction": "OSV 원문에서 현재 버전 계열의 영향 조건과 수정 버전을 확인하세요. 영향을 받지 않는 지원 버전으로 패키지와 잠금 파일을 갱신한 뒤, 호환성 테스트와 재점검을 진행하세요.",
        "criteria": "실제 배포에 포함되며, 취약점의 영향 조건에 해당하나요? 패키지·잠금 파일 갱신 후 호환성 테스트와 재점검을 마쳤나요?"
      },
      "workflow_state": "fixing"
    },
    {
      "occurrence_id": "F-018",
      "rule_id": "teum.web.request-redirect",
      "engine": "semgrep",
      "severity": "medium",
      "path": "src/auth/redirect.ts",
      "start_line": 14,
      "end_line": 14,
      "masked_evidence": "res.redirect(req.query.next);",
      "ai_explanation": null,
      "review_criteria": "외부 HTML, 상태 변경 요청, 쿠키, CORS, 리다이렉트에 실제 입력 경로가 있는가? 용도와 허용 출처·정화 방식을 확인했는가?",
      "review_guidance": {
        "reason": "요청 입력이 같은 함수 안에서 Express·Web Response·Next.js 리다이렉트 목적지로 이어지는 패턴이에요.",
        "check": "외부 URL이나 //로 시작하는 주소가 들어갈 수 있는지, 앞에서 검증하는지 확인하세요.",
        "direction": "목적지는 허용한 내부 경로나 고정된 origin으로 제한하고, URL을 해석한 결과를 검증하세요.",
        "criteria": "요청 값으로 외부 URL이나 //로 시작하는 목적지를 지정할 수 있나요? URL 해석 후 허용한 내부 경로나 origin으로만 이동하도록 제한하나요?"
      },
      "workflow_state": "open"
    },
    {
      "occurrence_id": "F-019",
      "rule_id": "teum.path.request-sendfile",
      "engine": "semgrep",
      "severity": "medium",
      "path": "src/documents/download.ts",
      "start_line": 23,
      "end_line": 23,
      "masked_evidence": "res.sendFile(req.params.filename);",
      "ai_explanation": null,
      "review_criteria": "외부 값이 파일 경로·fetch 목적지를 결정하는가? 정규화 후 루트 경계, DNS·리다이렉트, 크기·형식·압축 해제 제한이 유지되는가?",
      "review_guidance": {
        "reason": "요청 입력이 같은 함수 안에서 sendFile의 경로로 이어지는 패턴이에요.",
        "check": "상위 경로 이동·인코딩·심볼릭 링크로 허용한 디렉터리를 벗어날 수 있는지 확인하세요.",
        "direction": "사용자에게 경로를 직접 받기보다 허용된 파일 ID를 매핑하세요. 최종 경로와 파일 접근 권한도 검증하세요.",
        "criteria": "요청 경로가 상위 경로 이동·인코딩·심볼릭 링크를 통해 허용 디렉터리를 벗어날 수 있나요? 최종 파일 경로와 요청자의 접근 권한을 함께 검사하나요?"
      },
      "workflow_state": "reviewing"
    },
    {
      "occurrence_id": "F-020",
      "rule_id": "teum.auth.predictable-token",
      "engine": "semgrep",
      "severity": "low",
      "path": "src/auth/reset-token.ts",
      "start_line": 7,
      "end_line": 7,
      "masked_evidence": "const resetToken = Math.random().toString(36).slice(2);",
      "ai_explanation": null,
      "review_criteria": "비밀정보가 브라우저·로그·코드에 노출되는가? 토큰의 서명·대상·만료와 TLS 검증을 유지하는가? 가린 값의 유효성을 추측하지 않았는가?",
      "review_guidance": {
        "reason": "Math.random 결과가 token·password·secret·nonce 등 명시한 이름의 변수로 이어진 후보예요. 변수 이름을 이용한 제한적 검사예요.",
        "check": "이 값이 인증·재설정·CSRF·세션에 쓰이는지 확인하세요. 게임·표시용 난수의 모든 사용을 위험으로 판단하지 않아요.",
        "direction": "인증 값은 crypto.randomBytes·randomUUID 또는 적절한 Web Crypto 보안 난수로 만들고 충분한 길이와 만료를 적용하세요.",
        "criteria": "일반 난수로 만든 값이 인증이나 접근 권한의 근거가 되나요? 적절한 보안 난수·길이·만료로 바꾸고 정상 인증을 확인했나요?"
      },
      "workflow_state": "open"
    },
    {
      "occurrence_id": "F-021",
      "rule_id": "teum.auth.jwt-none-algorithm",
      "engine": "semgrep",
      "severity": "medium",
      "path": "src/auth/verify-token.ts",
      "start_line": 11,
      "end_line": 11,
      "masked_evidence": "jwt.verify(token, verificationKey, { algorithms: ['HS256', 'none'] });",
      "ai_explanation": null,
      "review_criteria": "비밀정보가 브라우저·로그·코드에 노출되는가? 토큰의 서명·대상·만료와 TLS 검증을 유지하는가? 가린 값의 유효성을 추측하지 않았는가?",
      "review_guidance": {
        "criteria": "외부에서 받은 서명 없는 JWT가 인증 경로에 들어올 수 있나요? 허용 알고리즘을 제한한 뒤 서명 없는 토큰은 거부하고 정상 토큰은 처리하나요?",
        "reason": "JWT 검증에서 허용 알고리즘에 none이 포함된 패턴이에요.",
        "check": "외부 토큰을 받는 경로인지, 서명 검증 없이 인증이 성립할 수 있는지 확인하세요.",
        "direction": "서비스가 사용하는 서명 알고리즘만 명시적으로 허용하고, 키·발급자·대상·만료 검증을 함께 확인하세요."
      },
      "workflow_state": "fixing"
    },
    {
      "occurrence_id": "F-022",
      "rule_id": "teum.python.unsafe-yaml",
      "engine": "semgrep",
      "severity": "medium",
      "path": "workers/import_config.py",
      "start_line": 16,
      "end_line": 16,
      "masked_evidence": "yaml.load(payload, Loader=yaml.UnsafeLoader)",
      "ai_explanation": null,
      "review_criteria": "요청·저장 데이터가 SQL 문법, 셸, eval, 역직렬화에 도달하는가? 바인딩·고정 명령·안전한 파서가 이 경로를 끊는가?",
      "review_guidance": {
        "reason": "안전하지 않은 Python·C 기반 Loader 또는 unsafe_load 계열, Loader가 없는 지원 YAML 호출을 사용하는 패턴이에요.",
        "check": "외부 YAML인지와 실제 PyYAML 버전·사용자 정의 태그의 필요성을 확인하세요. FullLoader와 SafeLoader를 같은 위험 로더로 취급하지 않아요.",
        "direction": "일반 데이터에는 safe_load·safe_load_all이나 SafeLoader·CSafeLoader를 사용하고 크기와 스키마도 검증하세요.",
        "criteria": "외부 YAML을 위험한 객체 로더로 읽거나 버전에 의존하는 기본 로더를 사용하나요? 안전한 로더와 스키마 검증으로 바꾼 뒤 필요한 자료가 정상적으로 읽히나요?"
      },
      "workflow_state": "open"
    }
  ],
  "comparison": [],
  "limitations": "국소 JS·TS·Python 규칙·비밀정보 패턴과, 점검 범위에 기록된 의존성 취약점 대조 결과입니다. 미지원·미점검 영역과 실행 검증을 포함한 전체 안전을 보증하지 않습니다.",
  "sample": true
}