Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

changed the org name for sonar #14

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 4 additions & 1 deletion .github/workflows/complete-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,9 @@ jobs:
distribution: 'adopt'
cache: maven
- name: Build with Maven cloud
run: mvn -B verify sonar:sonar -Dsonar.projectKey=javaprojectreachability -Dsonar.organization=javaprojectreachability -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN
#changed the ttk
run: mvn -B verify sonar:sonar -Dsonar.projectKey=githubactionscasestudy -Dsonar.organization=githubactionscaseStudy -Dsonar.host.url=https://sonarcloud.io -Dsonar.token=$SONAR_TOKEN
continue-on-error: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
Expand Down Expand Up @@ -45,3 +47,4 @@ jobs:
target: 'http://testphp.vulnweb.com/'
rules_file_name: '.zap/rules.tsv'
cmd_options: '-a'

8 changes: 8 additions & 0 deletions .idea/.gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 13 additions & 0 deletions .idea/compiler.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions .idea/jarRepositories.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 12 additions & 0 deletions .idea/misc.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions .idea/vcs.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

82 changes: 41 additions & 41 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -7,66 +7,66 @@
<artifactId>java-vulnerable-code-asecurityguru</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<sonar.organization>githubactionscasestudy</sonar.organization>
<sonar.host.url>https://sonarcloud.io</sonar.host.url>
</properties>
<dependencies>
<dependency>
<groupId>commons-collections</groupId>
<artifactId>commons-collections</artifactId>
<version>3.2.1</version>
<version>3.2.2</version>
</dependency>
<dependency>
<groupId>org.nd4j</groupId>
<artifactId>nd4j-common</artifactId>
<version>1.0.0-beta2</version>
</dependency>

<!--#Change 1 - Changes for Unit Test Coverage Percentage Update on SonarCloud Dashboard
#By ASecurityGuru
#5/11/2022 11:14 AM IST
#Default Location of CodeCoverage File is target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!--#Change 1 - Changes for Unit Test Coverage Percentage Update on SonarCloud Dashboard
#By ASecurityGuru
#5/11/2022 11:14 AM IST
#Default Location of CodeCoverage File is target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
-->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
</dependency>

</dependencies>
</dependencies>
<build>
<plugins>

<!--#Change 2 - Changes for Unit Test Coverage Percentage Update on SonarCloud Dashboard
#By ASecurityGuru
#5/11/2022 11:14 AM IST
#Default Location of CodeCoverage File is target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
-->
<!--#Change 2 - Changes for Unit Test Coverage Percentage Update on SonarCloud Dashboard
#By ASecurityGuru
#5/11/2022 11:14 AM IST
#Default Location of CodeCoverage File is target/site/jacoco/jacoco.xml,target/site/jacoco-it/jacoco.xml,build/reports/jacoco/test/jacocoTestReport.xml
-->
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.7</version>
<executions>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<configuration>
<formats>
<format>XML</format>
</formats>
</configuration>
</execution>
<execution>
<id>prepare-agent</id>
<goals>
<goal>prepare-agent</goal>
</goals>
</execution>
<execution>
<id>report</id>
<goals>
<goal>report</goal>
</goals>
<configuration>
<formats>
<format>XML</format>
</formats>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</plugin>
</plugins>
</build>
</project>
Binary file added target/classes/Butler.class
Binary file not shown.
Binary file added target/classes/Calculator.class
Binary file not shown.
Binary file added target/classes/Unzipper.class
Binary file not shown.
Binary file added target/jacoco.exec
Binary file not shown.
Binary file not shown.
3 changes: 3 additions & 0 deletions target/maven-archiver/pom.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
artifactId=java-vulnerable-code-asecurityguru
groupId=org.example
version=1.0-SNAPSHOT
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
Calculator.class
Butler.class
Unzipper.class
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
/Users/hiteshshridhar/Documents/Java/github_Actions_workflow/devsecops-github-actions-all-asecurityguru/src/main/java/Unzipper.java
/Users/hiteshshridhar/Documents/Java/github_Actions_workflow/devsecops-github-actions-all-asecurityguru/src/main/java/Calculator.java
/Users/hiteshshridhar/Documents/Java/github_Actions_workflow/devsecops-github-actions-all-asecurityguru/src/main/java/Butler.java
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
CalculatorTest.class
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
/Users/hiteshshridhar/Documents/Java/github_Actions_workflow/devsecops-github-actions-all-asecurityguru/src/test/java/CalculatorTest.java
1 change: 1 addition & 0 deletions target/site/jacoco/jacoco.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><!DOCTYPE report PUBLIC "-//JACOCO//DTD Report 1.1//EN" "report.dtd"><report name="java-vulnerable-code-asecurityguru"><sessioninfo id="Hitesh-MacBook-Air.local-8e70ceae" start="1716304093474" dump="1716304093829"/><package name=""><class name="Calculator" sourcefilename="Calculator.java"><method name="&lt;init&gt;" desc="()V" line="6"><counter type="INSTRUCTION" missed="0" covered="3"/><counter type="LINE" missed="0" covered="1"/><counter type="COMPLEXITY" missed="0" covered="1"/><counter type="METHOD" missed="0" covered="1"/></method><method name="addition" desc="(Ljava/lang/String;)I" line="10"><counter type="INSTRUCTION" missed="0" covered="28"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="4"/><counter type="COMPLEXITY" missed="0" covered="2"/><counter type="METHOD" missed="0" covered="1"/></method><counter type="INSTRUCTION" missed="0" covered="31"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></class><class name="Unzipper" sourcefilename="Unzipper.java"><method name="&lt;init&gt;" desc="()V" line="4"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="main" desc="([Ljava/lang/String;)V" line="7"><counter type="INSTRUCTION" missed="23" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="26" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="2" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><class name="Butler" sourcefilename="Butler.java"><method name="&lt;init&gt;" desc="()V" line="4"><counter type="INSTRUCTION" missed="3" covered="0"/><counter type="LINE" missed="1" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><method name="welcome" desc="()V" line="10"><counter type="INSTRUCTION" missed="22" covered="0"/><counter type="LINE" missed="6" covered="0"/><counter type="COMPLEXITY" missed="1" covered="0"/><counter type="METHOD" missed="1" covered="0"/></method><counter type="INSTRUCTION" missed="25" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="2" covered="0"/><counter type="CLASS" missed="1" covered="0"/></class><sourcefile name="Butler.java"><line nr="4" mi="3" ci="0" mb="0" cb="0"/><line nr="10" mi="4" ci="0" mb="0" cb="0"/><line nr="11" mi="4" ci="0" mb="0" cb="0"/><line nr="12" mi="4" ci="0" mb="0" cb="0"/><line nr="13" mi="4" ci="0" mb="0" cb="0"/><line nr="15" mi="5" ci="0" mb="0" cb="0"/><line nr="16" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="25" covered="0"/><counter type="LINE" missed="7" covered="0"/><counter type="COMPLEXITY" missed="2" covered="0"/><counter type="METHOD" missed="2" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="Unzipper.java"><line nr="4" mi="3" ci="0" mb="0" cb="0"/><line nr="7" mi="4" ci="0" mb="0" cb="0"/><line nr="8" mi="2" ci="0" mb="0" cb="0"/><line nr="11" mi="3" ci="0" mb="0" cb="0"/><line nr="12" mi="5" ci="0" mb="0" cb="0"/><line nr="13" mi="3" ci="0" mb="2" cb="0"/><line nr="14" mi="5" ci="0" mb="0" cb="0"/><line nr="16" mi="1" ci="0" mb="0" cb="0"/><counter type="INSTRUCTION" missed="26" covered="0"/><counter type="BRANCH" missed="2" covered="0"/><counter type="LINE" missed="8" covered="0"/><counter type="COMPLEXITY" missed="3" covered="0"/><counter type="METHOD" missed="2" covered="0"/><counter type="CLASS" missed="1" covered="0"/></sourcefile><sourcefile name="Calculator.java"><line nr="6" mi="0" ci="3" mb="0" cb="0"/><line nr="10" mi="0" ci="2" mb="0" cb="0"/><line nr="11" mi="0" ci="18" mb="0" cb="2"/><line nr="12" mi="0" ci="6" mb="0" cb="0"/><line nr="13" mi="0" ci="2" mb="0" cb="0"/><counter type="INSTRUCTION" missed="0" covered="31"/><counter type="BRANCH" missed="0" covered="2"/><counter type="LINE" missed="0" covered="5"/><counter type="COMPLEXITY" missed="0" covered="3"/><counter type="METHOD" missed="0" covered="2"/><counter type="CLASS" missed="0" covered="1"/></sourcefile><counter type="INSTRUCTION" missed="51" covered="31"/><counter type="BRANCH" missed="2" covered="2"/><counter type="LINE" missed="15" covered="5"/><counter type="COMPLEXITY" missed="5" covered="3"/><counter type="METHOD" missed="4" covered="2"/><counter type="CLASS" missed="2" covered="1"/></package><counter type="INSTRUCTION" missed="51" covered="31"/><counter type="BRANCH" missed="2" covered="2"/><counter type="LINE" missed="15" covered="5"/><counter type="COMPLEXITY" missed="5" covered="3"/><counter type="METHOD" missed="4" covered="2"/><counter type="CLASS" missed="2" covered="1"/></report>
4 changes: 4 additions & 0 deletions target/surefire-reports/CalculatorTest.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
-------------------------------------------------------------------------------
Test set: CalculatorTest
-------------------------------------------------------------------------------
Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.031 s -- in CalculatorTest
Loading