Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
updated suppression schema to require a CPE, CVE, or CVSS Below per i…
…ssue #488
- Loading branch information
1 parent
bcc2478
commit deda02f
Showing
7 changed files
with
65 additions
and
13 deletions.
There are no files selected for viewing
2 changes: 1 addition & 1 deletion
2
dependency-check-core/src/main/resources/dependencycheck-base-suppression.xml
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
58 changes: 58 additions & 0 deletions
58
dependency-check-core/src/main/resources/schema/dependency-suppression.1.1.xsd
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,58 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<xs:schema id="suppressions" | ||
xmlns:xs="http://www.w3.org/2001/XMLSchema" | ||
elementFormDefault="qualified" | ||
targetNamespace="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.1.xsd"> | ||
|
||
<xs:complexType name="regexStringType"> | ||
<xs:simpleContent> | ||
<xs:extension base="xs:string"> | ||
<xs:attribute name="regex" use="optional" type="xs:boolean" default="false"/> | ||
<xs:attribute name="caseSensitive" use="optional" type="xs:boolean" default="false"/> | ||
</xs:extension> | ||
</xs:simpleContent> | ||
</xs:complexType> | ||
<xs:simpleType name="cvssScoreType"> | ||
<xs:restriction base="xs:decimal"> | ||
<xs:minInclusive value="0"/> | ||
<xs:maxInclusive value="10"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
<xs:simpleType name="cveType"> | ||
<xs:restriction base="xs:string"> | ||
<xs:pattern value="((\w+\-)?CVE\-\d\d\d\d\-\d+|\d+)"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
<xs:simpleType name="sha1Type"> | ||
<xs:restriction base="xs:string"> | ||
<xs:pattern value="[a-fA-F0-9]{40}"/> | ||
</xs:restriction> | ||
</xs:simpleType> | ||
<xs:element name="suppressions"> | ||
<xs:complexType> | ||
<xs:sequence minOccurs="0" maxOccurs="unbounded"> | ||
<xs:element name="suppress"> | ||
<xs:complexType> | ||
<xs:sequence minOccurs="1" maxOccurs="1"> | ||
<xs:sequence minOccurs="0" maxOccurs="1"> | ||
<xs:element name="notes" type="xs:string"/> | ||
</xs:sequence> | ||
<xs:choice minOccurs="0" maxOccurs="1"> | ||
<xs:element name="filePath" type="dc:regexStringType"/> | ||
<xs:element name="sha1" type="dc:sha1Type"/> | ||
<xs:element name="gav" type="dc:regexStringType"/> | ||
</xs:choice> | ||
<xs:choice minOccurs="1" maxOccurs="unbounded"> | ||
<xs:element name="cpe" type="dc:regexStringType"/> | ||
<xs:element name="cve" type="dc:cveType"/> | ||
<xs:element name="cwe" type="xs:positiveInteger"/> | ||
<xs:element name="cvssBelow" type="dc:cvssScoreType"/> | ||
</xs:choice> | ||
</xs:sequence> | ||
<xs:attribute name="base" use="optional" type="xs:boolean" default="false"/> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> |
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 |
---|---|---|
|
@@ -56,4 +56,4 @@ | |
</xs:sequence> | ||
</xs:complexType> | ||
</xs:element> | ||
</xs:schema> | ||
</xs:schema> |
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
2 changes: 1 addition & 1 deletion
2
dependency-check-core/src/test/resources/commons-fileupload-1.2.1.suppression.xml
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