From 781e72e97abe4bb937604533b681a5fcc3fe961c Mon Sep 17 00:00:00 2001 From: mahmoud karzoun <135722882+mkarson1997@users.noreply.github.com> Date: Fri, 4 Sep 2026 17:34:39 +0300 Subject: [PATCH] chore: harden GitHub collaboration and security automation --- .github/CODEOWNERS | 6 ++++++ .github/PULL_REQUEST_TEMPLATE.md | 20 ++++++++++++++++++++ .github/dependabot.yml | 16 ++++++++++++++++ .github/workflows/codeql.yml | 30 ++++++++++++++++++++++++++++++ 4 files changed, 72 insertions(+) create mode 100644 .github/CODEOWNERS create mode 100644 .github/PULL_REQUEST_TEMPLATE.md create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/codeql.yml diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..b569403 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,6 @@ +* @mkarson1997 + +/.github/ @mkarson1997 +/src/ @mkarson1997 +/migrations/ @mkarson1997 +/tests/ @mkarson1997 diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md new file mode 100644 index 0000000..b7d890f --- /dev/null +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -0,0 +1,20 @@ +## Summary + +Describe the workflow-runtime change and why it is needed. + +## Reliability impact + +- [ ] Retry / lease / idempotency behavior was considered where relevant. +- [ ] Database and migration compatibility was considered where relevant. +- [ ] Observability or failure-mode impact was considered where relevant. + +## Validation + +- [ ] `npm run typecheck` +- [ ] `npm test` +- [ ] `npm run build` +- [ ] No credentials, tokens, production data, or connection strings were committed. + +## Notes + +Add migration notes, operational trade-offs, benchmark evidence, or follow-up work when useful. diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..47e7605 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,16 @@ +version: 2 +updates: + - package-ecosystem: npm + directory: / + schedule: + interval: weekly + open-pull-requests-limit: 5 + groups: + npm-development-dependencies: + dependency-type: development + + - package-ecosystem: github-actions + directory: / + schedule: + interval: weekly + open-pull-requests-limit: 5 diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..e34a0aa --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,30 @@ +name: CodeQL + +on: + push: + branches: [main] + pull_request: + branches: [main] + schedule: + - cron: "21 4 * * 3" + +permissions: + contents: read + security-events: write + +jobs: + analyze: + name: Analyze JavaScript/TypeScript + runs-on: ubuntu-latest + timeout-minutes: 15 + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Initialize CodeQL + uses: github/codeql-action/init@v3 + with: + languages: javascript-typescript + + - name: Perform CodeQL analysis + uses: github/codeql-action/analyze@v3