Skip to content

A self-hosted UPI & COD payment gateway with zero per-transaction platform fees, universal JavaScript checkout integration, dynamic QR payments, WhatsApp OTP authentication, and automated payment verification.

JavaScript

fix(ci): close the CodeQL, Android and labeler coverage gaps

rishabh364638075f4a
diff --git a/.github/workflows/android-build.yml b/.github/workflows/android-build.yml
index f8ebcbe..1793b07 100644
--- a/.github/workflows/android-build.yml
+++ b/.github/workflows/android-build.yml
@@ -36,7 +36,7 @@ jobs:
uses: actions/setup-java@b843ebf9b913146b38da2eaa7aeddf76074ae1ad # v6.1.0
with:
distribution: 'temurin'
- java-version: '17'
+ java-version: '17.0.13'
- name: Set up Node.js 24
uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7
@@ -50,7 +50,20 @@ jobs:
- name: Compile Certified Android APK
run: npm run build:android:apk
+ - name: Verify APK Checksum
+ # Verifies that the APK and the .sha256 file uploaded together describe the same
+ # bytes, so a corrupted or mismatched artifact pair cannot be published. It is not
+ # an attestation against the checksum committed to the repository: the build signs
+ # with a throwaway key, so the produced APK differs on every run.
+ run: |
+ set -euo pipefail
+ cd apps/android-observer-app
+ sha256sum -c youpi-sms-gateway.apk.sha256
+
- name: Verify Android Observer Tests
+ env:
+ NODE_ENV: test
+ YOUPI_MODE: localhost
run: node --test apps/android-observer-app/__tests__/android-observer.test.js
- name: Upload Android APK & Checksum Artifacts
@@ -61,3 +74,4 @@ jobs:
apps/android-observer-app/youpi-sms-gateway.apk
apps/android-observer-app/youpi-sms-gateway.apk.sha256
if-no-files-found: error
+ retention-days: 14
diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml
index 3d8b938..32d5fbc 100644
--- a/.github/workflows/codeql.yml
+++ b/.github/workflows/codeql.yml
@@ -7,6 +7,7 @@ on:
paths:
- 'apps/**'
- 'packages/**'
+ - 'scripts/**'
- '.github/workflows/codeql.yml'
pull_request:
branches:
@@ -14,6 +15,7 @@ on:
paths:
- 'apps/**'
- 'packages/**'
+ - 'scripts/**'
- '.github/workflows/codeql.yml'
schedule:
- cron: '0 4 * * 1'
@@ -37,6 +39,9 @@ jobs:
include:
- language: javascript-typescript
build-mode: none
+ # The Android observer is Java; without this it was never analysed.
+ - language: java-kotlin
+ build-mode: none
steps:
- name: Checkout Repository
@@ -49,6 +54,9 @@ jobs:
build-mode: ${{ matrix.build-mode }}
- name: Perform CodeQL Analysis
+ # A pull request from a fork runs with a read-only token, so the SARIF upload
+ # cannot succeed. Skip it there rather than failing the job.
+ if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository
uses: github/codeql-action/analyze@9b3254085494b55a0f7c4c2b3d2d52cc712ce370 # v4.39.1
with:
category: "/language:${{ matrix.language }}"
diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml
index c60f047..625c247 100644
--- a/.github/workflows/labeler.yml
+++ b/.github/workflows/labeler.yml
@@ -10,6 +10,10 @@ on:
permissions:
contents: read
pull-requests: write
+ # actions/labeler needs issues: write to CREATE a label that does not exist yet.
+ # Without it the job fails on every pull request, because the `area: *` labels
+ # below are not part of the repository's default label set.
+ issues: write
jobs:
label: