Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
79 commits
Select commit Hold shift + click to select a range
0ec6a33
Update lycheeverse/lychee-action digest to 5c4ee84
xdev-renovate Aug 8, 2025
3b75b24
Merge pull request #167 from xdev-software/master
AB-xdev Aug 8, 2025
68e1852
Update demo application.yml
AB-xdev Aug 8, 2025
df23f84
Update actions/checkout action to v5
xdev-renovate Aug 12, 2025
613e5d0
Update actions/checkout action to v5
xdev-renovate Aug 12, 2025
c7e35ec
Merge pull request #4 from xdev-software/renovate/lycheeverse-lychee-…
AB-xdev Aug 12, 2025
acf81d4
Merge pull request #5 from xdev-software/renovate/actions-checkout-5.x
AB-xdev Aug 12, 2025
d5670b4
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 12, 2025
c23e3a8
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 12, 2025
dae27e8
Merge pull request #181 from xdev-software/renovate/actions-checkout-5.x
AB-xdev Aug 12, 2025
019ff58
Add configuration for Intellij PMD plugin
AB-xdev Aug 13, 2025
c89fbec
Merge remote-tracking branch 'origin/update-from-template'
AB-xdev Aug 13, 2025
29aa603
Enable async processing by default
AB-xdev Aug 13, 2025
3ed0401
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 13, 2025
8d53531
Enhance default PMD ruleset
AB-xdev Aug 14, 2025
7baf8f8
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 14, 2025
50a54b7
Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3…
xdev-renovate Aug 17, 2025
2924da1
Update actions/setup-java action to v5
xdev-renovate Aug 22, 2025
739ed7e
Update lycheeverse/lychee-action digest to 01a5c94
xdev-renovate Aug 23, 2025
28c4ef5
Merge pull request #6 from xdev-software/renovate/lycheeverse-lychee-…
AB-xdev Aug 25, 2025
a7a1206
Merge pull request #187 from xdev-software/renovate/actions-setup-jav…
AB-xdev Aug 25, 2025
df3dad2
Merge pull request #186 from xdev-software/renovate/org.apache.maven.…
AB-xdev Aug 25, 2025
db11f77
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 25, 2025
aa9cdfe
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 25, 2025
ebc6187
Update lycheeverse/lychee-action digest to 885c65f
xdev-renovate Aug 26, 2025
b2aeb89
Merge pull request #7 from xdev-software/renovate/lycheeverse-lychee-…
AB-xdev Aug 26, 2025
87adb6f
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 26, 2025
e9b8509
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 26, 2025
8c154dd
Update to latest checkstyle version
AB-xdev Aug 26, 2025
683aee8
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 26, 2025
3c3c27c
Remove whitespaces
AB-xdev Aug 28, 2025
2d5dbbb
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 28, 2025
251594a
Improve caching and remove excessive whitespaces
AB-xdev Aug 28, 2025
3dfbb54
Remove excessive white-spaces
AB-xdev Aug 28, 2025
ae6bea8
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 28, 2025
e96287e
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Aug 28, 2025
d820b9e
Enable pmd analysis cache
AB-xdev Aug 28, 2025
85ec706
Update dependency com.puppycrawl.tools:checkstyle to v11.0.1
xdev-renovate Sep 1, 2025
a9590eb
Merge pull request #194 from xdev-software/renovate/com.puppycrawl.to…
AB-xdev Sep 1, 2025
c41665b
PMD: AvoidUnmanagedThreads
AB-xdev Sep 2, 2025
3b31f0b
Fix format
AB-xdev Sep 2, 2025
ebe579f
PMD: Add PostConstruct and PreDestroy
AB-xdev Sep 2, 2025
3792ace
Merge branch 'master' into update-from-template-merged
xdev-gh-bot Sep 2, 2025
d23faec
Init
AB-xdev Sep 3, 2025
b967a6a
Merge remote-tracking branch 'origin/update-from-template-xdev-softwa…
AB-xdev Sep 3, 2025
a42d3cb
Merge branch 'master' into update-from-template-xdev-software/java-te…
xdev-gh-bot Sep 3, 2025
bba9aa6
No EoL
AB-xdev Sep 3, 2025
dc3ac3d
Merge branch 'master' into update-from-template-xdev-software/java-se…
xdev-gh-bot Sep 3, 2025
1931201
Merge branch 'master' into update-from-template-xdev-software/java-te…
xdev-gh-bot Sep 3, 2025
6b6acb4
Merge remote-tracking branch 'origin/update-from-template' into develop
AB-xdev Sep 10, 2025
d9d62c2
Enabled PMD analysis cache
AB-xdev Sep 10, 2025
1ea10c6
Update com.vaadin to v24.8.8
xdev-renovate Sep 10, 2025
c6dd4b9
Update dependency org.apache.maven.plugins:maven-javadoc-plugin to v3…
xdev-renovate Sep 10, 2025
eecd09b
Update dependency org.mariadb.jdbc:mariadb-java-client to v3.5.5
xdev-renovate Sep 10, 2025
0ac7a8d
Update dependency org.springdoc:springdoc-openapi-starter-webmvc-ui t…
xdev-renovate Sep 10, 2025
cbf9e52
Update dependency software.xdev:testcontainers-advanced-imagebuilder …
xdev-renovate Sep 10, 2025
5c65700
Update org.springframework.boot to v3.5.5
xdev-renovate Sep 10, 2025
5de9cfe
Update dependency org.seleniumhq.selenium:selenium-dependencies-bom t…
xdev-renovate Sep 10, 2025
026ded8
Update actions/checkout action to v5
xdev-renovate Sep 10, 2025
42700b9
Update actions/setup-java action to v5
xdev-renovate Sep 10, 2025
87f6746
Merge pull request #178 from xdev-software/renovate/actions-setup-jav…
AB-xdev Sep 10, 2025
c21464f
Merge pull request #170 from xdev-software/renovate/actions-checkout-5.x
AB-xdev Sep 10, 2025
f3ca132
Merge pull request #174 from xdev-software/renovate/org.apache.maven.…
AB-xdev Sep 10, 2025
37c4a85
Merge pull request #168 from xdev-software/renovate/org.mariadb.jdbc-…
AB-xdev Sep 10, 2025
7fd2bba
Merge pull request #176 from xdev-software/renovate/org.springdoc-spr…
AB-xdev Sep 10, 2025
589c8b9
Merge pull request #177 from xdev-software/renovate/org.springframewo…
AB-xdev Sep 10, 2025
19b2944
Merge pull request #172 from xdev-software/renovate/org.seleniumhq.se…
AB-xdev Sep 10, 2025
5496d9a
Merge pull request #169 from xdev-software/renovate/com.vaadin
AB-xdev Sep 10, 2025
6e5e99b
Merge pull request #171 from xdev-software/renovate/software.xdev-tes…
AB-xdev Sep 10, 2025
9db52d6
Use mariadb lts
AB-xdev Sep 10, 2025
d13b510
Merge branch 'develop' of https://github.com/xdev-software/spring-sec…
AB-xdev Sep 10, 2025
ae057cb
Use constructor injection
AB-xdev Sep 10, 2025
bfe0a04
Update CHANGELOG.md
AB-xdev Sep 10, 2025
cad78d3
Update dependency com.puppycrawl.tools:checkstyle to v11.0.1
xdev-renovate Sep 10, 2025
c4d99bb
Update dependency software.xdev.tci:bom to v2.6.0
xdev-renovate Sep 10, 2025
94e1c22
Fix pmd
AB-xdev Sep 10, 2025
be8f61e
Merge pull request #181 from xdev-software/renovate/com.puppycrawl.to…
AB-xdev Sep 10, 2025
acfba71
Merge remote-tracking branch 'origin/renovate/software.xdev.tci-bom-2…
AB-xdev Sep 10, 2025
69311a2
Update to tci v2.6
AB-xdev Sep 10, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 113 additions & 0 deletions .config/pmd/java/ruleset.xml
Original file line number Diff line number Diff line change
Expand Up @@ -194,4 +194,117 @@
</rule>

<rule ref="category/java/security.xml"/>

<rule name="AvoidSystemSetterCall"
language="java"
message="Setters of java.lang.System should not be called unless really needed"
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
<description>
Calling setters of java.lang.System usually indicates bad design and likely causes unexpected behavior.
For example, it may break when multiple Threads are setting the value.
It may also overwrite user defined options or properties.

Try to pass the value only to the place where it's really needed and use it there accordingly.
</description>
<priority>3</priority>
<properties>
<property name="xpath">
<value>
<![CDATA[
//MethodCall[starts-with(@MethodName,'set')]/TypeExpression[pmd-java:typeIsExactly('java.lang.System')]
]]>
</value>
</property>
</properties>
</rule>

<rule name="AvoidPostConstruct"
language="java"
message="Avoid @PostConstruct"
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
<description>
Using a `@PostConstruct` method is usually only done when field injection is used and initialization needs to be performed after that.

It's better to do this directly in the constructor with constructor injection, so that all logic will be encapsulated there.
This also makes using the bean in environments where JavaEE is not present - for example in tests - a lot easier, as forgetting to call the `@PostConstruct` method is no longer possible.
</description>
<priority>3</priority>
<properties>
<property name="xpath">
<value>
<![CDATA[
//MethodDeclaration[pmd-java:hasAnnotation('jakarta.annotation.PostConstruct')]
]]>
</value>
</property>
</properties>
</rule>

<rule name="AvoidPreDestroy"
language="java"
message="Avoid @PreDestroy"
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
<description>
`@PreDestroy` should be replaced by implementing `AutoCloseable` and overwriting the `close` method instead.

This also makes using the bean in environments where JavaEE is not present - for example in tests - a lot easier, as forgetting to call the `@PreDestroy` method is no much more difficult.
</description>
<priority>3</priority>
<properties>
<property name="xpath">
<value>
<![CDATA[
//MethodDeclaration[pmd-java:hasAnnotation('jakarta.annotation.PreDestroy')]
]]>
</value>
</property>
</properties>
</rule>

<rule name="AvoidUnmanagedThreads"
language="java"
message="Avoid unmanaged threads"
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
<description>
Trying to manually manage threads usually gets quickly out of control and may result in various problems like uncontrollable spawning of threads.
Threads can also not be cancelled properly.

Use managed Thread services like `ExecutorService` and `CompletableFuture` instead.
</description>
<priority>3</priority>
<properties>
<property name="xpath">
<value>
<![CDATA[
//MethodCall[pmd-java:matchesSig('java.lang.Thread#start()') or pmd-java:matchesSig('java.lang.Thread#startVirtualThread(java.lang.Runnable)') or pmd-java:matchesSig('java.lang.Thread$Builder#start(java.lang.Runnable)')]
]]>
</value>
</property>
</properties>
</rule>

<rule name="JavaObjectSerializationIsUnsafe"
language="java"
message="Using Java Object (De-)Serialization is unsafe and has led to too many security vulnerabilities"
class="net.sourceforge.pmd.lang.rule.xpath.XPathRule">
<description>
Nearly every known usage of (Java) Object Deserialization has resulted in [a security vulnerability](https://cloud.google.com/blog/topics/threat-intelligence/hunting-deserialization-exploits?hl=en).
Vulnerabilities are so common that there are [dedicated projects for exploit payload generation](https://github.com/frohoff/ysoserial).

Java Object Serialization may also fail to deserialize when the underlying classes are changed.

Use proven data interchange formats like JSON instead.
</description>
<priority>2</priority>
<properties>
<property name="xpath">
<value>
<![CDATA[
//ClassDeclaration[@Interface = false()]/ClassBody/FieldDeclaration/VariableDeclarator/VariableId[@Name='serialVersionUID'] |
//ConstructorCall/ClassType[pmd-java:typeIsExactly('java.io.ObjectInputStream') or pmd-java:typeIsExactly('java.io.ObjectOutputStream')]
]]>
</value>
</property>
</properties>
</rule>
</ruleset>
6 changes: 3 additions & 3 deletions .github/workflows/broken-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- run: mv .github/.lycheeignore .lycheeignore

- name: Link Checker
id: lychee
uses: lycheeverse/lychee-action@5c4ee84814c983aa7164eaee476f014e53ff3963 # v2
uses: lycheeverse/lychee-action@885c65f3dc543b57c898c8099f4e08c8afd178a2 # v2
with:
fail: false # Don't fail on broken links, create an issue instead

Expand All @@ -29,7 +29,7 @@ jobs:
echo "number=$(gh issue list -l 'bug' -l 'automated' -L 1 -S 'in:title \"Link Checker Report\"' -s 'open' --json 'number' --jq '.[].number')" >> $GITHUB_OUTPUT
env:
GH_TOKEN: ${{ github.token }}

- name: Close issue if everything is fine
if: steps.lychee.outputs.exit_code == 0 && steps.find-issue.outputs.number != ''
run: gh issue close -r 'not planned' ${{ steps.find-issue.outputs.number }}
Expand Down
69 changes: 50 additions & 19 deletions .github/workflows/check-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,25 +23,30 @@ jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 30

strategy:
matrix:
java: [17, 21]
distribution: [temurin]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Set up JDK
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
cache: 'maven'


- name: Cache Maven
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-mvn-build-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-mvn-build-

- name: Build with Maven
run: ./mvnw -B clean package

- name: Check for uncommited changes
run: |
if [[ "$(git status --porcelain)" != "" ]]; then
Expand All @@ -64,21 +69,34 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
timeout-minutes: 15

strategy:
matrix:
java: [17]
distribution: [temurin]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Set up JDK
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Cache Maven
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-mvn-checkstyle-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-mvn-checkstyle-

- name: CheckStyle Cache
uses: actions/cache@v4
with:
path: '**/target/checkstyle-cachefile'
key: ${{ runner.os }}-checkstyle-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-checkstyle-

- name: Run Checkstyle
run: ./mvnw -B checkstyle:check -P checkstyle -T2C
Expand All @@ -87,21 +105,34 @@ jobs:
runs-on: ubuntu-latest
if: ${{ github.event_name != 'pull_request' || !startsWith(github.head_ref, 'renovate/') }}
timeout-minutes: 15

strategy:
matrix:
java: [17]
distribution: [temurin]

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v5

- name: Set up JDK
uses: actions/setup-java@v4
uses: actions/setup-java@v5
with:
distribution: ${{ matrix.distribution }}
java-version: ${{ matrix.java }}
cache: 'maven'

- name: Cache Maven
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-mvn-pmd-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-mvn-pmd-

- name: PMD Cache
uses: actions/cache@v4
with:
path: '**/target/pmd/pmd.cache'
key: ${{ runner.os }}-pmd-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-pmd-

- name: Run PMD
run: ./mvnw -B test pmd:aggregate-pmd-no-fork pmd:check -P pmd -DskipTests -T2C
Expand Down
Loading