From 608b04ddc9d35ad3ebcefa2e6fa2d3a6f5d15b73 Mon Sep 17 00:00:00 2001 From: Isira Hansaja Date: Mon, 2 Feb 2026 18:28:47 +0530 Subject: [PATCH 1/2] Update CodeQL workflow for Java 21 analysis --- .github/workflows/codeql.yml | 57 ++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 .github/workflows/codeql.yml diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 0000000..b40d801 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,57 @@ +name: "CodeQL" + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + schedule: + - cron: "33 19 * * 4" + +jobs: + analyze: + name: Analyze (Java 21) + runs-on: ubuntu-latest + + permissions: + security-events: write + actions: read + contents: read + packages: read + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + distribution: temurin + java-version: "21" + cache: maven + + - name: Initialize CodeQL + uses: github/codeql-action/init@v4 + with: + languages: java-kotlin + build-mode: manual + queries: security-extended,security-and-quality + + # Maven (Spring Initializr usually uses Maven) + - name: Build with Maven + if: hashFiles('pom.xml') != '' + run: | + chmod +x mvnw || true + ./mvnw -B -DskipTests clean package || mvn -B -DskipTests clean package + + # Gradle (only runs if Gradle files exist) + - name: Build with Gradle + if: hashFiles('build.gradle', 'build.gradle.kts') != '' + run: | + chmod +x gradlew || true + ./gradlew build -x test + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v4 + with: + category: "/language:java-kotlin" From 9f0f05cbe4e6753c4202ebe35f556bf53a27e242 Mon Sep 17 00:00:00 2001 From: Isira Hansaja Date: Mon, 2 Feb 2026 18:34:41 +0530 Subject: [PATCH 2/2] Add Dependabot configuration for dependency updates Configure Dependabot for Maven and GitHub Actions updates with specific schedules and ignore rules. --- .github/dependabot.yml | 55 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/dependabot.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..e1021dc --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,55 @@ +version: 2 + +updates: + # Maven / Spring Boot dependencies + - package-ecosystem: "maven" + directory: "/" + schedule: + interval: "weekly" + day: "sunday" + time: "09:00" + open-pull-requests-limit: 10 + rebase-strategy: "auto" + + # Group updates to reduce noise in dev + groups: + spring: + patterns: + - "org.springframework*" + - "org.springframework.boot*" + testing: + patterns: + - "org.junit*" + - "org.mockito*" + - "org.assertj*" + - "org.testcontainers*" + build-plugins: + patterns: + - "org.apache.maven.plugins*" + - "io.spring.javaformat*" + - "com.diffplug.spotless*" + - "org.sonarsource.scanner.maven*" + misc: + patterns: + - "*" + + # Avoid risky breaking changes automatically (you upgrade these intentionally) + ignore: + - dependency-name: "org.springframework.boot" + update-types: ["version-update:semver-major"] + - dependency-name: "org.springframework" + update-types: ["version-update:semver-major"] + - dependency-name: "org.springframework.security" + update-types: ["version-update:semver-major"] + - dependency-name: "org.hibernate.orm" + update-types: ["version-update:semver-major"] + + # GitHub Actions used in workflows + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + day: "sunday" + time: "09:00" + open-pull-requests-limit: 5 + rebase-strategy: "auto"