Skip to content

Commit cadc5c4

Browse files
authored
Merge pull request #16 from arosha-w/iSiRaH-patch-1
Update CodeQL workflow for Java 21 analysis
2 parents b413aad + 9f0f05c commit cadc5c4

2 files changed

Lines changed: 112 additions & 0 deletions

File tree

.github/dependabot.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
version: 2
2+
3+
updates:
4+
# Maven / Spring Boot dependencies
5+
- package-ecosystem: "maven"
6+
directory: "/"
7+
schedule:
8+
interval: "weekly"
9+
day: "sunday"
10+
time: "09:00"
11+
open-pull-requests-limit: 10
12+
rebase-strategy: "auto"
13+
14+
# Group updates to reduce noise in dev
15+
groups:
16+
spring:
17+
patterns:
18+
- "org.springframework*"
19+
- "org.springframework.boot*"
20+
testing:
21+
patterns:
22+
- "org.junit*"
23+
- "org.mockito*"
24+
- "org.assertj*"
25+
- "org.testcontainers*"
26+
build-plugins:
27+
patterns:
28+
- "org.apache.maven.plugins*"
29+
- "io.spring.javaformat*"
30+
- "com.diffplug.spotless*"
31+
- "org.sonarsource.scanner.maven*"
32+
misc:
33+
patterns:
34+
- "*"
35+
36+
# Avoid risky breaking changes automatically (you upgrade these intentionally)
37+
ignore:
38+
- dependency-name: "org.springframework.boot"
39+
update-types: ["version-update:semver-major"]
40+
- dependency-name: "org.springframework"
41+
update-types: ["version-update:semver-major"]
42+
- dependency-name: "org.springframework.security"
43+
update-types: ["version-update:semver-major"]
44+
- dependency-name: "org.hibernate.orm"
45+
update-types: ["version-update:semver-major"]
46+
47+
# GitHub Actions used in workflows
48+
- package-ecosystem: "github-actions"
49+
directory: "/"
50+
schedule:
51+
interval: "weekly"
52+
day: "sunday"
53+
time: "09:00"
54+
open-pull-requests-limit: 5
55+
rebase-strategy: "auto"

.github/workflows/codeql.yml

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
name: "CodeQL"
2+
3+
on:
4+
push:
5+
branches: [ "main" ]
6+
pull_request:
7+
branches: [ "main" ]
8+
schedule:
9+
- cron: "33 19 * * 4"
10+
11+
jobs:
12+
analyze:
13+
name: Analyze (Java 21)
14+
runs-on: ubuntu-latest
15+
16+
permissions:
17+
security-events: write
18+
actions: read
19+
contents: read
20+
packages: read
21+
22+
steps:
23+
- name: Checkout repository
24+
uses: actions/checkout@v4
25+
26+
- name: Set up JDK 21
27+
uses: actions/setup-java@v4
28+
with:
29+
distribution: temurin
30+
java-version: "21"
31+
cache: maven
32+
33+
- name: Initialize CodeQL
34+
uses: github/codeql-action/init@v4
35+
with:
36+
languages: java-kotlin
37+
build-mode: manual
38+
queries: security-extended,security-and-quality
39+
40+
# Maven (Spring Initializr usually uses Maven)
41+
- name: Build with Maven
42+
if: hashFiles('pom.xml') != ''
43+
run: |
44+
chmod +x mvnw || true
45+
./mvnw -B -DskipTests clean package || mvn -B -DskipTests clean package
46+
47+
# Gradle (only runs if Gradle files exist)
48+
- name: Build with Gradle
49+
if: hashFiles('build.gradle', 'build.gradle.kts') != ''
50+
run: |
51+
chmod +x gradlew || true
52+
./gradlew build -x test
53+
54+
- name: Perform CodeQL Analysis
55+
uses: github/codeql-action/analyze@v4
56+
with:
57+
category: "/language:java-kotlin"

0 commit comments

Comments
 (0)