public final class H2Functions extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
insertSoftware(Connection conn,
int vulnerabilityId,
String part,
String vendor,
String product,
String version,
String update,
String edition,
String language,
String swEdition,
String targetSw,
String targetHw,
String other,
String ecosystem,
String versionEndExcluding,
String versionEndIncluding,
String versionStartExcluding,
String versionStartIncluding,
Boolean vulnerable)
Adds a CPE to a vulnerability; if the CPE is not contained in the
database it is first added.
|
static ResultSet |
updateVulnerability(Connection conn,
String cve,
String description,
String v2Severity,
Float v2ExploitabilityScore,
Float v2ImpactScore,
Boolean v2AcInsufInfo,
Boolean v2ObtainAllPrivilege,
Boolean v2ObtainUserPrivilege,
Boolean v2ObtainOtherPrivilege,
Boolean v2UserInteractionRequired,
Float v2Score,
String v2AccessVector,
String v2AccessComplexity,
String v2Authentication,
String v2ConfidentialityImpact,
String v2IntegrityImpact,
String v2AvailabilityImpact,
String v2Version,
Float v3ExploitabilityScore,
Float v3ImpactScore,
String v3AttackVector,
String v3AttackComplexity,
String v3PrivilegesRequired,
String v3UserInteraction,
String v3Scope,
String v3ConfidentialityImpact,
String v3IntegrityImpact,
String v3AvailabilityImpact,
Float v3BaseScore,
String v3BaseSeverity,
String v3Version)
Updates or inserts the vulnerability into the database.
|
public static void insertSoftware(Connection conn, int vulnerabilityId, String part, String vendor, String product, String version, String update, String edition, String language, String swEdition, String targetSw, String targetHw, String other, String ecosystem, String versionEndExcluding, String versionEndIncluding, String versionStartExcluding, String versionStartIncluding, Boolean vulnerable) throws SQLException
conn - the database connectionvulnerabilityId - the vulnerability idpart - the CPE partvendor - the CPE vendorproduct - the CPE productversion - the CPE versionupdate - the CPE update versionedition - the CPE editionlanguage - the CPE languageswEdition - the CPE software editiontargetSw - the CPE target softwaretargetHw - the CPE target hardwareother - the CPE otherecosystem - the ecosystemversionEndExcluding - a version range to identify the softwareversionEndIncluding - a version range to identify the softwareversionStartExcluding - a version range to identify the softwareversionStartIncluding - a version range to identify the softwarevulnerable - a flag indicating whether or not the software is
vulnerableSQLException - thrown if there is an error adding the CPE or
software referencepublic static ResultSet updateVulnerability(Connection conn, String cve, String description, String v2Severity, Float v2ExploitabilityScore, Float v2ImpactScore, Boolean v2AcInsufInfo, Boolean v2ObtainAllPrivilege, Boolean v2ObtainUserPrivilege, Boolean v2ObtainOtherPrivilege, Boolean v2UserInteractionRequired, Float v2Score, String v2AccessVector, String v2AccessComplexity, String v2Authentication, String v2ConfidentialityImpact, String v2IntegrityImpact, String v2AvailabilityImpact, String v2Version, Float v3ExploitabilityScore, Float v3ImpactScore, String v3AttackVector, String v3AttackComplexity, String v3PrivilegesRequired, String v3UserInteraction, String v3Scope, String v3ConfidentialityImpact, String v3IntegrityImpact, String v3AvailabilityImpact, Float v3BaseScore, String v3BaseSeverity, String v3Version) throws SQLException
conn - the database connectioncve - the CVE identifierdescription - the vulnerability descriptionv2Severity - the CVSS v2 severityv2ExploitabilityScore - the CVSS v2 exploitability scorev2ImpactScore - the CVSS v2 impact scorev2AcInsufInfo - the CVSS v2 AcInsufInfov2ObtainAllPrivilege - the CVSS v2 obtain all privilege flagv2ObtainUserPrivilege - the CVSS v2 obtain user privilege flagv2ObtainOtherPrivilege - the CVSS v2 obtain other privilege flagv2UserInteractionRequired - the CVSS v2 user interaction required
flagv2Score - the CVSS v2 scorev2AccessVector - the CVSS v2 access vectorv2AccessComplexity - the CVSS v2 access complexityv2Authentication - the CVSS v2 authenticationv2ConfidentialityImpact - the CVSS v2 confidentiality impactv2IntegrityImpact - the CVSS v2 integrity impactv2AvailabilityImpact - the CVSS v2 availability impactv2Version - the CVSS v2 versionv3ExploitabilityScore - the CVSS v3 exploitability scorev3ImpactScore - the CVSS v3 impact scorev3AttackVector - the CVSS v3 attack vectorv3AttackComplexity - the CVSS v3 attack complexityv3PrivilegesRequired - the CVSS v3 privilege required flagv3UserInteraction - the CVSS v3 user interaction required flagv3Scope - the CVSS v3 scopev3ConfidentialityImpact - the CVSS v3 confidentiality impactv3IntegrityImpact - the CVSS v3 integrity impactv3AvailabilityImpact - the CVSS v3 availability impactv3BaseScore - the CVSS v3 base scorev3BaseSeverity - the CVSS v3 base severityv3Version - the CVSS v3 versionSQLException - thrown if there is an error updating or inserting
the vulnerabilityCopyright © 2012–2021 OWASP. All rights reserved.