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" 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"