Skip to content

Commit fd1e0bd

Browse files
ddamkeddamke
authored andcommitted
add review changes
1 parent b29e479 commit fd1e0bd

File tree

2 files changed

+8
-15
lines changed

2 files changed

+8
-15
lines changed

.github/workflows/mavenCi.yml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,13 @@
44
name: Java CI with Maven
55

66
on:
7-
workflow_dispatch:
87
push:
8+
branches: [ "master", "develop" ]
99
pull_request:
10+
branches: [ "master", "develop" ]
11+
12+
# Allows you to run this workflow manually from the Actions tab
13+
workflow_dispatch:
1014

1115
jobs:
1216

@@ -25,7 +29,7 @@ jobs:
2529
- name: Analyze
2630
env:
2731
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28-
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} #Added new Repository Secret in GitHub
32+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
2933
run: mvn sonar:sonar
3034
-Dsonar.host.url=${{ secrets.HOST_URL }}
3135
-Dsonar.organization=${{ secrets.ORGANIZATION_NAME }}
@@ -53,6 +57,5 @@ jobs:
5357
- name: Upload Build Artifact
5458
uses: actions/upload-artifact@v3
5559
with:
56-
# Artifact name
5760
name: KeepTime
58-
path: /home/runner/work/KeepTime/KeepTime/target/
61+
path: /home/runner/work/KeepTime/KeepTime/target/keeptime-*-bin.zip

src/main/java/de/doubleslash/keeptime/common/SvgNodeProvider.java

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,22 +25,12 @@ public static String getSvgPathWithXMl(Resources.RESOURCE resource){
2525
Document document;
2626
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
2727
try {
28+
// fixes sonar issue RSPEC-2755
2829
dbf.setFeature("http://apache.org/xml/features/disallow-doctype-decl", true);
2930
} catch (ParserConfigurationException e) {
3031
throw new RuntimeException(e);
3132
}
3233

33-
/* Fixes Sonar Vulnerability Issue "XML parsers should not be vulnerable to XXE attacks"
34-
* XML standard allows the use of entities, declared in the DOCTYPE of the document, which can be internal or external.
35-
Problem:
36-
When parsing the XML file, the content of the external entities is retrieved from an external storage such as the file system or network,
37-
which may lead, if no restrictions are put in place, to arbitrary file disclosures or server-side request forgery (SSRF) vulnerabilities.
38-
39-
Solution:
40-
*It’s recommended to limit resolution of external entities by using one of these solutions:
41-
If DOCTYPE is not necessary, completely disable all DOCTYPE declarations.
42-
* */
43-
4434
DocumentBuilder db;
4535

4636
try {

0 commit comments

Comments
 (0)