diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..bf6225a --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,25 @@ +# .github/workflows/sql-review.yml +name: SQL Review + +on: + pull_request: + paths: + - 'dev/*.sql' + - 'prod/*.sql' + +jobs: + review-sql: + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v3 + + - name: Check SQL for DROP statements + run: | + echo "🔍 Checking SQL files..." + if grep -i 'drop' $(find dev/ prod/ -name '*.sql'); then + echo "🚫 DROP statement found!" + exit 1 + else + echo "✅ No DROP statement found." + fi diff --git a/.github/workflows/sql-review.yml b/.github/workflows/sql-review.yml index 59c0fbf..af2ec22 100644 --- a/.github/workflows/sql-review.yml +++ b/.github/workflows/sql-review.yml @@ -14,10 +14,10 @@ jobs: runs-on: ubuntu-latest # use self-hosted machines if your Bytebase runs in internal networks. env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # set GITHUB_TOKEN because the 'Check release' step needs it to comment the pull request with check results. - BYTEBASE_URL: https://demo.bytebase.com - BYTEBASE_SERVICE_ACCOUNT: ci@service.bytebase.com + BYTEBASE_URL: https://3afb-113-190-242-52.ngrok-free.app + BYTEBASE_SERVICE_ACCOUNT: api-example@service.bytebase.com BYTEBASE_PROJECT: "projects/project-sample" - BYTEBASE_TARGETS: "instances/test-sample-instance/databases/hr_test" + BYTEBASE_TARGETS: "instances/test-sample-instance/databases/hr_test,instances/prod-sample-instance/databases/hr_prod" FILE_PATTERN: "migrations/*.sql" steps: - name: Checkout diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 0000000..034e848 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,21 @@ +# Security Policy + +## Supported Versions + +Use this section to tell people about which versions of your project are +currently being supported with security updates. + +| Version | Supported | +| ------- | ------------------ | +| 5.1.x | :white_check_mark: | +| 5.0.x | :x: | +| 4.0.x | :white_check_mark: | +| < 4.0 | :x: | + +## Reporting a Vulnerability + +Use this section to tell people how to report a vulnerability. + +Tell them where to go, how often they can expect to get an update on a +reported vulnerability, what to expect if the vulnerability is accepted or +declined, etc.