-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1149 from aikebah/upstream-issue-1145
Proposed fix for issue #1145
- Loading branch information
Showing
7 changed files
with
241 additions
and
39 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
66 changes: 66 additions & 0 deletions
66
core/src/main/resources/schema/dependency-suppression.1.2.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,66 @@ | ||
<?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.2.xsd" | ||
xmlns:dc="https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.2.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:attribute name="until" use="optional" type="xs:date"> | ||
<xs:annotation> | ||
<xs:documentation> | ||
When specified the suppression will only be active when the specified date is still in the future. On and after the 'until' date the suppression will no longer be active. | ||
</xs:documentation> | ||
</xs:annotation> | ||
</xs:attribute> | ||
</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
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,40 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<suppressions | ||
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' | ||
xmlns='https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.1.xsd' | ||
xsi:schemaLocation='https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.1.xsd'> | ||
<suppress> | ||
<notes><![CDATA[ | ||
This suppresses cpe:/a:csv:csv:1.0 for some.jar in the "c:\path\to" directory. | ||
]]></notes> | ||
<filePath>c:\path\to\some.jar</filePath> | ||
<cpe>cpe:/a:csv:csv:1.0</cpe> | ||
</suppress> | ||
<suppress base="true"> | ||
<notes><![CDATA[ | ||
This suppresses any jboss:jboss cpe for any test.jar in any directory. | ||
]]></notes> | ||
<filePath regex="true">.*\btest\.jar</filePath> | ||
<cpe>cpe:/a:jboss:jboss</cpe> | ||
</suppress> | ||
<suppress> | ||
<notes><![CDATA[ | ||
This suppresses a specific cve for any test.jar in any directory. | ||
]]></notes> | ||
<filePath regex="true">.*\btest\.jar</filePath> | ||
<cve>CVE-2013-1337</cve> | ||
</suppress> | ||
<suppress> | ||
<notes><![CDATA[ | ||
This suppresses a specific cve for any dependency in any directory that has the specified sha1 checksum. | ||
]]></notes> | ||
<sha1>384FAA82E193D4E4B0546059CA09572654BC3970</sha1> | ||
<cve>CVE-2013-1337</cve> | ||
</suppress> | ||
<suppress> | ||
<notes><![CDATA[ | ||
This suppresses all CVE entries that have a score below CVSS 7. | ||
]]></notes> | ||
<cvssBelow>7</cvssBelow> | ||
</suppress> | ||
</suppressions> |
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,43 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<suppressions | ||
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' | ||
xmlns='https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.2.xsd' | ||
xsi:schemaLocation='https://jeremylong.github.io/DependencyCheck/dependency-suppression.1.2.xsd'> | ||
<suppress> | ||
<notes><![CDATA[ | ||
This suppresses cpe:/a:csv:csv:1.0 for some.jar in the "c:\path\to" directory. | ||
]]></notes> | ||
<filePath>c:\path\to\some.jar</filePath> | ||
<cpe>cpe:/a:csv:csv:1.0</cpe> | ||
</suppress> | ||
<suppress base="true"> | ||
<notes><![CDATA[ | ||
This suppresses any jboss:jboss cpe for any test.jar in any directory. | ||
]]></notes> | ||
<filePath regex="true">.*\btest\.jar</filePath> | ||
<cpe>cpe:/a:jboss:jboss</cpe> | ||
</suppress> | ||
<suppress> | ||
<notes><![CDATA[ | ||
This suppresses a specific cve for any test.jar in any directory. | ||
]]></notes> | ||
<filePath regex="true">.*\btest\.jar</filePath> | ||
<cve>CVE-2013-1337</cve> | ||
</suppress> | ||
<suppress until="2014-01-01Z"> | ||
<notes><![CDATA[ | ||
This suppresses a specific cve for any dependency in any directory that has the specified sha1 checksum. If current date is not yet on or beyond 1 Jan 2014 | ||
]]></notes> | ||
<sha1>384FAA82E193D4E4B0546059CA09572654BC3970</sha1> | ||
<cve>CVE-2013-1337</cve> | ||
</suppress> | ||
<suppress until="9999-03-25Z"> | ||
<notes><![CDATA[ | ||
This suppresses all CVE entries that have a score below CVSS 7. | ||
But only if current date is not yet on or beyond 31 Dec 9999 | ||
(which is expected to be sufficiently far in the future to have this | ||
rule still be active when the test-cases run) | ||
]]></notes> | ||
<cvssBelow>7</cvssBelow> | ||
</suppress> | ||
</suppressions> |