{
  "$schema": "https://json.schemastore.org/sarif-2.1.0.json",
  "version": "2.1.0",
  "runs": [
    {
      "tool": {
        "driver": {
          "name": "API Migration Guard",
          "informationUri": "https://apimigrationguard.com/methodology",
          "rules": [
            {
              "id": "AMZ-ORD-OPERATION-001",
              "name": "Deprecated Orders v0 operation",
              "shortDescription": {
                "text": "Orders v0 operation must migrate before March 27 2027."
              },
              "helpUri": "https://apimigrationguard.com/orders-api-v2026-migration"
            },
            {
              "id": "AMZ-SET-XML-001",
              "name": "Settlement XML report removed",
              "shortDescription": {
                "text": "XML settlement report has no XML replacement."
              },
              "helpUri": "https://apimigrationguard.com/settlement-xml-no-replacement"
            },
            {
              "id": "AMZ-FIN-PAGINATION-001",
              "name": "Unsafe Finances nextToken handling",
              "shortDescription": {
                "text": "listTransactions token requests must preserve original arguments."
              },
              "helpUri": "https://apimigrationguard.com/finances-pagination-nexttoken"
            }
          ]
        }
      },
      "results": [
        {
          "ruleId": "AMZ-ORD-OPERATION-001",
          "level": "error",
          "message": {
            "text": "getOrders usage requires Orders v2026 migration and paginationToken validation."
          },
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "src/orders/client.ts"
                },
                "region": {
                  "startLine": 42,
                  "snippet": {
                    "text": "orders.getOrders({ MarketplaceIds, NextToken })"
                  }
                }
              }
            }
          ]
        },
        {
          "ruleId": "AMZ-SET-XML-001",
          "level": "error",
          "message": {
            "text": "Settlement XML report has no XML replacement; rebuild on Flat File V2."
          },
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "src/settlement/report-types.ts"
                },
                "region": {
                  "startLine": 18,
                  "snippet": {
                    "text": "GET_V2_SETTLEMENT_REPORT_DATA_XML"
                  }
                }
              }
            }
          ]
        },
        {
          "ruleId": "AMZ-FIN-PAGINATION-001",
          "level": "warning",
          "message": {
            "text": "Pagination loop stops on empty transactions before checking nextToken."
          },
          "locations": [
            {
              "physicalLocation": {
                "artifactLocation": {
                  "uri": "src/finances/list-transactions.ts"
                },
                "region": {
                  "startLine": 77,
                  "snippet": {
                    "text": "if (page.transactions.length === 0) return"
                  }
                }
              }
            }
          ]
        }
      ]
    }
  ]
}
