-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into feature/test-suite-validation
- Loading branch information
Showing
29 changed files
with
370 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
id;description;vulnerability_id | ||
1;"In Spring Security versions 5.5.6 and 5.6.3 and older unsupported versions, RegexRequestMatcher can easily be misconfigured to be bypassed on some servlet containers. Applications using RegexRequestMatcher with `.` in the regular expression are possibly vulnerable to an authorization bypass";1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
id;name;url;is_open_source;vulnerability_id | ||
1;"spring-projects/spring-security";"https://github.com/spring-projects/spring-security";1;1 | ||
2;"org.springframework.security:spring-security-web";"https://mvnrepository.com/artifact/org.springframework.security/spring-security-web";0;1 | ||
3;"org.springframework.security:spring-security-core";"https://mvnrepository.com/artifact/org.springframework.security/spring-security-core";0;1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | ||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"> | ||
|
||
<changeSet id="vulnerability-description-insert" author="frolov" context="dev"> | ||
<loadData tableName="vulnerability_description" encoding="UTF-8" separator=";" quotchar=""" file="db/test-data/sqlRequests/vulnerability-description.csv"> | ||
<column header="id" name="id" type="bigint"/> | ||
<column header="vulnerability_id" name="vulnerability_id" type="bigint"/> | ||
<column header="description" name="description" type="TEXT"/> | ||
</loadData> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | ||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"> | ||
|
||
<changeSet id="vulnerability-project-insert" author="frolov" context="dev"> | ||
<loadData tableName="vulnerability_project" encoding="UTF-8" separator=";" quotchar=""" file="db/test-data/sqlRequests/vulnerability-project.csv"> | ||
<column header="id" name="id" type="bigint"/> | ||
<column header="name" name="name" type="varchar(250)"/> | ||
<column header="url" name="url" type="varchar(250)"/> | ||
<column header="is_open_source" name="is_open_source" type="BOOLEAN"/> | ||
<column header="vulnerability_id" name="vulnerability_id" type="bigint"/> | ||
</loadData> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | ||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"> | ||
|
||
<changeSet id="vulnerability-description-1" author="frolov" context="dev or prod"> | ||
<createTable tableName="vulnerability_description"> | ||
<column name="id" type="bigint" autoIncrement="true"> | ||
<constraints primaryKey="true" nullable="false"/> | ||
</column> | ||
<column name="vulnerability_id" type="bigint"> | ||
<constraints foreignKeyName="fk_vulnerability_description_vulnerability" references="vulnerability(id)" nullable="false" deleteCascade="true"/> | ||
</column> | ||
<column name="description" type="TEXT"> | ||
<constraints nullable="false"/> | ||
</column> | ||
</createTable> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<databaseChangeLog | ||
xmlns="http://www.liquibase.org/xml/ns/dbchangelog" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog | ||
http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.8.xsd"> | ||
|
||
<changeSet id="vulnerability-project-1" author="frolov" context="dev or prod"> | ||
<createTable tableName="vulnerability_project"> | ||
<column name="id" type="bigint" autoIncrement="true"> | ||
<constraints primaryKey="true" nullable="false"/> | ||
</column> | ||
<column name="name" type="varchar(250)"> | ||
<constraints nullable="false"/> | ||
</column> | ||
<column name="url" type="varchar(250)"/> | ||
<column name="is_open_source" type="BOOLEAN" defaultValue="0"/> | ||
<column name="vulnerability_id" type="bigint"> | ||
<constraints foreignKeyName="fk_vulnerability_project_vulnerability" references="vulnerability(id)" nullable="false" deleteCascade="true"/> | ||
</column> | ||
</createTable> | ||
</changeSet> | ||
|
||
</databaseChangeLog> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
25 changes: 25 additions & 0 deletions
25
...rc/main/kotlin/com/saveourtool/save/buildutils/save-cli-download-configuration.gradle.kts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
/** | ||
* Configuration task to download save-cli once per a project | ||
*/ | ||
|
||
package com.saveourtool.save.buildutils | ||
|
||
import de.undercouch.gradle.tasks.download.Download | ||
import org.gradle.kotlin.dsl.* | ||
|
||
plugins { | ||
id("de.undercouch.download") | ||
} | ||
|
||
tasks.register<Download>("downloadSaveCli") { | ||
val saveCliVersion = readSaveCliVersion() | ||
val saveCliFileName = saveCliVersion.map { "save-$it-linuxX64.kexe" } | ||
val saveCliPath = saveCliVersion.zip(saveCliFileName) { version, fileName -> | ||
findProperty("saveCliPath")?.takeIf { version.isSnapshot() } as String? | ||
?: "https://github.com/saveourtool/save-cli/releases/download/v$version/$fileName" | ||
} | ||
src { saveCliPath } | ||
dest { saveCliFileName.map { fileName -> "$buildDir/download/$fileName" } } | ||
|
||
overwrite(false) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
10 changes: 0 additions & 10 deletions
10
save-cloud-common/src/commonMain/kotlin/com/saveourtool/save/entities/VulnerabilityDto.kt
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
...mon/src/commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package com.saveourtool.save.entities.vulnerability | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
/** | ||
* @property name name of vulnerability | ||
* @property progress vulnerability criticality percentage | ||
* @property projects links to projects with this vulnerability | ||
* @property description description of vulnerability | ||
*/ | ||
@Serializable | ||
data class VulnerabilityDto( | ||
val name: String, | ||
val progress: Int, | ||
val description: String?, | ||
val projects: List<VulnerabilityProjectDto>, | ||
) |
15 changes: 15 additions & 0 deletions
15
.../commonMain/kotlin/com/saveourtool/save/entities/vulnerability/VulnerabilityProjectDto.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
package com.saveourtool.save.entities.vulnerability | ||
|
||
import kotlinx.serialization.Serializable | ||
|
||
/** | ||
* @property name name of project | ||
* @property url url of project | ||
* @property isOpenSource is project open-source | ||
*/ | ||
@Serializable | ||
data class VulnerabilityProjectDto( | ||
val name: String, | ||
val url: String, | ||
val isOpenSource: Boolean, | ||
) |
Oops, something went wrong.