forked from mercedes-benz/sechub
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
tests and implementation of multi-language scan settings mercedes-ben…
- Loading branch information
Showing
14 changed files
with
678 additions
and
160 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
47 changes: 47 additions & 0 deletions
47
...marx/src/main/java/com/daimler/sechub/adapter/checkmarx/CheckmarxEngineConfiguration.java
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,47 @@ | ||
// SPDX-License-Identifier: MIT | ||
package com.daimler.sechub.adapter.checkmarx; | ||
|
||
import java.util.Objects; | ||
|
||
public class CheckmarxEngineConfiguration { | ||
private Long id; | ||
private String name; | ||
|
||
public Long getId() { | ||
return id; | ||
} | ||
|
||
public void setId(Long id) { | ||
this.id = id; | ||
} | ||
|
||
public String getName() { | ||
return name; | ||
} | ||
|
||
public void setName(String name) { | ||
this.name = name; | ||
} | ||
|
||
@Override | ||
public String toString() { | ||
return "CheckmarxEngineConfiguration [id=" + id + ", name=" + name + "]"; | ||
} | ||
|
||
@Override | ||
public int hashCode() { | ||
return Objects.hash(id, name); | ||
} | ||
|
||
@Override | ||
public boolean equals(Object obj) { | ||
if (this == obj) | ||
return true; | ||
if (obj == null) | ||
return false; | ||
if (getClass() != obj.getClass()) | ||
return false; | ||
CheckmarxEngineConfiguration other = (CheckmarxEngineConfiguration) obj; | ||
return Objects.equals(id, other.id) && Objects.equals(name, other.name); | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...c/main/java/com/daimler/sechub/adapter/checkmarx/CheckmarxEngineConfigurationOptions.java
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,37 @@ | ||
// SPDX-License-Identifier: MIT | ||
package com.daimler.sechub.adapter.checkmarx; | ||
|
||
import org.springframework.beans.factory.annotation.Value; | ||
import org.springframework.stereotype.Component; | ||
|
||
/** | ||
* Checkmarx defines a few engine configurations. | ||
* | ||
* This enum maps the Checkmarx engine configuration options to constant values. | ||
* | ||
* The possible options can be found in the Checkmarx documentation: | ||
* - https://checkmarx.atlassian.net/wiki/spaces/KC/pages/223543515/Get+All+Engine+Configurations+-+GET+sast+engineConfigurations+v8.6.0+and+up | ||
* | ||
* Only the names of the engine configurations are mapped and not the ids, assuming Checkmarx can | ||
* add/remove engineConfigurations or change the ids in the future. | ||
* | ||
* @author Jeremias Eppler | ||
*/ | ||
|
||
@Component | ||
public class CheckmarxEngineConfigurationOptions { | ||
|
||
public static final String DEFAULT_CHECKMARX_ENGINECONFIGURATION_MULTILANGANGE_SCAN_NAME = "Multi-language Scan"; | ||
|
||
@Value("{sechub.adapter.checkmarx.engineconfiguration.name:"+DEFAULT_CHECKMARX_ENGINECONFIGURATION_MULTILANGANGE_SCAN_NAME+"}") | ||
private String checkmarxName = DEFAULT_CHECKMARX_ENGINECONFIGURATION_MULTILANGANGE_SCAN_NAME; | ||
|
||
CheckmarxEngineConfigurationOptions(String checkmarxName) { | ||
this.checkmarxName = checkmarxName; | ||
} | ||
|
||
/* getNameUsedForCheckmarxEngineConfigurationIDFetching*/ | ||
public String getCheckmarxName() { | ||
return checkmarxName; | ||
} | ||
} |
Oops, something went wrong.