File tree Expand file tree Collapse file tree 2 files changed +8
-15
lines changed
src/main/java/de/doubleslash/keeptime/common Expand file tree Collapse file tree 2 files changed +8
-15
lines changed Original file line number Diff line number Diff line change 44name : Java CI with Maven
55
66on :
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
1115jobs :
1216
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 }}
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
Original file line number Diff line number Diff 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 {
You can’t perform that action at this time.
0 commit comments