diff --git a/.github/copilot-instructions.md b/.github/copilot-instructions.md new file mode 100644 index 0000000..7e9acef --- /dev/null +++ b/.github/copilot-instructions.md @@ -0,0 +1,42 @@ +# Omise Python SDK — Security & Code Review Instructions + +## Code Review Checklist + +When reviewing PRs or commits, Copilot should automatically flag: + +### 1. Non-Production Omise Hosts (CRITICAL) + +Flag any committed code containing Omise domains that do NOT match the official +production domain pattern `*.omise.co`. This includes: + +- Omise domains with any prefix other than `api`, `vault`, or other official production services +- Any `localhost` or `internal` patterns referencing Omise +- Any non-production environment hosts + +## Critical Files Requiring Strict Review + +These files contain Omise endpoint/host constants and require additional scrutiny: + +### `omise/__init__.py` — CRITICAL SECURITY FILE + +This file defines the base URLs used throughout the Omise Python SDK for API +and vault calls. It contains the production endpoint constants. + +**Changes to Block (Red Flag):** + +- Any change introducing a non omise.co domain for production endpoints +- Hardcoding non-production Omise URLs in production code paths (regex: `https?://[a-zA-Z0-9.-]*omise[a-zA-Z0-9.-]*(?