mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-14 15:53:36 +01:00
Compare commits
205 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dea5a6937e | ||
|
|
545c324e56 | ||
|
|
535d1e4aff | ||
|
|
8debea384f | ||
|
|
a0b6b66a5f | ||
|
|
37d165d6cb | ||
|
|
5b6eb13cf6 | ||
|
|
5d68c9f1e1 | ||
|
|
faff34a8c6 | ||
|
|
c31be72c8a | ||
|
|
1f0c13b7cb | ||
|
|
f06f1d1c42 | ||
|
|
2eca1f9702 | ||
|
|
ca6cb8811e | ||
|
|
ff14d8344f | ||
|
|
bfb6373742 | ||
|
|
e3f401debb | ||
|
|
c515afd8eb | ||
|
|
e028641861 | ||
|
|
72f9cb2ab2 | ||
|
|
e8694de6fa | ||
|
|
18d38592d4 | ||
|
|
b9767acd02 | ||
|
|
c9060da46e | ||
|
|
ddbcea7abe | ||
|
|
e488767cea | ||
|
|
85cacaf91e | ||
|
|
a038bef7fe | ||
|
|
539d3cbaba | ||
|
|
80784a44c5 | ||
|
|
b1a55e2df3 | ||
|
|
870d345de8 | ||
|
|
2b830dccfa | ||
|
|
9f08cf553b | ||
|
|
7c14017db3 | ||
|
|
e0e85c468a | ||
|
|
6628fc3c33 | ||
|
|
61a1531e7b | ||
|
|
933a8f8ec6 | ||
|
|
f660afc6cb | ||
|
|
a5dc79dffe | ||
|
|
dbc862ad39 | ||
|
|
e6efe6e610 | ||
|
|
9a7fbe44eb | ||
|
|
adfc913a0e | ||
|
|
8813652f0d | ||
|
|
250444dd25 | ||
|
|
a939d0c844 | ||
|
|
577b5ad704 | ||
|
|
7476550356 | ||
|
|
c9077a151d | ||
|
|
7e650e05b2 | ||
|
|
8e6b8a092b | ||
|
|
bd6aa7c61b | ||
|
|
300a3211ba | ||
|
|
d4084cfe85 | ||
|
|
7027109272 | ||
|
|
f37f8a7025 | ||
|
|
4758bea71b | ||
|
|
dcbe626d55 | ||
|
|
1d8dddbfbf | ||
|
|
1eae29e255 | ||
|
|
f1d76ecace | ||
|
|
e295bae27a | ||
|
|
2330e71b8a | ||
|
|
6a51fe9564 | ||
|
|
c57c4b1184 | ||
|
|
7de83a77c2 | ||
|
|
0b04cc196a | ||
|
|
5c37b6216f | ||
|
|
2cb56cb6fa | ||
|
|
912b0ef8da | ||
|
|
1fe56dbff7 | ||
|
|
d7d6dd5a62 | ||
|
|
0c100c1372 | ||
|
|
73886ce46e | ||
|
|
55e61caf39 | ||
|
|
2e3331f568 | ||
|
|
a1c7612a85 | ||
|
|
a70cbcc9d3 | ||
|
|
2a5b8943c3 | ||
|
|
24d5616c45 | ||
|
|
43e1ee3e67 | ||
|
|
f40fa460ca | ||
|
|
210d8b9f49 | ||
|
|
84f0a7e76a | ||
|
|
bd71bb601e | ||
|
|
116fe70061 | ||
|
|
231eb5067f | ||
|
|
2562d6ff98 | ||
|
|
bb2abf4529 | ||
|
|
9c0ef770b2 | ||
|
|
43f0fa9e10 | ||
|
|
6925ed78f6 | ||
|
|
2ebe80b12f | ||
|
|
34250f2cfe | ||
|
|
d3153ef0f3 | ||
|
|
5eaaa254ca | ||
|
|
c71bab2404 | ||
|
|
9d3cd0e13a | ||
|
|
033637dd92 | ||
|
|
d6ba01f5f5 | ||
|
|
b3f0fb5392 | ||
|
|
df3aac0794 | ||
|
|
62b6bf9105 | ||
|
|
dba1e0b316 | ||
|
|
0ad97dea0e | ||
|
|
704f8e4f0b | ||
|
|
2de68d9cda | ||
|
|
ca4a91d621 | ||
|
|
c352cd63ac | ||
|
|
351817edf2 | ||
|
|
032015a70a | ||
|
|
096d136387 | ||
|
|
616da84891 | ||
|
|
811f85c127 | ||
|
|
1b021a2eec | ||
|
|
c05490ca09 | ||
|
|
2223b3666f | ||
|
|
561b9d78d4 | ||
|
|
dc1e30bf39 | ||
|
|
28180267e4 | ||
|
|
056b50aeba | ||
|
|
d3b16e5f75 | ||
|
|
c80b0b4286 | ||
|
|
b5c09528d0 | ||
|
|
99ce04a62f | ||
|
|
d30910e711 | ||
|
|
f064c1a229 | ||
|
|
b888e1b5f8 | ||
|
|
1fcefb3bb7 | ||
|
|
6143202428 | ||
|
|
3d15afa0b5 | ||
|
|
9f8270165a | ||
|
|
cd4b02ba2f | ||
|
|
b88272802f | ||
|
|
0b8bb63f61 | ||
|
|
d6e387a29b | ||
|
|
00a35ce93f | ||
|
|
2b1eca171c | ||
|
|
84af7e0906 | ||
|
|
d291033725 | ||
|
|
c9fd6d6cf8 | ||
|
|
bba3e85d0e | ||
|
|
05e480a3b7 | ||
|
|
d99e8f9ef5 | ||
|
|
7d67d3fa86 | ||
|
|
c7f7324d05 | ||
|
|
5a5d699cab | ||
|
|
ea1fb191a9 | ||
|
|
f6f68655fb | ||
|
|
5dcb68c07f | ||
|
|
288b171f5a | ||
|
|
d73ce5c1e2 | ||
|
|
d27cfe45ec | ||
|
|
dad343539e | ||
|
|
5c493248aa | ||
|
|
708ba46040 | ||
|
|
b72a7d0440 | ||
|
|
b67092c472 | ||
|
|
7220a2ca46 | ||
|
|
1165c11d2d | ||
|
|
407aad924d | ||
|
|
72fd37bfa8 | ||
|
|
4dba00ad38 | ||
|
|
283acc5e30 | ||
|
|
cfece9499b | ||
|
|
276078a2e3 | ||
|
|
9e4b39988f | ||
|
|
9a9f03e730 | ||
|
|
d37ea348bf | ||
|
|
9478d5aea3 | ||
|
|
c2dbe4c821 | ||
|
|
41f631d1c0 | ||
|
|
0080b916ce | ||
|
|
73782493b0 | ||
|
|
bb1e47ae43 | ||
|
|
d1194f23d7 | ||
|
|
b9eda7984f | ||
|
|
4b07b59bbc | ||
|
|
4861b1befe | ||
|
|
67c0815d8a | ||
|
|
ff4e40a910 | ||
|
|
7d9fa79bd4 | ||
|
|
78a7fe5b93 | ||
|
|
f08a23fbf9 | ||
|
|
46a5059b36 | ||
|
|
41b3c475ab | ||
|
|
5f798a4814 | ||
|
|
7a4ba451ad | ||
|
|
3c62f8501c | ||
|
|
172558ed8c | ||
|
|
86416292d6 | ||
|
|
d4f097cfbc | ||
|
|
40e4f9cd90 | ||
|
|
38c1e31476 | ||
|
|
9e489c0c55 | ||
|
|
76899996c2 | ||
|
|
283dcae297 | ||
|
|
566f36e577 | ||
|
|
6e23fd7251 | ||
|
|
a16bcfbc10 | ||
|
|
2fcc325af7 | ||
|
|
5334cf7def | ||
|
|
a8a85a5947 |
10
.gitignore
vendored
10
.gitignore
vendored
@@ -1 +1,9 @@
|
||||
/target/
|
||||
/target/
|
||||
# Intellij project files
|
||||
*.iml
|
||||
*.ipr
|
||||
*.iws
|
||||
.idea/
|
||||
# Eclipse project files
|
||||
.classpath
|
||||
.project
|
||||
21
NOTICES.txt
21
NOTICES.txt
@@ -1,8 +1,17 @@
|
||||
DependencyCheck
|
||||
Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
Copyright (c) 2012-2013 Jeremy Long. All Rights Reserved.
|
||||
|
||||
This product includes software developed by
|
||||
The Apache Software Foundation (http://www.apache.org/).
|
||||
|
||||
This product includes software developed by
|
||||
Jquery.com (http://jquery.com/).
|
||||
The licenses for the software listed below can be found in the META-INF/licenses/[dependency name].
|
||||
|
||||
This product includes software developed by The Apache Software Foundation (http://www.apache.org/).
|
||||
|
||||
This product includes software developed by Jquery.com (http://jquery.com/).
|
||||
|
||||
This product includs software developed by Jonathan Hedley (jsoup.org)
|
||||
|
||||
This software contains unmodified binary redistributions for H2 database engine (http://www.h2database.com/), which is dual licensed and available under a modified version of the MPL 1.1 (Mozilla Public License) or under the (unmodified) EPL 1.0 (Eclipse Public License).
|
||||
An original copy of the license agreement can be found at: http://www.h2database.com/html/license.html
|
||||
|
||||
This product includes data from the Common Weakness Enumeration (CWE): http://cwe.mitre.org/
|
||||
|
||||
This product downloads and utilizes data from the National Vulnerability Database hosted by NIST: http://nvd.nist.gov/download.cfm
|
||||
42
README.md
Normal file
42
README.md
Normal file
@@ -0,0 +1,42 @@
|
||||
Dependency-Check
|
||||
=========
|
||||
|
||||
Dependency-Check is a utility that attempts to detect publicly disclosed vulnerabilities contained within project dependencies. It does this by determining if there is a Common Platform Enumeration (CPE) identifier for a given dependency. If found, it will generate a report linking to the associated CVE entries.
|
||||
|
||||
More information can be found on the [wiki].
|
||||
|
||||
Usage
|
||||
-
|
||||
|
||||
> $ mvn package
|
||||
|
||||
> $ cd target
|
||||
|
||||
> $ java -jar dependency-check-[version].jar -h
|
||||
|
||||
> $ java -jar dependency-check-[version].jar -a Testing -out . -scan ./test-classes -scan ./lib
|
||||
|
||||
Then load the resulting 'DependencyCheck-Report.html' into your favorite browser.
|
||||
|
||||
Mailing List
|
||||
-
|
||||
|
||||
Subscribe: [dependency-check+subscribe@googlegroups.com] [subscribe]
|
||||
|
||||
Post: [dependency-check@googlegroups.com] [post]
|
||||
|
||||
Copyright & License
|
||||
-
|
||||
|
||||
Dependency-Check is Copyright (c) 2012-2013 Jeremy Long. All Rights Reserved.
|
||||
|
||||
Permission to modify and redistribute is granted under the terms of the GPLv3 license. See the [LICENSE.txt] [GPLv3] file for the full license.
|
||||
|
||||
Dependency-Check makes use of several other open source libraries. Please see the [NOTICE.txt] [notices] file for more information.
|
||||
|
||||
|
||||
[wiki]: https://github.com/jeremylong/DependencyCheck/wiki
|
||||
[subscribe]: mailto:dependency-check+subscribe@googlegroups.com
|
||||
[post]: mailto:dependency-check@googlegroups.com
|
||||
[GPLv3]: https://github.com/jeremylong/DependencyCheck/blob/master/LICENSE.txt
|
||||
[notices]: https://github.com/jeremylong/DependencyCheck/blob/master/NOTICES.txt
|
||||
17
README.txt
17
README.txt
@@ -1,17 +0,0 @@
|
||||
About:
|
||||
DependencyCheck is a utility that attempts to detect publically disclosed
|
||||
vulnerabilities contained within project dependencies. It does this by determining
|
||||
if there is a Common Platform Enumeration (CPE) identifier for a given dependency.
|
||||
If found, it will generate a report linking to the associated CVE entries.
|
||||
|
||||
Usage:
|
||||
$ mvn package
|
||||
$ cd target
|
||||
$ java -jar DependencyCheck-0.2.3.jar -h
|
||||
$ java -jar DependencyCheck-0.2.3.jar -a Testing -out . -scan ./test-classes/org.mortbay.jetty.jar -scan ./test-classes/struts2-core-2.1.2.jar -scan ./lib
|
||||
|
||||
Then load the resulting 'Testing.html' into your favorite browser.
|
||||
|
||||
Author: Jeremy Long (jeremy.long@gmail.com)
|
||||
|
||||
Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
182
pom.xml
182
pom.xml
@@ -8,43 +8,51 @@ it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
DependencyCheck is distributed in the hope that it will be useful,
|
||||
Dependency-Check is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
along with DependencyCheck. If not, see <http://www.gnu.org/licenses />.
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<groupId>org.codesecure</groupId>
|
||||
<artifactId>DependencyCheck</artifactId>
|
||||
<version>0.2.3</version>
|
||||
<groupId>org.owasp</groupId>
|
||||
<artifactId>dependency-check</artifactId>
|
||||
<version>0.3.2.2</version>
|
||||
<packaging>jar</packaging>
|
||||
|
||||
<name>DependencyCheck</name>
|
||||
<url>https://github.com/jeremylong/DependencyCheck.git</url>
|
||||
<description>DependencyCheck is a utility that attempts to detect publically disclosed vulnerabilities contained within project dependencies. It does this by determining if there is a Common Platform Enumeration (CPE) identifier for a given dependency. If found, it will generate a report linking to the associated CVE entries.</description>
|
||||
<description>Dependency-Check is a utility that attempts to detect publicly disclosed vulnerabilities contained within project dependencies. It does this by determining if there is a Common Platform Enumeration (CPE) identifier for a given dependency. If found, it will generate a report linking to the associated CVE entries.</description>
|
||||
<inceptionYear>2012</inceptionYear>
|
||||
<organization>
|
||||
<name>Jeremy Long</name>
|
||||
<name>owasp</name>
|
||||
</organization>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Jeremy Long</name>
|
||||
<email>jeremy.long@gmail.com</email>
|
||||
<organization>Codesecure</organization>
|
||||
<organizationUrl>http://codesecure.blogspot.com</organizationUrl>
|
||||
<email>jeremy.long@owasp.org</email>
|
||||
<organization>OWASP</organization>
|
||||
<organizationUrl>https://www.owasp.org/index.php/OWASP_Dependency_Check</organizationUrl>
|
||||
<roles>
|
||||
<role>architect</role>
|
||||
<role>developer</role>
|
||||
</roles>
|
||||
</developer>
|
||||
<developer>
|
||||
<name>Steve Springett</name>
|
||||
<email>Steve.Springett@owasp.org</email>
|
||||
<organization>OWASP</organization>
|
||||
<organizationUrl>https://www.owasp.org/index.php/OWASP_Dependency_Check</organizationUrl>
|
||||
<roles>
|
||||
<role>contributor</role>
|
||||
</roles>
|
||||
</developer>
|
||||
</developers>
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:jeremylong/DependencyCheck.git</connection>
|
||||
@@ -55,6 +63,15 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<system>github</system>
|
||||
<url>https://github.com/jeremylong/DependencyCheck/issues</url>
|
||||
</issueManagement>
|
||||
<mailingLists>
|
||||
<mailingList>
|
||||
<name>Dependency Check</name>
|
||||
<subscribe>dependency-check+subscribe@googlegroups.com</subscribe>
|
||||
<unsubscribe>dependency-check+unsubscribe@googlegroups.com</unsubscribe>
|
||||
<post>dependency-check@googlegroups.com</post>
|
||||
<archive>https://groups.google.com/forum/?fromgroups#!forum/dependency-check</archive>
|
||||
</mailingList>
|
||||
</mailingLists>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>GNU General Public License version 3</name>
|
||||
@@ -65,6 +82,7 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
|
||||
</properties>
|
||||
|
||||
<build>
|
||||
<resources>
|
||||
<resource>
|
||||
@@ -93,20 +111,20 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-release-plugin</artifactId>
|
||||
<version>2.3.2</version>
|
||||
<version>2.4.1</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.8.1</version>
|
||||
<version>2.9</version>
|
||||
<configuration>
|
||||
<bottom>Copyright © 2012 Jeremy Long. All Rights Reserved.</bottom>
|
||||
<bottom>Copyright© 2012 Jeremy Long. All Rights Reserved.</bottom>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-dependency-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<version>2.7</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<phase>package</phase>
|
||||
@@ -127,7 +145,7 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifest>
|
||||
<mainClass>org.codesecure.dependencycheck.App</mainClass>
|
||||
<mainClass>org.owasp.dependencycheck.App</mainClass>
|
||||
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
|
||||
<addClasspath>true</addClasspath>
|
||||
<classpathPrefix>lib/</classpathPrefix>
|
||||
@@ -138,11 +156,10 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<version>2.5.2</version>
|
||||
<configuration>
|
||||
<instrumentation>
|
||||
<ignores>
|
||||
@@ -169,17 +186,12 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<lineRate>0</lineRate>
|
||||
</regex>
|
||||
<regex>
|
||||
<pattern>org.codesecure.dependencycheck.data.cpe.Fields</pattern>
|
||||
<pattern>org.owasp.dependencycheck.data.cpe.Fields</pattern>
|
||||
<branchRate>0</branchRate>
|
||||
<lineRate>0</lineRate>
|
||||
</regex>
|
||||
<regex>
|
||||
<pattern>org.codesecure.dependencycheck.App</pattern>
|
||||
<branchRate>0</branchRate>
|
||||
<lineRate>0</lineRate>
|
||||
</regex>
|
||||
<regex>
|
||||
<pattern>org.codesecure.dependencycheck.utils.SSDeep</pattern>
|
||||
<pattern>org.owasp.dependencycheck.App</pattern>
|
||||
<branchRate>0</branchRate>
|
||||
<lineRate>0</lineRate>
|
||||
</regex>
|
||||
@@ -198,7 +210,7 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.12</version>
|
||||
<version>2.14</version>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<property>
|
||||
@@ -206,14 +218,6 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<value>${project.build.directory}/cobertura/cobertura.ser</value>
|
||||
<workingDirectory>target</workingDirectory>
|
||||
</property>
|
||||
<!--<property>
|
||||
<name>cve</name>
|
||||
<value>${project.build.directory}/data/cve</value>
|
||||
</property>
|
||||
<property>
|
||||
<name>cpe</name>
|
||||
<value>${project.build.directory}/data/cpe</value>
|
||||
</property>-->
|
||||
<property>
|
||||
<name>cve</name>
|
||||
<value>target/data/cve</value>
|
||||
@@ -231,7 +235,7 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-failsafe-plugin</artifactId>
|
||||
<version>2.12.4</version>
|
||||
<version>2.14</version>
|
||||
<configuration>
|
||||
<systemProperties>
|
||||
<property>
|
||||
@@ -243,6 +247,9 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<value>target/data/cpe</value>
|
||||
</property>
|
||||
</systemProperties>
|
||||
<includes>
|
||||
<include>**/*IntegrationTest.java</include>
|
||||
</includes>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
@@ -256,17 +263,17 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-site-plugin</artifactId>
|
||||
<version>3.0</version>
|
||||
<version>3.2</version>
|
||||
<configuration>
|
||||
<reportPlugins>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<version>2.6</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
<!--<report>mailing-list</report>-->
|
||||
<report>mailing-list</report>
|
||||
<!--<report>cim</report>-->
|
||||
<report>index</report>
|
||||
<report>summary</report>
|
||||
@@ -283,7 +290,7 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>versions-maven-plugin</artifactId>
|
||||
<version>1.3.1</version>
|
||||
<version>2.0</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
@@ -301,7 +308,7 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||
<version>2.12.2</version>
|
||||
<version>2.14</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<reports>
|
||||
@@ -313,12 +320,12 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>cobertura-maven-plugin</artifactId>
|
||||
<version>2.5.1</version>
|
||||
<version>2.5.2</version>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-pmd-plugin</artifactId>
|
||||
<version>2.7.1</version>
|
||||
<version>3.0.1</version>
|
||||
<configuration>
|
||||
<targetJdk>1.6</targetJdk>
|
||||
<linkXref>true</linkXref>
|
||||
@@ -328,10 +335,34 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
</excludes>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>taglist-maven-plugin</artifactId>
|
||||
<version>2.4</version>
|
||||
<configuration>
|
||||
<tagListOptions>
|
||||
<tagClasses>
|
||||
<tagClass>
|
||||
<displayName>Todo Work</displayName>
|
||||
<tags>
|
||||
<tag>
|
||||
<matchString>todo</matchString>
|
||||
<matchType>ignoreCase</matchType>
|
||||
</tag>
|
||||
<tag>
|
||||
<matchString>FIXME</matchString>
|
||||
<matchType>exact</matchType>
|
||||
</tag>
|
||||
</tags>
|
||||
</tagClass>
|
||||
</tagClasses>
|
||||
</tagListOptions>
|
||||
</configuration>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.8.1</version>
|
||||
<version>2.9</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<id>default</id>
|
||||
@@ -344,7 +375,7 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-checkstyle-plugin</artifactId>
|
||||
<version>2.9.1</version>
|
||||
<version>2.10</version>
|
||||
<configuration>
|
||||
<enableRulesSummary>false</enableRulesSummary>
|
||||
<configLocation>src/main/config/checkstyle-checks.xml</configLocation>
|
||||
@@ -353,7 +384,7 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-report-plugin</artifactId>
|
||||
<version>2.12.4</version>
|
||||
<version>2.14</version>
|
||||
<reportSets>
|
||||
<reportSet>
|
||||
<id>integration-tests</id>
|
||||
@@ -364,34 +395,59 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
</reportSet>
|
||||
</reportSets>
|
||||
</plugin>
|
||||
<plugin>
|
||||
<groupId>org.codehaus.mojo</groupId>
|
||||
<artifactId>findbugs-maven-plugin</artifactId>
|
||||
<version>2.5.2</version>
|
||||
</plugin>
|
||||
</reportPlugins>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>com.google.code.findbugs</groupId>
|
||||
<artifactId>annotations</artifactId>
|
||||
<version>2.0.1</version>
|
||||
<scope>provided</scope><!-- don't include this in the libs-->
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-cli</groupId>
|
||||
<artifactId>commons-cli</artifactId>
|
||||
<version>1.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-io</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>2.4</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>commons-lang</groupId>
|
||||
<artifactId>commons-lang</artifactId>
|
||||
<version>2.5</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<version>4.10</version>
|
||||
<version>4.11</version>
|
||||
<scope>test</scope>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-core</artifactId>
|
||||
<version>3.5.0</version>
|
||||
<version>4.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-io</artifactId>
|
||||
<version>1.3.2</version>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-analyzers-common</artifactId>
|
||||
<version>4.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.lucene</groupId>
|
||||
<artifactId>lucene-queryparser</artifactId>
|
||||
<version>4.3.0</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.apache.velocity</groupId>
|
||||
@@ -442,11 +498,25 @@ along with DependencyCheck. If not, see <http://www.gnu.org/licenses/>.
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
<!--
|
||||
<dependency>
|
||||
<groupId>org.fusesource.hawtdb</groupId>
|
||||
<artifactId>hawtdb</artifactId>
|
||||
<version>1.6</version>
|
||||
<groupId>com.h2database</groupId>
|
||||
<artifactId>h2</artifactId>
|
||||
<version>1.3.172</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.jsoup</groupId>
|
||||
<artifactId>jsoup</artifactId>
|
||||
<version>1.7.2</version>
|
||||
<type>jar</type>
|
||||
</dependency>
|
||||
|
||||
<!-- The following dependencies are only scanned during integration testing -->
|
||||
<!--<dependency>
|
||||
<groupId>org.springframework</groupId>
|
||||
<artifactId>spring-webmvc</artifactId>
|
||||
<version>2.5.5</version>
|
||||
<scope>test</scope>
|
||||
</dependency>-->
|
||||
|
||||
</dependencies>
|
||||
</project>
|
||||
|
||||
@@ -1,205 +1,223 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
Licensed to the Apache Software Foundation (ASF) under one
|
||||
or more contributor license agreements. See the NOTICE file
|
||||
distributed with this work for additional information
|
||||
regarding copyright ownership. The ASF licenses this file
|
||||
to you under the Apache License, Version 2.0 (the
|
||||
"License"); you may not use this file except in compliance
|
||||
with the License. You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing,
|
||||
software distributed under the License is distributed on an
|
||||
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
|
||||
KIND, either express or implied. See the License for the
|
||||
specific language governing permissions and limitations
|
||||
under the License.
|
||||
-->
|
||||
|
||||
<!DOCTYPE module PUBLIC
|
||||
"-//Puppy Crawl//DTD Check Configuration 1.2//EN"
|
||||
"http://www.puppycrawl.com/dtds/configuration_1_2.dtd">
|
||||
|
||||
<!--
|
||||
Checkstyle configuration that checks the maven coding conventions from:
|
||||
-->
|
||||
"-//Puppy Crawl//DTD Check Configuration 1.3//EN"
|
||||
"http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
|
||||
|
||||
<module name="Checker">
|
||||
<!--
|
||||
If you set the basedir property below, then all reported file
|
||||
names will be relative to the specified directory. See
|
||||
http://checkstyle.sourceforge.net/5.x/config.html#Checker
|
||||
|
||||
<!-- Checks that each Java package has a Javadoc file used for commenting. -->
|
||||
<!-- See http://checkstyle.sf.net/config_javadoc.html#JavadocPackage -->
|
||||
<module name="JavadocPackage">
|
||||
<!--property name="allowLegacy" value="true"/-->
|
||||
</module>
|
||||
<property name="basedir" value="${basedir}"/>
|
||||
-->
|
||||
|
||||
<!-- Checks whether files end with a new line. -->
|
||||
<!-- See http://checkstyle.sf.net/config_misc.html#NewlineAtEndOfFile -->
|
||||
<!--module name="NewlineAtEndOfFile">
|
||||
<property name="lineSeparator" value="system"/>
|
||||
<property name="severity" value="error"/>
|
||||
|
||||
<module name="SuppressionFilter">
|
||||
<property name="file" value="src/main/config/checkstyle-suppressions.xml"/>
|
||||
</module>
|
||||
|
||||
<module name="JavadocPackage">
|
||||
<property name="allowLegacy" value="false"/>
|
||||
</module>
|
||||
|
||||
<module name="Translation">
|
||||
<property name="severity" value="warning"/>
|
||||
</module>
|
||||
|
||||
<module name="FileTabCharacter">
|
||||
<property name="eachLine" value="false"/>
|
||||
</module>
|
||||
|
||||
<module name="FileLength">
|
||||
<property name="fileExtensions" value="java"/>
|
||||
</module>
|
||||
|
||||
<module name="NewlineAtEndOfFile">
|
||||
<property name="fileExtensions" value="java"/>
|
||||
<property name="lineSeparator" value="lf"/>
|
||||
</module>
|
||||
|
||||
<module name="RegexpHeader">
|
||||
<property name="headerFile" value="src/main/config/checkstyle-header.txt"/>
|
||||
<property name="fileExtensions" value="java"/>
|
||||
<property name="id" value="header"/>
|
||||
</module>
|
||||
|
||||
<module name="RegexpSingleline">
|
||||
<property name="format" value="\s+$"/>
|
||||
<property name="minimum" value="0"/>
|
||||
<property name="maximum" value="0"/>
|
||||
</module>
|
||||
|
||||
<module name="TreeWalker">
|
||||
<property name="tabWidth" value="4"/>
|
||||
|
||||
<module name="AvoidStarImport"/>
|
||||
<module name="ConstantName"/>
|
||||
<module name="EmptyBlock"/>
|
||||
<module name="EmptyForIteratorPad"/>
|
||||
<module name="EqualsHashCode"/>
|
||||
<module name="OneStatementPerLine"/>
|
||||
|
||||
<!-- module name="IllegalCatch"/ -->
|
||||
<!--module name="ImportControl">
|
||||
<property name="file" value="${checkstyle.importcontrol.file}"/>
|
||||
</module-->
|
||||
|
||||
<module name="SuppressionFilter">
|
||||
<property name="file" value="src/main/config/checkstyle-suppressions.xml"/>
|
||||
<module name="IllegalImport"/>
|
||||
<module name="IllegalInstantiation"/>
|
||||
<module name="IllegalThrows"/>
|
||||
<module name="InnerAssignment"/>
|
||||
<module name="JavadocType">
|
||||
<property name="authorFormat" value="\S"/>
|
||||
</module>
|
||||
<module name="JavadocMethod">
|
||||
<property name="allowUndeclaredRTE" value="true"/>
|
||||
<property name="allowThrowsTagsForSubclasses" value="true"/>
|
||||
<property name="allowMissingPropertyJavadoc" value="true"/>
|
||||
</module>
|
||||
<module name="JavadocVariable"/>
|
||||
<module name="JavadocStyle">
|
||||
<property name="scope" value="public"/>
|
||||
</module>
|
||||
|
||||
<!-- Checks that property files contain the same keys. -->
|
||||
<!-- See http://checkstyle.sf.net/config_misc.html#Translation -->
|
||||
<!-- module name="Translation"/ -->
|
||||
|
||||
<module name="FileLength"/>
|
||||
|
||||
<!-- Checks for Headers -->
|
||||
<!-- See http://checkstyle.sf.net/config_header.html -->
|
||||
<module name="RegexpHeader">
|
||||
<property name="headerFile" value="src/main/config/checkstyle-header.txt"/>
|
||||
</module>
|
||||
|
||||
<module name="FileTabCharacter">
|
||||
<property name="eachLine" value="true"/>
|
||||
<module name="LeftCurly">
|
||||
<property name="option" value="eol"/>
|
||||
<property name="tokens" value="CLASS_DEF"/>
|
||||
<property name="tokens" value="CTOR_DEF"/>
|
||||
<property name="tokens" value="INTERFACE_DEF"/>
|
||||
<property name="tokens" value="METHOD_DEF"/>
|
||||
<property name="tokens" value="LITERAL_CATCH"/>
|
||||
<property name="tokens" value="LITERAL_DO"/>
|
||||
<property name="tokens" value="LITERAL_ELSE"/>
|
||||
<property name="tokens" value="LITERAL_FINALLY"/>
|
||||
<property name="tokens" value="LITERAL_FOR"/>
|
||||
<property name="tokens" value="LITERAL_IF"/>
|
||||
<property name="tokens" value="LITERAL_SWITCH"/>
|
||||
<property name="tokens" value="LITERAL_SYNCHRONIZED"/>
|
||||
<property name="tokens" value="LITERAL_TRY"/>
|
||||
<property name="tokens" value="LITERAL_WHILE"/>
|
||||
</module>
|
||||
|
||||
<!-- Line with trailing spaces (disabled as it's too noisy) -->
|
||||
<module name="RegexpSingleline">
|
||||
<property name="format" value="\s+$"/>
|
||||
<property name="message" value="Line has trailing spaces."/>
|
||||
<module name="OuterTypeNumber"/>
|
||||
<module name="LineLength">
|
||||
<property name="ignorePattern" value="^ *\* *[^ ]+$"/>
|
||||
<property name="max" value="150"/>
|
||||
</module>
|
||||
|
||||
<module name="TreeWalker">
|
||||
|
||||
<property name="cacheFile" value="${checkstyle.cache.file}"/>
|
||||
|
||||
<property name="tabWidth" value="4"/>
|
||||
|
||||
<module name="LeftCurly">
|
||||
<property name="option" value="eol"/>
|
||||
</module>
|
||||
|
||||
<module name="RightCurly">
|
||||
<!--property name="option" value="alone"/-->
|
||||
</module>
|
||||
|
||||
<module name="LineLength">
|
||||
<property name="max" value="150" />
|
||||
<property name="ignorePattern" value="@version|@see|@todo|TODO"/>
|
||||
</module>
|
||||
|
||||
<module name="MemberName" />
|
||||
|
||||
<!-- Checks for Javadoc comments. -->
|
||||
<!-- See http://checkstyle.sf.net/config_javadoc.html -->
|
||||
<module name="JavadocMethod">
|
||||
<property name="severity" value="warning"/>
|
||||
<property name="scope" value="protected"/>
|
||||
</module>
|
||||
<module name="JavadocType">
|
||||
<property name="scope" value="protected"/>
|
||||
<property name="allowUnknownTags" value="true" />
|
||||
</module>
|
||||
<module name="JavadocVariable">
|
||||
<property name="severity" value="info"/>
|
||||
<property name="scope" value="protected"/>
|
||||
</module>
|
||||
|
||||
|
||||
<!-- Checks for Naming Conventions. -->
|
||||
<!-- See http://checkstyle.sf.net/config_naming.html -->
|
||||
<module name="ConstantName"/>
|
||||
<module name="LocalFinalVariableName"/>
|
||||
<module name="LocalVariableName"/>
|
||||
<module name="MethodName"/>
|
||||
<module name="PackageName"/>
|
||||
<module name="ParameterName"/>
|
||||
<module name="StaticVariableName"/>
|
||||
<module name="TypeName"/>
|
||||
|
||||
<!-- Checks for imports -->
|
||||
<!-- See http://checkstyle.sf.net/config_import.html -->
|
||||
<!--<module name="AvoidStarImport"/>-->
|
||||
<module name="IllegalImport"/>
|
||||
<module name="RedundantImport"/>
|
||||
<module name="UnusedImports"/>
|
||||
|
||||
|
||||
<!-- Checks for Size Violations. -->
|
||||
<!-- See http://checkstyle.sf.net/config_sizes.html -->
|
||||
<module name="MethodLength"/>
|
||||
<module name="ParameterNumber"/>
|
||||
|
||||
|
||||
<!-- Checks for whitespace -->
|
||||
<!-- See http://checkstyle.sf.net/config_whitespace.html -->
|
||||
<module name="EmptyForIteratorPad">
|
||||
<property name="option" value="space"/>
|
||||
</module>
|
||||
<module name="OperatorWrap"/>
|
||||
<!--module name="ParenPad">
|
||||
<property name="option" value="space" />
|
||||
</module-->
|
||||
<module name="WhitespaceAfter"/>
|
||||
<module name="WhitespaceAround"/>
|
||||
<!-- module name="MethodParamPad"/ -->
|
||||
|
||||
|
||||
<!-- Modifier Checks -->
|
||||
<!-- See http://checkstyle.sf.net/config_modifiers.html -->
|
||||
<module name="ModifierOrder"/>
|
||||
<module name="RedundantModifier"/>
|
||||
|
||||
|
||||
<!-- Checks for blocks. You know, those {}'s -->
|
||||
<!-- See http://checkstyle.sf.net/config_blocks.html -->
|
||||
<module name="AvoidNestedBlocks"/>
|
||||
<module name="EmptyBlock">
|
||||
<property name="option" value="text"/>
|
||||
</module>
|
||||
<module name="NeedBraces"/>
|
||||
|
||||
|
||||
<!-- Checks for common coding problems -->
|
||||
<!-- See http://checkstyle.sf.net/config_coding.html -->
|
||||
<!-- module name="AvoidInlineConditionals"/ -->
|
||||
<module name="DoubleCheckedLocking"/>
|
||||
<module name="EmptyStatement"/>
|
||||
<module name="EqualsHashCode"/>
|
||||
<module name="HiddenField">
|
||||
<property name="severity" value="warning"/>
|
||||
<property name="ignoreSetter" value="true"/>
|
||||
<property name="ignoreConstructorParameter" value="true"/>
|
||||
</module>
|
||||
<module name="IllegalInstantiation"/>
|
||||
<module name="InnerAssignment"/>
|
||||
<!--
|
||||
<module name="MagicNumber">
|
||||
<property name="ignoreNumbers" value="-4, -3, -2, -1, 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 14, 32, 64, 100, 128, 256, 512, 1000, 1024, 4096"/>
|
||||
</module>
|
||||
-->
|
||||
<module name="MissingSwitchDefault"/>
|
||||
<!--module name="RedundantThrows"/-->
|
||||
<module name="SimplifyBooleanExpression"/>
|
||||
<module name="SimplifyBooleanReturn"/>
|
||||
|
||||
<!-- Checks for class design -->
|
||||
<!-- See http://checkstyle.sf.net/config_design.html -->
|
||||
<!-- module name="DesignForExtension"/ -->
|
||||
<!-- module name="FinalClass"/ -->
|
||||
<module name="HideUtilityClassConstructor"/>
|
||||
<module name="InterfaceIsType"/>
|
||||
<module name="VisibilityModifier">
|
||||
<property name="protectedAllowed" value="true"/>
|
||||
<property name="packageAllowed" value="true"/>
|
||||
</module>
|
||||
|
||||
<!-- Miscellaneous other checks. -->
|
||||
<!-- See http://checkstyle.sf.net/config_misc.html -->
|
||||
<!-- module name="ArrayTypeStyle"/ -->
|
||||
<!-- module name="FinalParameters"/ -->
|
||||
<!-- Let todo plugin handle this.
|
||||
<module name="TodoComment"/>
|
||||
-->
|
||||
<module name="UpperEll"/>
|
||||
|
||||
<module name="MethodCount">
|
||||
<property name="maxTotal" value="40"/>
|
||||
</module>
|
||||
|
||||
</module>
|
||||
<module name="LocalFinalVariableName"/>
|
||||
<module name="LocalVariableName"/>
|
||||
<module name="MemberName">
|
||||
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
|
||||
</module>
|
||||
<module name="MethodLength">
|
||||
<property name="max" value="160"/>
|
||||
<property name="countEmpty" value="false"/>
|
||||
</module>
|
||||
<module name="MethodName"/>
|
||||
<module name="MethodParamPad"/>
|
||||
<module name="ModifierOrder"/>
|
||||
<module name="NeedBraces"/>
|
||||
<module name="NoWhitespaceAfter">
|
||||
<property name="tokens" value="ARRAY_INIT"/>
|
||||
<property name="tokens" value="BNOT"/>
|
||||
<property name="tokens" value="DEC"/>
|
||||
<property name="tokens" value="DOT"/>
|
||||
<property name="tokens" value="INC"/>
|
||||
<property name="tokens" value="LNOT"/>
|
||||
<property name="tokens" value="UNARY_MINUS"/>
|
||||
<property name="tokens" value="UNARY_PLUS"/>
|
||||
</module>
|
||||
|
||||
<module name="NoWhitespaceBefore"/>
|
||||
<module name="NoWhitespaceBefore">
|
||||
<property name="tokens" value="DOT"/>
|
||||
<property name="allowLineBreaks" value="true"/>
|
||||
</module>
|
||||
|
||||
<module name="OperatorWrap"/>
|
||||
<module name="OperatorWrap">
|
||||
<property name="tokens" value="ASSIGN"/>
|
||||
<property name="tokens" value="DIV_ASSIGN"/>
|
||||
<property name="tokens" value="PLUS_ASSIGN"/>
|
||||
<property name="tokens" value="MINUS_ASSIGN"/>
|
||||
<property name="tokens" value="STAR_ASSIGN"/>
|
||||
<property name="tokens" value="MOD_ASSIGN"/>
|
||||
<property name="tokens" value="SR_ASSIGN"/>
|
||||
<property name="tokens" value="BSR_ASSIGN"/>
|
||||
<property name="tokens" value="SL_ASSIGN"/>
|
||||
<property name="tokens" value="BXOR_ASSIGN"/>
|
||||
<property name="tokens" value="BOR_ASSIGN"/>
|
||||
<property name="tokens" value="BAND_ASSIGN"/>
|
||||
<property name="option" value="eol"/>
|
||||
</module>
|
||||
<module name="PackageName"/>
|
||||
<module name="ParameterName">
|
||||
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
|
||||
</module>
|
||||
<module name="ParameterNumber">
|
||||
<property name="id" value="paramNum"/>
|
||||
</module>
|
||||
<module name="ParenPad"/>
|
||||
<module name="TypecastParenPad"/>
|
||||
<module name="RedundantImport"/>
|
||||
<module name="RedundantModifier"/>
|
||||
<module name="RightCurly">
|
||||
<property name="option" value="same"/>
|
||||
</module>
|
||||
<module name="SimplifyBooleanExpression"/>
|
||||
<module name="SimplifyBooleanReturn"/>
|
||||
<module name="StaticVariableName">
|
||||
<property name="format" value="^[a-z][a-zA-Z0-9]*$"/>
|
||||
</module>
|
||||
<module name="TypeName"/>
|
||||
<module name="UnusedImports"/>
|
||||
<module name="UpperEll"/>
|
||||
<module name="VisibilityModifier"/>
|
||||
<module name="WhitespaceAfter"/>
|
||||
<module name="WhitespaceAround"/>
|
||||
<module name="GenericWhitespace"/>
|
||||
<module name="FinalClass"/>
|
||||
<module name="MissingSwitchDefault"/>
|
||||
<!--module name="MagicNumber"/-->
|
||||
<!--module name="Indentation">
|
||||
<property name="basicOffset" value="4"/>
|
||||
<property name="braceAdjustment" value="0"/>
|
||||
<property name="caseIndent" value="0"/>
|
||||
</module-->
|
||||
<module name="ArrayTrailingComma"/>
|
||||
<module name="FinalLocalVariable"/>
|
||||
<module name="EqualsAvoidNull"/>
|
||||
<module name="ParameterAssignment"/>
|
||||
|
||||
<!-- Generates quite a few errors -->
|
||||
<module name="CyclomaticComplexity">
|
||||
<property name="severity" value="ignore"/>
|
||||
</module>
|
||||
|
||||
<module name="NestedForDepth">
|
||||
<property name="max" value="2"/>
|
||||
</module>
|
||||
<module name="NestedIfDepth">
|
||||
<property name="max" value="4"/>
|
||||
</module>
|
||||
<module name="NestedTryDepth">
|
||||
<property name="max" value="2"/>
|
||||
</module>
|
||||
<!--module name="ExplicitInitialization"/-->
|
||||
<module name="AnnotationUseStyle"/>
|
||||
<module name="MissingDeprecated"/>
|
||||
<module name="MissingOverride">
|
||||
<property name="javaFiveCompatibility" value="true"/>
|
||||
</module>
|
||||
<module name="PackageAnnotation"/>
|
||||
<module name="SuppressWarnings"/>
|
||||
<module name="OuterTypeFilename"/>
|
||||
<module name="HideUtilityClassConstructor"/>
|
||||
</module>
|
||||
</module>
|
||||
@@ -1,19 +1,19 @@
|
||||
^package
|
||||
^/\*\s*$
|
||||
^ \* This file is part of DependencyCheck\.\s*$
|
||||
^ \* This file is part of Dependency-Check\.\s*$
|
||||
^ \*\s*$
|
||||
^ \* DependencyCheck is free software\: you can redistribute it and/or modify it\s*$
|
||||
^ \* Dependency-Check is free software\: you can redistribute it and/or modify it\s*$
|
||||
^ \* under the terms of the GNU General Public License as published by the Free\s*$
|
||||
^ \* Software Foundation, either version 3 of the License, or \(at your option\) any\s*$
|
||||
^ \* later version\.
|
||||
^ \*\s*$
|
||||
^ \* DependencyCheck is distributed in the hope that it will be useful, but\s*$
|
||||
^ \* Dependency-Check is distributed in the hope that it will be useful, but\s*$
|
||||
^ \* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or\s*$
|
||||
^ \* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more\s*$
|
||||
^ \* details\.\s*$
|
||||
^ \*\s*$
|
||||
^ \* You should have received a copy of the GNU General Public License along with\s*$
|
||||
^ \* DependencyCheck\. If not, see http://www.gnu.org/licenses/\.\s*$
|
||||
^ \* Dependency-Check\. If not, see http://www.gnu.org/licenses/\.\s*$
|
||||
^ \*\s*$
|
||||
^ \* Copyright \(c\) 2012 Jeremy Long\. All Rights Reserved\.\s*$
|
||||
^ \*/\s*$
|
||||
^ \* Copyright \(c\) 201[23] (Jeremy Long|Steve Springett)\. All Rights Reserved\.\s*$
|
||||
^ \*/\s*$
|
||||
^package
|
||||
|
||||
@@ -6,11 +6,10 @@
|
||||
|
||||
<suppressions>
|
||||
<suppress checks=".*" files=".*[\\/]package-info\.java" />
|
||||
<suppress checks=".*" files=".*org[\\/]codesecure[\\/]dependencycheck[\\/]utils[\\/]SSDeep.java" />
|
||||
<suppress checks=".*" files=".*org[\\/]codesecure[\\/]dependencycheck[\\/]utils[\\/]Filter.java" />
|
||||
<suppress checks=".*" files=".*org[\\/]codesecure[\\/]dependencycheck[\\/]utils[\\/]Checksum.java" />
|
||||
<suppress checks=".*" files=".*org[\\/]owasp[\\/]dependencycheck[\\/]utils[\\/]Filter.java" />
|
||||
<suppress checks=".*" files=".*org[\\/]owasp[\\/]dependencycheck[\\/]utils[\\/]Checksum.java" />
|
||||
<suppress checks=".*" files=".*[\\/]generated[\\/].*.java" />
|
||||
<suppress checks="MagicNumberCheck"
|
||||
files="org[\\/]codesecure[\\/]dependencycheck[\\/]data[\\/]cpe/Entry.java"
|
||||
files="org[\\/]owasp[\\/]dependencycheck[\\/]data[\\/]cpe/Entry.java"
|
||||
lines="376"/>
|
||||
</suppressions>
|
||||
@@ -1,48 +0,0 @@
|
||||
package org.codesecure.dependencycheck.analyzer;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import org.codesecure.dependencycheck.dependency.Dependency;
|
||||
import java.io.IOException;
|
||||
import org.codesecure.dependencycheck.Engine;
|
||||
|
||||
/**
|
||||
* An interface that defines an Analyzer that is used to expand archives and
|
||||
* allow the engine to scan the contents.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public interface ArchiveAnalyzer {
|
||||
|
||||
/**
|
||||
* An ArchiveAnalyzer expands an archive and calls the scan method of the
|
||||
* engine on the exploded contents.
|
||||
*
|
||||
* @param dependency a dependency to analyze.
|
||||
* @param engine the engine that is scanning the dependencies.
|
||||
* @throws IOException is thrown if there is an error reading the dependency
|
||||
* file
|
||||
*/
|
||||
void analyze(Dependency dependency, Engine engine) throws IOException;
|
||||
|
||||
/**
|
||||
* Cleans any temporary files generated when analyzing the archive.
|
||||
*/
|
||||
void cleanup();
|
||||
}
|
||||
@@ -1,183 +0,0 @@
|
||||
package org.codesecure.dependencycheck.analyzer;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import org.codesecure.dependencycheck.dependency.Dependency;
|
||||
import org.codesecure.dependencycheck.dependency.Evidence;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
/**
|
||||
*
|
||||
* Takes a dependency and analyzes the filename and determines the hashes.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class FileNameAnalyzer implements Analyzer {
|
||||
|
||||
/**
|
||||
* The name of the analyzer.
|
||||
*/
|
||||
private static final String ANALYZER_NAME = "File Name Analyzer";
|
||||
/**
|
||||
* The phase that this analyzer is intended to run in.
|
||||
*/
|
||||
private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
|
||||
/**
|
||||
* The set of file extensions supported by this analyzer.
|
||||
*/
|
||||
private static final Set<String> EXTENSIONS = null;
|
||||
|
||||
/**
|
||||
* Returns a list of file EXTENSIONS supported by this analyzer.
|
||||
*
|
||||
* @return a list of file EXTENSIONS supported by this analyzer.
|
||||
*/
|
||||
public Set<String> getSupportedExtensions() {
|
||||
return EXTENSIONS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the analyzer.
|
||||
*
|
||||
* @return the name of the analyzer.
|
||||
*/
|
||||
public String getName() {
|
||||
return ANALYZER_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not this analyzer can process the given extension.
|
||||
*
|
||||
* @param extension the file extension to test for support.
|
||||
* @return whether or not the specified file extension is supported by tihs
|
||||
* analyzer.
|
||||
*/
|
||||
public boolean supportsExtension(String extension) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the phase that the analyzer is intended to run in.
|
||||
*
|
||||
* @return the phase that the analyzer is intended to run in.
|
||||
*/
|
||||
public AnalysisPhase getAnalysisPhase() {
|
||||
return ANALYSIS_PHASE;
|
||||
}
|
||||
|
||||
/**
|
||||
* An enumeration to keep track of the characters in a string as it is being
|
||||
* read in one character at a time.
|
||||
*/
|
||||
private enum STRING_STATE {
|
||||
|
||||
ALPHA,
|
||||
NUMBER,
|
||||
PERIOD,
|
||||
OTHER
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines type of the character passed in.
|
||||
*
|
||||
* @param c a character
|
||||
* @return a STRING_STATE representing whether the character is number,
|
||||
* alpha, or other.
|
||||
*/
|
||||
private STRING_STATE determineState(char c) {
|
||||
if (c >= '0' && c <= '9') {
|
||||
return STRING_STATE.NUMBER;
|
||||
} else if (c == '.') {
|
||||
return STRING_STATE.PERIOD;
|
||||
} else if (c >= 'a' && c <= 'z') {
|
||||
return STRING_STATE.ALPHA;
|
||||
} else {
|
||||
return STRING_STATE.OTHER;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Collects information about the file such as hashsums.
|
||||
*
|
||||
* @param dependency the dependency to analyze.
|
||||
* @throws AnalysisException is thrown if there is an error reading the JAR
|
||||
* file.
|
||||
*/
|
||||
public void analyze(Dependency dependency) throws AnalysisException {
|
||||
|
||||
analyzeFileName(dependency);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Analyzes the filename of the dependency and adds it to the evidence
|
||||
* collections.
|
||||
*
|
||||
* @param dependency the dependency to analyze.
|
||||
*/
|
||||
private void analyzeFileName(Dependency dependency) {
|
||||
String fileName = dependency.getFileName();
|
||||
//slightly process the filename to chunk it into distinct words, numbers.
|
||||
// Yes, the lucene analyzer might do this, but I want a little better control
|
||||
// over the process.
|
||||
String fileNameEvidence = fileName.substring(0, fileName.length() - 4).toLowerCase().replace('-', ' ').replace('_', ' ');
|
||||
StringBuilder sb = new StringBuilder(fileNameEvidence.length());
|
||||
STRING_STATE state = determineState(fileNameEvidence.charAt(0));
|
||||
|
||||
for (int i = 0; i < fileNameEvidence.length(); i++) {
|
||||
char c = fileNameEvidence.charAt(i);
|
||||
STRING_STATE newState = determineState(c);
|
||||
if (newState != state) {
|
||||
if ((state != STRING_STATE.NUMBER && newState == STRING_STATE.PERIOD)
|
||||
|| (state == STRING_STATE.PERIOD && newState != STRING_STATE.NUMBER)
|
||||
|| (state == STRING_STATE.ALPHA || newState == STRING_STATE.ALPHA)
|
||||
|| ((state == STRING_STATE.OTHER || newState == STRING_STATE.OTHER) && c != ' ')) {
|
||||
sb.append(' ');
|
||||
}
|
||||
}
|
||||
state = newState;
|
||||
sb.append(c);
|
||||
}
|
||||
Pattern rx = Pattern.compile("\\s\\s+");
|
||||
fileNameEvidence = rx.matcher(sb.toString()).replaceAll(" ");
|
||||
dependency.getProductEvidence().addEvidence("file", "name",
|
||||
fileNameEvidence, Evidence.Confidence.HIGH);
|
||||
dependency.getVendorEvidence().addEvidence("file", "name",
|
||||
fileNameEvidence, Evidence.Confidence.HIGH);
|
||||
if (fileNameEvidence.matches(".*\\d.*")) {
|
||||
dependency.getVersionEvidence().addEvidence("file", "name",
|
||||
fileNameEvidence, Evidence.Confidence.HIGH);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The initialize method does nothing for this Analyzer
|
||||
*/
|
||||
public void initialize() {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
/**
|
||||
* The close method does nothing for this Analyzer
|
||||
*/
|
||||
public void close() {
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
@@ -1,618 +0,0 @@
|
||||
package org.codesecure.dependencycheck.analyzer;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import org.codesecure.dependencycheck.dependency.Dependency;
|
||||
import org.codesecure.dependencycheck.dependency.Evidence;
|
||||
import org.codesecure.dependencycheck.dependency.EvidenceCollection;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStreamReader;
|
||||
import java.io.Reader;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.Properties;
|
||||
import java.util.Set;
|
||||
import java.util.StringTokenizer;
|
||||
import java.util.jar.Attributes;
|
||||
import java.util.jar.JarFile;
|
||||
import java.util.jar.Manifest;
|
||||
import java.util.zip.ZipEntry;
|
||||
import java.util.zip.ZipInputStream;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import org.codesecure.dependencycheck.analyzer.pom.generated.License;
|
||||
import org.codesecure.dependencycheck.analyzer.pom.generated.Model;
|
||||
import org.codesecure.dependencycheck.analyzer.pom.generated.Organization;
|
||||
import org.codesecure.dependencycheck.utils.NonClosingStream;
|
||||
|
||||
/**
|
||||
*
|
||||
* Used to load a JAR file and collect information that can be used to determine
|
||||
* the associated CPE.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class JarAnalyzer extends AbstractAnalyzer {
|
||||
|
||||
/**
|
||||
* The system independent newline character.
|
||||
*/
|
||||
private static final String NEWLINE = System.getProperty("line.separator");
|
||||
/**
|
||||
* The name of the analyzer.
|
||||
*/
|
||||
private static final String ANALYZER_NAME = "Jar Analyzer";
|
||||
/**
|
||||
* The phase that this analyzer is intended to run in.
|
||||
*/
|
||||
private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INITIAL;
|
||||
/**
|
||||
* A list of elements in the manifest to ignore.
|
||||
*/
|
||||
private static final Set<String> IGNORE_LIST = newHashSet(
|
||||
"built-by",
|
||||
"created-by",
|
||||
"builtby",
|
||||
"createdby",
|
||||
"build-jdk",
|
||||
"buildjdk",
|
||||
"ant-version",
|
||||
"antversion",
|
||||
"import-package",
|
||||
"export-package",
|
||||
"importpackage",
|
||||
"exportpackage",
|
||||
"sealed",
|
||||
"manifest-version",
|
||||
"archiver-version",
|
||||
"manifestversion",
|
||||
"archiverversion",
|
||||
"classpath",
|
||||
"class-path",
|
||||
"tool",
|
||||
"bundle-manifestversion",
|
||||
"bundlemanifestversion");
|
||||
/**
|
||||
* The set of file extensions supported by this analyzer.
|
||||
*/
|
||||
private static final Set<String> EXTENSIONS = newHashSet("jar");
|
||||
/**
|
||||
* item in some manifest, should be considered medium confidence.
|
||||
*/
|
||||
private static final String BUNDLE_VERSION = "Bundle-Version"; //: 2.1.2
|
||||
/**
|
||||
* item in some manifest, should be considered medium confidence.
|
||||
*/
|
||||
private static final String BUNDLE_DESCRIPTION = "Bundle-Description"; //: Apache Struts 2
|
||||
/**
|
||||
* item in some manifest, should be considered medium confidence.
|
||||
*/
|
||||
private static final String BUNDLE_NAME = "Bundle-Name"; //: Struts 2 Core
|
||||
/**
|
||||
* item in some manifest, should be considered medium confidence.
|
||||
*/
|
||||
private static final String BUNDLE_VENDOR = "Bundle-Vendor"; //: Apache Software Foundation
|
||||
/**
|
||||
* The JAXB Contexts used to unmarshall the pom.xml from a JAR file.
|
||||
*/
|
||||
private JAXBContext jaxbContext = null;
|
||||
/**
|
||||
* The unmarshaller used to parse the pom.xml from a JAR file.
|
||||
*/
|
||||
private Unmarshaller pomUnmarshaller = null;
|
||||
|
||||
/**
|
||||
* Constructs a new JarAnalyzer.
|
||||
*/
|
||||
public JarAnalyzer() {
|
||||
try {
|
||||
jaxbContext = JAXBContext.newInstance("org.codesecure.dependencycheck.analyzer.pom.generated");
|
||||
pomUnmarshaller = jaxbContext.createUnmarshaller();
|
||||
} catch (JAXBException ex) { //guess we will just have a null pointer exception later...
|
||||
Logger.getLogger(JarAnalyzer.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a list of file EXTENSIONS supported by this analyzer.
|
||||
*
|
||||
* @return a list of file EXTENSIONS supported by this analyzer.
|
||||
*/
|
||||
public Set<String> getSupportedExtensions() {
|
||||
return EXTENSIONS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the analyzer.
|
||||
*
|
||||
* @return the name of the analyzer.
|
||||
*/
|
||||
public String getName() {
|
||||
return ANALYZER_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not this analyzer can process the given extension.
|
||||
*
|
||||
* @param extension the file extension to test for support.
|
||||
* @return whether or not the specified file extension is supported by tihs
|
||||
* analyzer.
|
||||
*/
|
||||
public boolean supportsExtension(String extension) {
|
||||
return EXTENSIONS.contains(extension);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the phase that the analyzer is intended to run in.
|
||||
*
|
||||
* @return the phase that the analyzer is intended to run in.
|
||||
*/
|
||||
public AnalysisPhase getAnalysisPhase() {
|
||||
return ANALYSIS_PHASE;
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads a specified JAR file and collects information from the manifest and
|
||||
* checksums to identify the correct CPE information.
|
||||
*
|
||||
* @param dependency the dependency to analyze.
|
||||
* @throws AnalysisException is thrown if there is an error reading the JAR
|
||||
* file.
|
||||
*/
|
||||
public void analyze(Dependency dependency) throws AnalysisException {
|
||||
try {
|
||||
parseManifest(dependency);
|
||||
analyzePackageNames(dependency);
|
||||
analyzePOM(dependency);
|
||||
} catch (IOException ex) {
|
||||
throw new AnalysisException("Exception occured reading the JAR file.", ex);
|
||||
} catch (JAXBException ex) {
|
||||
throw new AnalysisException("Exception occured reading the POM within the JAR file.", ex);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to find a pom.xml within the JAR file. If found it extracts information
|
||||
* and adds it to the evidence. This will attempt to interpolate the strings contained
|
||||
* within the pom.properties if one exists.
|
||||
*
|
||||
* @param dependency the dependency being analyzed.
|
||||
* @throws IOException is thrown if there is an error reading the zip file.
|
||||
* @throws JAXBException is thrown if there is an error extracting the model (aka pom).
|
||||
* @throws AnalysisException is thrown if there is an exception parsing the pom.
|
||||
*/
|
||||
protected void analyzePOM(Dependency dependency) throws IOException, JAXBException, AnalysisException {
|
||||
|
||||
Properties pomProperties = null;
|
||||
Model pom = null;
|
||||
FileInputStream fs = null;
|
||||
try {
|
||||
fs = new FileInputStream(dependency.getActualFilePath());
|
||||
ZipInputStream zin = new ZipInputStream(fs);
|
||||
ZipEntry entry = zin.getNextEntry();
|
||||
|
||||
while (entry != null) {
|
||||
String entryName = (new File(entry.getName())).getName().toLowerCase();
|
||||
|
||||
if (!entry.isDirectory() && "pom.xml".equals(entryName)) {
|
||||
if (pom == null) {
|
||||
NonClosingStream stream = new NonClosingStream(zin);
|
||||
JAXBElement obj = (JAXBElement) pomUnmarshaller.unmarshal(stream);
|
||||
pom = (org.codesecure.dependencycheck.analyzer.pom.generated.Model) obj.getValue();
|
||||
zin.closeEntry();
|
||||
} else {
|
||||
throw new AnalysisException("JAR file contains multiple pom.xml files - unable to process POM");
|
||||
}
|
||||
} else if (!entry.isDirectory() && "pom.properties".equals(entryName)) {
|
||||
if (pomProperties == null) {
|
||||
Reader reader = new InputStreamReader(zin);
|
||||
pomProperties = new Properties();
|
||||
pomProperties.load(reader);
|
||||
zin.closeEntry();
|
||||
} else {
|
||||
throw new AnalysisException("JAR file contains multiple pom.properties files - unable to process POM");
|
||||
}
|
||||
}
|
||||
|
||||
entry = zin.getNextEntry();
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
throw new AnalysisException("Error reading JAR file as zip.", ex);
|
||||
} finally {
|
||||
if (fs != null) {
|
||||
fs.close();
|
||||
}
|
||||
}
|
||||
|
||||
if (pom != null) {
|
||||
//group id
|
||||
String groupid = interpolateString(pom.getGroupId(), pomProperties);
|
||||
if (groupid != null) {
|
||||
dependency.getVendorEvidence().addEvidence("pom", "groupid", groupid, Evidence.Confidence.HIGH);
|
||||
dependency.getProductEvidence().addEvidence("pom", "groupid", groupid, Evidence.Confidence.LOW);
|
||||
}
|
||||
//artifact id
|
||||
String artifactid = interpolateString(pom.getArtifactId(), pomProperties);
|
||||
if (artifactid != null) {
|
||||
dependency.getProductEvidence().addEvidence("pom", "artifactid", artifactid, Evidence.Confidence.HIGH);
|
||||
}
|
||||
//version
|
||||
String version = interpolateString(pom.getVersion(), pomProperties);
|
||||
if (version != null) {
|
||||
dependency.getVersionEvidence().addEvidence("pom", "version", version, Evidence.Confidence.HIGH);
|
||||
}
|
||||
// org name
|
||||
Organization org = pom.getOrganization();
|
||||
if (org != null && org.getName() != null) {
|
||||
String orgName = interpolateString(org.getName(), pomProperties);
|
||||
dependency.getVendorEvidence().addEvidence("pom", "organization name", orgName, Evidence.Confidence.HIGH);
|
||||
}
|
||||
//pom name
|
||||
String pomName = interpolateString(pom.getName(), pomProperties);
|
||||
if (pomName != null) {
|
||||
dependency.getProductEvidence().addEvidence("pom", "name", pomName, Evidence.Confidence.HIGH);
|
||||
}
|
||||
|
||||
//Description
|
||||
if (pom.getDescription() != null) {
|
||||
String description = interpolateString(pom.getDescription(), pomProperties);
|
||||
dependency.setDescription(description);
|
||||
dependency.getProductEvidence().addEvidence("pom", "description", description, Evidence.Confidence.MEDIUM);
|
||||
dependency.getVendorEvidence().addEvidence("pom", "description", description, Evidence.Confidence.MEDIUM);
|
||||
}
|
||||
|
||||
//license
|
||||
if (pom.getLicenses() != null) {
|
||||
String license = null;
|
||||
for (License lic : pom.getLicenses().getLicense()) {
|
||||
String tmp = null;
|
||||
if (lic.getName() != null) {
|
||||
tmp = interpolateString(lic.getName(), pomProperties);
|
||||
}
|
||||
if (lic.getUrl() != null) {
|
||||
if (tmp == null) {
|
||||
tmp = interpolateString(lic.getUrl(), pomProperties);
|
||||
} else {
|
||||
tmp += ": " + interpolateString(lic.getUrl(), pomProperties);
|
||||
}
|
||||
}
|
||||
if (tmp == null) {
|
||||
continue;
|
||||
}
|
||||
if (license == null) {
|
||||
license = tmp;
|
||||
} else {
|
||||
license += "\n" + tmp;
|
||||
}
|
||||
}
|
||||
if (license != null) {
|
||||
dependency.setLicense(license);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Analyzes the path information of the classes contained within the
|
||||
* JarAnalyzer to try and determine possible vendor or product names. If any
|
||||
* are found they are stored in the packageVendor and packageProduct
|
||||
* hashSets.
|
||||
*
|
||||
* @param dependency A reference to the dependency.
|
||||
* @throws IOException is thrown if there is an error reading the JAR file.
|
||||
*/
|
||||
protected void analyzePackageNames(Dependency dependency) throws IOException {
|
||||
|
||||
JarFile jar = new JarFile(dependency.getActualFilePath());
|
||||
java.util.Enumeration en = jar.entries();
|
||||
|
||||
HashMap<String, Integer> level0 = new HashMap<String, Integer>();
|
||||
HashMap<String, Integer> level1 = new HashMap<String, Integer>();
|
||||
HashMap<String, Integer> level2 = new HashMap<String, Integer>();
|
||||
HashMap<String, Integer> level3 = new HashMap<String, Integer>();
|
||||
int count = 0;
|
||||
while (en.hasMoreElements()) {
|
||||
java.util.jar.JarEntry entry = (java.util.jar.JarEntry) en.nextElement();
|
||||
if (entry.getName().endsWith(".class") && entry.getName().contains("/")) {
|
||||
String[] path = entry.getName().toLowerCase().split("/");
|
||||
|
||||
if ("java".equals(path[0])
|
||||
|| "javax".equals(path[0])
|
||||
|| ("com".equals(path[0]) && "sun".equals(path[0]))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
count += 1;
|
||||
String temp = path[0];
|
||||
if (level0.containsKey(temp)) {
|
||||
level0.put(temp, level0.get(temp) + 1);
|
||||
} else {
|
||||
level0.put(temp, 1);
|
||||
}
|
||||
|
||||
if (path.length > 2) {
|
||||
temp += "/" + path[1];
|
||||
if (level1.containsKey(temp)) {
|
||||
level1.put(temp, level1.get(temp) + 1);
|
||||
} else {
|
||||
level1.put(temp, 1);
|
||||
}
|
||||
}
|
||||
if (path.length > 3) {
|
||||
temp += "/" + path[2];
|
||||
if (level2.containsKey(temp)) {
|
||||
level2.put(temp, level2.get(temp) + 1);
|
||||
} else {
|
||||
level2.put(temp, 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (path.length > 4) {
|
||||
temp += "/" + path[3];
|
||||
if (level3.containsKey(temp)) {
|
||||
level3.put(temp, level3.get(temp) + 1);
|
||||
} else {
|
||||
level3.put(temp, 1);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
if (count == 0) {
|
||||
return;
|
||||
}
|
||||
EvidenceCollection vendor = dependency.getVendorEvidence();
|
||||
EvidenceCollection product = dependency.getProductEvidence();
|
||||
|
||||
for (String s : level0.keySet()) {
|
||||
if (!"org".equals(s) && !"com".equals(s)) {
|
||||
vendor.addWeighting(s);
|
||||
product.addWeighting(s);
|
||||
vendor.addEvidence("jar", "package", s, Evidence.Confidence.LOW);
|
||||
product.addEvidence("jar", "package", s, Evidence.Confidence.LOW);
|
||||
}
|
||||
}
|
||||
for (String s : level1.keySet()) {
|
||||
float ratio = level1.get(s);
|
||||
ratio /= count;
|
||||
if (ratio > 0.5) {
|
||||
String[] parts = s.split("/");
|
||||
if ("org".equals(parts[0]) || "com".equals(parts[0])) {
|
||||
vendor.addWeighting(parts[1]);
|
||||
vendor.addEvidence("jar", "package", parts[1], Evidence.Confidence.LOW);
|
||||
} else {
|
||||
vendor.addWeighting(parts[0]);
|
||||
product.addWeighting(parts[1]);
|
||||
vendor.addEvidence("jar", "package", parts[0], Evidence.Confidence.LOW);
|
||||
product.addEvidence("jar", "package", parts[1], Evidence.Confidence.LOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (String s : level2.keySet()) {
|
||||
float ratio = level2.get(s);
|
||||
ratio /= count;
|
||||
if (ratio > 0.4) {
|
||||
String[] parts = s.split("/");
|
||||
if ("org".equals(parts[0]) || "com".equals(parts[0])) {
|
||||
vendor.addWeighting(parts[1]);
|
||||
product.addWeighting(parts[2]);
|
||||
vendor.addEvidence("jar", "package", parts[1], Evidence.Confidence.LOW);
|
||||
product.addEvidence("jar", "package", parts[2], Evidence.Confidence.LOW);
|
||||
} else {
|
||||
vendor.addWeighting(parts[0]);
|
||||
vendor.addWeighting(parts[1]);
|
||||
product.addWeighting(parts[1]);
|
||||
product.addWeighting(parts[2]);
|
||||
vendor.addEvidence("jar", "package", parts[0], Evidence.Confidence.LOW);
|
||||
vendor.addEvidence("jar", "package", parts[1], Evidence.Confidence.LOW);
|
||||
product.addEvidence("jar", "package", parts[1], Evidence.Confidence.LOW);
|
||||
product.addEvidence("jar", "package", parts[2], Evidence.Confidence.LOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
for (String s : level3.keySet()) {
|
||||
float ratio = level3.get(s);
|
||||
ratio /= count;
|
||||
if (ratio > 0.3) {
|
||||
String[] parts = s.split("/");
|
||||
if ("org".equals(parts[0]) || "com".equals(parts[0])) {
|
||||
vendor.addWeighting(parts[1]);
|
||||
vendor.addWeighting(parts[2]);
|
||||
product.addWeighting(parts[2]);
|
||||
product.addWeighting(parts[3]);
|
||||
vendor.addEvidence("jar", "package", parts[1], Evidence.Confidence.LOW);
|
||||
vendor.addEvidence("jar", "package", parts[2], Evidence.Confidence.LOW);
|
||||
product.addEvidence("jar", "package", parts[2], Evidence.Confidence.LOW);
|
||||
product.addEvidence("jar", "package", parts[3], Evidence.Confidence.LOW);
|
||||
|
||||
} else {
|
||||
vendor.addWeighting(parts[0]);
|
||||
vendor.addWeighting(parts[1]);
|
||||
vendor.addWeighting(parts[2]);
|
||||
product.addWeighting(parts[1]);
|
||||
product.addWeighting(parts[2]);
|
||||
product.addWeighting(parts[3]);
|
||||
vendor.addEvidence("jar", "package", parts[0], Evidence.Confidence.LOW);
|
||||
vendor.addEvidence("jar", "package", parts[1], Evidence.Confidence.LOW);
|
||||
vendor.addEvidence("jar", "package", parts[2], Evidence.Confidence.LOW);
|
||||
product.addEvidence("jar", "package", parts[1], Evidence.Confidence.LOW);
|
||||
product.addEvidence("jar", "package", parts[2], Evidence.Confidence.LOW);
|
||||
product.addEvidence("jar", "package", parts[3], Evidence.Confidence.LOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Reads the manifest from the JAR file and collects the entries. Some
|
||||
* key entries are:</p> <ul><li>Implementation Title</li> <li>Implementation
|
||||
* Version</li> <li>Implementation Vendor</li> <li>Implementation
|
||||
* VendorId</li> <li>Bundle Name</li> <li>Bundle Version</li> <li>Bundle
|
||||
* Vendor</li> <li>Bundle Description</li> <li>Main Class</li> </ul>
|
||||
* However, all but a handful of specific entries are read in.
|
||||
*
|
||||
* @param dependency A reference to the dependency.
|
||||
* @throws IOException if there is an issue reading the JAR file.
|
||||
*/
|
||||
protected void parseManifest(Dependency dependency) throws IOException {
|
||||
JarFile jar = new JarFile(dependency.getActualFilePath());
|
||||
Manifest manifest = jar.getManifest();
|
||||
Attributes atts = manifest.getMainAttributes();
|
||||
|
||||
EvidenceCollection vendorEvidence = dependency.getVendorEvidence();
|
||||
EvidenceCollection productEvidence = dependency.getProductEvidence();
|
||||
EvidenceCollection versionEvidence = dependency.getVersionEvidence();
|
||||
|
||||
String source = "Manifest";
|
||||
|
||||
for (Entry<Object, Object> entry : atts.entrySet()) {
|
||||
String key = entry.getKey().toString();
|
||||
String value = atts.getValue(key);
|
||||
if (key.equals(Attributes.Name.IMPLEMENTATION_TITLE.toString())) {
|
||||
productEvidence.addEvidence(source, key, value, Evidence.Confidence.HIGH);
|
||||
} else if (key.equals(Attributes.Name.IMPLEMENTATION_VERSION.toString())) {
|
||||
versionEvidence.addEvidence(source, key, value, Evidence.Confidence.HIGH);
|
||||
} else if (key.equals(Attributes.Name.IMPLEMENTATION_VENDOR.toString())) {
|
||||
vendorEvidence.addEvidence(source, key, value, Evidence.Confidence.HIGH);
|
||||
} else if (key.equals(Attributes.Name.IMPLEMENTATION_VENDOR_ID.toString())) {
|
||||
vendorEvidence.addEvidence(source, key, value, Evidence.Confidence.MEDIUM);
|
||||
} else if (key.equals(BUNDLE_DESCRIPTION)) {
|
||||
productEvidence.addEvidence(source, key, value, Evidence.Confidence.MEDIUM);
|
||||
dependency.setDescription(value);
|
||||
} else if (key.equals(BUNDLE_NAME)) {
|
||||
productEvidence.addEvidence(source, key, value, Evidence.Confidence.MEDIUM);
|
||||
} else if (key.equals(BUNDLE_VENDOR)) {
|
||||
vendorEvidence.addEvidence(source, key, value, Evidence.Confidence.HIGH);
|
||||
} else if (key.equals(BUNDLE_VERSION)) {
|
||||
versionEvidence.addEvidence(source, key, value, Evidence.Confidence.HIGH);
|
||||
} else if (key.equals(Attributes.Name.MAIN_CLASS.toString())) {
|
||||
productEvidence.addEvidence(source, key, value, Evidence.Confidence.MEDIUM);
|
||||
vendorEvidence.addEvidence(source, key, value, Evidence.Confidence.MEDIUM);
|
||||
} else {
|
||||
key = key.toLowerCase();
|
||||
|
||||
if (!IGNORE_LIST.contains(key) && !key.endsWith("jdk")
|
||||
&& !key.contains("lastmodified") && !key.endsWith("package")) {
|
||||
|
||||
if (key.contains("version")) {
|
||||
versionEvidence.addEvidence(source, key, value, Evidence.Confidence.MEDIUM);
|
||||
} else if (key.contains("title")) {
|
||||
productEvidence.addEvidence(source, key, value, Evidence.Confidence.MEDIUM);
|
||||
} else if (key.contains("vendor")) {
|
||||
vendorEvidence.addEvidence(source, key, value, Evidence.Confidence.MEDIUM);
|
||||
} else if (key.contains("name")) {
|
||||
productEvidence.addEvidence(source, key, value, Evidence.Confidence.MEDIUM);
|
||||
vendorEvidence.addEvidence(source, key, value, Evidence.Confidence.MEDIUM);
|
||||
} else if (key.contains("license")) {
|
||||
addLicense(dependency, value);
|
||||
} else {
|
||||
if (key.contains("description")) {
|
||||
addDescription(dependency, value);
|
||||
}
|
||||
productEvidence.addEvidence(source, key, value, Evidence.Confidence.LOW);
|
||||
vendorEvidence.addEvidence(source, key, value, Evidence.Confidence.LOW);
|
||||
if (value.matches(".*\\d.*")) {
|
||||
StringTokenizer tokenizer = new StringTokenizer(value, " ");
|
||||
while (tokenizer.hasMoreElements()) {
|
||||
String s = tokenizer.nextToken();
|
||||
if (s.matches("^[0-9.]+$")) {
|
||||
versionEvidence.addEvidence(source, key, s, Evidence.Confidence.LOW);
|
||||
}
|
||||
}
|
||||
//versionEvidence.addEvidence(source, key, value, Evidence.Confidence.LOW);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void addDescription(Dependency d, String description) {
|
||||
if (d.getDescription() == null) {
|
||||
d.setDescription(description);
|
||||
}
|
||||
}
|
||||
|
||||
private void addLicense(Dependency d, String license) {
|
||||
if (d.getLicense() == null) {
|
||||
d.setLicense(license);
|
||||
} else if (!d.getLicense().contains(license)) {
|
||||
d.setLicense(d.getLicense() + NEWLINE + license);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* The initialize method does nothing for this Analyzer
|
||||
*/
|
||||
public void initialize() {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
/**
|
||||
* The close method does nothing for this Analyzer
|
||||
*/
|
||||
public void close() {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
/**
|
||||
* A utiltiy function that will interpolate strings based on values given
|
||||
* in the properties file. It will also interpolate the strings contained
|
||||
* within the properties file so that properties can reference other
|
||||
* properties.
|
||||
*
|
||||
* @param text the string that contains references to properties.
|
||||
* @param properties a collection of properties that may be referenced within the text.
|
||||
* @return the interpolated text.
|
||||
*/
|
||||
protected String interpolateString(String text, Properties properties) {
|
||||
//${project.build.directory}
|
||||
if (properties == null || text == null) {
|
||||
return text;
|
||||
}
|
||||
|
||||
int pos = text.indexOf("${");
|
||||
if (pos < 0) {
|
||||
return text;
|
||||
}
|
||||
int end = text.indexOf("}");
|
||||
if (end < pos) {
|
||||
return text;
|
||||
}
|
||||
|
||||
String propName = text.substring(pos + 2, end);
|
||||
String propValue = interpolateString(properties.getProperty(propName), properties);
|
||||
if (propValue == null) {
|
||||
propValue = "";
|
||||
}
|
||||
StringBuilder sb = new StringBuilder(propValue.length() + text.length());
|
||||
sb.append(text.subSequence(0, pos));
|
||||
sb.append(propValue);
|
||||
sb.append(text.substring(end + 1));
|
||||
return interpolateString(sb.toString(), properties); //yes yes, this should be a loop...
|
||||
}
|
||||
}
|
||||
@@ -1,15 +0,0 @@
|
||||
/**
|
||||
* <html>
|
||||
* <head>
|
||||
* <title>org.codesecure.dependencycheck.scanner</title>
|
||||
* </head>
|
||||
* <body>
|
||||
* The scanner package contains the utilities to scan files and directories for
|
||||
* dependencies. Analyzers are used to inspect the identified dependencies and
|
||||
* collect Evidence. This evidence is then used to determine if the dependency
|
||||
* has a known CPE.
|
||||
* </body>
|
||||
* </html>
|
||||
*/
|
||||
|
||||
package org.codesecure.dependencycheck.analyzer;
|
||||
@@ -1,320 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.cpe;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.OutputStream;
|
||||
import java.io.OutputStreamWriter;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Properties;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import org.apache.lucene.analysis.Analyzer;
|
||||
import org.apache.lucene.analysis.KeywordAnalyzer;
|
||||
import org.apache.lucene.analysis.PerFieldAnalyzerWrapper;
|
||||
import org.apache.lucene.analysis.standard.StandardAnalyzer;
|
||||
import org.apache.lucene.store.Directory;
|
||||
import org.apache.lucene.store.FSDirectory;
|
||||
import org.apache.lucene.util.Version;
|
||||
import org.codesecure.dependencycheck.data.lucene.AbstractIndex;
|
||||
import org.codesecure.dependencycheck.data.CachedWebDataSource;
|
||||
import org.codesecure.dependencycheck.data.UpdateException;
|
||||
import org.codesecure.dependencycheck.utils.Downloader;
|
||||
import org.codesecure.dependencycheck.utils.Settings;
|
||||
import org.codesecure.dependencycheck.data.cpe.xml.Importer;
|
||||
import org.codesecure.dependencycheck.utils.DownloadFailedException;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
/**
|
||||
* The Index class is used to utilize and maintain the CPE Index.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class Index extends AbstractIndex implements CachedWebDataSource {
|
||||
|
||||
/**
|
||||
* The name of the properties file containing the timestamp of the last
|
||||
* update.
|
||||
*/
|
||||
private static final String UPDATE_PROPERTIES_FILE = "lastupdated.prop";
|
||||
/**
|
||||
* The properties file key for the last updated field.
|
||||
*/
|
||||
private static final String LAST_UPDATED = "lastupdated";
|
||||
|
||||
/**
|
||||
* Returns the directory that holds the CPE Index.
|
||||
*
|
||||
* @return the Directory containing the CPE Index.
|
||||
* @throws IOException is thrown if an IOException occurs.
|
||||
*/
|
||||
public Directory getDirectory() throws IOException {
|
||||
File path = getDataDirectory();
|
||||
Directory dir = FSDirectory.open(path);
|
||||
|
||||
return dir;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the directory that the JAR file exists in so that
|
||||
* we can ensure we always use a common data directory.
|
||||
*
|
||||
* @return the data directory for this index.
|
||||
* @throws IOException is thrown if an IOException occurs of course...
|
||||
*/
|
||||
protected File getDataDirectory() throws IOException {
|
||||
String fileName = Settings.getString(Settings.KEYS.CPE_INDEX);
|
||||
String filePath = Index.class.getProtectionDomain().getCodeSource().getLocation().getPath();
|
||||
String decodedPath = URLDecoder.decode(filePath, "UTF-8");
|
||||
File exePath = new File(decodedPath);
|
||||
if (exePath.getName().toLowerCase().endsWith(".jar")) {
|
||||
exePath = exePath.getParentFile();
|
||||
} else {
|
||||
exePath = new File(".");
|
||||
}
|
||||
File path = new File(exePath.getCanonicalFile() + File.separator + fileName);
|
||||
path = new File(path.getCanonicalPath());
|
||||
return path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an Analyzer for the CPE Index.
|
||||
*
|
||||
* @return the CPE Analyzer.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Analyzer createAnalyzer() {
|
||||
Map fieldAnalyzers = new HashMap();
|
||||
|
||||
fieldAnalyzers.put(Fields.VERSION, new KeywordAnalyzer());
|
||||
|
||||
PerFieldAnalyzerWrapper wrapper = new PerFieldAnalyzerWrapper(
|
||||
new StandardAnalyzer(Version.LUCENE_35), fieldAnalyzers);
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* Downloads the latest CPE XML file from the web and imports it into the
|
||||
* current CPE Index.
|
||||
*
|
||||
* @throws UpdateException is thrown if there is a problem updating the
|
||||
* index.
|
||||
*/
|
||||
public void update() throws UpdateException {
|
||||
try {
|
||||
long timeStamp = updateNeeded();
|
||||
if (timeStamp > 0) {
|
||||
URL url = new URL(Settings.getString(Settings.KEYS.CPE_URL));
|
||||
Logger.getLogger(Index.class.getName()).log(Level.WARNING, "Updating CPE :" + url.toString());
|
||||
File outputPath = null;
|
||||
try {
|
||||
outputPath = File.createTempFile("cpe", ".xml");
|
||||
Downloader.fetchFile(url, outputPath, true);
|
||||
Importer.importXML(outputPath.toString());
|
||||
writeLastUpdatedPropertyFile(timeStamp);
|
||||
} catch (ParserConfigurationException ex) {
|
||||
//Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException(ex);
|
||||
} catch (SAXException ex) {
|
||||
//Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException(ex);
|
||||
} catch (IOException ex) {
|
||||
//Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException(ex);
|
||||
} finally {
|
||||
try {
|
||||
if (outputPath != null && outputPath.exists()) {
|
||||
outputPath.delete();
|
||||
}
|
||||
} finally {
|
||||
if (outputPath != null && outputPath.exists()) {
|
||||
outputPath.deleteOnExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (MalformedURLException ex) {
|
||||
//Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException(ex);
|
||||
} catch (DownloadFailedException ex) {
|
||||
//Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a properties file containing the last updated date to the CPE
|
||||
* directory.
|
||||
*
|
||||
* @param timeStamp the timestamp to write.
|
||||
*/
|
||||
private void writeLastUpdatedPropertyFile(long timeStamp) throws UpdateException {
|
||||
String dir;
|
||||
try {
|
||||
dir = getDataDirectory().getCanonicalPath();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException("Unable to locate the last updated properties file.", ex);
|
||||
}
|
||||
File cpeProp = new File(dir + File.separatorChar + UPDATE_PROPERTIES_FILE);
|
||||
Properties prop = new Properties();
|
||||
prop.put(Index.LAST_UPDATED, String.valueOf(timeStamp));
|
||||
OutputStream os = null;
|
||||
try {
|
||||
os = new FileOutputStream(cpeProp);
|
||||
OutputStreamWriter out = new OutputStreamWriter(os);
|
||||
prop.store(out, dir);
|
||||
} catch (FileNotFoundException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} finally {
|
||||
try {
|
||||
os.flush();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
try {
|
||||
os.close();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the index needs to be updated. This is done by fetching the
|
||||
* cpe.meta data and checking the lastModifiedDate. If the CPE data needs to
|
||||
* be refreshed this method will return the timestamp of the new CPE. If an
|
||||
* update is not required this function will return 0.
|
||||
*
|
||||
* @return the timestamp of the currently published CPE.xml if the index
|
||||
* needs to be updated, otherwise returns 0..
|
||||
* @throws MalformedURLException is thrown if the URL for the CPE Meta data
|
||||
* is incorrect.
|
||||
* @throws DownloadFailedException is thrown if there is an error
|
||||
* downloading the cpe.meta data file.
|
||||
* @throws UpdateException is thrown if there is an error locating the last updated
|
||||
* properties file.
|
||||
*/
|
||||
public long updateNeeded() throws MalformedURLException, DownloadFailedException, UpdateException {
|
||||
long retVal = 0;
|
||||
long lastUpdated = 0;
|
||||
long currentlyPublishedDate = retrieveCurrentCPETimestampFromWeb();
|
||||
if (currentlyPublishedDate == 0) {
|
||||
throw new DownloadFailedException("Unable to retrieve valid timestamp from cpe.meta file");
|
||||
}
|
||||
|
||||
//String dir = Settings.getString(Settings.KEYS.CPE_INDEX);
|
||||
File f;
|
||||
try {
|
||||
f = getDataDirectory(); //new File(dir);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException("Unable to locate last updated properties file.", ex);
|
||||
}
|
||||
if (!f.exists()) {
|
||||
retVal = currentlyPublishedDate;
|
||||
} else {
|
||||
File cpeProp;
|
||||
try {
|
||||
cpeProp = new File(f.getCanonicalPath() + File.separatorChar + UPDATE_PROPERTIES_FILE);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException("Unable to find last updated properties file.", ex);
|
||||
}
|
||||
if (!cpeProp.exists()) {
|
||||
retVal = currentlyPublishedDate;
|
||||
} else {
|
||||
Properties prop = new Properties();
|
||||
InputStream is = null;
|
||||
try {
|
||||
is = new FileInputStream(cpeProp);
|
||||
prop.load(is);
|
||||
lastUpdated = Long.parseLong(prop.getProperty(Index.LAST_UPDATED));
|
||||
} catch (FileNotFoundException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.FINEST, null, ex);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.FINEST, null, ex);
|
||||
} catch (NumberFormatException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.FINEST, null, ex);
|
||||
}
|
||||
if (currentlyPublishedDate > lastUpdated) {
|
||||
retVal = currentlyPublishedDate;
|
||||
}
|
||||
}
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the timestamp from the CPE meta data file.
|
||||
*
|
||||
* @return the timestamp from the currently published cpe.meta.
|
||||
* @throws MalformedURLException is thrown if the URL for the CPE Meta data
|
||||
* is incorrect.
|
||||
* @throws DownloadFailedException is thrown if there is an error
|
||||
* downloading the cpe.meta data file.
|
||||
*/
|
||||
private long retrieveCurrentCPETimestampFromWeb() throws MalformedURLException, DownloadFailedException {
|
||||
long timestamp = 0;
|
||||
File tmp = null;
|
||||
InputStream is = null;
|
||||
try {
|
||||
tmp = File.createTempFile("cpe", "meta");
|
||||
URL url = new URL(Settings.getString(Settings.KEYS.CPE_META_URL));
|
||||
Downloader.fetchFile(url, tmp);
|
||||
Properties prop = new Properties();
|
||||
is = new FileInputStream(tmp);
|
||||
prop.load(is);
|
||||
timestamp = Long.parseLong(prop.getProperty("lastModifiedDate"));
|
||||
} catch (IOException ex) {
|
||||
throw new DownloadFailedException("Unable to create temporary file for CPE Meta File download.", ex);
|
||||
} finally {
|
||||
try {
|
||||
if (is != null) {
|
||||
try {
|
||||
is.close();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.FINEST, null, ex);
|
||||
}
|
||||
}
|
||||
if (tmp != null && tmp.exists()) {
|
||||
tmp.delete();
|
||||
}
|
||||
} finally {
|
||||
if (tmp != null && tmp.exists()) {
|
||||
tmp.deleteOnExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
return timestamp;
|
||||
}
|
||||
}
|
||||
@@ -1,351 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.cpe.xml;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.text.ParseException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.apache.lucene.index.CorruptIndexException;
|
||||
import org.codesecure.dependencycheck.data.cpe.Entry;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
|
||||
/**
|
||||
* A SAX Handler that will parse the CPE XML Listing.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class CPEHandler extends DefaultHandler {
|
||||
|
||||
private static final String CURRENT_SCHEMA_VERSION = "2.2";
|
||||
EntrySaveDelegate saveDelegate = null;
|
||||
Entry entry = null;
|
||||
boolean languageIsUS = false;
|
||||
StringBuilder nodeText = null;
|
||||
boolean skip = false;
|
||||
Element current = new Element();
|
||||
|
||||
/**
|
||||
* Register a EntrySaveDelegate object. When the last node of an entry is
|
||||
* reached if a save delegate has been registered the save method will be
|
||||
* invoked.
|
||||
*
|
||||
* @param delegate the delegate used to save an entry
|
||||
*/
|
||||
public void registerSaveDelegate(EntrySaveDelegate delegate) {
|
||||
this.saveDelegate = delegate;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void startElement(String uri, String localName, String qName, Attributes attributes) throws SAXException {
|
||||
nodeText = null;
|
||||
current.setNode(qName);
|
||||
if (current.isCpeItemNode()) {
|
||||
entry = new Entry();
|
||||
String temp = attributes.getValue("deprecated");
|
||||
String name = attributes.getValue("name");
|
||||
skip = (temp != null && temp.equals("true"));
|
||||
try {
|
||||
if (!skip && name.startsWith("cpe:/a:")) {
|
||||
entry.setName(name);
|
||||
} else {
|
||||
skip = true;
|
||||
}
|
||||
} catch (UnsupportedEncodingException ex) {
|
||||
throw new SAXException(ex);
|
||||
}
|
||||
} else if (current.isTitleNode()) {
|
||||
nodeText = new StringBuilder(100);
|
||||
if ("en-US".equalsIgnoreCase(attributes.getValue("xml:lang"))) {
|
||||
languageIsUS = true;
|
||||
} else {
|
||||
languageIsUS = false;
|
||||
}
|
||||
} else if (current.isMetaNode()) {
|
||||
try {
|
||||
entry.setModificationDate(attributes.getValue("modification-date"));
|
||||
} catch (ParseException ex) {
|
||||
Logger.getLogger(CPEHandler.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
entry.setStatus(attributes.getValue("status"));
|
||||
entry.setNvdId(attributes.getValue("nvd-id"));
|
||||
} else if (current.isSchemaVersionNode()) {
|
||||
nodeText = new StringBuilder(3);
|
||||
} else if (current.isTimestampNode()) {
|
||||
nodeText = new StringBuilder(24);
|
||||
}
|
||||
// } else if (current.isCpeListNode()) {
|
||||
// //do nothing
|
||||
// } else if (current.isNotesNode()) {
|
||||
// //do nothing
|
||||
// } else if (current.isNoteNode()) {
|
||||
// //do nothing
|
||||
// } else if (current.isCheckNode()) {
|
||||
// //do nothing
|
||||
// } else if (current.isGeneratorNode()) {
|
||||
// //do nothing
|
||||
// } else if (current.isProductNameNode()) {
|
||||
// //do nothing
|
||||
// } else if (current.isProductVersionNode()) {
|
||||
// //do nothing
|
||||
}
|
||||
|
||||
@Override
|
||||
public void characters(char[] ch, int start, int length) throws SAXException {
|
||||
//nodeText += new String(ch, start, length);
|
||||
if (nodeText != null) {
|
||||
nodeText.append(ch, start, length);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void endElement(String uri, String localName, String qName) throws SAXException {
|
||||
current.setNode(qName);
|
||||
if (current.isCpeItemNode()) {
|
||||
if (saveDelegate != null && !skip) {
|
||||
try {
|
||||
saveDelegate.saveEntry(entry);
|
||||
} catch (CorruptIndexException ex) {
|
||||
Logger.getLogger(CPEHandler.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new SAXException(ex);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(CPEHandler.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new SAXException(ex);
|
||||
}
|
||||
entry = null;
|
||||
}
|
||||
} else if (current.isTitleNode()) {
|
||||
if (languageIsUS) {
|
||||
entry.setTitle(nodeText.toString());
|
||||
}
|
||||
} else if (current.isSchemaVersionNode() && !CURRENT_SCHEMA_VERSION.equals(nodeText.toString())) {
|
||||
throw new SAXException("ERROR: Invalid Schema Version, expected: "
|
||||
+ CURRENT_SCHEMA_VERSION + ", file is: " + nodeText);
|
||||
}
|
||||
// } else if (current.isCpeListNode()) {
|
||||
// //do nothing
|
||||
// } else if (current.isMetaNode()) {
|
||||
// //do nothing
|
||||
// } else if (current.isNotesNode()) {
|
||||
// //do nothing
|
||||
// } else if (current.isNoteNode()) {
|
||||
// //do nothing
|
||||
// } else if (current.isCheckNode()) {
|
||||
// //do nothing
|
||||
// } else if (current.isGeneratorNode()) {
|
||||
// //do nothing
|
||||
// } else if (current.isProductNameNode()) {
|
||||
// //do nothing
|
||||
// } else if (current.isProductVersionNode()) {
|
||||
// //do nothing
|
||||
// else if (current.isTimestampNode()) {
|
||||
// //do nothing
|
||||
// } else {
|
||||
// throw new SAXException("ERROR STATE: Unexpected qName '" + qName + "'");
|
||||
// }
|
||||
}
|
||||
|
||||
// <editor-fold defaultstate="collapsed" desc="The Element Class that maintains state information about the current node">
|
||||
/**
|
||||
* A simple class to maintain information about the current element while
|
||||
* parsing the CPE XML.
|
||||
*/
|
||||
protected class Element {
|
||||
|
||||
/**
|
||||
* A node type in the CPE Schema 2.2
|
||||
*/
|
||||
public static final String CPE_LIST = "cpe-list";
|
||||
/**
|
||||
* A node type in the CPE Schema 2.2
|
||||
*/
|
||||
public static final String CPE_ITEM = "cpe-item";
|
||||
/**
|
||||
* A node type in the CPE Schema 2.2
|
||||
*/
|
||||
public static final String TITLE = "title";
|
||||
/**
|
||||
* A node type in the CPE Schema 2.2
|
||||
*/
|
||||
public static final String NOTES = "notes";
|
||||
/**
|
||||
* A node type in the CPE Schema 2.2
|
||||
*/
|
||||
public static final String NOTE = "note";
|
||||
/**
|
||||
* A node type in the CPE Schema 2.2
|
||||
*/
|
||||
public static final String CHECK = "check";
|
||||
/**
|
||||
* A node type in the CPE Schema 2.2
|
||||
*/
|
||||
public static final String META = "meta:item-metadata";
|
||||
/**
|
||||
* A node type in the CPE Schema 2.2
|
||||
*/
|
||||
public static final String GENERATOR = "generator";
|
||||
/**
|
||||
* A node type in the CPE Schema 2.2
|
||||
*/
|
||||
public static final String PRODUCT_NAME = "product_name";
|
||||
/**
|
||||
* A node type in the CPE Schema 2.2
|
||||
*/
|
||||
public static final String PRODUCT_VERSION = "product_version";
|
||||
/**
|
||||
* A node type in the CPE Schema 2.2
|
||||
*/
|
||||
public static final String SCHEMA_VERSION = "schema_version";
|
||||
/**
|
||||
* A node type in the CPE Schema 2.2
|
||||
*/
|
||||
public static final String TIMESTAMP = "timestamp";
|
||||
private String node = null;
|
||||
|
||||
/**
|
||||
* Gets the value of node
|
||||
*
|
||||
* @return the value of node
|
||||
*/
|
||||
public String getNode() {
|
||||
return this.node;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of node
|
||||
*
|
||||
* @param node new value of node
|
||||
*/
|
||||
public void setNode(String node) {
|
||||
this.node = node;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the handler is at the CPE_LIST node
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isCpeListNode() {
|
||||
return CPE_LIST.equals(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the handler is at the CPE_ITEM node
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isCpeItemNode() {
|
||||
return CPE_ITEM.equals(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the handler is at the TITLE node
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isTitleNode() {
|
||||
return TITLE.equals(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the handler is at the NOTES node
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isNotesNode() {
|
||||
return NOTES.equals(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the handler is at the NOTE node
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isNoteNode() {
|
||||
return NOTE.equals(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the handler is at the CHECK node
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isCheckNode() {
|
||||
return CHECK.equals(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the handler is at the META node
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isMetaNode() {
|
||||
return META.equals(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the handler is at the GENERATOR node
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isGeneratorNode() {
|
||||
return GENERATOR.equals(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the handler is at the PRODUCT_NAME node
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isProductNameNode() {
|
||||
return PRODUCT_NAME.equals(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the handler is at the PRODUCT_VERSION node
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isProductVersionNode() {
|
||||
return PRODUCT_VERSION.equals(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the handler is at the SCHEMA_VERSION node
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isSchemaVersionNode() {
|
||||
return SCHEMA_VERSION.equals(node);
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if the handler is at the TIMESTAMP node
|
||||
*
|
||||
* @return true or false
|
||||
*/
|
||||
public boolean isTimestampNode() {
|
||||
return TIMESTAMP.equals(node);
|
||||
}
|
||||
}
|
||||
// </editor-fold>
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.cpe.xml;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import org.codesecure.dependencycheck.data.cpe.Entry;
|
||||
import java.io.IOException;
|
||||
import org.apache.lucene.index.CorruptIndexException;
|
||||
|
||||
/**
|
||||
*
|
||||
* An interface used to define the save function used when parsing the CPE XML
|
||||
* file.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public interface EntrySaveDelegate {
|
||||
|
||||
/**
|
||||
* Saves a CPE Entry into the Lucene index.
|
||||
*
|
||||
* @param entry a CPE entry.
|
||||
* @throws CorruptIndexException is thrown if the index is corrupt.
|
||||
* @throws IOException is thrown if an IOException occurs.
|
||||
*/
|
||||
void saveEntry(Entry entry) throws CorruptIndexException, IOException;
|
||||
}
|
||||
@@ -1,88 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.cpe.xml;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import javax.xml.parsers.SAXParser;
|
||||
import javax.xml.parsers.SAXParserFactory;
|
||||
import org.apache.lucene.index.CorruptIndexException;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
/**
|
||||
* Imports a CPE XML file into the Lucene CPE Index.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class Importer {
|
||||
|
||||
/**
|
||||
* Private constructor for utility class.
|
||||
*/
|
||||
private Importer() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Imports the CPE XML File into the Lucene Index.
|
||||
*
|
||||
* @param file containing the path to the CPE XML file.
|
||||
* @throws ParserConfigurationException is thrown if the parser is
|
||||
* misconfigured.
|
||||
* @throws SAXException is thrown when there is a SAXException.
|
||||
* @throws IOException is thrown when there is an IOException.
|
||||
* @throws CorruptIndexException is thrown when the Lucene index is corrupt.
|
||||
*/
|
||||
public static void importXML(File file) throws CorruptIndexException, ParserConfigurationException, IOException, SAXException {
|
||||
SAXParserFactory factory = SAXParserFactory.newInstance();
|
||||
SAXParser saxParser = factory.newSAXParser();
|
||||
CPEHandler handler = new CPEHandler();
|
||||
Indexer indexer = new Indexer();
|
||||
indexer.openIndexWriter();
|
||||
handler.registerSaveDelegate(indexer);
|
||||
try {
|
||||
saxParser.parse(file, handler);
|
||||
} catch (SAXException ex) {
|
||||
Logger.getLogger(Importer.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Importer.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} finally {
|
||||
indexer.close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Imports the CPE XML File into the Lucene Index.
|
||||
*
|
||||
* @param path the path to the CPE XML file.
|
||||
* @throws ParserConfigurationException is thrown if the parser is
|
||||
* misconfigured.
|
||||
* @throws SAXException is thrown when there is a SAXException.
|
||||
* @throws IOException is thrown when there is an IOException.
|
||||
*/
|
||||
public static void importXML(String path) throws ParserConfigurationException, SAXException, IOException {
|
||||
File f = new File(path);
|
||||
if (!f.exists()) {
|
||||
f.mkdirs();
|
||||
}
|
||||
Importer.importXML(f);
|
||||
}
|
||||
}
|
||||
@@ -1,102 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.cpe.xml;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
import org.apache.lucene.document.Document;
|
||||
import org.apache.lucene.document.Field;
|
||||
import org.apache.lucene.index.CorruptIndexException;
|
||||
import org.apache.lucene.index.FieldInfo.IndexOptions;
|
||||
import org.apache.lucene.index.Term;
|
||||
import org.codesecure.dependencycheck.data.cpe.Entry;
|
||||
import org.codesecure.dependencycheck.data.cpe.Fields;
|
||||
import org.codesecure.dependencycheck.data.cpe.Index;
|
||||
import org.codesecure.dependencycheck.data.lucene.LuceneUtils;
|
||||
|
||||
/**
|
||||
* The Indexer is used to convert a CPE Entry, retrieved from the CPE XML file,
|
||||
* into a Document that is stored in the Lucene index.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class Indexer extends Index implements EntrySaveDelegate {
|
||||
|
||||
/**
|
||||
* Saves a CPE Entry into the Lucene index.
|
||||
*
|
||||
* @param entry a CPE entry.
|
||||
* @throws CorruptIndexException is thrown if the index is corrupt.
|
||||
* @throws IOException is thrown if an IOException occurs.
|
||||
*/
|
||||
public void saveEntry(Entry entry) throws CorruptIndexException, IOException {
|
||||
Document doc = convertEntryToDoc(entry);
|
||||
Term term = new Term(Fields.NVDID, LuceneUtils.escapeLuceneQuery(entry.getNvdId()));
|
||||
indexWriter.updateDocument(term, doc);
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a CPE entry into a Lucene Document.
|
||||
*
|
||||
* @param entry a CPE Entry.
|
||||
* @return a Lucene Document containing a CPE Entry.
|
||||
*/
|
||||
protected Document convertEntryToDoc(Entry entry) {
|
||||
Document doc = new Document();
|
||||
|
||||
Field name = new Field(Fields.NAME, entry.getName(), Field.Store.YES, Field.Index.ANALYZED);
|
||||
name.setIndexOptions(IndexOptions.DOCS_ONLY);
|
||||
doc.add(name);
|
||||
|
||||
Field nvdId = new Field(Fields.NVDID, entry.getNvdId(), Field.Store.NO, Field.Index.ANALYZED);
|
||||
nvdId.setIndexOptions(IndexOptions.DOCS_ONLY);
|
||||
doc.add(nvdId);
|
||||
|
||||
Field vendor = new Field(Fields.VENDOR, entry.getVendor(), Field.Store.NO, Field.Index.ANALYZED);
|
||||
vendor.setIndexOptions(IndexOptions.DOCS_ONLY);
|
||||
vendor.setBoost(5.0F);
|
||||
doc.add(vendor);
|
||||
|
||||
Field product = new Field(Fields.PRODUCT, entry.getProduct(), Field.Store.NO, Field.Index.ANALYZED);
|
||||
product.setIndexOptions(IndexOptions.DOCS_ONLY);
|
||||
product.setBoost(5.0F);
|
||||
doc.add(product);
|
||||
|
||||
Field title = new Field(Fields.TITLE, entry.getTitle(), Field.Store.YES, Field.Index.ANALYZED);
|
||||
title.setIndexOptions(IndexOptions.DOCS_ONLY);
|
||||
//title.setBoost(1.0F);
|
||||
doc.add(title);
|
||||
|
||||
//TODO revision should likely be its own field
|
||||
if (entry.getVersion() != null) {
|
||||
Field version = null;
|
||||
if (entry.getRevision() != null) {
|
||||
version = new Field(Fields.VERSION, entry.getVersion() + " "
|
||||
+ entry.getRevision(), Field.Store.NO, Field.Index.ANALYZED);
|
||||
} else {
|
||||
version = new Field(Fields.VERSION, entry.getVersion(),
|
||||
Field.Store.NO, Field.Index.ANALYZED);
|
||||
}
|
||||
version.setIndexOptions(IndexOptions.DOCS_ONLY);
|
||||
version.setBoost(0.8F);
|
||||
doc.add(version);
|
||||
}
|
||||
|
||||
return doc;
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
/**
|
||||
* <html>
|
||||
* <head>
|
||||
* <title>org.codesecure.dependencycheck.data.cpe.xml</title>
|
||||
* </head>
|
||||
* <body>
|
||||
* Contains classes used to parse the CPE XML file.
|
||||
* </body>
|
||||
* </html>
|
||||
*/
|
||||
|
||||
package org.codesecure.dependencycheck.data.cpe.xml;
|
||||
@@ -1,33 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.lucene;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
/**
|
||||
* VersionAnalyzer is a Lucene Analyzer used to analyze version information.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class VersionAnalyzer {
|
||||
//TODO Implement this...
|
||||
// use custom attributes for major, minor, x, x, x, rcx
|
||||
// these can then be used to weight the score for searches on the version.
|
||||
// see http://lucene.apache.org/core/3_6_1/api/core/org/apache/lucene/analysis/package-summary.html#package_description
|
||||
// look at this article to implement
|
||||
// http://www.codewrecks.com/blog/index.php/2012/08/25/index-your-blog-using-tags-and-lucene-net/
|
||||
}
|
||||
@@ -1,45 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Fields is a collection of field names used within the Lucene index for NVD
|
||||
* VULNERABLE_CPE entries.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public abstract class Fields {
|
||||
|
||||
/**
|
||||
* The key for the name field.
|
||||
*/
|
||||
public static final String CVE_ID = "cve";
|
||||
/**
|
||||
* The key for the vulnerable cpes field.
|
||||
*/
|
||||
public static final String VULNERABLE_CPE = "cpe";
|
||||
/**
|
||||
* The key for the description field.
|
||||
*/
|
||||
public static final String DESCRIPTION = "description";
|
||||
/**
|
||||
* The key for the xml field. Stores the entire NVD VULNERABLE_CPE Entry.
|
||||
*/
|
||||
public static final String XML = "xml";
|
||||
}
|
||||
@@ -1,555 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.*;
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
||||
import java.net.URLDecoder;
|
||||
import java.util.*;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import org.apache.lucene.analysis.Analyzer;
|
||||
import org.apache.lucene.analysis.KeywordAnalyzer;
|
||||
import org.apache.lucene.analysis.PerFieldAnalyzerWrapper;
|
||||
import org.apache.lucene.analysis.standard.StandardAnalyzer;
|
||||
import org.apache.lucene.store.Directory;
|
||||
import org.apache.lucene.store.FSDirectory;
|
||||
import org.apache.lucene.util.Version;
|
||||
import org.codesecure.dependencycheck.data.CachedWebDataSource;
|
||||
import org.codesecure.dependencycheck.data.UpdateException;
|
||||
import org.codesecure.dependencycheck.data.lucene.AbstractIndex;
|
||||
import org.codesecure.dependencycheck.data.nvdcve.xml.Importer;
|
||||
import org.codesecure.dependencycheck.utils.DownloadFailedException;
|
||||
import org.codesecure.dependencycheck.utils.Downloader;
|
||||
import org.codesecure.dependencycheck.utils.Settings;
|
||||
|
||||
/**
|
||||
* The Index class is used to utilize and maintain the NVD CVE Index.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class Index extends AbstractIndex implements CachedWebDataSource {
|
||||
|
||||
/**
|
||||
* The name of the properties file containing the timestamp of the last
|
||||
* update.
|
||||
*/
|
||||
private static final String UPDATE_PROPERTIES_FILE = "lastupdated.prop";
|
||||
/**
|
||||
* The properties file key for the last updated field - used to store the
|
||||
* last updated time of the Modified NVD CVE xml file.
|
||||
*/
|
||||
private static final String LAST_UPDATED_MODIFIED = "lastupdated.modified";
|
||||
/**
|
||||
* Stores the last updated time for each of the NVD CVE files. These
|
||||
* timestamps should be updated if we process the modified file within 7
|
||||
* days of the last update.
|
||||
*/
|
||||
private static final String LAST_UPDATED_BASE = "lastupdated.";
|
||||
|
||||
/**
|
||||
* Returns the directory that holds the NVD CVE Index. Note, this
|
||||
* returns the path where the class or jar file exists.
|
||||
*
|
||||
* @return the Directory containing the NVD CVE Index.
|
||||
* @throws IOException is thrown if an IOException occurs.
|
||||
*/
|
||||
public Directory getDirectory() throws IOException {
|
||||
File path = getDataDirectory();
|
||||
Directory dir = FSDirectory.open(path);
|
||||
return dir;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the directory that the JAR file exists in so that
|
||||
* we can ensure we always use a common data directory.
|
||||
*
|
||||
* @return the data directory for this index.
|
||||
* @throws IOException is thrown if an IOException occurs of course...
|
||||
*/
|
||||
protected File getDataDirectory() throws IOException {
|
||||
String fileName = Settings.getString(Settings.KEYS.CVE_INDEX);
|
||||
String filePath = Index.class.getProtectionDomain().getCodeSource().getLocation().getPath();
|
||||
String decodedPath = URLDecoder.decode(filePath, "UTF-8");
|
||||
File exePath = new File(decodedPath);
|
||||
if (exePath.getName().toLowerCase().endsWith(".jar")) {
|
||||
exePath = exePath.getParentFile();
|
||||
} else {
|
||||
exePath = new File(".");
|
||||
}
|
||||
File path = new File(exePath.getCanonicalFile() + File.separator + fileName);
|
||||
path = new File(path.getCanonicalPath());
|
||||
return path;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates an Analyzer for the NVD VULNERABLE_CPE Index.
|
||||
*
|
||||
* @return the VULNERABLE_CPE Analyzer.
|
||||
*/
|
||||
@SuppressWarnings("unchecked")
|
||||
public Analyzer createAnalyzer() {
|
||||
Map fieldAnalyzers = new HashMap();
|
||||
|
||||
fieldAnalyzers.put(Fields.CVE_ID, new KeywordAnalyzer());
|
||||
fieldAnalyzers.put(Fields.VULNERABLE_CPE, new KeywordAnalyzer());
|
||||
|
||||
PerFieldAnalyzerWrapper wrapper = new PerFieldAnalyzerWrapper(
|
||||
new StandardAnalyzer(Version.LUCENE_35), fieldAnalyzers);
|
||||
|
||||
return wrapper;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Downloads the latest NVD CVE XML file from the web and imports it into
|
||||
* the current CVE Index.</p>
|
||||
*
|
||||
* @throws UpdateException is thrown if there is an error updating the index
|
||||
*/
|
||||
public void update() throws UpdateException {
|
||||
try {
|
||||
Map<String, NvdCveUrl> update = updateNeeded();
|
||||
int maxUpdates = 0;
|
||||
for (NvdCveUrl cve : update.values()) {
|
||||
if (cve.getNeedsUpdate()) {
|
||||
maxUpdates += 1;
|
||||
}
|
||||
}
|
||||
if (maxUpdates > 3) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.WARNING, "NVD CVE requires several updates; this could take a couple of minutes.");
|
||||
}
|
||||
int count = 0;
|
||||
for (NvdCveUrl cve : update.values()) {
|
||||
if (cve.getNeedsUpdate()) {
|
||||
count += 1;
|
||||
Logger.getLogger(Index.class.getName()).log(Level.WARNING, "Updating NVD CVE (" + count + " of " + maxUpdates + ")");
|
||||
URL url = new URL(cve.getUrl());
|
||||
File outputPath = null;
|
||||
try {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.WARNING, "Downloading " + cve.getUrl());
|
||||
outputPath = File.createTempFile("cve" + cve.getId() + "_", ".xml");
|
||||
Downloader.fetchFile(url, outputPath, false);
|
||||
Logger.getLogger(Index.class.getName()).log(Level.WARNING, "Processing " + cve.getUrl());
|
||||
Importer.importXML(outputPath.toString());
|
||||
Logger.getLogger(Index.class.getName()).log(Level.WARNING, "Completed updated " + count + " of " + maxUpdates);
|
||||
} catch (FileNotFoundException ex) {
|
||||
//Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException(ex);
|
||||
} catch (IOException ex) {
|
||||
//Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException(ex);
|
||||
} finally {
|
||||
try {
|
||||
if (outputPath != null && outputPath.exists()) {
|
||||
outputPath.delete();
|
||||
}
|
||||
} finally {
|
||||
if (outputPath != null && outputPath.exists()) {
|
||||
outputPath.deleteOnExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
if (maxUpdates >= 1) {
|
||||
writeLastUpdatedPropertyFile(update);
|
||||
}
|
||||
} catch (MalformedURLException ex) {
|
||||
//Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException(ex);
|
||||
} catch (DownloadFailedException ex) {
|
||||
//Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException(ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes a properties file containing the last updated date to the
|
||||
* VULNERABLE_CPE directory.
|
||||
*
|
||||
* @param timeStamp the timestamp to write.
|
||||
*/
|
||||
private void writeLastUpdatedPropertyFile(Map<String, NvdCveUrl> updated) throws UpdateException {
|
||||
String dir;
|
||||
try {
|
||||
dir = getDataDirectory().getCanonicalPath();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException("Unable to locate last updated properties file.", ex);
|
||||
}
|
||||
File cveProp = new File(dir + File.separatorChar + UPDATE_PROPERTIES_FILE);
|
||||
Properties prop = new Properties();
|
||||
|
||||
for (NvdCveUrl cve : updated.values()) {
|
||||
prop.put(LAST_UPDATED_BASE + cve.id, String.valueOf(cve.getTimestamp()));
|
||||
}
|
||||
|
||||
OutputStream os = null;
|
||||
try {
|
||||
os = new FileOutputStream(cveProp);
|
||||
OutputStreamWriter out = new OutputStreamWriter(os);
|
||||
prop.store(out, dir);
|
||||
} catch (FileNotFoundException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException("Unable to find last updated properties file.", ex);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException("Unable to update last updated properties file.", ex);
|
||||
} finally {
|
||||
try {
|
||||
os.flush();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
try {
|
||||
os.close();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the index needs to be updated. This is done by fetching the
|
||||
* nvd cve meta data and checking the last update date. If the data needs to
|
||||
* be refreshed this method will return the NvdCveUrl for the files that
|
||||
* need to be updated.
|
||||
*
|
||||
* @return the NvdCveUrl of the files that need to be updated.
|
||||
* @throws MalformedURLException is thrown if the URL for the NVD CVE Meta
|
||||
* data is incorrect.
|
||||
* @throws DownloadFailedException is thrown if there is an error.
|
||||
* downloading the nvd cve download data file.
|
||||
* @throws UpdateException Is thrown if there is an issue with the last updated properties file.
|
||||
*/
|
||||
public Map<String, NvdCveUrl> updateNeeded() throws MalformedURLException, DownloadFailedException, UpdateException {
|
||||
|
||||
Map<String, NvdCveUrl> currentlyPublished;
|
||||
try {
|
||||
currentlyPublished = retrieveCurrentTimestampsFromWeb();
|
||||
} catch (InvalidDataException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new DownloadFailedException("Unable to retrieve valid timestamp from nvd cve downloads page", ex);
|
||||
}
|
||||
if (currentlyPublished == null) {
|
||||
throw new DownloadFailedException("Unable to retrieve valid timestamp from nvd cve downloads page");
|
||||
}
|
||||
String dir;
|
||||
try {
|
||||
dir = getDataDirectory().getCanonicalPath();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new UpdateException("Unable to locate last updated properties file.", ex);
|
||||
}
|
||||
|
||||
File f = new File(dir);
|
||||
if (f.exists()) {
|
||||
File cveProp = new File(dir + File.separatorChar + UPDATE_PROPERTIES_FILE);
|
||||
if (cveProp.exists()) {
|
||||
Properties prop = new Properties();
|
||||
InputStream is;
|
||||
try {
|
||||
is = new FileInputStream(cveProp);
|
||||
prop.load(is);
|
||||
long lastUpdated = Long.parseLong(prop.getProperty(Index.LAST_UPDATED_MODIFIED));
|
||||
Date now = new Date();
|
||||
int days = Settings.getInt(Settings.KEYS.CVE_MODIFIED_VALID_FOR_DAYS);
|
||||
int maxEntries = Settings.getInt(Settings.KEYS.CVE_URL_COUNT);
|
||||
if (lastUpdated == currentlyPublished.get("modified").timestamp) {
|
||||
currentlyPublished.clear(); //we don't need to update anything.
|
||||
} else if (withinRange(lastUpdated, now.getTime(), days)) {
|
||||
currentlyPublished.get("modified").setNeedsUpdate(true);
|
||||
for (int i = 1; i <= maxEntries; i++) {
|
||||
currentlyPublished.get(String.valueOf(i)).setNeedsUpdate(false);
|
||||
}
|
||||
} else { //we figure out which of the several XML files need to be downloaded.
|
||||
currentlyPublished.get("modified").setNeedsUpdate(false);
|
||||
for (int i = 1; i <= maxEntries; i++) {
|
||||
NvdCveUrl cve = currentlyPublished.get(String.valueOf(i));
|
||||
long currentTimestamp = 0;
|
||||
try {
|
||||
currentTimestamp = Long.parseLong(prop.getProperty(LAST_UPDATED_BASE + String.valueOf(i), "0"));
|
||||
} catch (NumberFormatException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.FINEST, "Error parsing " + LAST_UPDATED_BASE
|
||||
+ String.valueOf(i) + " from nvdcve.lastupdated", ex);
|
||||
}
|
||||
if (currentTimestamp == cve.getTimestamp()) {
|
||||
cve.setNeedsUpdate(false); //they default to true.
|
||||
}
|
||||
}
|
||||
}
|
||||
} catch (FileNotFoundException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.FINEST, null, ex);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.FINEST, null, ex);
|
||||
} catch (NumberFormatException ex) {
|
||||
Logger.getLogger(Index.class.getName()).log(Level.FINEST, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
return currentlyPublished;
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the epoch date is within the range specified of the
|
||||
* compareTo epoch time. This takes the (compareTo-date)/1000/60/60/24 to
|
||||
* get the number of days. If the calculated days is less then the range the
|
||||
* date is considered valid.
|
||||
*
|
||||
* @param date the date to be checked.
|
||||
* @param compareTo the date to compare to.
|
||||
* @param range the range in days to be considered valid.
|
||||
* @return whether or not the date is within the range.
|
||||
*/
|
||||
private boolean withinRange(long date, long compareTo, int range) {
|
||||
double differenceInDays = (compareTo - date) / 1000 / 60 / 60 / 24;
|
||||
return differenceInDays < range;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the timestamps from the NVD CVE meta data file.
|
||||
*
|
||||
* @return the timestamp from the currently published nvdcve downloads page
|
||||
* @throws MalformedURLException is thrown if the URL for the NVD CCE Meta
|
||||
* data is incorrect.
|
||||
* @throws DownloadFailedException is thrown if there is an error
|
||||
* downloading the nvd cve meta data file
|
||||
* @throws InvalidDataException is thrown if there is an exception parsing
|
||||
* the timestamps
|
||||
*/
|
||||
protected Map<String, NvdCveUrl> retrieveCurrentTimestampsFromWeb() throws MalformedURLException, DownloadFailedException, InvalidDataException {
|
||||
Map<String, NvdCveUrl> map = new HashMap<String, NvdCveUrl>();
|
||||
|
||||
File tmp = null;
|
||||
try {
|
||||
tmp = File.createTempFile("cve", "meta");
|
||||
URL url = new URL(Settings.getString(Settings.KEYS.CVE_META_URL));
|
||||
Downloader.fetchFile(url, tmp);
|
||||
String html = readFile(tmp);
|
||||
|
||||
String retrieveUrl = Settings.getString(Settings.KEYS.CVE_MODIFIED_URL);
|
||||
NvdCveUrl cve = createNvdCveUrl("modified", retrieveUrl, html);
|
||||
cve.setNeedsUpdate(false); //the others default to true, to make life easier later this should default to false.
|
||||
map.put("modified", cve);
|
||||
int max = Settings.getInt(Settings.KEYS.CVE_URL_COUNT);
|
||||
for (int i = 1; i <= max; i++) {
|
||||
retrieveUrl = Settings.getString(Settings.KEYS.CVE_BASE_URL + i);
|
||||
String key = Integer.toString(i);
|
||||
cve = createNvdCveUrl(key, retrieveUrl, html);
|
||||
map.put(key, cve);
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
throw new DownloadFailedException("Unable to create temporary file for NVD CVE Meta File download.", ex);
|
||||
} finally {
|
||||
try {
|
||||
if (tmp != null && tmp.exists()) {
|
||||
tmp.delete();
|
||||
}
|
||||
} finally {
|
||||
if (tmp != null && tmp.exists()) {
|
||||
tmp.deleteOnExit();
|
||||
}
|
||||
}
|
||||
}
|
||||
return map;
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new NvdCveUrl object from the provide id, url, and text/html
|
||||
* from the NVD CVE downloads page.
|
||||
*
|
||||
* @param id the name of this NVD CVE Url
|
||||
* @param retrieveUrl the URL to download the file from
|
||||
* @param text a bit of HTML from the NVD CVE downloads page that contains
|
||||
* the URL and the last updated timestamp.
|
||||
* @return a shiny new NvdCveUrl object.
|
||||
* @throws InvalidDataException is thrown if the timestamp could not be
|
||||
* extracted from the provided text.
|
||||
*/
|
||||
private NvdCveUrl createNvdCveUrl(String id, String retrieveUrl, String text) throws InvalidDataException {
|
||||
Pattern pattern = Pattern.compile(Pattern.quote(retrieveUrl) + ".+?\\<br");
|
||||
Matcher m = pattern.matcher(text);
|
||||
NvdCveUrl item = new NvdCveUrl();
|
||||
item.id = id;
|
||||
item.url = retrieveUrl;
|
||||
if (m.find()) {
|
||||
String line = m.group();
|
||||
int pos = line.indexOf("Updated:");
|
||||
if (pos > 0) {
|
||||
pos += 9;
|
||||
try {
|
||||
String timestampstr = line.substring(pos, line.length() - 3).replace("at ", "");
|
||||
long timestamp = getEpochTimeFromDateTime(timestampstr);
|
||||
item.setTimestamp(timestamp);
|
||||
} catch (NumberFormatException ex) {
|
||||
throw new InvalidDataException("NVD CVE Meta file does not contain a valid timestamp for '" + retrieveUrl + "'.", ex);
|
||||
}
|
||||
} else {
|
||||
throw new InvalidDataException("NVD CVE Meta file does not contain the updated timestamp for '" + retrieveUrl + "'.");
|
||||
}
|
||||
} else {
|
||||
throw new InvalidDataException("NVD CVE Meta file does not contain the url for '" + retrieveUrl + "'.");
|
||||
}
|
||||
return item;
|
||||
}
|
||||
|
||||
/**
|
||||
* Parses a timestamp in the format of "MM/dd/yy hh:mm" into a calendar
|
||||
* object and returns the epoch time. Note, this removes the millisecond
|
||||
* portion of the epoch time so all numbers returned should end in 000.
|
||||
*
|
||||
* @param timestamp a string in the format of "MM/dd/yy hh:mm"
|
||||
* @return a Calendar object.
|
||||
* @throws NumberFormatException if the timestamp was parsed incorrectly.
|
||||
*/
|
||||
private long getEpochTimeFromDateTime(String timestamp) throws NumberFormatException {
|
||||
Calendar c = new GregorianCalendar();
|
||||
int month = Integer.parseInt(timestamp.substring(0, 2));
|
||||
int date = Integer.parseInt(timestamp.substring(3, 5));
|
||||
int year = 2000 + Integer.parseInt(timestamp.substring(6, 8));
|
||||
int hourOfDay = Integer.parseInt(timestamp.substring(9, 11));
|
||||
int minute = Integer.parseInt(timestamp.substring(12, 14));
|
||||
c.set(year, month, date, hourOfDay, minute, 0);
|
||||
long t = c.getTimeInMillis();
|
||||
t = (t / 1000) * 1000;
|
||||
return t;
|
||||
}
|
||||
|
||||
/**
|
||||
* Reads a file into a string.
|
||||
*
|
||||
* @param file the file to be read.
|
||||
* @return the contents of the file.
|
||||
* @throws IOException is thrown if an IOExcpetion occurs.
|
||||
*/
|
||||
private String readFile(File file) throws IOException {
|
||||
FileReader stream = new FileReader(file);
|
||||
StringBuilder str = new StringBuilder((int) file.length());
|
||||
try {
|
||||
char[] buf = new char[8096];
|
||||
int read = stream.read(buf, 0, 8096);
|
||||
while (read > 0) {
|
||||
str.append(buf, 0, read);
|
||||
read = stream.read(buf, 0, 8096);
|
||||
}
|
||||
} finally {
|
||||
stream.close();
|
||||
}
|
||||
return str.toString();
|
||||
}
|
||||
|
||||
/**
|
||||
* A pojo that contains the Url and timestamp of the current NvdCve XML
|
||||
* files.
|
||||
*/
|
||||
protected class NvdCveUrl {
|
||||
|
||||
/**
|
||||
* an id.
|
||||
*/
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* Get the value of id
|
||||
*
|
||||
* @return the value of id
|
||||
*/
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of id
|
||||
*
|
||||
* @param id new value of id
|
||||
*/
|
||||
public void setId(String id) {
|
||||
this.id = id;
|
||||
}
|
||||
/**
|
||||
* a url.
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* Get the value of url
|
||||
*
|
||||
* @return the value of url
|
||||
*/
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of url
|
||||
*
|
||||
* @param url new value of url
|
||||
*/
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
/**
|
||||
* a timestamp - epoch time.
|
||||
*/
|
||||
private long timestamp;
|
||||
|
||||
/**
|
||||
* Get the value of timestamp - epoch time
|
||||
*
|
||||
* @return the value of timestamp - epoch time
|
||||
*/
|
||||
public long getTimestamp() {
|
||||
return timestamp;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of timestamp - epoch time
|
||||
*
|
||||
* @param timestamp new value of timestamp - epoch time
|
||||
*/
|
||||
public void setTimestamp(long timestamp) {
|
||||
this.timestamp = timestamp;
|
||||
}
|
||||
/**
|
||||
* indicates whether or not this item should be updated.
|
||||
*/
|
||||
private boolean needsUpdate = true;
|
||||
|
||||
/**
|
||||
* Get the value of needsUpdate
|
||||
*
|
||||
* @return the value of needsUpdate
|
||||
*/
|
||||
public boolean getNeedsUpdate() {
|
||||
return needsUpdate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of needsUpdate
|
||||
*
|
||||
* @param needsUpdate new value of needsUpdate
|
||||
*/
|
||||
public void setNeedsUpdate(boolean needsUpdate) {
|
||||
this.needsUpdate = needsUpdate;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,225 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.ByteArrayInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import org.apache.lucene.document.Document;
|
||||
import org.apache.lucene.index.Term;
|
||||
import org.apache.lucene.search.*;
|
||||
import org.codesecure.dependencycheck.analyzer.AnalysisException;
|
||||
import org.codesecure.dependencycheck.analyzer.AnalysisPhase;
|
||||
import org.codesecure.dependencycheck.data.nvdcve.generated.VulnerabilityReferenceType;
|
||||
import org.codesecure.dependencycheck.data.nvdcve.generated.VulnerabilityType;
|
||||
import org.codesecure.dependencycheck.dependency.Dependency;
|
||||
import org.codesecure.dependencycheck.dependency.Vulnerability;
|
||||
import org.codesecure.dependencycheck.dependency.Identifier;
|
||||
import org.codesecure.dependencycheck.dependency.Reference;
|
||||
|
||||
/**
|
||||
* NvdCveAnalyzer is a utility class that takes a project dependency and
|
||||
* attempts to decern if there is an associated CVEs. It uses the the
|
||||
* identifiers found by other analyzers to lookup the CVE data.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class NvdCveAnalyzer implements org.codesecure.dependencycheck.analyzer.Analyzer {
|
||||
|
||||
/**
|
||||
* The maximum number of query results to return.
|
||||
*/
|
||||
static final int MAX_QUERY_RESULTS = 100;
|
||||
/**
|
||||
* The CVE Index.
|
||||
*/
|
||||
protected Index cve = null;
|
||||
/**
|
||||
* The Lucene IndexSearcher.
|
||||
*/
|
||||
private IndexSearcher indexSearcher = null;
|
||||
|
||||
/**
|
||||
* Opens the data source.
|
||||
*
|
||||
* @throws IOException when the Lucene directory to be querried does not
|
||||
* exist or is corrupt.
|
||||
*/
|
||||
public void open() throws IOException {
|
||||
cve = new Index();
|
||||
cve.open();
|
||||
indexSearcher = cve.getIndexSearcher();
|
||||
}
|
||||
|
||||
/**
|
||||
* Closes the data source.
|
||||
*/
|
||||
public void close() {
|
||||
indexSearcher = null;
|
||||
cve.close();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the status of the data source - is the index open.
|
||||
*
|
||||
* @return true or false.
|
||||
*/
|
||||
public boolean isOpen() {
|
||||
return (cve == null) ? false : cve.isOpen();
|
||||
}
|
||||
|
||||
/**
|
||||
* Ensures that the Lucene index is closed.
|
||||
*
|
||||
* @throws Throwable when a throwable is thrown.
|
||||
*/
|
||||
@Override
|
||||
protected void finalize() throws Throwable {
|
||||
super.finalize();
|
||||
if (isOpen()) {
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Analyzes a dependency and attempts to determine if there are any CPE
|
||||
* identifiers for this dependency.
|
||||
*
|
||||
* @param dependency The Dependency to analyze.
|
||||
* @throws AnalysisException is thrown if there is an issue analyzing the
|
||||
* dependency.
|
||||
*/
|
||||
public void analyze(Dependency dependency) throws AnalysisException {
|
||||
for (Identifier id : dependency.getIdentifiers()) {
|
||||
if ("cpe".equals(id.getType())) {
|
||||
try {
|
||||
String value = id.getValue();
|
||||
Term term1 = new Term(Fields.VULNERABLE_CPE, value);
|
||||
Query query1 = new TermQuery(term1);
|
||||
|
||||
//need to get the cpe:/a:vendor:product - some CVEs are referenced very broadly.
|
||||
//find the index of the colon after the product of the cpe value
|
||||
//cpe:/a:microsoft:anti-cross_site_scripting_library:3.1
|
||||
int pos = value.indexOf(":", 7) + 1;
|
||||
pos = value.indexOf(":", pos);
|
||||
String productVendor = value.substring(0, pos);
|
||||
Term term2 = new Term(Fields.VULNERABLE_CPE, productVendor);
|
||||
Query query2 = new TermQuery(term2);
|
||||
|
||||
BooleanQuery query = new BooleanQuery();
|
||||
query.add(query1, BooleanClause.Occur.SHOULD);
|
||||
query.add(query2, BooleanClause.Occur.SHOULD);
|
||||
|
||||
TopDocs docs = indexSearcher.search(query, MAX_QUERY_RESULTS);
|
||||
for (ScoreDoc d : docs.scoreDocs) {
|
||||
Document doc = indexSearcher.doc(d.doc);
|
||||
String xml = doc.get(Fields.XML);
|
||||
Vulnerability vuln;
|
||||
try {
|
||||
vuln = parseVulnerability(xml);
|
||||
dependency.addVulnerability(vuln);
|
||||
} catch (JAXBException ex) {
|
||||
Logger.getLogger(NvdCveAnalyzer.class.getName()).log(Level.SEVERE, null, ex);
|
||||
dependency.addAnalysisException(new AnalysisException("Unable to retrieve vulnerability data", ex));
|
||||
}
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(NvdCveAnalyzer.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new AnalysisException("Exception occured while determining CVEs", ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true because this analyzer supports all dependency types.
|
||||
*
|
||||
* @return true.
|
||||
*/
|
||||
public Set<String> getSupportedExtensions() {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of this analyzer.
|
||||
*
|
||||
* @return the name of this analyzer.
|
||||
*/
|
||||
public String getName() {
|
||||
return "NVD CVE Analyzer";
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true because this analyzer supports all dependency types.
|
||||
*
|
||||
* @param extension the file extension of the dependency being analyzed.
|
||||
* @return true.
|
||||
*/
|
||||
public boolean supportsExtension(String extension) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the analysis phase that this analyzer should run in.
|
||||
*
|
||||
* @return the analysis phase that this analyzer should run in.
|
||||
*/
|
||||
public AnalysisPhase getAnalysisPhase() {
|
||||
return AnalysisPhase.FINDING_ANALYSIS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Opens the NVD CVE Lucene Index.
|
||||
*
|
||||
* @throws Exception is thrown if there is an issue opening the index.
|
||||
*/
|
||||
public void initialize() throws Exception {
|
||||
this.open();
|
||||
}
|
||||
|
||||
private Vulnerability parseVulnerability(String xml) throws JAXBException {
|
||||
|
||||
JAXBContext jaxbContext = JAXBContext.newInstance(VulnerabilityType.class);
|
||||
Unmarshaller unmarshaller = jaxbContext.createUnmarshaller();
|
||||
ByteArrayInputStream input = new ByteArrayInputStream(xml.getBytes());
|
||||
VulnerabilityType cvedata = (VulnerabilityType) unmarshaller.unmarshal(input);
|
||||
if (cvedata == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Vulnerability vuln = new Vulnerability();
|
||||
vuln.setName(cvedata.getId());
|
||||
vuln.setDescription(cvedata.getSummary());
|
||||
if (cvedata.getReferences() != null) {
|
||||
for (VulnerabilityReferenceType r : cvedata.getReferences()) {
|
||||
Reference ref = new Reference();
|
||||
ref.setName(r.getReference().getValue());
|
||||
ref.setSource(r.getSource());
|
||||
ref.setUrl(r.getReference().getHref());
|
||||
vuln.addReference(ref);
|
||||
}
|
||||
}
|
||||
return vuln;
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for accessComplexityEnumType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="accessComplexityEnumType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="HIGH"/>
|
||||
* <enumeration value="MEDIUM"/>
|
||||
* <enumeration value="LOW"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "accessComplexityEnumType")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum AccessComplexityEnumType {
|
||||
|
||||
HIGH,
|
||||
MEDIUM,
|
||||
LOW;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static AccessComplexityEnumType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
|
||||
/**
|
||||
* <p>Java class for accessComplexityType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="accessComplexityType">
|
||||
* <simpleContent>
|
||||
* <extension base="<http://scap.nist.gov/schema/cvss-v2/0.2>accessComplexityEnumType">
|
||||
* <attGroup ref="{http://scap.nist.gov/schema/cvss-v2/0.2}vectorAttributeGroup"/>
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "accessComplexityType", propOrder = {
|
||||
"value"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class AccessComplexityType {
|
||||
|
||||
@XmlValue
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected AccessComplexityEnumType value;
|
||||
@XmlAttribute
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean approximated;
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link AccessComplexityEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public AccessComplexityEnumType getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link AccessComplexityEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setValue(AccessComplexityEnumType value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the approximated property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public boolean isApproximated() {
|
||||
if (approximated == null) {
|
||||
return false;
|
||||
} else {
|
||||
return approximated;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the approximated property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setApproximated(Boolean value) {
|
||||
this.approximated = value;
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for accessVectorEnumType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="accessVectorEnumType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="LOCAL"/>
|
||||
* <enumeration value="ADJACENT_NETWORK"/>
|
||||
* <enumeration value="NETWORK"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "accessVectorEnumType")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum AccessVectorEnumType {
|
||||
|
||||
LOCAL,
|
||||
ADJACENT_NETWORK,
|
||||
NETWORK;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static AccessVectorEnumType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,124 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
|
||||
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
|
||||
|
||||
/**
|
||||
* <p>Java class for accessVectorType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="accessVectorType">
|
||||
* <simpleContent>
|
||||
* <extension base="<http://scap.nist.gov/schema/cvss-v2/0.2>accessVectorEnumType">
|
||||
* <attGroup ref="{http://scap.nist.gov/schema/cvss-v2/0.2}vectorAttributeGroup"/>
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "accessVectorType", propOrder = {
|
||||
"value"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class AccessVectorType {
|
||||
|
||||
@XmlValue
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected AccessVectorEnumType value;
|
||||
@XmlAttribute
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean approximated;
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link AccessVectorEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public AccessVectorEnumType getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link AccessVectorEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setValue(AccessVectorEnumType value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the approximated property.
|
||||
*
|
||||
* @return
|
||||
* possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public boolean isApproximated() {
|
||||
if (approximated == null) {
|
||||
return false;
|
||||
} else {
|
||||
return approximated;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the approximated property.
|
||||
*
|
||||
* @param value
|
||||
* allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setApproximated(Boolean value) {
|
||||
this.approximated = value;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,174 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for associatedExploitLocationType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="associatedExploitLocationType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="physical-access" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
|
||||
* <element name="voluntarily-interact" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
|
||||
* <element name="dialup" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
|
||||
* <element name="unknown" type="{http://www.w3.org/2001/XMLSchema}boolean" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "associatedExploitLocationType", namespace = "http://scap.nist.gov/schema/vulnerability/0.4", propOrder = {
|
||||
"physicalAccess",
|
||||
"voluntarilyInteract",
|
||||
"dialup",
|
||||
"unknown"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class AssociatedExploitLocationType {
|
||||
|
||||
@XmlElement(name = "physical-access", defaultValue = "false")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean physicalAccess;
|
||||
@XmlElement(name = "voluntarily-interact", defaultValue = "false")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean voluntarilyInteract;
|
||||
@XmlElement(defaultValue = "false")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean dialup;
|
||||
@XmlElement(defaultValue = "false")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean unknown;
|
||||
|
||||
/**
|
||||
* Gets the value of the physicalAccess property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public Boolean isPhysicalAccess() {
|
||||
return physicalAccess;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the physicalAccess property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setPhysicalAccess(Boolean value) {
|
||||
this.physicalAccess = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the voluntarilyInteract property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public Boolean isVoluntarilyInteract() {
|
||||
return voluntarilyInteract;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the voluntarilyInteract property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setVoluntarilyInteract(Boolean value) {
|
||||
this.voluntarilyInteract = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the dialup property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public Boolean isDialup() {
|
||||
return dialup;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the dialup property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setDialup(Boolean value) {
|
||||
this.dialup = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the unknown property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public Boolean isUnknown() {
|
||||
return unknown;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the unknown property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setUnknown(Boolean value) {
|
||||
this.unknown = value;
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for authenticationEnumType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="authenticationEnumType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="MULTIPLE_INSTANCES"/>
|
||||
* <enumeration value="SINGLE_INSTANCE"/>
|
||||
* <enumeration value="NONE"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "authenticationEnumType")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum AuthenticationEnumType {
|
||||
|
||||
MULTIPLE_INSTANCES,
|
||||
SINGLE_INSTANCE,
|
||||
NONE;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static AuthenticationEnumType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
|
||||
/**
|
||||
* <p>Java class for authenticationType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="authenticationType">
|
||||
* <simpleContent>
|
||||
* <extension base="<http://scap.nist.gov/schema/cvss-v2/0.2>authenticationEnumType">
|
||||
* <attGroup ref="{http://scap.nist.gov/schema/cvss-v2/0.2}vectorAttributeGroup"/>
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "authenticationType", propOrder = {
|
||||
"value"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class AuthenticationType {
|
||||
|
||||
@XmlValue
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected AuthenticationEnumType value;
|
||||
@XmlAttribute
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean approximated;
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link AuthenticationEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public AuthenticationEnumType getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link AuthenticationEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setValue(AuthenticationEnumType value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the approximated property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public boolean isApproximated() {
|
||||
if (approximated == null) {
|
||||
return false;
|
||||
} else {
|
||||
return approximated;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the approximated property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setApproximated(Boolean value) {
|
||||
this.approximated = value;
|
||||
}
|
||||
}
|
||||
@@ -1,376 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.math.BigDecimal;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
|
||||
/**
|
||||
* <p>Java class for baseMetricsType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="baseMetricsType">
|
||||
* <complexContent>
|
||||
* <extension base="{http://scap.nist.gov/schema/cvss-v2/0.2}metricsType">
|
||||
* <sequence>
|
||||
* <element name="score" type="{http://scap.nist.gov/schema/cvss-v2/0.2}zeroToTenDecimalType" minOccurs="0"/>
|
||||
* <element name="exploit-subscore" type="{http://scap.nist.gov/schema/cvss-v2/0.2}zeroToTenDecimalType" minOccurs="0"/>
|
||||
* <element name="impact-subscore" type="{http://scap.nist.gov/schema/cvss-v2/0.2}zeroToTenDecimalType" minOccurs="0"/>
|
||||
* <group ref="{http://scap.nist.gov/schema/cvss-v2/0.2}baseVectorsGroup"/>
|
||||
* <element name="source" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
|
||||
* <element name="generated-on-datetime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "baseMetricsType", propOrder = {
|
||||
"score",
|
||||
"exploitSubscore",
|
||||
"impactSubscore",
|
||||
"accessVector",
|
||||
"accessComplexity",
|
||||
"authentication",
|
||||
"confidentialityImpact",
|
||||
"integrityImpact",
|
||||
"availabilityImpact",
|
||||
"source",
|
||||
"generatedOnDatetime"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class BaseMetricsType
|
||||
extends MetricsType {
|
||||
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected BigDecimal score;
|
||||
@XmlElement(name = "exploit-subscore")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected BigDecimal exploitSubscore;
|
||||
@XmlElement(name = "impact-subscore")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected BigDecimal impactSubscore;
|
||||
@XmlElement(name = "access-vector")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected AccessVectorType accessVector;
|
||||
@XmlElement(name = "access-complexity")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected AccessComplexityType accessComplexity;
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected AuthenticationType authentication;
|
||||
@XmlElement(name = "confidentiality-impact")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected CiaType confidentialityImpact;
|
||||
@XmlElement(name = "integrity-impact")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected CiaType integrityImpact;
|
||||
@XmlElement(name = "availability-impact")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected CiaType availabilityImpact;
|
||||
@XmlElement(required = true)
|
||||
@XmlSchemaType(name = "anyURI")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String source;
|
||||
@XmlElement(name = "generated-on-datetime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected XMLGregorianCalendar generatedOnDatetime;
|
||||
|
||||
/**
|
||||
* Gets the value of the score property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public BigDecimal getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the score property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setScore(BigDecimal value) {
|
||||
this.score = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the exploitSubscore property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public BigDecimal getExploitSubscore() {
|
||||
return exploitSubscore;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the exploitSubscore property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setExploitSubscore(BigDecimal value) {
|
||||
this.exploitSubscore = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the impactSubscore property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public BigDecimal getImpactSubscore() {
|
||||
return impactSubscore;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the impactSubscore property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setImpactSubscore(BigDecimal value) {
|
||||
this.impactSubscore = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the accessVector property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link AccessVectorType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public AccessVectorType getAccessVector() {
|
||||
return accessVector;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the accessVector property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link AccessVectorType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setAccessVector(AccessVectorType value) {
|
||||
this.accessVector = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the accessComplexity property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link AccessComplexityType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public AccessComplexityType getAccessComplexity() {
|
||||
return accessComplexity;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the accessComplexity property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link AccessComplexityType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setAccessComplexity(AccessComplexityType value) {
|
||||
this.accessComplexity = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the authentication property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link AuthenticationType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public AuthenticationType getAuthentication() {
|
||||
return authentication;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the authentication property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link AuthenticationType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setAuthentication(AuthenticationType value) {
|
||||
this.authentication = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the confidentialityImpact property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link CiaType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public CiaType getConfidentialityImpact() {
|
||||
return confidentialityImpact;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the confidentialityImpact property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link CiaType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setConfidentialityImpact(CiaType value) {
|
||||
this.confidentialityImpact = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the integrityImpact property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link CiaType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public CiaType getIntegrityImpact() {
|
||||
return integrityImpact;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the integrityImpact property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link CiaType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setIntegrityImpact(CiaType value) {
|
||||
this.integrityImpact = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the availabilityImpact property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link CiaType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public CiaType getAvailabilityImpact() {
|
||||
return availabilityImpact;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the availabilityImpact property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link CiaType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setAvailabilityImpact(CiaType value) {
|
||||
this.availabilityImpact = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the source property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the source property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setSource(String value) {
|
||||
this.source = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the generatedOnDatetime property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public XMLGregorianCalendar getGeneratedOnDatetime() {
|
||||
return generatedOnDatetime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the generatedOnDatetime property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setGeneratedOnDatetime(XMLGregorianCalendar value) {
|
||||
this.generatedOnDatetime = value;
|
||||
}
|
||||
}
|
||||
@@ -1,156 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
/**
|
||||
* <p>Java class for cceParameterType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="cceParameterType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="value" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded"/>
|
||||
* </sequence>
|
||||
* <attribute name="identifier" type="{http://www.w3.org/2001/XMLSchema}token" />
|
||||
* <attribute name="operator" type="{http://www.w3.org/2001/XMLSchema}token" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "cceParameterType", namespace = "http://scap.nist.gov/schema/cce/0.1", propOrder = {
|
||||
"values"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class CceParameterType {
|
||||
|
||||
@XmlElement(name = "value", required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<String> values;
|
||||
@XmlAttribute
|
||||
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
|
||||
@XmlSchemaType(name = "token")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String identifier;
|
||||
@XmlAttribute
|
||||
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
|
||||
@XmlSchemaType(name = "token")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String operator;
|
||||
|
||||
/**
|
||||
* Gets the value of the values property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the values property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getValues().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link String }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<String> getValues() {
|
||||
if (values == null) {
|
||||
values = new ArrayList<String>();
|
||||
}
|
||||
return this.values;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the identifier property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the identifier property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setIdentifier(String value) {
|
||||
this.identifier = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the operator property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getOperator() {
|
||||
return operator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the operator property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setOperator(String value) {
|
||||
this.operator = value;
|
||||
}
|
||||
}
|
||||
@@ -1,215 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
/**
|
||||
* <p>Java class for cceType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="cceType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="definition" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
|
||||
* <element name="parameter" type="{http://scap.nist.gov/schema/cce/0.1}cceParameterType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="technical-mechanisms" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="references" type="{http://scap.nist.gov/schema/scap-core/0.1}referenceType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="id" use="required" type="{http://scap.nist.gov/schema/cce/0.1}cceNamePatternType" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "cceType", namespace = "http://scap.nist.gov/schema/cce/0.1", propOrder = {
|
||||
"definition",
|
||||
"parameters",
|
||||
"technicalMechanisms",
|
||||
"references"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class CceType {
|
||||
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String definition;
|
||||
@XmlElement(name = "parameter")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<CceParameterType> parameters;
|
||||
@XmlElement(name = "technical-mechanisms")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<String> technicalMechanisms;
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<ReferenceType> references;
|
||||
@XmlAttribute(required = true)
|
||||
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String id;
|
||||
|
||||
/**
|
||||
* Gets the value of the definition property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getDefinition() {
|
||||
return definition;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the definition property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setDefinition(String value) {
|
||||
this.definition = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the parameters property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the parameters property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getParameters().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link CceParameterType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<CceParameterType> getParameters() {
|
||||
if (parameters == null) {
|
||||
parameters = new ArrayList<CceParameterType>();
|
||||
}
|
||||
return this.parameters;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the technicalMechanisms property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the technicalMechanisms property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getTechnicalMechanisms().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link String }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<String> getTechnicalMechanisms() {
|
||||
if (technicalMechanisms == null) {
|
||||
technicalMechanisms = new ArrayList<String>();
|
||||
}
|
||||
return this.technicalMechanisms;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the references property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the references property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getReferences().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link ReferenceType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<ReferenceType> getReferences() {
|
||||
if (references == null) {
|
||||
references = new ArrayList<ReferenceType>();
|
||||
}
|
||||
return this.references;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
}
|
||||
@@ -1,153 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
/**
|
||||
* Data type for the check element, a checking system specification URI, string
|
||||
* content, and an optional external file reference. The checking system
|
||||
* specification should be the URI for a particular version of OVAL or a related
|
||||
* system testing language, and the content will be an identifier of a test
|
||||
* written in that language. The external file reference could be used to point
|
||||
* to the file in which the content test identifier is defined.
|
||||
*
|
||||
* <p>Java class for checkReferenceType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="checkReferenceType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="system" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
|
||||
* <attribute name="href" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
|
||||
* <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}token" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "checkReferenceType", namespace = "http://scap.nist.gov/schema/scap-core/0.1")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class CheckReferenceType {
|
||||
|
||||
@XmlAttribute(required = true)
|
||||
@XmlSchemaType(name = "anyURI")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String system;
|
||||
@XmlAttribute(required = true)
|
||||
@XmlSchemaType(name = "anyURI")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String href;
|
||||
@XmlAttribute
|
||||
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
|
||||
@XmlSchemaType(name = "token")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String name;
|
||||
|
||||
/**
|
||||
* Gets the value of the system property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getSystem() {
|
||||
return system;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the system property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setSystem(String value) {
|
||||
this.system = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the href property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getHref() {
|
||||
return href;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the href property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setHref(String value) {
|
||||
this.href = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
/**
|
||||
* <p>Java class for checkSearchType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="checkSearchType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="system" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
|
||||
* <attribute name="name" type="{http://www.w3.org/2001/XMLSchema}token" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "checkSearchType", namespace = "http://scap.nist.gov/schema/scap-core/0.1")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class CheckSearchType {
|
||||
|
||||
@XmlAttribute(required = true)
|
||||
@XmlSchemaType(name = "anyURI")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String system;
|
||||
@XmlAttribute
|
||||
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
|
||||
@XmlSchemaType(name = "token")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String name;
|
||||
|
||||
/**
|
||||
* Gets the value of the system property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getSystem() {
|
||||
return system;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the system property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setSystem(String value) {
|
||||
this.system = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for ciaEnumType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="ciaEnumType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="NONE"/>
|
||||
* <enumeration value="PARTIAL"/>
|
||||
* <enumeration value="COMPLETE"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "ciaEnumType")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum CiaEnumType {
|
||||
|
||||
NONE,
|
||||
PARTIAL,
|
||||
COMPLETE;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static CiaEnumType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for ciaRequirementEnumType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="ciaRequirementEnumType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="LOW"/>
|
||||
* <enumeration value="MEDIUM"/>
|
||||
* <enumeration value="HIGH"/>
|
||||
* <enumeration value="NOT_DEFINED"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "ciaRequirementEnumType")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum CiaRequirementEnumType {
|
||||
|
||||
LOW,
|
||||
MEDIUM,
|
||||
HIGH,
|
||||
NOT_DEFINED;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static CiaRequirementEnumType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
|
||||
/**
|
||||
* <p>Java class for ciaRequirementType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="ciaRequirementType">
|
||||
* <simpleContent>
|
||||
* <extension base="<http://scap.nist.gov/schema/cvss-v2/0.2>ciaRequirementEnumType">
|
||||
* <attGroup ref="{http://scap.nist.gov/schema/cvss-v2/0.2}vectorAttributeGroup"/>
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "ciaRequirementType", propOrder = {
|
||||
"value"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class CiaRequirementType {
|
||||
|
||||
@XmlValue
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected CiaRequirementEnumType value;
|
||||
@XmlAttribute
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean approximated;
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link CiaRequirementEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public CiaRequirementEnumType getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link CiaRequirementEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setValue(CiaRequirementEnumType value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the approximated property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public boolean isApproximated() {
|
||||
if (approximated == null) {
|
||||
return false;
|
||||
} else {
|
||||
return approximated;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the approximated property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setApproximated(Boolean value) {
|
||||
this.approximated = value;
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
|
||||
/**
|
||||
* <p>Java class for ciaType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="ciaType">
|
||||
* <simpleContent>
|
||||
* <extension base="<http://scap.nist.gov/schema/cvss-v2/0.2>ciaEnumType">
|
||||
* <attGroup ref="{http://scap.nist.gov/schema/cvss-v2/0.2}vectorAttributeGroup"/>
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "ciaType", propOrder = {
|
||||
"value"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class CiaType {
|
||||
|
||||
@XmlValue
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected CiaEnumType value;
|
||||
@XmlAttribute
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean approximated;
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link CiaEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public CiaEnumType getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link CiaEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setValue(CiaEnumType value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the approximated property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public boolean isApproximated() {
|
||||
if (approximated == null) {
|
||||
return false;
|
||||
} else {
|
||||
return approximated;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the approximated property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setApproximated(Boolean value) {
|
||||
this.approximated = value;
|
||||
}
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for collateralDamagePotentialEnumType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="collateralDamagePotentialEnumType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="NONE"/>
|
||||
* <enumeration value="LOW"/>
|
||||
* <enumeration value="LOW_MEDIUM"/>
|
||||
* <enumeration value="MEDIUM_HIGH"/>
|
||||
* <enumeration value="HIGH"/>
|
||||
* <enumeration value="NOT_DEFINED"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "collateralDamagePotentialEnumType")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum CollateralDamagePotentialEnumType {
|
||||
|
||||
NONE,
|
||||
LOW,
|
||||
LOW_MEDIUM,
|
||||
MEDIUM_HIGH,
|
||||
HIGH,
|
||||
NOT_DEFINED;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static CollateralDamagePotentialEnumType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
|
||||
/**
|
||||
* <p>Java class for collateralDamagePotentialType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="collateralDamagePotentialType">
|
||||
* <simpleContent>
|
||||
* <extension base="<http://scap.nist.gov/schema/cvss-v2/0.2>collateralDamagePotentialEnumType">
|
||||
* <attGroup ref="{http://scap.nist.gov/schema/cvss-v2/0.2}vectorAttributeGroup"/>
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "collateralDamagePotentialType", propOrder = {
|
||||
"value"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class CollateralDamagePotentialType {
|
||||
|
||||
@XmlValue
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected CollateralDamagePotentialEnumType value;
|
||||
@XmlAttribute
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean approximated;
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link CollateralDamagePotentialEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public CollateralDamagePotentialEnumType getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link CollateralDamagePotentialEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setValue(CollateralDamagePotentialEnumType value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the approximated property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public boolean isApproximated() {
|
||||
if (approximated == null) {
|
||||
return false;
|
||||
} else {
|
||||
return approximated;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the approximated property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setApproximated(Boolean value) {
|
||||
this.approximated = value;
|
||||
}
|
||||
}
|
||||
@@ -1,65 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for confidenceEnumType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="confidenceEnumType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="UNCONFIRMED"/>
|
||||
* <enumeration value="UNCORROBORATED"/>
|
||||
* <enumeration value="CONFIRMED"/>
|
||||
* <enumeration value="NOT_DEFINED"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "confidenceEnumType")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum ConfidenceEnumType {
|
||||
|
||||
UNCONFIRMED,
|
||||
UNCORROBORATED,
|
||||
CONFIRMED,
|
||||
NOT_DEFINED;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static ConfidenceEnumType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
|
||||
/**
|
||||
* <p>Java class for confidenceType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="confidenceType">
|
||||
* <simpleContent>
|
||||
* <extension base="<http://scap.nist.gov/schema/cvss-v2/0.2>confidenceEnumType">
|
||||
* <attGroup ref="{http://scap.nist.gov/schema/cvss-v2/0.2}vectorAttributeGroup"/>
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "confidenceType", propOrder = {
|
||||
"value"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class ConfidenceType {
|
||||
|
||||
@XmlValue
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected ConfidenceEnumType value;
|
||||
@XmlAttribute
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean approximated;
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link ConfidenceEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public ConfidenceEnumType getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link ConfidenceEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setValue(ConfidenceEnumType value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the approximated property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public boolean isApproximated() {
|
||||
if (approximated == null) {
|
||||
return false;
|
||||
} else {
|
||||
return approximated;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the approximated property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setApproximated(Boolean value) {
|
||||
this.approximated = value;
|
||||
}
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for cveStatus.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="cveStatus">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="CANDIDATE"/>
|
||||
* <enumeration value="ENTRY"/>
|
||||
* <enumeration value="DEPRECATED"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "cveStatus", namespace = "http://scap.nist.gov/schema/cve/0.1")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum CveStatus {
|
||||
|
||||
CANDIDATE,
|
||||
ENTRY,
|
||||
DEPRECATED;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static CveStatus fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,178 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
/**
|
||||
* <p>Java class for cveType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="cveType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="status" type="{http://scap.nist.gov/schema/cve/0.1}cveStatus" minOccurs="0"/>
|
||||
* <element name="description" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
|
||||
* <element name="references" type="{http://scap.nist.gov/schema/scap-core/0.1}referenceType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="id" use="required" type="{http://scap.nist.gov/schema/cve/0.1}cveNamePatternType" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "cveType", namespace = "http://scap.nist.gov/schema/cve/0.1", propOrder = {
|
||||
"status",
|
||||
"description",
|
||||
"references"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class CveType {
|
||||
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected CveStatus status;
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String description;
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<ReferenceType> references;
|
||||
@XmlAttribute(required = true)
|
||||
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String id;
|
||||
|
||||
/**
|
||||
* Gets the value of the status property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link CveStatus }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public CveStatus getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the status property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link CveStatus }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setStatus(CveStatus value) {
|
||||
this.status = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the description property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the description property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setDescription(String value) {
|
||||
this.description = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the references property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the references property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getReferences().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link ReferenceType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<ReferenceType> getReferences() {
|
||||
if (references == null) {
|
||||
references = new ArrayList<ReferenceType>();
|
||||
}
|
||||
return this.references;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
}
|
||||
@@ -1,59 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for cvssImpactType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="cvssImpactType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://scap.nist.gov/schema/cvss-v2/0.2}cvssType">
|
||||
* <sequence>
|
||||
* <element name="base_metrics" type="{http://scap.nist.gov/schema/cvss-v2/0.2}baseMetricsType"/>
|
||||
* <element name="environmental_metrics" type="{http://scap.nist.gov/schema/cvss-v2/0.2}environmentalMetricsType" minOccurs="0"/>
|
||||
* <element name="temporal_metrics" type="{http://scap.nist.gov/schema/cvss-v2/0.2}temporalMetricsType" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "cvssImpactType")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class CvssImpactType
|
||||
extends CvssType {
|
||||
}
|
||||
@@ -1,170 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* "This schema was intentionally designed to avoid mixing classes and
|
||||
* attributes between CVSS version 1, CVSS version 2, and future versions.
|
||||
* Scores in the CVSS system are interdependent. The temporal score is a
|
||||
* multiplier of the base score. The environmental score, in turn, is a
|
||||
* multiplier of the temporal score. The ability to transfer these scores
|
||||
* independently is provided on the assumption that the user understands the
|
||||
* business logic. For any given metric, it is preferred that the score, as a
|
||||
* minimum is provided, however the score can be re-created from the metrics or
|
||||
* the multiplier and any scores they are dependent on."
|
||||
*
|
||||
* <p>Java class for cvssType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="cvssType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="base_metrics" type="{http://scap.nist.gov/schema/cvss-v2/0.2}baseMetricsType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="environmental_metrics" type="{http://scap.nist.gov/schema/cvss-v2/0.2}environmentalMetricsType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="temporal_metrics" type="{http://scap.nist.gov/schema/cvss-v2/0.2}temporalMetricsType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "cvssType", propOrder = {
|
||||
"baseMetrics",
|
||||
"environmentalMetrics",
|
||||
"temporalMetrics"
|
||||
})
|
||||
@XmlSeeAlso({
|
||||
CvssImpactType.class
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class CvssType {
|
||||
|
||||
@XmlElement(name = "base_metrics")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<BaseMetricsType> baseMetrics;
|
||||
@XmlElement(name = "environmental_metrics")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<EnvironmentalMetricsType> environmentalMetrics;
|
||||
@XmlElement(name = "temporal_metrics")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<TemporalMetricsType> temporalMetrics;
|
||||
|
||||
/**
|
||||
* Gets the value of the baseMetrics property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the baseMetrics property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getBaseMetrics().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link BaseMetricsType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<BaseMetricsType> getBaseMetrics() {
|
||||
if (baseMetrics == null) {
|
||||
baseMetrics = new ArrayList<BaseMetricsType>();
|
||||
}
|
||||
return this.baseMetrics;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the environmentalMetrics property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the environmentalMetrics property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getEnvironmentalMetrics().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link EnvironmentalMetricsType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<EnvironmentalMetricsType> getEnvironmentalMetrics() {
|
||||
if (environmentalMetrics == null) {
|
||||
environmentalMetrics = new ArrayList<EnvironmentalMetricsType>();
|
||||
}
|
||||
return this.environmentalMetrics;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the temporalMetrics property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the temporalMetrics property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getTemporalMetrics().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link TemporalMetricsType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<TemporalMetricsType> getTemporalMetrics() {
|
||||
if (temporalMetrics == null) {
|
||||
temporalMetrics = new ArrayList<TemporalMetricsType>();
|
||||
}
|
||||
return this.temporalMetrics;
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
/**
|
||||
* <p>Java class for cweReferenceType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="cweReferenceType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="id" use="required" type="{http://scap.nist.gov/schema/scap-core/0.1}cweNamePatternType" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "cweReferenceType", namespace = "http://scap.nist.gov/schema/vulnerability/0.4")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class CweReferenceType {
|
||||
|
||||
@XmlAttribute(required = true)
|
||||
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String id;
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
}
|
||||
@@ -1,291 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.math.BigDecimal;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
|
||||
/**
|
||||
* <p>Java class for environmentalMetricsType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="environmentalMetricsType">
|
||||
* <complexContent>
|
||||
* <extension base="{http://scap.nist.gov/schema/cvss-v2/0.2}metricsType">
|
||||
* <sequence>
|
||||
* <element name="score" type="{http://scap.nist.gov/schema/cvss-v2/0.2}zeroToTenDecimalType" minOccurs="0"/>
|
||||
* <group ref="{http://scap.nist.gov/schema/cvss-v2/0.2}environmentalVectorsGroup"/>
|
||||
* <element name="source" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
|
||||
* <element name="generated-on-datetime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "environmentalMetricsType", propOrder = {
|
||||
"score",
|
||||
"collateralDamagePotential",
|
||||
"targetDistribution",
|
||||
"confidentialityRequirement",
|
||||
"integrityRequirement",
|
||||
"availabilityRequirement",
|
||||
"source",
|
||||
"generatedOnDatetime"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class EnvironmentalMetricsType
|
||||
extends MetricsType {
|
||||
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected BigDecimal score;
|
||||
@XmlElement(name = "collateral-damage-potential")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected CollateralDamagePotentialType collateralDamagePotential;
|
||||
@XmlElement(name = "target-distribution")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected TargetDistributionType targetDistribution;
|
||||
@XmlElement(name = "confidentiality-requirement")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected CiaRequirementType confidentialityRequirement;
|
||||
@XmlElement(name = "integrity-requirement")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected CiaRequirementType integrityRequirement;
|
||||
@XmlElement(name = "availability-requirement")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected CiaRequirementType availabilityRequirement;
|
||||
@XmlElement(required = true)
|
||||
@XmlSchemaType(name = "anyURI")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String source;
|
||||
@XmlElement(name = "generated-on-datetime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected XMLGregorianCalendar generatedOnDatetime;
|
||||
|
||||
/**
|
||||
* Gets the value of the score property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public BigDecimal getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the score property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setScore(BigDecimal value) {
|
||||
this.score = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the collateralDamagePotential property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link CollateralDamagePotentialType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public CollateralDamagePotentialType getCollateralDamagePotential() {
|
||||
return collateralDamagePotential;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the collateralDamagePotential property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link CollateralDamagePotentialType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setCollateralDamagePotential(CollateralDamagePotentialType value) {
|
||||
this.collateralDamagePotential = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the targetDistribution property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link TargetDistributionType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public TargetDistributionType getTargetDistribution() {
|
||||
return targetDistribution;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the targetDistribution property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link TargetDistributionType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setTargetDistribution(TargetDistributionType value) {
|
||||
this.targetDistribution = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the confidentialityRequirement property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link CiaRequirementType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public CiaRequirementType getConfidentialityRequirement() {
|
||||
return confidentialityRequirement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the confidentialityRequirement property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link CiaRequirementType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setConfidentialityRequirement(CiaRequirementType value) {
|
||||
this.confidentialityRequirement = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the integrityRequirement property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link CiaRequirementType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public CiaRequirementType getIntegrityRequirement() {
|
||||
return integrityRequirement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the integrityRequirement property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link CiaRequirementType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setIntegrityRequirement(CiaRequirementType value) {
|
||||
this.integrityRequirement = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the availabilityRequirement property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link CiaRequirementType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public CiaRequirementType getAvailabilityRequirement() {
|
||||
return availabilityRequirement;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the availabilityRequirement property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link CiaRequirementType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setAvailabilityRequirement(CiaRequirementType value) {
|
||||
this.availabilityRequirement = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the source property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the source property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setSource(String value) {
|
||||
this.source = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the generatedOnDatetime property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public XMLGregorianCalendar getGeneratedOnDatetime() {
|
||||
return generatedOnDatetime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the generatedOnDatetime property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setGeneratedOnDatetime(XMLGregorianCalendar value) {
|
||||
this.generatedOnDatetime = value;
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for exploitabilityEnumType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="exploitabilityEnumType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="UNPROVEN"/>
|
||||
* <enumeration value="PROOF_OF_CONCEPT"/>
|
||||
* <enumeration value="FUNCTIONAL"/>
|
||||
* <enumeration value="HIGH"/>
|
||||
* <enumeration value="NOT_DEFINED"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "exploitabilityEnumType")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum ExploitabilityEnumType {
|
||||
|
||||
UNPROVEN,
|
||||
PROOF_OF_CONCEPT,
|
||||
FUNCTIONAL,
|
||||
HIGH,
|
||||
NOT_DEFINED;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static ExploitabilityEnumType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
|
||||
/**
|
||||
* <p>Java class for exploitabilityType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="exploitabilityType">
|
||||
* <simpleContent>
|
||||
* <extension base="<http://scap.nist.gov/schema/cvss-v2/0.2>exploitabilityEnumType">
|
||||
* <attGroup ref="{http://scap.nist.gov/schema/cvss-v2/0.2}vectorAttributeGroup"/>
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "exploitabilityType", propOrder = {
|
||||
"value"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class ExploitabilityType {
|
||||
|
||||
@XmlValue
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected ExploitabilityEnumType value;
|
||||
@XmlAttribute
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean approximated;
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link ExploitabilityEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public ExploitabilityEnumType getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link ExploitabilityEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setValue(ExploitabilityEnumType value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the approximated property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public boolean isApproximated() {
|
||||
if (approximated == null) {
|
||||
return false;
|
||||
} else {
|
||||
return approximated;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the approximated property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setApproximated(Boolean value) {
|
||||
this.approximated = value;
|
||||
}
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* The fact-ref element appears as a child of a logical-test element. It is
|
||||
* simply a reference to a CPE Name that always evaluates to a Boolean result.
|
||||
*
|
||||
* <p>Java class for FactRefType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="FactRefType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="name" use="required" type="{http://cpe.mitre.org/language/2.0}namePattern" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "FactRefType", namespace = "http://cpe.mitre.org/language/2.0")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class FactRefType {
|
||||
|
||||
@XmlAttribute(required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String name;
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for fixActionDescriptionEnumType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="fixActionDescriptionEnumType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="PATCH"/>
|
||||
* <enumeration value="SOFTWARE_UPDATE"/>
|
||||
* <enumeration value="CONFIGURATION_CHANGE"/>
|
||||
* <enumeration value="POLICY_CHANGE"/>
|
||||
* <enumeration value="EXTERNAL_MITIGATION"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "fixActionDescriptionEnumType", namespace = "http://scap.nist.gov/schema/vulnerability/0.4")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum FixActionDescriptionEnumType {
|
||||
|
||||
PATCH,
|
||||
SOFTWARE_UPDATE,
|
||||
CONFIGURATION_CHANGE,
|
||||
POLICY_CHANGE,
|
||||
EXTERNAL_MITIGATION;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static FixActionDescriptionEnumType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,493 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
/**
|
||||
* A single fix action should only cover a single patch application, software
|
||||
* update, configuration change, or external fix. Dependencies should be
|
||||
* documented by using the "next_fix_action" element to point to a recursive
|
||||
* list of fix actions.
|
||||
*
|
||||
* <p>Java class for fixActionType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="fixActionType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element ref="{http://scap.nist.gov/schema/patch/0.1}patch" minOccurs="0"/>
|
||||
* <element name="configuration-remediation" type="{http://scap.nist.gov/schema/vulnerability/0.4}vulnerabilityReferenceType" minOccurs="0"/>
|
||||
* <element name="software-update" type="{http://scap.nist.gov/schema/scap-core/0.1}cpeNamePatternType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="notes" type="{http://www.w3.org/2001/XMLSchema}string" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="deprecated-by" type="{http://scap.nist.gov/schema/scap-core/0.1}cpeNamePatternType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="next-fix-action" type="{http://scap.nist.gov/schema/vulnerability/0.4}fixActionType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="fix-action-tool-configuration" type="{http://scap.nist.gov/schema/vulnerability/0.4}toolConfigurationType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="applicable-configuration" type="{http://cpe.mitre.org/language/2.0}PlatformType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="effectiveness" type="{http://scap.nist.gov/schema/vulnerability/0.4}fixEffectivenessEnumType" minOccurs="0"/>
|
||||
* <element name="applicable-check" type="{http://scap.nist.gov/schema/scap-core/0.1}checkReferenceType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="fix_action_description" use="required" type="{http://scap.nist.gov/schema/vulnerability/0.4}fixActionDescriptionEnumType" />
|
||||
* <attribute name="fix_action_type" use="required" type="{http://scap.nist.gov/schema/vulnerability/0.4}fixActionTypeEnumType" />
|
||||
* <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
|
||||
* <attribute name="source" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "fixActionType", namespace = "http://scap.nist.gov/schema/vulnerability/0.4", propOrder = {
|
||||
"patch",
|
||||
"configurationRemediation",
|
||||
"softwareUpdates",
|
||||
"notes",
|
||||
"deprecatedBies",
|
||||
"nextFixActions",
|
||||
"fixActionToolConfigurations",
|
||||
"applicableConfigurations",
|
||||
"effectiveness",
|
||||
"applicableChecks"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class FixActionType {
|
||||
|
||||
@XmlElement(namespace = "http://scap.nist.gov/schema/patch/0.1")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Patch patch;
|
||||
@XmlElement(name = "configuration-remediation")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected VulnerabilityReferenceType configurationRemediation;
|
||||
@XmlElement(name = "software-update")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<String> softwareUpdates;
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<String> notes;
|
||||
@XmlElement(name = "deprecated-by")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<String> deprecatedBies;
|
||||
@XmlElement(name = "next-fix-action")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<FixActionType> nextFixActions;
|
||||
@XmlElement(name = "fix-action-tool-configuration")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<ToolConfigurationType> fixActionToolConfigurations;
|
||||
@XmlElement(name = "applicable-configuration")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<PlatformType> applicableConfigurations;
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected FixEffectivenessEnumType effectiveness;
|
||||
@XmlElement(name = "applicable-check")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<CheckReferenceType> applicableChecks;
|
||||
@XmlAttribute(name = "fix_action_description", required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected FixActionDescriptionEnumType fixActionDescription;
|
||||
@XmlAttribute(name = "fix_action_type", required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected FixActionTypeEnumType fixActionType;
|
||||
@XmlAttribute(required = true)
|
||||
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
|
||||
@XmlSchemaType(name = "token")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String id;
|
||||
@XmlAttribute(required = true)
|
||||
@XmlSchemaType(name = "anyURI")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String source;
|
||||
|
||||
/**
|
||||
* Gets the value of the patch property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Patch }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public Patch getPatch() {
|
||||
return patch;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the patch property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Patch }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setPatch(Patch value) {
|
||||
this.patch = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the configurationRemediation property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link VulnerabilityReferenceType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public VulnerabilityReferenceType getConfigurationRemediation() {
|
||||
return configurationRemediation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the configurationRemediation property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link VulnerabilityReferenceType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setConfigurationRemediation(VulnerabilityReferenceType value) {
|
||||
this.configurationRemediation = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the softwareUpdates property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the softwareUpdates property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getSoftwareUpdates().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link String }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<String> getSoftwareUpdates() {
|
||||
if (softwareUpdates == null) {
|
||||
softwareUpdates = new ArrayList<String>();
|
||||
}
|
||||
return this.softwareUpdates;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the notes property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the notes property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getNotes().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link String }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<String> getNotes() {
|
||||
if (notes == null) {
|
||||
notes = new ArrayList<String>();
|
||||
}
|
||||
return this.notes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the deprecatedBies property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the deprecatedBies property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getDeprecatedBies().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link String }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<String> getDeprecatedBies() {
|
||||
if (deprecatedBies == null) {
|
||||
deprecatedBies = new ArrayList<String>();
|
||||
}
|
||||
return this.deprecatedBies;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the nextFixActions property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the nextFixActions property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getNextFixActions().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link FixActionType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<FixActionType> getNextFixActions() {
|
||||
if (nextFixActions == null) {
|
||||
nextFixActions = new ArrayList<FixActionType>();
|
||||
}
|
||||
return this.nextFixActions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the fixActionToolConfigurations property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the fixActionToolConfigurations property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getFixActionToolConfigurations().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link ToolConfigurationType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<ToolConfigurationType> getFixActionToolConfigurations() {
|
||||
if (fixActionToolConfigurations == null) {
|
||||
fixActionToolConfigurations = new ArrayList<ToolConfigurationType>();
|
||||
}
|
||||
return this.fixActionToolConfigurations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the applicableConfigurations property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the applicableConfigurations property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getApplicableConfigurations().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link PlatformType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<PlatformType> getApplicableConfigurations() {
|
||||
if (applicableConfigurations == null) {
|
||||
applicableConfigurations = new ArrayList<PlatformType>();
|
||||
}
|
||||
return this.applicableConfigurations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the effectiveness property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link FixEffectivenessEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public FixEffectivenessEnumType getEffectiveness() {
|
||||
return effectiveness;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the effectiveness property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link FixEffectivenessEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setEffectiveness(FixEffectivenessEnumType value) {
|
||||
this.effectiveness = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the applicableChecks property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the applicableChecks property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getApplicableChecks().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link CheckReferenceType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<CheckReferenceType> getApplicableChecks() {
|
||||
if (applicableChecks == null) {
|
||||
applicableChecks = new ArrayList<CheckReferenceType>();
|
||||
}
|
||||
return this.applicableChecks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the fixActionDescription property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link FixActionDescriptionEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public FixActionDescriptionEnumType getFixActionDescription() {
|
||||
return fixActionDescription;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the fixActionDescription property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link FixActionDescriptionEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setFixActionDescription(FixActionDescriptionEnumType value) {
|
||||
this.fixActionDescription = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the fixActionType property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link FixActionTypeEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public FixActionTypeEnumType getFixActionType() {
|
||||
return fixActionType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the fixActionType property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link FixActionTypeEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setFixActionType(FixActionTypeEnumType value) {
|
||||
this.fixActionType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the source property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the source property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setSource(String value) {
|
||||
this.source = value;
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for fixActionTypeEnumType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="fixActionTypeEnumType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="MITIGATION"/>
|
||||
* <enumeration value="REMEDIATION"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "fixActionTypeEnumType", namespace = "http://scap.nist.gov/schema/vulnerability/0.4")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum FixActionTypeEnumType {
|
||||
|
||||
MITIGATION,
|
||||
REMEDIATION;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static FixActionTypeEnumType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for fixEffectivenessEnumType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="fixEffectivenessEnumType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="PARTIAL"/>
|
||||
* <enumeration value="COMPLETE"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "fixEffectivenessEnumType", namespace = "http://scap.nist.gov/schema/vulnerability/0.4")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum FixEffectivenessEnumType {
|
||||
|
||||
PARTIAL,
|
||||
COMPLETE;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static FixEffectivenessEnumType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,183 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* The logical-test element appears as a child of a platform element, and may
|
||||
* also be nested to create more complex logical tests. The content consists of
|
||||
* one or more elements: fact-ref, and logical-test children are permitted. The
|
||||
* operator to be applied, and optional negation of the test, are given as
|
||||
* attributes.
|
||||
*
|
||||
* <p>Java class for LogicalTestType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="LogicalTestType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="logical-test" type="{http://cpe.mitre.org/language/2.0}LogicalTestType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="fact-ref" type="{http://cpe.mitre.org/language/2.0}FactRefType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="operator" use="required" type="{http://cpe.mitre.org/language/2.0}operatorEnumeration" />
|
||||
* <attribute name="negate" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "LogicalTestType", namespace = "http://cpe.mitre.org/language/2.0", propOrder = {
|
||||
"logicalTests",
|
||||
"factReves"
|
||||
})
|
||||
@XmlRootElement(name = "logical-test", namespace = "http://cpe.mitre.org/language/2.0")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class LogicalTest {
|
||||
|
||||
@XmlElement(name = "logical-test")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<LogicalTest> logicalTests;
|
||||
@XmlElement(name = "fact-ref")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<FactRefType> factReves;
|
||||
@XmlAttribute(required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected OperatorEnumeration operator;
|
||||
@XmlAttribute(required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected boolean negate;
|
||||
|
||||
/**
|
||||
* Gets the value of the logicalTests property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the logicalTests property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getLogicalTests().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link LogicalTest }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<LogicalTest> getLogicalTests() {
|
||||
if (logicalTests == null) {
|
||||
logicalTests = new ArrayList<LogicalTest>();
|
||||
}
|
||||
return this.logicalTests;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the factReves property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the factReves property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getFactReves().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link FactRefType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<FactRefType> getFactReves() {
|
||||
if (factReves == null) {
|
||||
factReves = new ArrayList<FactRefType>();
|
||||
}
|
||||
return this.factReves;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the operator property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link OperatorEnumeration }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public OperatorEnumeration getOperator() {
|
||||
return operator;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the operator property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link OperatorEnumeration }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setOperator(OperatorEnumeration value) {
|
||||
this.operator = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the negate property.
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public boolean isNegate() {
|
||||
return negate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the negate property.
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setNegate(boolean value) {
|
||||
this.negate = value;
|
||||
}
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.math.BigDecimal;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* Base type for metrics that defines common attributes of all metrics.
|
||||
*
|
||||
* <p>Java class for metricsType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="metricsType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="upgraded-from-version" type="{http://www.w3.org/2001/XMLSchema}decimal" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "metricsType")
|
||||
@XmlSeeAlso({
|
||||
TemporalMetricsType.class,
|
||||
BaseMetricsType.class,
|
||||
EnvironmentalMetricsType.class
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public abstract class MetricsType {
|
||||
|
||||
@XmlAttribute(name = "upgraded-from-version")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected BigDecimal upgradedFromVersion;
|
||||
|
||||
/**
|
||||
* Gets the value of the upgradedFromVersion property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public BigDecimal getUpgradedFromVersion() {
|
||||
return upgradedFromVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the upgradedFromVersion property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setUpgradedFromVersion(BigDecimal value) {
|
||||
this.upgradedFromVersion = value;
|
||||
}
|
||||
}
|
||||
@@ -1,96 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* The notesType defines an element that consists of one or more child note
|
||||
* elements. It is assumed that each of these note elements are representative
|
||||
* of the same language as defined by their parent.
|
||||
*
|
||||
* <p>Java class for notesType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="notesType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="note" type="{http://scap.nist.gov/schema/scap-core/0.1}textType" maxOccurs="unbounded"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "notesType", namespace = "http://scap.nist.gov/schema/scap-core/0.1", propOrder = {
|
||||
"notes"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class NotesType {
|
||||
|
||||
@XmlElement(name = "note", required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<TextType2> notes;
|
||||
|
||||
/**
|
||||
* Gets the value of the notes property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the notes property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getNotes().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link TextType2 }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<TextType2> getNotes() {
|
||||
if (notes == null) {
|
||||
notes = new ArrayList<TextType2>();
|
||||
}
|
||||
return this.notes;
|
||||
}
|
||||
}
|
||||
@@ -1,155 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
|
||||
/**
|
||||
* <p>Java class for anonymous complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element ref="{http://scap.nist.gov/schema/feed/vulnerability/2.0}entry" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="nvd_xml_version" use="required" type="{http://www.w3.org/2001/XMLSchema}decimal" />
|
||||
* <attribute name="pub_date" use="required" type="{http://www.w3.org/2001/XMLSchema}dateTime" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "", propOrder = {
|
||||
"entries"
|
||||
})
|
||||
@XmlRootElement(name = "nvd", namespace = "http://scap.nist.gov/schema/feed/vulnerability/2.0")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class Nvd {
|
||||
|
||||
@XmlElement(name = "entry", namespace = "http://scap.nist.gov/schema/feed/vulnerability/2.0")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<VulnerabilityType> entries;
|
||||
@XmlAttribute(name = "nvd_xml_version", required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected BigDecimal nvdXmlVersion;
|
||||
@XmlAttribute(name = "pub_date", required = true)
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected XMLGregorianCalendar pubDate;
|
||||
|
||||
/**
|
||||
* A CVE entry.Gets the value of the entries property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the entries property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getEntries().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link VulnerabilityType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<VulnerabilityType> getEntries() {
|
||||
if (entries == null) {
|
||||
entries = new ArrayList<VulnerabilityType>();
|
||||
}
|
||||
return this.entries;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the nvdXmlVersion property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public BigDecimal getNvdXmlVersion() {
|
||||
return nvdXmlVersion;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the nvdXmlVersion property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setNvdXmlVersion(BigDecimal value) {
|
||||
this.nvdXmlVersion = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the pubDate property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public XMLGregorianCalendar getPubDate() {
|
||||
return pubDate;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the pubDate property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setPubDate(XMLGregorianCalendar value) {
|
||||
this.pubDate = value;
|
||||
}
|
||||
}
|
||||
@@ -1,423 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import javax.xml.bind.annotation.XmlElementDecl;
|
||||
import javax.xml.bind.annotation.XmlRegistry;
|
||||
import javax.xml.namespace.QName;
|
||||
|
||||
/**
|
||||
* This object contains factory methods for each Java content interface and Java
|
||||
* element interface generated in the
|
||||
* org.codesecure.dependencycheck.data.nvdcve.generated package. <p>An
|
||||
* ObjectFactory allows you to programatically construct new instances of the
|
||||
* Java representation for XML content. The Java representation of XML content
|
||||
* can consist of schema derived interfaces and classes representing the binding
|
||||
* of schema type definitions, element declarations and model groups. Factory
|
||||
* methods for each of these are provided in this class.
|
||||
*
|
||||
*/
|
||||
@XmlRegistry
|
||||
public class ObjectFactory {
|
||||
|
||||
private final static QName _Entry_QNAME = new QName("http://scap.nist.gov/schema/feed/vulnerability/2.0", "entry");
|
||||
private final static QName _Vulnerability_QNAME = new QName("http://scap.nist.gov/schema/vulnerability/0.4", "vulnerability");
|
||||
private final static QName _SearchableCpeReferencesTypeCpeName_QNAME = new QName("http://scap.nist.gov/schema/scap-core/0.1", "cpe-name");
|
||||
private final static QName _SearchableCpeReferencesTypeCpeSearchableName_QNAME = new QName("http://scap.nist.gov/schema/scap-core/0.1", "cpe-searchable-name");
|
||||
|
||||
/**
|
||||
* Create a new ObjectFactory that can be used to create new instances of
|
||||
* schema derived classes for package:
|
||||
* org.codesecure.dependencycheck.data.nvdcve.generated
|
||||
*
|
||||
*/
|
||||
public ObjectFactory() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link AccessComplexityType }
|
||||
*
|
||||
*/
|
||||
public AccessComplexityType createAccessComplexityType() {
|
||||
return new AccessComplexityType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link ExploitabilityType }
|
||||
*
|
||||
*/
|
||||
public ExploitabilityType createExploitabilityType() {
|
||||
return new ExploitabilityType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link ConfidenceType }
|
||||
*
|
||||
*/
|
||||
public ConfidenceType createConfidenceType() {
|
||||
return new ConfidenceType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link TemporalMetricsType }
|
||||
*
|
||||
*/
|
||||
public TemporalMetricsType createTemporalMetricsType() {
|
||||
return new TemporalMetricsType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link FactRefType }
|
||||
*
|
||||
*/
|
||||
public FactRefType createFactRefType() {
|
||||
return new FactRefType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link VulnerableSoftwareType }
|
||||
*
|
||||
*/
|
||||
public VulnerableSoftwareType createVulnerableSoftwareType() {
|
||||
return new VulnerableSoftwareType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link CveType }
|
||||
*
|
||||
*/
|
||||
public CveType createCveType() {
|
||||
return new CveType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link AssociatedExploitLocationType }
|
||||
*
|
||||
*/
|
||||
public AssociatedExploitLocationType createAssociatedExploitLocationType() {
|
||||
return new AssociatedExploitLocationType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link SearchableCpeReferencesType }
|
||||
*
|
||||
*/
|
||||
public SearchableCpeReferencesType createSearchableCpeReferencesType() {
|
||||
return new SearchableCpeReferencesType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link CvssImpactType }
|
||||
*
|
||||
*/
|
||||
public CvssImpactType createCvssImpactType() {
|
||||
return new CvssImpactType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link CweReferenceType }
|
||||
*
|
||||
*/
|
||||
public CweReferenceType createCweReferenceType() {
|
||||
return new CweReferenceType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link CceParameterType }
|
||||
*
|
||||
*/
|
||||
public CceParameterType createCceParameterType() {
|
||||
return new CceParameterType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link FixActionType }
|
||||
*
|
||||
*/
|
||||
public FixActionType createFixActionType() {
|
||||
return new FixActionType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link OsvdbExtensionType }
|
||||
*
|
||||
*/
|
||||
public OsvdbExtensionType createOsvdbExtensionType() {
|
||||
return new OsvdbExtensionType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link CheckSearchType }
|
||||
*
|
||||
*/
|
||||
public CheckSearchType createCheckSearchType() {
|
||||
return new CheckSearchType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link RemediationLevelType }
|
||||
*
|
||||
*/
|
||||
public RemediationLevelType createRemediationLevelType() {
|
||||
return new RemediationLevelType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link ToolConfigurationType }
|
||||
*
|
||||
*/
|
||||
public ToolConfigurationType createToolConfigurationType() {
|
||||
return new ToolConfigurationType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link TextType1 }
|
||||
*
|
||||
*/
|
||||
public TextType1 createTextType1() {
|
||||
return new TextType1();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link PlatformSpecification }
|
||||
*
|
||||
*/
|
||||
public PlatformSpecification createPlatformSpecification() {
|
||||
return new PlatformSpecification();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link NotesType }
|
||||
*
|
||||
*/
|
||||
public NotesType createNotesType() {
|
||||
return new NotesType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link CollateralDamagePotentialType }
|
||||
*
|
||||
*/
|
||||
public CollateralDamagePotentialType createCollateralDamagePotentialType() {
|
||||
return new CollateralDamagePotentialType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link BaseMetricsType }
|
||||
*
|
||||
*/
|
||||
public BaseMetricsType createBaseMetricsType() {
|
||||
return new BaseMetricsType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link CheckReferenceType }
|
||||
*
|
||||
*/
|
||||
public CheckReferenceType createCheckReferenceType() {
|
||||
return new CheckReferenceType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link ReferenceType }
|
||||
*
|
||||
*/
|
||||
public ReferenceType createReferenceType() {
|
||||
return new ReferenceType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link VulnerabilityReferenceType }
|
||||
*
|
||||
*/
|
||||
public VulnerabilityReferenceType createVulnerabilityReferenceType() {
|
||||
return new VulnerabilityReferenceType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link CiaRequirementType }
|
||||
*
|
||||
*/
|
||||
public CiaRequirementType createCiaRequirementType() {
|
||||
return new CiaRequirementType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link CvssType }
|
||||
*
|
||||
*/
|
||||
public CvssType createCvssType() {
|
||||
return new CvssType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link TargetDistributionType }
|
||||
*
|
||||
*/
|
||||
public TargetDistributionType createTargetDistributionType() {
|
||||
return new TargetDistributionType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link VulnerabilityType }
|
||||
*
|
||||
*/
|
||||
public VulnerabilityType createVulnerabilityType() {
|
||||
return new VulnerabilityType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link Nvd }
|
||||
*
|
||||
*/
|
||||
public Nvd createNvd() {
|
||||
return new Nvd();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link Patch }
|
||||
*
|
||||
*/
|
||||
public Patch createPatch() {
|
||||
return new Patch();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link EnvironmentalMetricsType }
|
||||
*
|
||||
*/
|
||||
public EnvironmentalMetricsType createEnvironmentalMetricsType() {
|
||||
return new EnvironmentalMetricsType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link LogicalTest }
|
||||
*
|
||||
*/
|
||||
public LogicalTest createLogicalTest() {
|
||||
return new LogicalTest();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link TextType2 }
|
||||
*
|
||||
*/
|
||||
public TextType2 createTextType2() {
|
||||
return new TextType2();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link AccessVectorType }
|
||||
*
|
||||
*/
|
||||
public AccessVectorType createAccessVectorType() {
|
||||
return new AccessVectorType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link AuthenticationType }
|
||||
*
|
||||
*/
|
||||
public AuthenticationType createAuthenticationType() {
|
||||
return new AuthenticationType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link Patch.References }
|
||||
*
|
||||
*/
|
||||
public Patch.References createPatchReferences() {
|
||||
return new Patch.References();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link TagType }
|
||||
*
|
||||
*/
|
||||
public TagType createTagType() {
|
||||
return new TagType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link CceType }
|
||||
*
|
||||
*/
|
||||
public CceType createCceType() {
|
||||
return new CceType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link PlatformType }
|
||||
*
|
||||
*/
|
||||
public PlatformType createPlatformType() {
|
||||
return new PlatformType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link CiaType }
|
||||
*
|
||||
*/
|
||||
public CiaType createCiaType() {
|
||||
return new CiaType();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link JAXBElement }{@code <}{@link VulnerabilityType }{@code >}}
|
||||
*
|
||||
*/
|
||||
@XmlElementDecl(namespace = "http://scap.nist.gov/schema/feed/vulnerability/2.0", name = "entry")
|
||||
public JAXBElement<VulnerabilityType> createEntry(VulnerabilityType value) {
|
||||
return new JAXBElement<VulnerabilityType>(_Entry_QNAME, VulnerabilityType.class, null, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link JAXBElement }{@code <}{@link VulnerabilityType }{@code >}}
|
||||
*
|
||||
*/
|
||||
@XmlElementDecl(namespace = "http://scap.nist.gov/schema/vulnerability/0.4", name = "vulnerability")
|
||||
public JAXBElement<VulnerabilityType> createVulnerability(VulnerabilityType value) {
|
||||
return new JAXBElement<VulnerabilityType>(_Vulnerability_QNAME, VulnerabilityType.class, null, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
|
||||
*
|
||||
*/
|
||||
@XmlElementDecl(namespace = "http://scap.nist.gov/schema/scap-core/0.1", name = "cpe-name", scope = SearchableCpeReferencesType.class)
|
||||
public JAXBElement<String> createSearchableCpeReferencesTypeCpeName(String value) {
|
||||
return new JAXBElement<String>(_SearchableCpeReferencesTypeCpeName_QNAME, String.class, SearchableCpeReferencesType.class, value);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create an instance of {@link JAXBElement }{@code <}{@link String }{@code >}}
|
||||
*
|
||||
*/
|
||||
@XmlElementDecl(namespace = "http://scap.nist.gov/schema/scap-core/0.1", name = "cpe-searchable-name", scope = SearchableCpeReferencesType.class)
|
||||
public JAXBElement<String> createSearchableCpeReferencesTypeCpeSearchableName(String value) {
|
||||
return new JAXBElement<String>(_SearchableCpeReferencesTypeCpeSearchableName_QNAME, String.class, SearchableCpeReferencesType.class, value);
|
||||
}
|
||||
}
|
||||
@@ -1,61 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for operatorEnumeration.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="operatorEnumeration">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}string">
|
||||
* <enumeration value="AND"/>
|
||||
* <enumeration value="OR"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "operatorEnumeration", namespace = "http://cpe.mitre.org/language/2.0")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum OperatorEnumeration {
|
||||
|
||||
AND,
|
||||
OR;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static OperatorEnumeration fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,87 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for osvdbExtensionType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="osvdbExtensionType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="exploit-location" type="{http://scap.nist.gov/schema/vulnerability/0.4}associatedExploitLocationType"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "osvdbExtensionType", namespace = "http://scap.nist.gov/schema/vulnerability/0.4", propOrder = {
|
||||
"exploitLocation"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class OsvdbExtensionType {
|
||||
|
||||
@XmlElement(name = "exploit-location", required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected AssociatedExploitLocationType exploitLocation;
|
||||
|
||||
/**
|
||||
* Gets the value of the exploitLocation property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link AssociatedExploitLocationType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public AssociatedExploitLocationType getExploitLocation() {
|
||||
return exploitLocation;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the exploitLocation property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link AssociatedExploitLocationType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setExploitLocation(AssociatedExploitLocationType value) {
|
||||
this.exploitLocation = value;
|
||||
}
|
||||
}
|
||||
@@ -1,414 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for patchType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="patchType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="title" type="{http://scap.nist.gov/schema/scap-core/0.1}textType" minOccurs="0"/>
|
||||
* <element name="references" minOccurs="0">
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="reference" type="{http://scap.nist.gov/schema/scap-core/0.1}referenceType" maxOccurs="unbounded"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </element>
|
||||
* <element name="notes" type="{http://scap.nist.gov/schema/scap-core/0.1}notesType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="check" type="{http://scap.nist.gov/schema/scap-core/0.1}checkReferenceType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="supersedes" type="{http://scap.nist.gov/schema/patch/0.1}patchType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="superseded-by" type="{http://scap.nist.gov/schema/patch/0.1}patchType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="identifier" use="required" type="{http://www.w3.org/2001/XMLSchema}double" />
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}string" />
|
||||
* <attribute name="superseded" use="required" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* <attribute name="deprecated" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "patchType", namespace = "http://scap.nist.gov/schema/patch/0.1", propOrder = {
|
||||
"title",
|
||||
"references",
|
||||
"notes",
|
||||
"checks",
|
||||
"supersedes",
|
||||
"supersededBies"
|
||||
})
|
||||
@XmlRootElement(name = "patch", namespace = "http://scap.nist.gov/schema/patch/0.1")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class Patch {
|
||||
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected TextType2 title;
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Patch.References references;
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<NotesType> notes;
|
||||
@XmlElement(name = "check")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<CheckReferenceType> checks;
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<Patch> supersedes;
|
||||
@XmlElement(name = "superseded-by")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<Patch> supersededBies;
|
||||
@XmlAttribute(required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected double identifier;
|
||||
@XmlAttribute(required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String name;
|
||||
@XmlAttribute(required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected boolean superseded;
|
||||
@XmlAttribute
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean deprecated;
|
||||
|
||||
/**
|
||||
* Gets the value of the title property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link TextType2 }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public TextType2 getTitle() {
|
||||
return title;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the title property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link TextType2 }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setTitle(TextType2 value) {
|
||||
this.title = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the references property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Patch.References }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public Patch.References getReferences() {
|
||||
return references;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the references property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Patch.References }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setReferences(Patch.References value) {
|
||||
this.references = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the notes property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the notes property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getNotes().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link NotesType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<NotesType> getNotes() {
|
||||
if (notes == null) {
|
||||
notes = new ArrayList<NotesType>();
|
||||
}
|
||||
return this.notes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the checks property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the checks property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getChecks().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link CheckReferenceType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<CheckReferenceType> getChecks() {
|
||||
if (checks == null) {
|
||||
checks = new ArrayList<CheckReferenceType>();
|
||||
}
|
||||
return this.checks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the supersedes property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the supersedes property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getSupersedes().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link Patch }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<Patch> getSupersedes() {
|
||||
if (supersedes == null) {
|
||||
supersedes = new ArrayList<Patch>();
|
||||
}
|
||||
return this.supersedes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the supersededBies property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the supersededBies property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getSupersededBies().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link Patch }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<Patch> getSupersededBies() {
|
||||
if (supersededBies == null) {
|
||||
supersededBies = new ArrayList<Patch>();
|
||||
}
|
||||
return this.supersededBies;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the identifier property.
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public double getIdentifier() {
|
||||
return identifier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the identifier property.
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setIdentifier(double value) {
|
||||
this.identifier = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the superseded property.
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public boolean isSuperseded() {
|
||||
return superseded;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the superseded property.
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setSuperseded(boolean value) {
|
||||
this.superseded = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the deprecated property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public Boolean isDeprecated() {
|
||||
return deprecated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the deprecated property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setDeprecated(Boolean value) {
|
||||
this.deprecated = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* <p>Java class for anonymous complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="reference" type="{http://scap.nist.gov/schema/scap-core/0.1}referenceType" maxOccurs="unbounded"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "", propOrder = {
|
||||
"references"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public static class References {
|
||||
|
||||
@XmlElement(name = "reference", namespace = "http://scap.nist.gov/schema/patch/0.1", required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<ReferenceType> references;
|
||||
|
||||
/**
|
||||
* Gets the value of the references property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list
|
||||
* will be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the references property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getReferences().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link ReferenceType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<ReferenceType> getReferences() {
|
||||
if (references == null) {
|
||||
references = new ArrayList<ReferenceType>();
|
||||
}
|
||||
return this.references;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,94 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for anonymous complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType>
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="platform" type="{http://cpe.mitre.org/language/2.0}PlatformType" maxOccurs="unbounded"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "", propOrder = {
|
||||
"platforms"
|
||||
})
|
||||
@XmlRootElement(name = "platform-specification", namespace = "http://cpe.mitre.org/language/2.0")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class PlatformSpecification {
|
||||
|
||||
@XmlElement(name = "platform", namespace = "http://cpe.mitre.org/language/2.0", required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<PlatformType> platforms;
|
||||
|
||||
/**
|
||||
* Gets the value of the platforms property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the platforms property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getPlatforms().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link PlatformType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<PlatformType> getPlatforms() {
|
||||
if (platforms == null) {
|
||||
platforms = new ArrayList<PlatformType>();
|
||||
}
|
||||
return this.platforms;
|
||||
}
|
||||
}
|
||||
@@ -1,190 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* The optional remark element may appear as a child of a platform element. It
|
||||
* provides some additional description. Zero or more remark elements may
|
||||
* appear. To support uses intended for multiple languages, this element
|
||||
* supports the <20>xml:lang<6E> attribute. There can be multiple remarks for a single
|
||||
* language.
|
||||
*
|
||||
* <p>Java class for PlatformType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="PlatformType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="title" type="{http://cpe.mitre.org/language/2.0}TextType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="remark" type="{http://cpe.mitre.org/language/2.0}TextType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="logical-test" type="{http://cpe.mitre.org/language/2.0}LogicalTestType"/>
|
||||
* </sequence>
|
||||
* <attribute name="id" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "PlatformType", namespace = "http://cpe.mitre.org/language/2.0", propOrder = {
|
||||
"titles",
|
||||
"remarks",
|
||||
"logicalTest"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class PlatformType {
|
||||
|
||||
@XmlElement(name = "title")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<TextType1> titles;
|
||||
@XmlElement(name = "remark")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<TextType1> remarks;
|
||||
@XmlElement(name = "logical-test", required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected LogicalTest logicalTest;
|
||||
@XmlAttribute(required = true)
|
||||
@XmlSchemaType(name = "anyURI")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String id;
|
||||
|
||||
/**
|
||||
* Gets the value of the titles property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the titles property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getTitles().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link TextType1 }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<TextType1> getTitles() {
|
||||
if (titles == null) {
|
||||
titles = new ArrayList<TextType1>();
|
||||
}
|
||||
return this.titles;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the remarks property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the remarks property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getRemarks().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link TextType1 }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<TextType1> getRemarks() {
|
||||
if (remarks == null) {
|
||||
remarks = new ArrayList<TextType1>();
|
||||
}
|
||||
return this.remarks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the logicalTest property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link LogicalTest }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public LogicalTest getLogicalTest() {
|
||||
return logicalTest;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the logicalTest property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link LogicalTest }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setLogicalTest(LogicalTest value) {
|
||||
this.logicalTest = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* Type for a reference in the description of a CPE item. This would normally be
|
||||
* used to point to extra descriptive material, or the supplier's web site, or
|
||||
* the platform documentation. It consists of a piece of text (intended to be
|
||||
* human-readable) and a URI (intended to be a URL, and point to a real
|
||||
* resource).
|
||||
*
|
||||
* <p>Java class for referenceType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="referenceType">
|
||||
* <simpleContent>
|
||||
* <extension base="<http://scap.nist.gov/schema/scap-core/0.1>textType">
|
||||
* <attribute name="href" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "referenceType", namespace = "http://scap.nist.gov/schema/scap-core/0.1")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class ReferenceType
|
||||
extends TextType2 {
|
||||
|
||||
@XmlAttribute
|
||||
@XmlSchemaType(name = "anyURI")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String href;
|
||||
|
||||
/**
|
||||
* Gets the value of the href property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getHref() {
|
||||
return href;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the href property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setHref(String value) {
|
||||
this.href = value;
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for remediationLevelEnumType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="remediationLevelEnumType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="OFFICIAL_FIX"/>
|
||||
* <enumeration value="TEMPORARY_FIX"/>
|
||||
* <enumeration value="WORKAROUND"/>
|
||||
* <enumeration value="UNAVAILABLE"/>
|
||||
* <enumeration value="NOT_DEFINED"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "remediationLevelEnumType")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum RemediationLevelEnumType {
|
||||
|
||||
OFFICIAL_FIX,
|
||||
TEMPORARY_FIX,
|
||||
WORKAROUND,
|
||||
UNAVAILABLE,
|
||||
NOT_DEFINED;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static RemediationLevelEnumType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
|
||||
/**
|
||||
* <p>Java class for remediationLevelType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="remediationLevelType">
|
||||
* <simpleContent>
|
||||
* <extension base="<http://scap.nist.gov/schema/cvss-v2/0.2>remediationLevelEnumType">
|
||||
* <attGroup ref="{http://scap.nist.gov/schema/cvss-v2/0.2}vectorAttributeGroup"/>
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "remediationLevelType", propOrder = {
|
||||
"value"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class RemediationLevelType {
|
||||
|
||||
@XmlValue
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected RemediationLevelEnumType value;
|
||||
@XmlAttribute
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean approximated;
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link RemediationLevelEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public RemediationLevelEnumType getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link RemediationLevelEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setValue(RemediationLevelEnumType value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the approximated property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public boolean isApproximated() {
|
||||
if (approximated == null) {
|
||||
return false;
|
||||
} else {
|
||||
return approximated;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the approximated property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setApproximated(Boolean value) {
|
||||
this.approximated = value;
|
||||
}
|
||||
}
|
||||
@@ -1,98 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElementRef;
|
||||
import javax.xml.bind.annotation.XmlElementRefs;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for searchableCpeReferencesType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="searchableCpeReferencesType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <group ref="{http://scap.nist.gov/schema/scap-core/0.1}cpeReferenceGroup" maxOccurs="unbounded"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "searchableCpeReferencesType", namespace = "http://scap.nist.gov/schema/scap-core/0.1", propOrder = {
|
||||
"cpeNamesAndCpeSearchableNames"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class SearchableCpeReferencesType {
|
||||
|
||||
@XmlElementRefs({
|
||||
@XmlElementRef(name = "cpe-searchable-name", namespace = "http://scap.nist.gov/schema/scap-core/0.1", type = JAXBElement.class),
|
||||
@XmlElementRef(name = "cpe-name", namespace = "http://scap.nist.gov/schema/scap-core/0.1", type = JAXBElement.class)
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<JAXBElement<String>> cpeNamesAndCpeSearchableNames;
|
||||
|
||||
/**
|
||||
* Gets the value of the cpeNamesAndCpeSearchableNames property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the cpeNamesAndCpeSearchableNames property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getCpeNamesAndCpeSearchableNames().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link JAXBElement }{@code <}{@link String }{@code >}
|
||||
* {@link JAXBElement }{@code <}{@link String }{@code >}
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<JAXBElement<String>> getCpeNamesAndCpeSearchableNames() {
|
||||
if (cpeNamesAndCpeSearchableNames == null) {
|
||||
cpeNamesAndCpeSearchableNames = new ArrayList<JAXBElement<String>>();
|
||||
}
|
||||
return this.cpeNamesAndCpeSearchableNames;
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for securityProtectionType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="securityProtectionType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="ALLOWS_ADMIN_ACCESS"/>
|
||||
* <enumeration value="ALLOWS_USER_ACCESS"/>
|
||||
* <enumeration value="ALLOWS_OTHER_ACCESS"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "securityProtectionType", namespace = "http://scap.nist.gov/schema/vulnerability/0.4")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum SecurityProtectionType {
|
||||
|
||||
/**
|
||||
* gain administrative access
|
||||
*
|
||||
*/
|
||||
ALLOWS_ADMIN_ACCESS,
|
||||
/**
|
||||
* gain user access
|
||||
*
|
||||
*/
|
||||
ALLOWS_USER_ACCESS,
|
||||
ALLOWS_OTHER_ACCESS;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static SecurityProtectionType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,118 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
|
||||
/**
|
||||
* <p>Java class for tagType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="tagType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <attribute name="name" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
|
||||
* <attribute name="value" use="required" type="{http://www.w3.org/2001/XMLSchema}token" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "tagType", namespace = "http://scap.nist.gov/schema/scap-core/0.1")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class TagType {
|
||||
|
||||
@XmlAttribute(required = true)
|
||||
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
|
||||
@XmlSchemaType(name = "token")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String name;
|
||||
@XmlAttribute(required = true)
|
||||
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
|
||||
@XmlSchemaType(name = "token")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String value;
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
@@ -1,67 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for targetDistributionEnumType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="targetDistributionEnumType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="NONE"/>
|
||||
* <enumeration value="LOW"/>
|
||||
* <enumeration value="MEDIUM"/>
|
||||
* <enumeration value="HIGH"/>
|
||||
* <enumeration value="NOT_DEFINED"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "targetDistributionEnumType")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum TargetDistributionEnumType {
|
||||
|
||||
NONE,
|
||||
LOW,
|
||||
MEDIUM,
|
||||
HIGH,
|
||||
NOT_DEFINED;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static TargetDistributionEnumType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,117 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
|
||||
/**
|
||||
* <p>Java class for targetDistributionType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="targetDistributionType">
|
||||
* <simpleContent>
|
||||
* <extension base="<http://scap.nist.gov/schema/cvss-v2/0.2>targetDistributionEnumType">
|
||||
* <attGroup ref="{http://scap.nist.gov/schema/cvss-v2/0.2}vectorAttributeGroup"/>
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "targetDistributionType", propOrder = {
|
||||
"value"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class TargetDistributionType {
|
||||
|
||||
@XmlValue
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected TargetDistributionEnumType value;
|
||||
@XmlAttribute
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean approximated;
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link TargetDistributionEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public TargetDistributionEnumType getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link TargetDistributionEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setValue(TargetDistributionEnumType value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the approximated property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public boolean isApproximated() {
|
||||
if (approximated == null) {
|
||||
return false;
|
||||
} else {
|
||||
return approximated;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the approximated property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setApproximated(Boolean value) {
|
||||
this.approximated = value;
|
||||
}
|
||||
}
|
||||
@@ -1,263 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.math.BigDecimal;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlSchemaType;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
|
||||
/**
|
||||
* <p>Java class for temporalMetricsType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="temporalMetricsType">
|
||||
* <complexContent>
|
||||
* <extension base="{http://scap.nist.gov/schema/cvss-v2/0.2}metricsType">
|
||||
* <sequence>
|
||||
* <element name="score" type="{http://scap.nist.gov/schema/cvss-v2/0.2}zeroToTenDecimalType" minOccurs="0"/>
|
||||
* <element name="temporal-multiplier" type="{http://www.w3.org/2001/XMLSchema}decimal" minOccurs="0"/>
|
||||
* <group ref="{http://scap.nist.gov/schema/cvss-v2/0.2}temporalVectorsGroup"/>
|
||||
* <element name="source" type="{http://www.w3.org/2001/XMLSchema}anyURI"/>
|
||||
* <element name="generated-on-datetime" type="{http://www.w3.org/2001/XMLSchema}dateTime"/>
|
||||
* </sequence>
|
||||
* </extension>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "temporalMetricsType", propOrder = {
|
||||
"score",
|
||||
"temporalMultiplier",
|
||||
"exploitability",
|
||||
"remediationLevel",
|
||||
"reportConfidence",
|
||||
"source",
|
||||
"generatedOnDatetime"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class TemporalMetricsType
|
||||
extends MetricsType {
|
||||
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected BigDecimal score;
|
||||
@XmlElement(name = "temporal-multiplier")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected BigDecimal temporalMultiplier;
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected ExploitabilityType exploitability;
|
||||
@XmlElement(name = "remediation-level")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected RemediationLevelType remediationLevel;
|
||||
@XmlElement(name = "report-confidence")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected ConfidenceType reportConfidence;
|
||||
@XmlElement(required = true)
|
||||
@XmlSchemaType(name = "anyURI")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String source;
|
||||
@XmlElement(name = "generated-on-datetime", required = true)
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected XMLGregorianCalendar generatedOnDatetime;
|
||||
|
||||
/**
|
||||
* Gets the value of the score property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public BigDecimal getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the score property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setScore(BigDecimal value) {
|
||||
this.score = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the temporalMultiplier property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public BigDecimal getTemporalMultiplier() {
|
||||
return temporalMultiplier;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the temporalMultiplier property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link BigDecimal }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setTemporalMultiplier(BigDecimal value) {
|
||||
this.temporalMultiplier = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the exploitability property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link ExploitabilityType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public ExploitabilityType getExploitability() {
|
||||
return exploitability;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the exploitability property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link ExploitabilityType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setExploitability(ExploitabilityType value) {
|
||||
this.exploitability = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the remediationLevel property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link RemediationLevelType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public RemediationLevelType getRemediationLevel() {
|
||||
return remediationLevel;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the remediationLevel property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link RemediationLevelType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setRemediationLevel(RemediationLevelType value) {
|
||||
this.remediationLevel = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the reportConfidence property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link ConfidenceType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public ConfidenceType getReportConfidence() {
|
||||
return reportConfidence;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the reportConfidence property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link ConfidenceType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setReportConfidence(ConfidenceType value) {
|
||||
this.reportConfidence = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the source property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the source property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setSource(String value) {
|
||||
this.source = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the generatedOnDatetime property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public XMLGregorianCalendar getGeneratedOnDatetime() {
|
||||
return generatedOnDatetime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the generatedOnDatetime property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setGeneratedOnDatetime(XMLGregorianCalendar value) {
|
||||
this.generatedOnDatetime = value;
|
||||
}
|
||||
}
|
||||
@@ -1,116 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
|
||||
/**
|
||||
* This type allows the xml:lang attribute to associate a specific language with
|
||||
* an element's string content.
|
||||
*
|
||||
* <p>Java class for TextType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="TextType">
|
||||
* <simpleContent>
|
||||
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
|
||||
* <attribute ref="{http://www.w3.org/XML/1998/namespace}lang"/>
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "TextType", namespace = "http://cpe.mitre.org/language/2.0", propOrder = {
|
||||
"value"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class TextType1 {
|
||||
|
||||
@XmlValue
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String value;
|
||||
@XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String lang;
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the lang property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getLang() {
|
||||
return lang;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the lang property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setLang(String value) {
|
||||
this.lang = value;
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlSeeAlso;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
import javax.xml.bind.annotation.XmlValue;
|
||||
|
||||
/**
|
||||
* This type allows the xml:lang attribute to associate a specific language with
|
||||
* an element's string content.
|
||||
*
|
||||
* <p>Java class for textType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="textType">
|
||||
* <simpleContent>
|
||||
* <extension base="<http://www.w3.org/2001/XMLSchema>string">
|
||||
* <attribute ref="{http://www.w3.org/XML/1998/namespace}lang"/>
|
||||
* </extension>
|
||||
* </simpleContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "textType", namespace = "http://scap.nist.gov/schema/scap-core/0.1", propOrder = {
|
||||
"value"
|
||||
})
|
||||
@XmlSeeAlso({
|
||||
ReferenceType.class
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class TextType2 {
|
||||
|
||||
@XmlValue
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String value;
|
||||
@XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String lang;
|
||||
|
||||
/**
|
||||
* Gets the value of the value property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the value property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setValue(String value) {
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the lang property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getLang() {
|
||||
return lang;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the lang property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setLang(String value) {
|
||||
this.lang = value;
|
||||
}
|
||||
}
|
||||
@@ -1,120 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for toolConfigurationType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="toolConfigurationType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="name" type="{http://scap.nist.gov/schema/scap-core/0.1}cpeNamePatternType" minOccurs="0"/>
|
||||
* <element name="definition" type="{http://scap.nist.gov/schema/scap-core/0.1}checkReferenceType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "toolConfigurationType", namespace = "http://scap.nist.gov/schema/vulnerability/0.4", propOrder = {
|
||||
"name",
|
||||
"definitions"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class ToolConfigurationType {
|
||||
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String name;
|
||||
@XmlElement(name = "definition")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<CheckReferenceType> definitions;
|
||||
|
||||
/**
|
||||
* Gets the value of the name property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the name property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setName(String value) {
|
||||
this.name = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the definitions property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the definitions property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getDefinitions().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link CheckReferenceType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<CheckReferenceType> getDefinitions() {
|
||||
if (definitions == null) {
|
||||
definitions = new ArrayList<CheckReferenceType>();
|
||||
}
|
||||
return this.definitions;
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlEnum;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for vulnerabilityReferenceCategoryEnumType.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class. <p>
|
||||
* <pre>
|
||||
* <simpleType name="vulnerabilityReferenceCategoryEnumType">
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}token">
|
||||
* <enumeration value="PATCH"/>
|
||||
* <enumeration value="VENDOR_ADVISORY"/>
|
||||
* <enumeration value="THIRD_PARTY_ADVISORY"/>
|
||||
* <enumeration value="SIGNATURE_SOURCE"/>
|
||||
* <enumeration value="MITIGATION_PROCEDURE"/>
|
||||
* <enumeration value="TOOL_CONFIGURATION_DESCRIPTION"/>
|
||||
* <enumeration value="UNKNOWN"/>
|
||||
* </restriction>
|
||||
* </simpleType>
|
||||
* </pre>
|
||||
*
|
||||
*/
|
||||
@XmlType(name = "vulnerabilityReferenceCategoryEnumType", namespace = "http://scap.nist.gov/schema/vulnerability/0.4")
|
||||
@XmlEnum
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public enum VulnerabilityReferenceCategoryEnumType {
|
||||
|
||||
PATCH,
|
||||
VENDOR_ADVISORY,
|
||||
THIRD_PARTY_ADVISORY,
|
||||
SIGNATURE_SOURCE,
|
||||
MITIGATION_PROCEDURE,
|
||||
TOOL_CONFIGURATION_DESCRIPTION,
|
||||
UNKNOWN;
|
||||
|
||||
public String value() {
|
||||
return name();
|
||||
}
|
||||
|
||||
public static VulnerabilityReferenceCategoryEnumType fromValue(String v) {
|
||||
return valueOf(v);
|
||||
}
|
||||
}
|
||||
@@ -1,236 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlAttribute;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* Extends the base "reference" class by adding the ability to specify which
|
||||
* kind (within the vulnerability model) of reference it is. See
|
||||
* "Vulnerability_Reference_Category_List" enumeration.
|
||||
*
|
||||
* <p>Java class for vulnerabilityReferenceType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="vulnerabilityReferenceType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="source" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
|
||||
* <element name="reference" type="{http://scap.nist.gov/schema/scap-core/0.1}referenceType"/>
|
||||
* <element name="notes" type="{http://scap.nist.gov/schema/scap-core/0.1}notesType" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute ref="{http://www.w3.org/XML/1998/namespace}lang default="en""/>
|
||||
* <attribute name="reference_type" use="required" type="{http://scap.nist.gov/schema/vulnerability/0.4}vulnerabilityReferenceCategoryEnumType" />
|
||||
* <attribute name="deprecated" type="{http://www.w3.org/2001/XMLSchema}boolean" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "vulnerabilityReferenceType", namespace = "http://scap.nist.gov/schema/vulnerability/0.4", propOrder = {
|
||||
"source",
|
||||
"reference",
|
||||
"notes"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class VulnerabilityReferenceType {
|
||||
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String source;
|
||||
@XmlElement(required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected ReferenceType reference;
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected NotesType notes;
|
||||
@XmlAttribute(namespace = "http://www.w3.org/XML/1998/namespace")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String lang;
|
||||
@XmlAttribute(name = "reference_type", required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected VulnerabilityReferenceCategoryEnumType referenceType;
|
||||
@XmlAttribute
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected Boolean deprecated;
|
||||
|
||||
/**
|
||||
* Gets the value of the source property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the source property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setSource(String value) {
|
||||
this.source = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the reference property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link ReferenceType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public ReferenceType getReference() {
|
||||
return reference;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the reference property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link ReferenceType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setReference(ReferenceType value) {
|
||||
this.reference = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the notes property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link NotesType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public NotesType getNotes() {
|
||||
return notes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the notes property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link NotesType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setNotes(NotesType value) {
|
||||
this.notes = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the lang property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getLang() {
|
||||
if (lang == null) {
|
||||
return "en";
|
||||
} else {
|
||||
return lang;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the lang property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setLang(String value) {
|
||||
this.lang = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the referenceType property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link VulnerabilityReferenceCategoryEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public VulnerabilityReferenceCategoryEnumType getReferenceType() {
|
||||
return referenceType;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the referenceType property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link VulnerabilityReferenceCategoryEnumType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setReferenceType(VulnerabilityReferenceCategoryEnumType value) {
|
||||
this.referenceType = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the deprecated property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public Boolean isDeprecated() {
|
||||
return deprecated;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the deprecated property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link Boolean }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setDeprecated(Boolean value) {
|
||||
this.deprecated = value;
|
||||
}
|
||||
}
|
||||
@@ -1,703 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.*;
|
||||
import javax.xml.bind.annotation.adapters.CollapsedStringAdapter;
|
||||
import javax.xml.bind.annotation.adapters.XmlJavaTypeAdapter;
|
||||
import javax.xml.datatype.XMLGregorianCalendar;
|
||||
|
||||
/**
|
||||
* TODO: Low priority: Add reference to notes type to allow analysts, vendor and
|
||||
* other comments. Add source attribute. Maybe categorization?
|
||||
*
|
||||
* <p>Java class for vulnerabilityType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="vulnerabilityType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="osvdb-ext" type="{http://scap.nist.gov/schema/vulnerability/0.4}osvdbExtensionType" minOccurs="0"/>
|
||||
* <element name="vulnerable-configuration" type="{http://cpe.mitre.org/language/2.0}PlatformType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="vulnerable-software-list" type="{http://scap.nist.gov/schema/vulnerability/0.4}vulnerableSoftwareType" minOccurs="0"/>
|
||||
* <choice minOccurs="0">
|
||||
* <element name="cve-id" type="{http://scap.nist.gov/schema/cve/0.1}cveNamePatternType"/>
|
||||
* <element name="cce-id" type="{http://scap.nist.gov/schema/cce/0.1}cceNamePatternType"/>
|
||||
* </choice>
|
||||
* <element name="discovered-datetime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
|
||||
* <element name="disclosure-datetime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
|
||||
* <element name="exploit-publish-datetime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
|
||||
* <element name="published-datetime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
|
||||
* <element name="last-modified-datetime" type="{http://www.w3.org/2001/XMLSchema}dateTime" minOccurs="0"/>
|
||||
* <element name="cvss" type="{http://scap.nist.gov/schema/cvss-v2/0.2}cvssImpactType" minOccurs="0"/>
|
||||
* <element name="security-protection" type="{http://scap.nist.gov/schema/vulnerability/0.4}securityProtectionType" minOccurs="0"/>
|
||||
* <element name="assessment_check" type="{http://scap.nist.gov/schema/scap-core/0.1}checkReferenceType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="cwe" type="{http://scap.nist.gov/schema/vulnerability/0.4}cweReferenceType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="references" type="{http://scap.nist.gov/schema/vulnerability/0.4}vulnerabilityReferenceType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="fix_action" type="{http://scap.nist.gov/schema/vulnerability/0.4}fixActionType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="scanner" type="{http://scap.nist.gov/schema/vulnerability/0.4}toolConfigurationType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="summary" type="{http://www.w3.org/2001/XMLSchema}string" minOccurs="0"/>
|
||||
* <element name="technical_description" type="{http://scap.nist.gov/schema/scap-core/0.1}referenceType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* <element name="attack_scenario" type="{http://scap.nist.gov/schema/scap-core/0.1}referenceType" maxOccurs="unbounded" minOccurs="0"/>
|
||||
* </sequence>
|
||||
* <attribute name="id" use="required" type="{http://scap.nist.gov/schema/vulnerability/0.4}vulnerabilityIdType" />
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlRootElement(name = "vulnerabilityType", namespace = "http://scap.nist.gov/schema/vulnerability/0.4")
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "vulnerabilityType", namespace = "http://scap.nist.gov/schema/vulnerability/0.4", propOrder = {
|
||||
"osvdbExt",
|
||||
"vulnerableConfigurations",
|
||||
"vulnerableSoftwareList",
|
||||
"cceId",
|
||||
"cveId",
|
||||
"discoveredDatetime",
|
||||
"disclosureDatetime",
|
||||
"exploitPublishDatetime",
|
||||
"publishedDatetime",
|
||||
"lastModifiedDatetime",
|
||||
"cvss",
|
||||
"securityProtection",
|
||||
"assessmentChecks",
|
||||
"cwes",
|
||||
"references",
|
||||
"fixActions",
|
||||
"scanners",
|
||||
"summary",
|
||||
"technicalDescriptions",
|
||||
"attackScenarios"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class VulnerabilityType {
|
||||
|
||||
@XmlElement(name = "osvdb-ext")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected OsvdbExtensionType osvdbExt;
|
||||
@XmlElement(name = "vulnerable-configuration")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<PlatformType> vulnerableConfigurations;
|
||||
@XmlElement(name = "vulnerable-software-list")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected VulnerableSoftwareType vulnerableSoftwareList;
|
||||
@XmlElement(name = "cce-id")
|
||||
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String cceId;
|
||||
@XmlElement(name = "cve-id")
|
||||
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String cveId;
|
||||
@XmlElement(name = "discovered-datetime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected XMLGregorianCalendar discoveredDatetime;
|
||||
@XmlElement(name = "disclosure-datetime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected XMLGregorianCalendar disclosureDatetime;
|
||||
@XmlElement(name = "exploit-publish-datetime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected XMLGregorianCalendar exploitPublishDatetime;
|
||||
@XmlElement(name = "published-datetime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected XMLGregorianCalendar publishedDatetime;
|
||||
@XmlElement(name = "last-modified-datetime")
|
||||
@XmlSchemaType(name = "dateTime")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected XMLGregorianCalendar lastModifiedDatetime;
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected CvssImpactType cvss;
|
||||
@XmlElement(name = "security-protection")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected SecurityProtectionType securityProtection;
|
||||
@XmlElement(name = "assessment_check")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<CheckReferenceType> assessmentChecks;
|
||||
@XmlElement(name = "cwe")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<CweReferenceType> cwes;
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<VulnerabilityReferenceType> references;
|
||||
@XmlElement(name = "fix_action")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<FixActionType> fixActions;
|
||||
@XmlElement(name = "scanner")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<ToolConfigurationType> scanners;
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String summary;
|
||||
@XmlElement(name = "technical_description")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<ReferenceType> technicalDescriptions;
|
||||
@XmlElement(name = "attack_scenario")
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<ReferenceType> attackScenarios;
|
||||
@XmlAttribute(required = true)
|
||||
@XmlJavaTypeAdapter(CollapsedStringAdapter.class)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected String id;
|
||||
|
||||
/**
|
||||
* Gets the value of the osvdbExt property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link OsvdbExtensionType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public OsvdbExtensionType getOsvdbExt() {
|
||||
return osvdbExt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the osvdbExt property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link OsvdbExtensionType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setOsvdbExt(OsvdbExtensionType value) {
|
||||
this.osvdbExt = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the vulnerableConfigurations property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the vulnerableConfigurations property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getVulnerableConfigurations().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link PlatformType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<PlatformType> getVulnerableConfigurations() {
|
||||
if (vulnerableConfigurations == null) {
|
||||
vulnerableConfigurations = new ArrayList<PlatformType>();
|
||||
}
|
||||
return this.vulnerableConfigurations;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the vulnerableSoftwareList property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link VulnerableSoftwareType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public VulnerableSoftwareType getVulnerableSoftwareList() {
|
||||
return vulnerableSoftwareList;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the vulnerableSoftwareList property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link VulnerableSoftwareType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setVulnerableSoftwareList(VulnerableSoftwareType value) {
|
||||
this.vulnerableSoftwareList = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the cceId property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getCceId() {
|
||||
return cceId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the cceId property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setCceId(String value) {
|
||||
this.cceId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the cveId property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getCveId() {
|
||||
return cveId;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the cveId property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setCveId(String value) {
|
||||
this.cveId = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the discoveredDatetime property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public XMLGregorianCalendar getDiscoveredDatetime() {
|
||||
return discoveredDatetime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the discoveredDatetime property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setDiscoveredDatetime(XMLGregorianCalendar value) {
|
||||
this.discoveredDatetime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the disclosureDatetime property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public XMLGregorianCalendar getDisclosureDatetime() {
|
||||
return disclosureDatetime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the disclosureDatetime property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setDisclosureDatetime(XMLGregorianCalendar value) {
|
||||
this.disclosureDatetime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the exploitPublishDatetime property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public XMLGregorianCalendar getExploitPublishDatetime() {
|
||||
return exploitPublishDatetime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the exploitPublishDatetime property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setExploitPublishDatetime(XMLGregorianCalendar value) {
|
||||
this.exploitPublishDatetime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the publishedDatetime property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public XMLGregorianCalendar getPublishedDatetime() {
|
||||
return publishedDatetime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the publishedDatetime property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setPublishedDatetime(XMLGregorianCalendar value) {
|
||||
this.publishedDatetime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the lastModifiedDatetime property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public XMLGregorianCalendar getLastModifiedDatetime() {
|
||||
return lastModifiedDatetime;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the lastModifiedDatetime property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link XMLGregorianCalendar }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setLastModifiedDatetime(XMLGregorianCalendar value) {
|
||||
this.lastModifiedDatetime = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the cvss property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link CvssImpactType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public CvssImpactType getCvss() {
|
||||
return cvss;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the cvss property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link CvssImpactType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setCvss(CvssImpactType value) {
|
||||
this.cvss = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the securityProtection property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link SecurityProtectionType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public SecurityProtectionType getSecurityProtection() {
|
||||
return securityProtection;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the securityProtection property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link SecurityProtectionType }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setSecurityProtection(SecurityProtectionType value) {
|
||||
this.securityProtection = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the assessmentChecks property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the assessmentChecks property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getAssessmentChecks().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link CheckReferenceType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<CheckReferenceType> getAssessmentChecks() {
|
||||
if (assessmentChecks == null) {
|
||||
assessmentChecks = new ArrayList<CheckReferenceType>();
|
||||
}
|
||||
return this.assessmentChecks;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the cwes property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the cwes property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getCwes().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link CweReferenceType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<CweReferenceType> getCwes() {
|
||||
if (cwes == null) {
|
||||
cwes = new ArrayList<CweReferenceType>();
|
||||
}
|
||||
return this.cwes;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the references property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the references property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getReferences().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link VulnerabilityReferenceType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<VulnerabilityReferenceType> getReferences() {
|
||||
if (references == null) {
|
||||
references = new ArrayList<VulnerabilityReferenceType>();
|
||||
}
|
||||
return this.references;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the fixActions property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the fixActions property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getFixActions().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link FixActionType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<FixActionType> getFixActions() {
|
||||
if (fixActions == null) {
|
||||
fixActions = new ArrayList<FixActionType>();
|
||||
}
|
||||
return this.fixActions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the scanners property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the scanners property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getScanners().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link ToolConfigurationType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<ToolConfigurationType> getScanners() {
|
||||
if (scanners == null) {
|
||||
scanners = new ArrayList<ToolConfigurationType>();
|
||||
}
|
||||
return this.scanners;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the summary property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getSummary() {
|
||||
return summary;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the summary property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setSummary(String value) {
|
||||
this.summary = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the technicalDescriptions property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the technicalDescriptions property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getTechnicalDescriptions().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link ReferenceType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<ReferenceType> getTechnicalDescriptions() {
|
||||
if (technicalDescriptions == null) {
|
||||
technicalDescriptions = new ArrayList<ReferenceType>();
|
||||
}
|
||||
return this.technicalDescriptions;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the attackScenarios property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the attackScenarios property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getAttackScenarios().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link ReferenceType }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<ReferenceType> getAttackScenarios() {
|
||||
if (attackScenarios == null) {
|
||||
attackScenarios = new ArrayList<ReferenceType>();
|
||||
}
|
||||
return this.attackScenarios;
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets the value of the id property.
|
||||
*
|
||||
* @return possible object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the value of the id property.
|
||||
*
|
||||
* @param value allowed object is
|
||||
* {@link String }
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public void setId(String value) {
|
||||
this.id = value;
|
||||
}
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import javax.annotation.Generated;
|
||||
import javax.xml.bind.annotation.XmlAccessType;
|
||||
import javax.xml.bind.annotation.XmlAccessorType;
|
||||
import javax.xml.bind.annotation.XmlElement;
|
||||
import javax.xml.bind.annotation.XmlType;
|
||||
|
||||
/**
|
||||
* <p>Java class for vulnerableSoftwareType complex type.
|
||||
*
|
||||
* <p>The following schema fragment specifies the expected content contained
|
||||
* within this class.
|
||||
*
|
||||
* <pre>
|
||||
* <complexType name="vulnerableSoftwareType">
|
||||
* <complexContent>
|
||||
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
|
||||
* <sequence>
|
||||
* <element name="product" type="{http://cpe.mitre.org/language/2.0}namePattern" maxOccurs="unbounded"/>
|
||||
* </sequence>
|
||||
* </restriction>
|
||||
* </complexContent>
|
||||
* </complexType>
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
*/
|
||||
@XmlAccessorType(XmlAccessType.FIELD)
|
||||
@XmlType(name = "vulnerableSoftwareType", namespace = "http://scap.nist.gov/schema/vulnerability/0.4", propOrder = {
|
||||
"products"
|
||||
})
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public class VulnerableSoftwareType {
|
||||
|
||||
@XmlElement(name = "product", required = true)
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
protected List<String> products;
|
||||
|
||||
/**
|
||||
* Gets the value of the products property.
|
||||
*
|
||||
* <p> This accessor method returns a reference to the live list, not a
|
||||
* snapshot. Therefore any modification you make to the returned list will
|
||||
* be present inside the JAXB object. This is why there is not a
|
||||
* <CODE>set</CODE> method for the products property.
|
||||
*
|
||||
* <p> For example, to add a new item, do as follows:
|
||||
* <pre>
|
||||
* getProducts().add(newItem);
|
||||
* </pre>
|
||||
*
|
||||
*
|
||||
* <p> Objects of the following type(s) are allowed in the list
|
||||
* {@link String }
|
||||
*
|
||||
*
|
||||
*/
|
||||
@Generated(value = "com.sun.tools.internal.xjc.Driver", date = "2012-10-21T11:58:46-04:00", comments = "JAXB RI vJAXB 2.1.10 in JDK 6")
|
||||
public List<String> getProducts() {
|
||||
if (products == null) {
|
||||
products = new ArrayList<String>();
|
||||
}
|
||||
return this.products;
|
||||
}
|
||||
}
|
||||
@@ -1,9 +0,0 @@
|
||||
//
|
||||
// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, vJAXB 2.1.10 in JDK 6
|
||||
// See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a>
|
||||
// Any modifications to this file will be lost upon recompilation of the source schema.
|
||||
// Generated on: 2012.10.21 at 11:58:46 AM EDT
|
||||
//
|
||||
|
||||
@javax.xml.bind.annotation.XmlSchema(namespace = "http://scap.nist.gov/schema/cvss-v2/0.2", elementFormDefault = javax.xml.bind.annotation.XmlNsForm.QUALIFIED)
|
||||
package org.codesecure.dependencycheck.data.nvdcve.generated;
|
||||
@@ -1,42 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.xml;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
import org.apache.lucene.index.CorruptIndexException;
|
||||
import org.codesecure.dependencycheck.data.nvdcve.generated.VulnerabilityType;
|
||||
|
||||
/**
|
||||
*
|
||||
* An interface used to define the save function used when parsing the NVD CVE
|
||||
* XML file.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public interface EntrySaveDelegate {
|
||||
|
||||
/**
|
||||
* Saves a CVE Entry into the Lucene index.
|
||||
*
|
||||
* @param vulnerability a CVE entry.
|
||||
* @throws CorruptIndexException is thrown if the index is corrupt.
|
||||
* @throws IOException is thrown if an IOException occurs.
|
||||
*/
|
||||
void saveEntry(VulnerabilityType vulnerability) throws CorruptIndexException, IOException;
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.xml;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.*;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.apache.lucene.index.CorruptIndexException;
|
||||
|
||||
/**
|
||||
* Imports a NVD CVE XML file into the Lucene NVD CVE Index.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class Importer {
|
||||
|
||||
/**
|
||||
* Private constructor for utility class.
|
||||
*/
|
||||
private Importer() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Imports the NVD CVE XML File into the Lucene Index.
|
||||
*
|
||||
* @param file containing the path to the NVD CVE XML file.
|
||||
*/
|
||||
public static void importXML(File file) {
|
||||
NvdCveParser indexer = null;
|
||||
try {
|
||||
|
||||
indexer = new NvdCveParser();
|
||||
|
||||
indexer.openIndexWriter();
|
||||
|
||||
|
||||
indexer.parse(file);
|
||||
|
||||
} catch (CorruptIndexException ex) {
|
||||
Logger.getLogger(Importer.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(Importer.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} finally {
|
||||
if (indexer != null) {
|
||||
indexer.close();
|
||||
}
|
||||
}
|
||||
}
|
||||
// public static void importXML(File file) throws FileNotFoundException, IOException, JAXBException,
|
||||
// ParserConfigurationException, SAXException {
|
||||
//
|
||||
// SAXParserFactory factory = SAXParserFactory.newInstance();
|
||||
// factory.setNamespaceAware(true);
|
||||
// XMLReader reader = factory.newSAXParser().getXMLReader();
|
||||
//
|
||||
// JAXBContext context = JAXBContext.newInstance("org.codesecure.dependencycheck.data.nvdcve.generated");
|
||||
// NvdCveXmlFilter filter = new NvdCveXmlFilter(context);
|
||||
//
|
||||
// Indexer indexer = new Indexer();
|
||||
// indexer.openIndexWriter();
|
||||
//
|
||||
// filter.registerSaveDelegate(indexer);
|
||||
//
|
||||
// reader.setContentHandler(filter);
|
||||
// Reader fileReader = new FileReader(file);
|
||||
// InputSource is = new InputSource(fileReader);
|
||||
// try {
|
||||
// reader.parse(is);
|
||||
// } catch (IOException ex) {
|
||||
// Logger.getLogger(Importer.class.getName()).log(Level.SEVERE, null, ex);
|
||||
// } catch (SAXException ex) {
|
||||
// Logger.getLogger(Importer.class.getName()).log(Level.SEVERE, null, ex);
|
||||
// } finally {
|
||||
// indexer.close();
|
||||
// }
|
||||
// }
|
||||
|
||||
/**
|
||||
* Imports the CPE XML File into the Lucene Index.
|
||||
*
|
||||
* @param path the path to the CPE XML file.
|
||||
*/
|
||||
public static void importXML(String path) {
|
||||
File f = new File(path);
|
||||
if (!f.exists()) {
|
||||
f.mkdirs();
|
||||
}
|
||||
Importer.importXML(f);
|
||||
}
|
||||
}
|
||||
@@ -1,148 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.xml;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.ByteArrayOutputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.Marshaller;
|
||||
import org.apache.lucene.document.Document;
|
||||
import org.apache.lucene.document.Field;
|
||||
import org.apache.lucene.index.CorruptIndexException;
|
||||
import org.apache.lucene.index.FieldInfo.IndexOptions;
|
||||
import org.apache.lucene.index.Term;
|
||||
import org.codesecure.dependencycheck.data.lucene.LuceneUtils;
|
||||
import org.codesecure.dependencycheck.data.nvdcve.generated.VulnerabilityType;
|
||||
import org.codesecure.dependencycheck.data.nvdcve.Fields;
|
||||
import org.codesecure.dependencycheck.data.nvdcve.Index;
|
||||
import org.codesecure.dependencycheck.data.nvdcve.generated.FactRefType;
|
||||
import org.codesecure.dependencycheck.data.nvdcve.generated.LogicalTest;
|
||||
import org.codesecure.dependencycheck.data.nvdcve.generated.PlatformType;
|
||||
|
||||
/**
|
||||
* The Indexer is used to convert a VULNERABLE_CPE Entry, retrieved from the
|
||||
* VULNERABLE_CPE XML file, into a Document that is stored in the Lucene index.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class Indexer extends Index implements EntrySaveDelegate {
|
||||
|
||||
/**
|
||||
* Saves an NVD CVE Entry into the Lucene index.
|
||||
*
|
||||
* @param vulnerability a NVD CVE vulnerability.
|
||||
* @throws CorruptIndexException is thrown if the index is corrupt.
|
||||
* @throws IOException is thrown if an IOException occurs.
|
||||
*/
|
||||
public void saveEntry(VulnerabilityType vulnerability) throws CorruptIndexException, IOException {
|
||||
try {
|
||||
Document doc = convertEntryToDoc(vulnerability);
|
||||
|
||||
if (doc == null) {
|
||||
return;
|
||||
}
|
||||
|
||||
Term name = new Term(Fields.CVE_ID, LuceneUtils.escapeLuceneQuery(vulnerability.getId()));
|
||||
indexWriter.updateDocument(name, doc);
|
||||
} catch (JAXBException ex) {
|
||||
Logger.getLogger(Indexer.class.getName()).log(Level.SEVERE, "Unable to add " + vulnerability.getId() + " to the Lucene index.", ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Converts a VULNERABLE_CPE vulnerability into a Lucene Document.
|
||||
*
|
||||
* @param vulnerability a VULNERABLE_CPE Entry.
|
||||
* @return a Lucene Document containing a VULNERABLE_CPE Entry.
|
||||
* @throws JAXBException is thrown when there is a JAXBException.
|
||||
*/
|
||||
protected Document convertEntryToDoc(VulnerabilityType vulnerability) throws JAXBException {
|
||||
boolean hasApplication = false;
|
||||
Document doc = new Document();
|
||||
|
||||
if (vulnerability.getVulnerableConfigurations() != null) {
|
||||
|
||||
for (PlatformType pt : vulnerability.getVulnerableConfigurations()) {
|
||||
hasApplication = addVulnerableProducts(doc, pt.getLogicalTest());
|
||||
}
|
||||
|
||||
} else if (vulnerability.getVulnerableSoftwareList() != null) { //this should never be reached, but is here just in case.
|
||||
for (String cpe : vulnerability.getVulnerableSoftwareList().getProducts()) {
|
||||
if (cpe.startsWith("cpe:/a:")) {
|
||||
hasApplication = true;
|
||||
addVulnerableCpe(cpe, doc);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
return null;
|
||||
}
|
||||
|
||||
//there are no cpe:/a that are vulnerable - don't add it to the index.
|
||||
if (!hasApplication) {
|
||||
return null;
|
||||
}
|
||||
|
||||
Field name = new Field(Fields.CVE_ID, vulnerability.getId(), Field.Store.NO, Field.Index.ANALYZED);
|
||||
name.setIndexOptions(IndexOptions.DOCS_ONLY);
|
||||
doc.add(name);
|
||||
|
||||
Field description = new Field(Fields.DESCRIPTION, vulnerability.getSummary(), Field.Store.NO, Field.Index.ANALYZED);
|
||||
description.setIndexOptions(IndexOptions.DOCS_ONLY);
|
||||
doc.add(description);
|
||||
|
||||
|
||||
JAXBContext context = JAXBContext.newInstance("org.codesecure.dependencycheck.data.nvdcve.generated");
|
||||
|
||||
Marshaller m = context.createMarshaller();
|
||||
m.setProperty(Marshaller.JAXB_FORMATTED_OUTPUT, Boolean.TRUE);
|
||||
|
||||
ByteArrayOutputStream out = new ByteArrayOutputStream();
|
||||
|
||||
m.marshal(vulnerability, out);
|
||||
|
||||
Field xml = new Field(Fields.XML, out.toString(), Field.Store.YES, Field.Index.NO);
|
||||
doc.add(xml);
|
||||
|
||||
return doc;
|
||||
}
|
||||
|
||||
private boolean addVulnerableProducts(Document doc, LogicalTest logicalTest) {
|
||||
boolean retVal = false;
|
||||
for (LogicalTest lt : logicalTest.getLogicalTests()) {
|
||||
retVal = retVal || addVulnerableProducts(doc, lt);
|
||||
}
|
||||
for (FactRefType facts : logicalTest.getFactReves()) {
|
||||
String cpe = facts.getName();
|
||||
if (cpe.startsWith("cpe:/a:")) {
|
||||
retVal = true;
|
||||
addVulnerableCpe(cpe, doc);
|
||||
}
|
||||
}
|
||||
return retVal;
|
||||
}
|
||||
|
||||
private void addVulnerableCpe(String cpe, Document doc) {
|
||||
Field vulnerable = new Field(Fields.VULNERABLE_CPE, cpe, Field.Store.NO, Field.Index.ANALYZED);
|
||||
vulnerable.setIndexOptions(IndexOptions.DOCS_ONLY);
|
||||
doc.add(vulnerable);
|
||||
}
|
||||
}
|
||||
@@ -1,173 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.xml;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.FileReader;
|
||||
import java.io.IOException;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import org.apache.lucene.document.Document;
|
||||
import org.apache.lucene.document.Field;
|
||||
import org.apache.lucene.index.FieldInfo.IndexOptions;
|
||||
import org.apache.lucene.index.Term;
|
||||
import org.codesecure.dependencycheck.data.nvdcve.Fields;
|
||||
import org.codesecure.dependencycheck.data.nvdcve.Index;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class NvdCveParser extends Index {
|
||||
|
||||
/**
|
||||
* Parses an NVD CVE xml file using a buffered readerd. This
|
||||
* method maybe more fragile then using a partial-unmarshalling SAX
|
||||
* Parser (aka the deprecated NvdCveXmlFilter) - but this method is
|
||||
* orders of magnitude faster.
|
||||
*
|
||||
* @param file the reference to the NVD CVE file
|
||||
*/
|
||||
public void parse(File file) {
|
||||
FileReader fr = null;
|
||||
BufferedReader br = null;
|
||||
Pattern rxEntry = Pattern.compile("^\\s*<entry\\s*id\\=\\\"([^\\\"]+)\\\".*$");
|
||||
Pattern rxEntryEnd = Pattern.compile("^\\s*</entry>.*$");
|
||||
Pattern rxFact = Pattern.compile("^\\s*<cpe\\-lang\\:fact\\-ref name=\\\"([^\\\"]+).*$");
|
||||
Pattern rxSummary = Pattern.compile("^\\s*<vuln:summary>([^\\<]+).*$");
|
||||
try {
|
||||
fr = new FileReader(file);
|
||||
br = new BufferedReader(fr);
|
||||
StringBuilder sb = new StringBuilder(7000);
|
||||
String str = null;
|
||||
String id = null;
|
||||
Document doc = new Document();
|
||||
boolean skipEntry = true;
|
||||
boolean started = false;
|
||||
|
||||
while ((str = br.readLine()) != null) {
|
||||
Matcher matcherEntryEnd = rxEntryEnd.matcher(str);
|
||||
|
||||
if (started && !matcherEntryEnd.matches()) {
|
||||
sb.append(str);
|
||||
}
|
||||
//facts occur more often, do them first.
|
||||
Matcher matcherFact = rxFact.matcher(str);
|
||||
if (matcherFact.matches()) {
|
||||
String cpe = matcherFact.group(1);
|
||||
if (cpe != null && cpe.startsWith("cpe:/a:")) {
|
||||
skipEntry = false;
|
||||
addVulnerableCpe(cpe, doc);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
Matcher matcherEntry = rxEntry.matcher(str);
|
||||
if (matcherEntry.matches()) {
|
||||
started = true;
|
||||
id = matcherEntry.group(1);
|
||||
|
||||
sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\" standalone=\"yes\"?>");
|
||||
sb.append("<vulnerabilityType ");
|
||||
//sb.append("xmlns=\"http://scap.nist.gov/schema/feed/vulnerability/2.0\" ");
|
||||
//sb.append("xmlns:vuln=\"http://scap.nist.gov/schema/vulnerability/0.4\" ");
|
||||
sb.append("xmlns=\"http://scap.nist.gov/schema/vulnerability/0.4\" ");
|
||||
sb.append("xmlns:vuln=\"http://scap.nist.gov/schema/vulnerability/0.4\" ");
|
||||
//sb.append("xmlns:vulnerability=\"http://scap.nist.gov/schema/feed/vulnerability/2.0\" ");
|
||||
sb.append("xmlns:cpe-lang=\"http://cpe.mitre.org/language/2.0\" ");
|
||||
sb.append("xmlns:cvss2=\"http://scap.nist.gov/schema/cvss-v2/0.2\" ");
|
||||
sb.append("xmlns:cvss=\"http://scap.nist.gov/schema/cvss-v2/0.2\" ");
|
||||
sb.append("xmlns:scap-core=\"http://scap.nist.gov/schema/scap-core/0.1\" ");
|
||||
sb.append("xmlns:scap_core=\"http://scap.nist.gov/schema/scap-core/0.1\" ");
|
||||
sb.append("xmlns:patch=\"http://scap.nist.gov/schema/patch/0.1\" ");
|
||||
sb.append("xmlns:cve=\"http://scap.nist.gov/schema/cve/0.1\" ");
|
||||
sb.append("xmlns:cce=\"http://scap.nist.gov/schema/cce/0.1\" ");
|
||||
|
||||
sb.append("id=\"").append(id).append("\">");
|
||||
//sb.append(str); //need to do the above to get the correct schema generated from files.
|
||||
|
||||
Field name = new Field(Fields.CVE_ID, id, Field.Store.NO, Field.Index.ANALYZED);
|
||||
name.setIndexOptions(IndexOptions.DOCS_ONLY);
|
||||
doc.add(name);
|
||||
continue;
|
||||
}
|
||||
Matcher matcherSummary = rxSummary.matcher(str);
|
||||
if (matcherSummary.matches()) {
|
||||
String summary = matcherSummary.group(1);
|
||||
Field description = new Field(Fields.DESCRIPTION, summary, Field.Store.NO, Field.Index.ANALYZED);
|
||||
description.setIndexOptions(IndexOptions.DOCS_ONLY);
|
||||
doc.add(description);
|
||||
continue;
|
||||
}
|
||||
|
||||
if (matcherEntryEnd.matches()) {
|
||||
sb.append("</vulnerabilityType>");
|
||||
Field xml = new Field(Fields.XML, sb.toString(), Field.Store.YES, Field.Index.NO);
|
||||
doc.add(xml);
|
||||
|
||||
if (!skipEntry) {
|
||||
Term name = new Term(Fields.CVE_ID, id);
|
||||
indexWriter.deleteDocuments(name);
|
||||
indexWriter.addDocument(doc);
|
||||
//indexWriter.updateDocument(name, doc);
|
||||
}
|
||||
//reset the document
|
||||
doc = new Document();
|
||||
sb = new StringBuilder(7000);
|
||||
id = null;
|
||||
skipEntry = true;
|
||||
started = false;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} catch (FileNotFoundException ex) {
|
||||
Logger.getLogger(NvdCveParser.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(NvdCveParser.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} finally {
|
||||
try {
|
||||
fr.close();
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(NvdCveParser.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
try {
|
||||
if (br != null) {
|
||||
br.close();
|
||||
}
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(NvdCveParser.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a CPE to the Lucene Document
|
||||
* @param cpe a string representing a CPE
|
||||
* @param doc a lucene document
|
||||
*/
|
||||
private void addVulnerableCpe(String cpe, Document doc) {
|
||||
Field vulnerable = new Field(Fields.VULNERABLE_CPE, cpe, Field.Store.NO, Field.Index.ANALYZED);
|
||||
vulnerable.setIndexOptions(IndexOptions.DOCS_ONLY);
|
||||
doc.add(vulnerable);
|
||||
}
|
||||
}
|
||||
@@ -1,247 +0,0 @@
|
||||
package org.codesecure.dependencycheck.data.nvdcve.xml;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.Enumeration;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import javax.xml.bind.JAXBContext;
|
||||
import javax.xml.bind.JAXBElement;
|
||||
import javax.xml.bind.JAXBException;
|
||||
import javax.xml.bind.Unmarshaller;
|
||||
import javax.xml.bind.UnmarshallerHandler;
|
||||
import org.apache.lucene.index.CorruptIndexException;
|
||||
import org.codesecure.dependencycheck.data.nvdcve.generated.VulnerabilityType;
|
||||
import org.xml.sax.Attributes;
|
||||
import org.xml.sax.Locator;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.xml.sax.helpers.DefaultHandler;
|
||||
import org.xml.sax.helpers.NamespaceSupport;
|
||||
import org.xml.sax.helpers.XMLFilterImpl;
|
||||
|
||||
/**
|
||||
*
|
||||
* <p>This filter uses partial-unmarshalling to unmarshall single NVD CVE
|
||||
* entries for use with a SAX Parser.</p>
|
||||
*
|
||||
* <p>This code was based off of an example found on <a
|
||||
* href="http://stackoverflow.com/questions/6484681/jaxb-partial-unmarshalling-elements-without-xmlrootelement">stackoverflow</a></p>
|
||||
*
|
||||
* @author Jeremy
|
||||
*/
|
||||
@Deprecated
|
||||
public class NvdCveXmlFilter extends XMLFilterImpl {
|
||||
|
||||
EntrySaveDelegate saveDelegate = null;
|
||||
|
||||
/**
|
||||
* Register a EntrySaveDelegate object. When the last node of an entry is
|
||||
* reached if a save delegate has been registered the save method will be
|
||||
* invoked.
|
||||
*
|
||||
* @param delegate the delegate used to save an entry
|
||||
*/
|
||||
public void registerSaveDelegate(EntrySaveDelegate delegate) {
|
||||
this.saveDelegate = delegate;
|
||||
}
|
||||
/**
|
||||
* The JAXBContext
|
||||
*/
|
||||
private final JAXBContext context;
|
||||
|
||||
/**
|
||||
* Constructs a new NvdCveXmlFilter
|
||||
*
|
||||
* @param context a JAXBContext
|
||||
*/
|
||||
public NvdCveXmlFilter(JAXBContext context) {
|
||||
this.context = context;
|
||||
}
|
||||
/**
|
||||
* The locator object used for unmarshalling
|
||||
*/
|
||||
private Locator locator = null;
|
||||
|
||||
/**
|
||||
* Sets the document locator.
|
||||
*
|
||||
* @param loc the locator to use.
|
||||
*/
|
||||
@Override
|
||||
public void setDocumentLocator(Locator loc) {
|
||||
this.locator = loc;
|
||||
super.setDocumentLocator(loc);
|
||||
}
|
||||
/**
|
||||
* Used to keep track of namespace bindings.
|
||||
*/
|
||||
private NamespaceSupport nsSupport = new NamespaceSupport();
|
||||
|
||||
/**
|
||||
* Stores the namespace prefix for use during unmarshalling.
|
||||
*
|
||||
* @param prefix the namespace prefix.
|
||||
* @param uri the namespace.
|
||||
* @throws SAXException is thrown is there is a SAXException.
|
||||
*/
|
||||
@Override
|
||||
public void startPrefixMapping(String prefix, String uri) throws SAXException {
|
||||
nsSupport.pushContext();
|
||||
nsSupport.declarePrefix(prefix, uri);
|
||||
super.startPrefixMapping(prefix, uri);
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes the namespace prefix from the local support object so that
|
||||
* unmarshalling works correctly.
|
||||
*
|
||||
* @param prefix the prefix to remove.
|
||||
* @throws SAXException is thrown is there is a SAXException.
|
||||
*/
|
||||
@Override
|
||||
public void endPrefixMapping(String prefix) throws SAXException {
|
||||
nsSupport.popContext();
|
||||
super.endPrefixMapping(prefix);
|
||||
}
|
||||
/**
|
||||
* The UnmarshallerHandler.
|
||||
*/
|
||||
private UnmarshallerHandler unmarshallerHandler;
|
||||
/**
|
||||
* Used to track how deep the SAX parser is in nested XML.
|
||||
*/
|
||||
private int depth;
|
||||
|
||||
/**
|
||||
* Fired when the SAX parser starts an element. This will either forward the
|
||||
* event to the unmarshaller or create an unmarshaller if it is at the start
|
||||
* of a new "entry".
|
||||
*
|
||||
* @param uri uri
|
||||
* @param localName localName
|
||||
* @param qName qName
|
||||
* @param atts atts
|
||||
* @throws SAXException is thrown if there is a SAXException.
|
||||
*/
|
||||
@Override
|
||||
public void startElement(String uri, String localName, String qName, Attributes atts) throws SAXException {
|
||||
|
||||
if (depth != 0) {
|
||||
// we are in the middle of forwarding events.
|
||||
// continue to do so.
|
||||
depth += 1;
|
||||
super.startElement(uri, localName, qName, atts);
|
||||
return;
|
||||
}
|
||||
|
||||
//old - for cve 1.2 uri.equals("http://nvd.nist.gov/feeds/cve/1.2")
|
||||
if (uri.equals("http://scap.nist.gov/schema/feed/vulnerability/2.0") && localName.equals("entry")) {
|
||||
Unmarshaller unmarshaller;
|
||||
try {
|
||||
unmarshaller = context.createUnmarshaller();
|
||||
} catch (JAXBException e) {
|
||||
throw new SAXException(e);
|
||||
}
|
||||
unmarshallerHandler = unmarshaller.getUnmarshallerHandler();
|
||||
setContentHandler(unmarshallerHandler);
|
||||
|
||||
// fire SAX events to emulate the start of a new document.
|
||||
unmarshallerHandler.startDocument();
|
||||
unmarshallerHandler.setDocumentLocator(locator);
|
||||
|
||||
Enumeration e = nsSupport.getPrefixes();
|
||||
while (e.hasMoreElements()) {
|
||||
String prefix = (String) e.nextElement();
|
||||
String uriToUse = nsSupport.getURI(prefix);
|
||||
|
||||
unmarshallerHandler.startPrefixMapping(prefix, uriToUse);
|
||||
}
|
||||
String defaultURI = nsSupport.getURI("");
|
||||
if (defaultURI != null) {
|
||||
unmarshallerHandler.startPrefixMapping("", defaultURI);
|
||||
}
|
||||
|
||||
super.startElement(uri, localName, qName, atts);
|
||||
|
||||
// count the depth of elements and we will know when to stop.
|
||||
depth = 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Processes the end of an element. If we are at depth 0 we unmarshall the
|
||||
* Entry and pass it to the save delegate
|
||||
*
|
||||
* @param uri the uri of the current element
|
||||
* @param localName the local name of the current element
|
||||
* @param qName the qname of the current element
|
||||
* @throws SAXException is thrown if there is a SAXException
|
||||
*/
|
||||
@Override
|
||||
public void endElement(String uri, String localName, String qName) throws SAXException {
|
||||
|
||||
// forward this event
|
||||
super.endElement(uri, localName, qName);
|
||||
|
||||
if (depth != 0) {
|
||||
depth -= 1;
|
||||
if (depth == 0) {
|
||||
|
||||
// emulate the end of a document.
|
||||
Enumeration e = nsSupport.getPrefixes();
|
||||
while (e.hasMoreElements()) {
|
||||
String prefix = (String) e.nextElement();
|
||||
unmarshallerHandler.endPrefixMapping(prefix);
|
||||
}
|
||||
String defaultURI = nsSupport.getURI("");
|
||||
if (defaultURI != null) {
|
||||
unmarshallerHandler.endPrefixMapping("");
|
||||
}
|
||||
unmarshallerHandler.endDocument();
|
||||
|
||||
// stop forwarding events by setting a dummy handler.
|
||||
// XMLFilter doesn't accept null, so we have to give it something,
|
||||
// hence a DefaultHandler, which does nothing.
|
||||
setContentHandler(new DefaultHandler());
|
||||
|
||||
// then retrieve the fully unmarshalled object
|
||||
try {
|
||||
if (saveDelegate != null) {
|
||||
JAXBElement<VulnerabilityType> result = (JAXBElement<VulnerabilityType>) unmarshallerHandler.getResult();
|
||||
VulnerabilityType entry = result.getValue();
|
||||
saveDelegate.saveEntry(entry);
|
||||
}
|
||||
} catch (JAXBException je) { //we can continue with this exception.
|
||||
//TODO can I get the filename somewhere?
|
||||
Logger.getLogger(NvdCveXmlFilter.class.getName()).log(Level.SEVERE,
|
||||
"Unable to unmarshall NvdCVE (line " + locator.getLineNumber() + ").", je);
|
||||
} catch (CorruptIndexException ex) {
|
||||
Logger.getLogger(NvdCveXmlFilter.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new SAXException(ex);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(NvdCveXmlFilter.class.getName()).log(Level.SEVERE, null, ex);
|
||||
throw new SAXException(ex);
|
||||
} finally {
|
||||
unmarshallerHandler = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,95 +0,0 @@
|
||||
package org.codesecure.dependencycheck.dependency;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
/**
|
||||
* An external reference for a vulnerability. This contains a name, URL, and a
|
||||
* source.
|
||||
*
|
||||
* @author Jeremy
|
||||
*/
|
||||
public class Reference {
|
||||
|
||||
/**
|
||||
* The name of the reference.
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* Get the value of name
|
||||
*
|
||||
* @return the value of name
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of name
|
||||
*
|
||||
* @param name new value of name
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
/**
|
||||
* the url for the reference
|
||||
*/
|
||||
private String url;
|
||||
|
||||
/**
|
||||
* Get the value of url
|
||||
*
|
||||
* @return the value of url
|
||||
*/
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of url
|
||||
*
|
||||
* @param url new value of url
|
||||
*/
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
/**
|
||||
* the source of the reference.
|
||||
*/
|
||||
private String source;
|
||||
|
||||
/**
|
||||
* Get the value of source
|
||||
*
|
||||
* @return the value of source
|
||||
*/
|
||||
public String getSource() {
|
||||
return source;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of source
|
||||
*
|
||||
* @param source new value of source
|
||||
*/
|
||||
public void setSource(String source) {
|
||||
this.source = source;
|
||||
}
|
||||
}
|
||||
@@ -1,106 +0,0 @@
|
||||
package org.codesecure.dependencycheck.dependency;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Contains the information about a vulnerability.
|
||||
*
|
||||
* @author Jeremy
|
||||
*/
|
||||
public class Vulnerability {
|
||||
|
||||
/**
|
||||
* The name of the vulnerability
|
||||
*/
|
||||
private String name;
|
||||
|
||||
/**
|
||||
* Get the value of name
|
||||
*
|
||||
* @return the value of name
|
||||
*/
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of name
|
||||
*
|
||||
* @param name new value of name
|
||||
*/
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
/**
|
||||
* the description of the vulnerability
|
||||
*/
|
||||
private String description;
|
||||
|
||||
/**
|
||||
* Get the value of description
|
||||
*
|
||||
* @return the value of description
|
||||
*/
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of description
|
||||
*
|
||||
* @param description new value of description
|
||||
*/
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
/**
|
||||
* References for this vulnerability
|
||||
*/
|
||||
private List<Reference> references = new ArrayList<Reference>();
|
||||
|
||||
/**
|
||||
* Get the value of references
|
||||
*
|
||||
* @return the value of references
|
||||
*/
|
||||
public List<Reference> getReferences() {
|
||||
return references;
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the value of references
|
||||
*
|
||||
* @param references new value of references
|
||||
*/
|
||||
public void setReferences(List<Reference> references) {
|
||||
this.references = references;
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds a reference to the references collection
|
||||
*
|
||||
* @param ref a reference for the vulnerability
|
||||
*/
|
||||
public void addReference(Reference ref) {
|
||||
this.references.add(ref);
|
||||
}
|
||||
}
|
||||
@@ -1,134 +0,0 @@
|
||||
package org.codesecure.dependencycheck.reporting;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.apache.velocity.app.VelocityEngine;
|
||||
import org.apache.velocity.context.Context;
|
||||
import org.apache.velocity.runtime.RuntimeConstants;
|
||||
import org.apache.velocity.runtime.resource.loader.ClasspathResourceLoader;
|
||||
import org.apache.velocity.tools.ToolManager;
|
||||
import org.apache.velocity.tools.config.EasyFactoryConfiguration;
|
||||
import org.codesecure.dependencycheck.dependency.Dependency;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class ReportGenerator {
|
||||
|
||||
/**
|
||||
* Generates the Dependency Reports for the identified dependencies.
|
||||
*
|
||||
* @param outputDir the path where the reports should be written.
|
||||
* @param applicationName the name of the application that was scanned.
|
||||
* @param dependencies a list of dependencies to include in the report.
|
||||
* @throws IOException is thrown when the template file does not exist.
|
||||
* @throws Exception is thrown if there is an error writting out the
|
||||
* reports.
|
||||
*/
|
||||
public void generateReports(String outputDir, String applicationName, List<Dependency> dependencies) throws IOException, Exception {
|
||||
|
||||
Map<String, Object> properties = new HashMap<String, Object>();
|
||||
properties.put("dependencies", dependencies);
|
||||
properties.put("applicationName", applicationName);
|
||||
|
||||
String reportName = applicationName.replaceAll("[^a-zA-Z0-9-_ \\.]+", "");
|
||||
String filename = outputDir + File.separatorChar + reportName;
|
||||
generateReport("HtmlReport", filename + ".html", properties);
|
||||
//generateReport("XmlReport",filename + ".xml",properties);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* much of this code is from
|
||||
* http://stackoverflow.com/questions/2931516/loading-velocity-template-inside-a-jar-file
|
||||
*
|
||||
* @param templateName the name of the template to load.
|
||||
* @param outFileName The filename and path to write the report to.
|
||||
* @param properties a map of properties to load into the velocity context.
|
||||
* @throws IOException is thrown when the template file does not exist.
|
||||
* @throws Exception is thrown when an exception occurs.
|
||||
*/
|
||||
protected void generateReport(String templateName, String outFileName,
|
||||
Map<String, Object> properties) throws IOException, Exception {
|
||||
|
||||
VelocityEngine ve = new VelocityEngine();
|
||||
ve.setProperty(RuntimeConstants.RESOURCE_LOADER, "classpath");
|
||||
ve.setProperty("classpath.resource.loader.class", ClasspathResourceLoader.class.getName());
|
||||
|
||||
ToolManager manager = new ToolManager();
|
||||
Context context = manager.createContext();
|
||||
EasyFactoryConfiguration config = new EasyFactoryConfiguration();
|
||||
config.addDefaultTools();
|
||||
config.toolbox("application").tool("esc", "org.apache.velocity.tools.generic.EscapeTool").tool("org.apache.velocity.tools.generic.DateTool");
|
||||
|
||||
manager.configure(config);
|
||||
|
||||
ve.init();
|
||||
|
||||
final String templatePath = "templates/" + templateName + ".vsl";
|
||||
InputStream input = this.getClass().getClassLoader().getResourceAsStream(templatePath);
|
||||
if (input == null) {
|
||||
throw new IOException("Template file doesn't exist");
|
||||
}
|
||||
|
||||
InputStreamReader reader = new InputStreamReader(input);
|
||||
BufferedWriter writer = null;
|
||||
|
||||
//VelocityContext context = new VelocityContext();
|
||||
|
||||
//load the data into the context
|
||||
if (properties != null) {
|
||||
for (Map.Entry<String, Object> property : properties.entrySet()) {
|
||||
context.put(property.getKey(), property.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
try {
|
||||
writer = new BufferedWriter(new FileWriter(new File(outFileName)));
|
||||
|
||||
if (!ve.evaluate(context, writer, templatePath, reader)) {
|
||||
throw new Exception("Failed to convert the template into html.");
|
||||
}
|
||||
writer.flush();
|
||||
} finally {
|
||||
try {
|
||||
writer.close();
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(ReportGenerator.class.getName()).log(Level.FINEST, null, ex);
|
||||
}
|
||||
try {
|
||||
reader.close();
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(ReportGenerator.class.getName()).log(Level.FINEST, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,48 +0,0 @@
|
||||
package org.codesecure.dependencycheck.utils;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
|
||||
/**
|
||||
* A collection of utilities for processing information about files.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
*/
|
||||
public class FileUtils {
|
||||
|
||||
/**
|
||||
* Private constructor for a utility class.
|
||||
*/
|
||||
private FileUtils() {
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the (lowercase) file extension for a specified file.
|
||||
*
|
||||
* @param fileName the file name to retrieve the file extension from.
|
||||
* @return the file extension.
|
||||
*/
|
||||
public static String getFileExtension(String fileName) {
|
||||
String ret = null;
|
||||
int pos = fileName.lastIndexOf(".");
|
||||
if (pos >= 0) {
|
||||
ret = fileName.substring(pos + 1, fileName.length()).toLowerCase();
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@@ -1,677 +0,0 @@
|
||||
/* ssdeep
|
||||
Copyright (C) 2006 ManTech International Corporation
|
||||
|
||||
$Id: fuzzy.c 97 2010-03-19 15:10:06Z jessekornblum $
|
||||
|
||||
This program is free software; you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation; either version 2 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program; if not, write to the Free Software
|
||||
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
The code in this file, and this file only, is based on SpamSum, part
|
||||
of the Samba project:
|
||||
http://www.samba.org/ftp/unpacked/junkcode/spamsum/
|
||||
|
||||
Because of where this file came from, any program that contains it
|
||||
must be licensed under the terms of the General Public License (GPL).
|
||||
See the file COPYING for details. The author's original comments
|
||||
about licensing are below:
|
||||
|
||||
|
||||
|
||||
this is a checksum routine that is specifically designed for spam.
|
||||
Copyright Andrew Tridgell <tridge@samba.org> 2002
|
||||
|
||||
This code is released under the GNU General Public License version 2
|
||||
or later. Alteratively, you may also use this code under the terms
|
||||
of the Perl Artistic license.
|
||||
|
||||
If you wish to distribute this code under the terms of a different
|
||||
free software license then please ask me. If there is a good reason
|
||||
then I will probably say yes.
|
||||
|
||||
*/
|
||||
|
||||
//package eu.scape_project.bitwiser.utils;
|
||||
//https://raw.github.com/openplanets/bitwiser/master/src/main/java/eu/scape_project/bitwiser/utils/SSDeep.java
|
||||
package org.codesecure.dependencycheck.utils;
|
||||
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.Arrays;
|
||||
|
||||
import org.apache.commons.lang.StringUtils;
|
||||
|
||||
/**
|
||||
* SSDeep
|
||||
*
|
||||
* <p>
|
||||
* A Java version of the ssdeep algorithm, based on the fuzzy.c source
|
||||
* code, taken from version 2.6 of the ssdeep package.
|
||||
*
|
||||
* <p>
|
||||
* Transliteration/port to Java from C by...
|
||||
*
|
||||
* @author Andrew Jackson <Andrew.Jackson@bl.uk>
|
||||
*
|
||||
*/
|
||||
public class SSDeep {
|
||||
|
||||
public class FuzzyHash {
|
||||
/** the blocksize used by the program, */
|
||||
int blocksize;
|
||||
/** the hash for this blocksize */
|
||||
String hash;
|
||||
/** the hash for twice the blocksize, */
|
||||
String hash2;
|
||||
/** the filename. */
|
||||
String filename;
|
||||
}
|
||||
|
||||
/// Length of an individual fuzzy hash signature component
|
||||
public static final int SPAMSUM_LENGTH = 64;
|
||||
|
||||
/// The longest possible length for a fuzzy hash signature (without the filename)
|
||||
public static final int FUZZY_MAX_RESULT = (SPAMSUM_LENGTH + (SPAMSUM_LENGTH/2 + 20));
|
||||
|
||||
|
||||
public static final int MIN_BLOCKSIZE = 3;
|
||||
public static final int ROLLING_WINDOW = 7;
|
||||
|
||||
public static final int HASH_PRIME = 0x01000193;
|
||||
public static final int HASH_INIT = 0x28021967;
|
||||
|
||||
// Our input buffer when reading files to hash
|
||||
public static final int BUFFER_SIZE = 8192;
|
||||
|
||||
static class roll_state_class {
|
||||
int[] window = new int[ROLLING_WINDOW];
|
||||
int h1, h2, h3;
|
||||
int n;
|
||||
}
|
||||
private static roll_state_class roll_state = new roll_state_class();
|
||||
|
||||
|
||||
/*
|
||||
a rolling hash, based on the Adler checksum. By using a rolling hash
|
||||
we can perform auto resynchronisation after inserts/deletes
|
||||
|
||||
internally, h1 is the sum of the bytes in the window and h2
|
||||
is the sum of the bytes times the index
|
||||
|
||||
h3 is a shift/xor based rolling hash, and is mostly needed to ensure that
|
||||
we can cope with large blocksize values
|
||||
*/
|
||||
static int roll_hash(int c)
|
||||
{
|
||||
|
||||
// System.out.println(""+roll_state.h1+","+roll_state.h2+","+roll_state.h3);
|
||||
roll_state.h2 -= roll_state.h1;
|
||||
//roll_state.h2 = roll_state.h2 & 0x7fffffff;
|
||||
roll_state.h2 += ROLLING_WINDOW * c;
|
||||
//roll_state.h2 = roll_state.h2 & 0x7fffffff;
|
||||
|
||||
roll_state.h1 += c;
|
||||
//roll_state.h1 = roll_state.h1 & 0x7fffffff;
|
||||
roll_state.h1 -= roll_state.window[(roll_state.n % ROLLING_WINDOW)];
|
||||
//roll_state.h1 = roll_state.h1 & 0x7fffffff;
|
||||
|
||||
roll_state.window[roll_state.n % ROLLING_WINDOW] = (char)c;
|
||||
roll_state.n = (roll_state.n+1)%ROLLING_WINDOW;
|
||||
|
||||
/* The original spamsum AND'ed this value with 0xFFFFFFFF which
|
||||
in theory should have no effect. This AND has been removed
|
||||
for performance (jk) */
|
||||
roll_state.h3 = (roll_state.h3 << 5);// & 0xFFFFFFFF;
|
||||
roll_state.h3 ^= c;
|
||||
//roll_state.h3 = roll_state.h3 & 0x7FFFFFFF;
|
||||
//if( roll_state.h3 > 0xEFFFFFFF ) roll_state.h3 -= 0xEFFFFFFF;
|
||||
|
||||
long result = ((roll_state.h1 + roll_state.h2 + roll_state.h3));//&0x7FFFFFFF;
|
||||
//System.out.println("Result: "+result);
|
||||
//System.out.println("Result2: "+(result&0xFFFFFFFF));
|
||||
//System.out.println("Result3: "+(result&0x7FFFFFFF));
|
||||
|
||||
return (int) result;//&0xFFFFFFFF;
|
||||
}
|
||||
|
||||
/*
|
||||
reset the state of the rolling hash and return the initial rolling hash value
|
||||
*/
|
||||
static void roll_reset()
|
||||
{
|
||||
roll_state.h1 = 0;
|
||||
roll_state.h2 = 0;
|
||||
roll_state.h3 = 0;
|
||||
roll_state.n = 0;
|
||||
Arrays.fill(roll_state.window,(char)0);
|
||||
}
|
||||
|
||||
/* a simple non-rolling hash, based on the FNV hash */
|
||||
static int sum_hash(int c, int h)
|
||||
{
|
||||
h *= HASH_PRIME;
|
||||
//h = h & 0xFFFFFFFF;
|
||||
h ^= c;
|
||||
//h = h & 0xFFFFFFFF;
|
||||
return h;
|
||||
}
|
||||
|
||||
class ss_context {
|
||||
char[] ret;
|
||||
char[] p;
|
||||
long total_chars;
|
||||
int h, h2, h3;
|
||||
int j, n, i, k;
|
||||
int block_size;
|
||||
char[] ret2 = new char[SPAMSUM_LENGTH/2 + 1];
|
||||
}
|
||||
|
||||
|
||||
static void ss_destroy(ss_context ctx)
|
||||
{
|
||||
if (ctx.ret != null)
|
||||
ctx.ret = null;
|
||||
//free(ctx.ret);
|
||||
}
|
||||
|
||||
|
||||
static boolean ss_init(ss_context ctx, File handle)
|
||||
{
|
||||
if ( ctx == null )
|
||||
return true;
|
||||
|
||||
ctx.ret = new char[FUZZY_MAX_RESULT];
|
||||
if (ctx.ret == null)
|
||||
return true;
|
||||
|
||||
if (handle != null)
|
||||
ctx.total_chars = handle.length();
|
||||
|
||||
ctx.block_size = MIN_BLOCKSIZE;
|
||||
while (ctx.block_size * SPAMSUM_LENGTH < ctx.total_chars) {
|
||||
ctx.block_size = ctx.block_size * 2;
|
||||
}
|
||||
|
||||
System.out.println("bs:"+ctx.block_size);
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
static char[] b64 = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".toCharArray();
|
||||
|
||||
static void ss_engine(ss_context ctx,
|
||||
byte[] buffer,
|
||||
int buffer_size)
|
||||
{
|
||||
if (null == ctx || null == buffer)
|
||||
return;
|
||||
|
||||
for ( int i = 0 ; i < buffer_size ; ++i)
|
||||
{
|
||||
|
||||
/*
|
||||
at each character we update the rolling hash and
|
||||
the normal hash. When the rolling hash hits the
|
||||
reset value then we emit the normal hash as a
|
||||
element of the signature and reset both hashes
|
||||
*/
|
||||
|
||||
System.out.println(""+ctx.h+","+ctx.h2+","+ctx.h3);
|
||||
ctx.h = roll_hash(buffer[i]);// & 0x7FFFFFFF;
|
||||
ctx.h2 = sum_hash(buffer[i], ctx.h2);// & 0x7FFFFFFF;
|
||||
ctx.h3 = sum_hash(buffer[i], ctx.h3);// & 0x7FFFFFFF;
|
||||
|
||||
if (((0xFFFFFFFFl & ctx.h) % ctx.block_size) == (ctx.block_size-1)) {
|
||||
/* we have hit a reset point. We now emit a
|
||||
hash which is based on all chacaters in the
|
||||
piece of the message between the last reset
|
||||
point and this one */
|
||||
ctx.p[ctx.j] = b64[(int)((ctx.h2&0xFFFF) % 64)];
|
||||
System.out.println("::"+ctx.j+":"+new String(ctx.p));
|
||||
// for( char c : ctx.p ) {
|
||||
// System.out.print(c);
|
||||
// }
|
||||
// System.out.println();
|
||||
if (ctx.j < SPAMSUM_LENGTH-1) {
|
||||
/* we can have a problem with the tail
|
||||
overflowing. The easiest way to
|
||||
cope with this is to only reset the
|
||||
second hash if we have room for
|
||||
more characters in our
|
||||
signature. This has the effect of
|
||||
combining the last few pieces of
|
||||
the message into a single piece */
|
||||
|
||||
ctx.h2 = HASH_INIT;
|
||||
(ctx.j)++;
|
||||
}
|
||||
}
|
||||
|
||||
/* this produces a second signature with a block size
|
||||
of block_size*2. By producing dual signatures in
|
||||
this way the effect of small changes in the message
|
||||
size near a block size boundary is greatly reduced. */
|
||||
if (((0xFFFFFFFFl & ctx.h) % (ctx.block_size*2)) == ((ctx.block_size*2)-1)) {
|
||||
ctx.ret2[ctx.k] = b64[(int) (ctx.h3&0xFFFF % 64)];
|
||||
if (ctx.k < SPAMSUM_LENGTH/2-1) {
|
||||
ctx.h3 = HASH_INIT;
|
||||
(ctx.k)++;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
static boolean ss_update(ss_context ctx, File handle) throws IOException
|
||||
{
|
||||
int bytes_read = 0;
|
||||
byte[] buffer;
|
||||
|
||||
if (null == ctx || null == handle)
|
||||
return true;
|
||||
|
||||
buffer = new byte[BUFFER_SIZE];
|
||||
if (buffer == null)
|
||||
return true;
|
||||
|
||||
// snprintf(ctx.ret, 12, "%u:", ctx.block_size);
|
||||
ctx.ret = (ctx.block_size + ":").toCharArray();
|
||||
// ctx.p = ctx.ret + strlen(ctx.ret);
|
||||
ctx.p = new char[SPAMSUM_LENGTH];
|
||||
|
||||
//memset(ctx.p, 0, SPAMSUM_LENGTH+1);
|
||||
Arrays.fill(ctx.p, (char)0 );
|
||||
//memset(ctx.ret2, 0, sizeof(ctx.ret2.length));
|
||||
Arrays.fill(ctx.ret2, (char)0 );
|
||||
|
||||
ctx.k = ctx.j = 0;
|
||||
ctx.h3 = ctx.h2 = HASH_INIT;
|
||||
ctx.h = 0;
|
||||
roll_reset();
|
||||
|
||||
System.out.println("Opening file:"+handle);
|
||||
FileInputStream in = new FileInputStream(handle);
|
||||
// while ((bytes_read = fread(buffer,sizeof(byte),BUFFER_SIZE,handle)) > 0)
|
||||
while (in.available() > 0 )
|
||||
{
|
||||
bytes_read = in.read(buffer);
|
||||
ss_engine(ctx,buffer,bytes_read);
|
||||
}
|
||||
|
||||
if (ctx.h != 0)
|
||||
{
|
||||
ctx.p[ctx.j] = b64[(int) ((ctx.h2 & 0xFFFF) % 64)];
|
||||
ctx.ret2[ctx.k] = b64[(int) ((ctx.h3 &0xFFFF) % 64)];
|
||||
}
|
||||
|
||||
// strcat(ctx.p+ctx.j, ":");
|
||||
// strcat(ctx.p+ctx.j, ctx.ret2);
|
||||
ctx.ret = (new String(ctx.ret) + new String(ctx.p) + ":" + new String(ctx.ret2)).toCharArray();
|
||||
|
||||
// free(buffer);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
boolean fuzzy_hash_file(File handle) throws IOException
|
||||
{
|
||||
ss_context ctx;
|
||||
int filepos;
|
||||
boolean done = false;
|
||||
|
||||
if (null == handle)
|
||||
return true;
|
||||
|
||||
ctx = new ss_context();
|
||||
if (ctx == null)
|
||||
return true;
|
||||
|
||||
// filepos = ftello(handle);
|
||||
|
||||
ss_init(ctx, handle);
|
||||
System.out.println("bs-pre:"+ctx.block_size);
|
||||
|
||||
while (!done)
|
||||
{
|
||||
// if (fseeko(handle,0,SEEK_SET))
|
||||
// return true;
|
||||
|
||||
ss_update(ctx,handle);
|
||||
|
||||
System.out.println("RESULT:"+new String(ctx.ret));
|
||||
|
||||
// our blocksize guess may have been way off - repeat if necessary
|
||||
if (ctx.block_size > MIN_BLOCKSIZE && ctx.j < SPAMSUM_LENGTH/2)
|
||||
ctx.block_size = ctx.block_size / 2;
|
||||
else
|
||||
done = true;
|
||||
}
|
||||
|
||||
System.out.println("bs-post:"+ctx.block_size);
|
||||
// strncpy(result,ctx.ret,FUZZY_MAX_RESULT);
|
||||
|
||||
System.out.println("RESULT:"+new String(ctx.ret));
|
||||
|
||||
ss_destroy(ctx);
|
||||
// free(ctx);
|
||||
|
||||
// if (fseeko(handle,filepos,SEEK_SET))
|
||||
// return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
public boolean fuzzy_hash_filename(String filename) throws IOException
|
||||
{
|
||||
boolean status;
|
||||
|
||||
if (null == filename)
|
||||
return true;
|
||||
|
||||
File handle = new File(filename);//,"rb");
|
||||
if (null == handle)
|
||||
return true;
|
||||
|
||||
status = fuzzy_hash_file(handle);
|
||||
|
||||
// fclose(handle);
|
||||
|
||||
return status;
|
||||
}
|
||||
|
||||
|
||||
boolean fuzzy_hash_buf(byte[] buf,
|
||||
int buf_len,
|
||||
char[] result)
|
||||
{
|
||||
ss_context ctx = new ss_context();
|
||||
boolean done = false;
|
||||
|
||||
if (buf == null)
|
||||
return true;
|
||||
|
||||
ctx.total_chars = buf_len;
|
||||
ss_init(ctx, null);
|
||||
|
||||
System.out.println("total_chars: "+ctx.total_chars);
|
||||
|
||||
while (!done)
|
||||
{
|
||||
// snprintf(ctx.ret, 12, "%u:", ctx.block_size);
|
||||
// ctx.p = ctx.ret + strlen(ctx.ret);
|
||||
ctx.p = new char[SPAMSUM_LENGTH+1]; // TODO Duplication!
|
||||
|
||||
// memset(ctx.p, 0, SPAMSUM_LENGTH+1);
|
||||
// memset(ctx.ret2, 0, sizeof(ctx.ret2));
|
||||
|
||||
ctx.k = ctx.j = 0;
|
||||
ctx.h3 = ctx.h2 = HASH_INIT;
|
||||
ctx.h = 0;
|
||||
roll_reset();
|
||||
|
||||
System.out.println("h:"+ctx.h);
|
||||
System.out.println("h2:"+ctx.h2);
|
||||
|
||||
ss_engine(ctx,buf,buf_len);
|
||||
|
||||
/* our blocksize guess may have been way off - repeat if necessary */
|
||||
if (ctx.block_size > MIN_BLOCKSIZE && ctx.j < SPAMSUM_LENGTH/2)
|
||||
ctx.block_size = ctx.block_size / 2;
|
||||
else
|
||||
done = true;
|
||||
|
||||
System.out.println("h:"+ctx.h);
|
||||
System.out.println("h2:"+ctx.h2);
|
||||
System.out.println("h3:"+ctx.h3);
|
||||
System.out.println("bs:"+ctx.block_size);
|
||||
System.out.println("ret:"+new String(ctx.ret));
|
||||
System.out.println("p:"+new String(ctx.p));
|
||||
System.out.println("ret2:"+new String(ctx.ret2));
|
||||
if (ctx.h != 0)
|
||||
{
|
||||
ctx.p[ctx.j] = b64[(int) ((ctx.h2&0xFFFF) % 64)];
|
||||
ctx.ret2[ctx.k] = b64[(int) ((ctx.h3&0xFFFF) % 64)];
|
||||
}
|
||||
|
||||
// strcat(ctx.p+ctx.j, ":");
|
||||
// strcat(ctx.p+ctx.j, ctx.ret2);
|
||||
}
|
||||
|
||||
|
||||
// strncpy(result,ctx.ret,FUZZY_MAX_RESULT);
|
||||
System.out.println("bs:"+ctx.block_size);
|
||||
System.out.println("ret:"+new String(ctx.ret));
|
||||
System.out.println("p:"+new String(ctx.p));
|
||||
System.out.println("ret2:"+new String(ctx.ret2));
|
||||
System.out.println("h3:"+ctx.h3);
|
||||
result = ctx.ret;
|
||||
|
||||
ss_destroy(ctx);
|
||||
// free(ctx);
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
we only accept a match if we have at least one common substring in
|
||||
the signature of length ROLLING_WINDOW. This dramatically drops the
|
||||
false positive rate for low score thresholds while having
|
||||
negligable affect on the rate of spam detection.
|
||||
|
||||
return 1 if the two strings do have a common substring, 0 otherwise
|
||||
*/
|
||||
static int has_common_substring(char[] s1, char[] s2)
|
||||
{
|
||||
int i, j;
|
||||
int num_hashes;
|
||||
long[] hashes = new long[SPAMSUM_LENGTH];
|
||||
|
||||
/* there are many possible algorithms for common substring
|
||||
detection. In this case I am re-using the rolling hash code
|
||||
to act as a filter for possible substring matches */
|
||||
|
||||
roll_reset();
|
||||
// memset(hashes, 0, sizeof(hashes));
|
||||
|
||||
/* first compute the windowed rolling hash at each offset in
|
||||
the first string */
|
||||
for (i=0;s1[i] != 0;i++)
|
||||
{
|
||||
hashes[i] = roll_hash((char)s1[i]);
|
||||
}
|
||||
num_hashes = i;
|
||||
|
||||
roll_reset();
|
||||
|
||||
/* now for each offset in the second string compute the
|
||||
rolling hash and compare it to all of the rolling hashes
|
||||
for the first string. If one matches then we have a
|
||||
candidate substring match. We then confirm that match with
|
||||
a direct string comparison */
|
||||
for (i=0;s2[i] != 0;i++) {
|
||||
long h = roll_hash((char)s2[i]);
|
||||
if (i < ROLLING_WINDOW-1) continue;
|
||||
for (j=ROLLING_WINDOW-1;j<num_hashes;j++)
|
||||
{
|
||||
if (hashes[j] != 0 && hashes[j] == h)
|
||||
{
|
||||
/* we have a potential match - confirm it */
|
||||
/*FIXME
|
||||
if (strlen(s2+i-(ROLLING_WINDOW-1)) >= ROLLING_WINDOW &&
|
||||
strncmp(s2+i-(ROLLING_WINDOW-1),
|
||||
s1+j-(ROLLING_WINDOW-1),
|
||||
ROLLING_WINDOW) == 0)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
*/
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
// eliminate sequences of longer than 3 identical characters. These
|
||||
// sequences contain very little information so they tend to just bias
|
||||
// the result unfairly
|
||||
static char[] eliminate_sequences(String string)
|
||||
{
|
||||
char[] str = string.toCharArray();
|
||||
StringBuffer ret = new StringBuffer();
|
||||
|
||||
// Do not include repeats:
|
||||
for (int i=3;i<str.length;i++) {
|
||||
if (str[i] != str[i-1] ||
|
||||
str[i] != str[i-2] ||
|
||||
str[i] != str[i-3]) {
|
||||
ret.append(str[i]);
|
||||
}
|
||||
}
|
||||
|
||||
return ret.toString().toCharArray();
|
||||
}
|
||||
|
||||
/*
|
||||
this is the low level string scoring algorithm. It takes two strings
|
||||
and scores them on a scale of 0-100 where 0 is a terrible match and
|
||||
100 is a great match. The block_size is used to cope with very small
|
||||
messages.
|
||||
*/
|
||||
static int score_strings(char[] s1, char[] s2, int block_size)
|
||||
{
|
||||
int score = 0;
|
||||
int len1, len2;
|
||||
|
||||
len1 = s1.length;
|
||||
len2 = s2.length;
|
||||
|
||||
if (len1 > SPAMSUM_LENGTH || len2 > SPAMSUM_LENGTH) {
|
||||
/* not a real spamsum signature? */
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* the two strings must have a common substring of length
|
||||
ROLLING_WINDOW to be candidates */
|
||||
if (has_common_substring(s1, s2) == 0) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* compute the edit distance between the two strings. The edit distance gives
|
||||
us a pretty good idea of how closely related the two strings are */
|
||||
score = StringUtils.getLevenshteinDistance(new String(s1), new String(s2));
|
||||
|
||||
/* scale the edit distance by the lengths of the two
|
||||
strings. This changes the score to be a measure of the
|
||||
proportion of the message that has changed rather than an
|
||||
absolute quantity. It also copes with the variability of
|
||||
the string lengths. */
|
||||
score = (score * SPAMSUM_LENGTH) / (len1 + len2);
|
||||
|
||||
/* at this stage the score occurs roughly on a 0-64 scale,
|
||||
* with 0 being a good match and 64 being a complete
|
||||
* mismatch */
|
||||
|
||||
/* rescale to a 0-100 scale (friendlier to humans) */
|
||||
score = (100 * score) / 64;
|
||||
|
||||
/* it is possible to get a score above 100 here, but it is a
|
||||
really terrible match */
|
||||
if (score >= 100) return 0;
|
||||
|
||||
/* now re-scale on a 0-100 scale with 0 being a poor match and
|
||||
100 being a excellent match. */
|
||||
score = 100 - score;
|
||||
|
||||
// printf ("len1: %"PRIu32" len2: %"PRIu32"\n", len1, len2);
|
||||
|
||||
/* when the blocksize is small we don't want to exaggerate the match size */
|
||||
if (score > block_size/MIN_BLOCKSIZE * Math.min(len1, len2)) {
|
||||
score = block_size/MIN_BLOCKSIZE * Math.min(len1, len2);
|
||||
}
|
||||
return score;
|
||||
}
|
||||
|
||||
/*
|
||||
given two spamsum strings return a value indicating the degree to which they match.
|
||||
*/
|
||||
int fuzzy_compare(FuzzyHash fh1, FuzzyHash fh2 )
|
||||
{
|
||||
int score = 0;
|
||||
char[] s1_1, s1_2;
|
||||
char[] s2_1, s2_2;
|
||||
|
||||
// if the blocksizes don't match then we are comparing
|
||||
// apples to oranges. This isn't an 'error' per se. We could
|
||||
// have two valid signatures, but they can't be compared.
|
||||
if (fh1.blocksize != fh2.blocksize &&
|
||||
fh1.blocksize != fh2.blocksize*2 &&
|
||||
fh2.blocksize != fh1.blocksize*2) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
// there is very little information content is sequences of
|
||||
// the same character like 'LLLLL'. Eliminate any sequences
|
||||
// longer than 3. This is especially important when combined
|
||||
// with the has_common_substring() test below.
|
||||
s1_1 = eliminate_sequences(fh1.hash+1);
|
||||
s2_1 = eliminate_sequences(fh2.hash+1);
|
||||
|
||||
s1_2 = eliminate_sequences(fh1.hash2+1);
|
||||
s2_2 = eliminate_sequences(fh1.hash2+1);
|
||||
|
||||
// each signature has a string for two block sizes. We now
|
||||
// choose how to combine the two block sizes. We checked above
|
||||
// that they have at least one block size in common
|
||||
if (fh1.blocksize == fh2.blocksize) {
|
||||
int score1, score2;
|
||||
score1 = score_strings(s1_1, s2_1, fh1.blocksize);
|
||||
score2 = score_strings(s1_2, s2_2, fh2.blocksize);
|
||||
|
||||
// s.block_size = fh1.blocksize;
|
||||
|
||||
score = Math.max(score1, score2);
|
||||
} else if (fh1.blocksize == fh2.blocksize*2) {
|
||||
|
||||
score = score_strings(s1_1, s2_2, fh1.blocksize);
|
||||
// s.block_size = fh1.blocksize;
|
||||
} else {
|
||||
|
||||
score = score_strings(s1_2, s2_1, fh2.blocksize);
|
||||
// s.block_size = fh2.blocksize;
|
||||
}
|
||||
|
||||
return (int)score;
|
||||
}
|
||||
|
||||
/**
|
||||
* Main class for quick testing.
|
||||
* @param args
|
||||
* @throws IOException
|
||||
*/
|
||||
public static void main( String[] args ) throws IOException {
|
||||
SSDeep ssd = new SSDeep();
|
||||
byte[] b2 = "Hello World how are you today...\n".getBytes();
|
||||
byte[] b3 = "Helli".getBytes();
|
||||
char[] h1 = null;
|
||||
boolean t1 = ssd.fuzzy_hash_buf(b2, b2.length, h1);
|
||||
System.out.println("Got "+h1);
|
||||
ssd.fuzzy_hash_file(new File("test"));
|
||||
//ssd.fuzzy_hash_file(new File("pom.xml"));
|
||||
}
|
||||
}
|
||||
@@ -1,24 +1,23 @@
|
||||
package org.codesecure.dependencycheck;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
* This file is part of Dependency-Check.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* Dependency-Check is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* Dependency-Check is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
* Dependency-Check. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
package org.owasp.dependencycheck;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileNotFoundException;
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
@@ -26,13 +25,11 @@ import java.util.List;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.LogManager;
|
||||
import java.util.logging.Logger;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
import org.apache.commons.cli.ParseException;
|
||||
import org.codesecure.dependencycheck.data.cpe.xml.Importer;
|
||||
import org.codesecure.dependencycheck.reporting.ReportGenerator;
|
||||
import org.codesecure.dependencycheck.dependency.Dependency;
|
||||
import org.codesecure.dependencycheck.utils.CliParser;
|
||||
import org.xml.sax.SAXException;
|
||||
import org.owasp.dependencycheck.reporting.ReportGenerator;
|
||||
import org.owasp.dependencycheck.dependency.Dependency;
|
||||
import org.owasp.dependencycheck.utils.CliParser;
|
||||
import org.owasp.dependencycheck.utils.Settings;
|
||||
|
||||
/*
|
||||
* This file is part of App.
|
||||
@@ -54,32 +51,33 @@ import org.xml.sax.SAXException;
|
||||
/**
|
||||
* The command line interface for the DependencyCheck application.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
* @author Jeremy Long (jeremy.long@owasp.org)
|
||||
*/
|
||||
public class App {
|
||||
|
||||
/**
|
||||
* The location of the log properties configuration file.
|
||||
*/
|
||||
private static final String LOG_PROPERTIES_FILE = "configuration/log.properties";
|
||||
|
||||
/**
|
||||
* The main method for the application.
|
||||
*
|
||||
* @param args the command line arguments
|
||||
*/
|
||||
public static void main(String[] args) {
|
||||
prepareLogger();
|
||||
App app = new App();
|
||||
final App app = new App();
|
||||
app.run(args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Configures the logger for use by the application.
|
||||
*/
|
||||
private static void prepareLogger() {
|
||||
//while java doc for JUL says to use preferences api - it throws an exception...
|
||||
//Preferences.systemRoot().put("java.util.logging.config.file", "log.properties");
|
||||
//System.getProperties().put("java.util.logging.config.file", "configuration/log.properties");
|
||||
File dir = new File("logs");
|
||||
|
||||
if (!dir.exists()) {
|
||||
dir.mkdir();
|
||||
}
|
||||
InputStream in = null;
|
||||
try {
|
||||
InputStream in = App.class.getClassLoader().getResourceAsStream(LOG_PROPERTIES_FILE);
|
||||
in = App.class.getClassLoader().getResourceAsStream(LOG_PROPERTIES_FILE);
|
||||
LogManager.getLogManager().reset();
|
||||
LogManager.getLogManager().readConfiguration(in);
|
||||
} catch (IOException ex) {
|
||||
@@ -87,17 +85,24 @@ public class App {
|
||||
Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (SecurityException ex) {
|
||||
Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} finally {
|
||||
try {
|
||||
in.close();
|
||||
} catch (Exception ex) {
|
||||
//ignore
|
||||
in = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* main CLI entry-point into the application.
|
||||
* Main CLI entry-point into the application.
|
||||
*
|
||||
* @param args the command line arguments
|
||||
*/
|
||||
public void run(String[] args) {
|
||||
|
||||
CliParser cli = new CliParser();
|
||||
final CliParser cli = new CliParser();
|
||||
try {
|
||||
cli.parse(args);
|
||||
} catch (FileNotFoundException ex) {
|
||||
@@ -114,31 +119,12 @@ public class App {
|
||||
|
||||
if (cli.isGetVersion()) {
|
||||
cli.printVersionInfo();
|
||||
} else if (cli.isLoadCPE()) {
|
||||
loadCPE(cli.getCpeFile());
|
||||
} else if (cli.isRunScan()) {
|
||||
runScan(cli.getReportDirectory(), cli.getApplicationName(), cli.getScanFiles(), cli.isAutoUpdate());
|
||||
updateSettings(cli.isAutoUpdate(), cli.isDeepScan(), cli.getConnectionTimeout(), cli.getProxyUrl(), cli.getProxyPort());
|
||||
runScan(cli.getReportDirectory(), cli.getReportFormat(), cli.getApplicationName(), cli.getScanFiles());
|
||||
} else {
|
||||
cli.printHelp();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the specified CPE.XML file into Lucene Index.
|
||||
*
|
||||
* @param cpePath
|
||||
*/
|
||||
private void loadCPE(String cpePath) {
|
||||
try {
|
||||
Importer.importXML(cpePath);
|
||||
} catch (ParserConfigurationException ex) {
|
||||
Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (SAXException ex) {
|
||||
Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -146,26 +132,50 @@ public class App {
|
||||
* reportDirectory.
|
||||
*
|
||||
* @param reportDirectory the path to the directory where the reports will
|
||||
* be written.
|
||||
* @param applicationName the application name for the report.
|
||||
* @param files the files/directories to scan.
|
||||
* be written
|
||||
* @param outputFormat the output format of the report
|
||||
* @param applicationName the application name for the report
|
||||
* @param files the files/directories to scan
|
||||
*/
|
||||
private void runScan(String reportDirectory, String applicationName, String[] files, boolean autoUpdate) {
|
||||
Engine scanner = new Engine(autoUpdate);
|
||||
private void runScan(String reportDirectory, String outputFormat, String applicationName, String[] files) {
|
||||
final Engine scanner = new Engine();
|
||||
|
||||
for (String file : files) {
|
||||
scanner.scan(file);
|
||||
}
|
||||
scanner.analyzeDependencies();
|
||||
List<Dependency> dependencies = scanner.getDependencies();
|
||||
|
||||
ReportGenerator report = new ReportGenerator();
|
||||
scanner.analyzeDependencies();
|
||||
final List<Dependency> dependencies = scanner.getDependencies();
|
||||
|
||||
final ReportGenerator report = new ReportGenerator(applicationName, dependencies, scanner.getAnalyzers());
|
||||
try {
|
||||
report.generateReports(reportDirectory, applicationName, dependencies);
|
||||
report.generateReports(reportDirectory, outputFormat);
|
||||
} catch (IOException ex) {
|
||||
Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(App.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Updates the global Settings.
|
||||
* @param autoUpdate whether or not to update cached web data sources
|
||||
* @param deepScan whether or not to perform a deep scan (increases false positives, but may reduce false negatives)
|
||||
* @param connectionTimeout the timeout to use when downloading resources (null or blank will use default)
|
||||
* @param proxyUrl the proxy url (null or blank means no proxy will be used)
|
||||
* @param proxyPort the proxy port (null or blank means no port will be used)
|
||||
*/
|
||||
private void updateSettings(boolean autoUpdate, boolean deepScan, String connectionTimeout, String proxyUrl, String proxyPort) {
|
||||
Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, autoUpdate);
|
||||
Settings.setBoolean(Settings.KEYS.PERFORM_DEEP_SCAN, deepScan);
|
||||
if (proxyUrl != null && !proxyUrl.isEmpty()) {
|
||||
Settings.setString(Settings.KEYS.PROXY_URL, proxyUrl);
|
||||
}
|
||||
if (proxyPort != null && !proxyPort.isEmpty()) {
|
||||
Settings.setString(Settings.KEYS.PROXY_PORT, proxyPort);
|
||||
}
|
||||
if (connectionTimeout != null && !connectionTimeout.isEmpty()) {
|
||||
Settings.setString(Settings.KEYS.CONNECTION_TIMEOUT, connectionTimeout);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,27 +1,25 @@
|
||||
package org.codesecure.dependencycheck;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
* This file is part of Dependency-Check.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* Dependency-Check is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* Dependency-Check is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
* Dependency-Check. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
package org.owasp.dependencycheck;
|
||||
|
||||
import java.util.EnumMap;
|
||||
import org.codesecure.dependencycheck.dependency.Dependency;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
@@ -29,15 +27,17 @@ import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.logging.Level;
|
||||
import java.util.logging.Logger;
|
||||
import org.codesecure.dependencycheck.analyzer.AnalysisException;
|
||||
import org.codesecure.dependencycheck.analyzer.AnalysisPhase;
|
||||
import org.codesecure.dependencycheck.analyzer.Analyzer;
|
||||
import org.codesecure.dependencycheck.analyzer.AnalyzerService;
|
||||
import org.codesecure.dependencycheck.analyzer.ArchiveAnalyzer;
|
||||
import org.codesecure.dependencycheck.data.CachedWebDataSource;
|
||||
import org.codesecure.dependencycheck.data.UpdateException;
|
||||
import org.codesecure.dependencycheck.data.UpdateService;
|
||||
import org.codesecure.dependencycheck.utils.FileUtils;
|
||||
import org.owasp.dependencycheck.analyzer.AnalysisException;
|
||||
import org.owasp.dependencycheck.analyzer.AnalysisPhase;
|
||||
import org.owasp.dependencycheck.analyzer.Analyzer;
|
||||
import org.owasp.dependencycheck.analyzer.AnalyzerService;
|
||||
import org.owasp.dependencycheck.data.CachedWebDataSource;
|
||||
import org.owasp.dependencycheck.data.UpdateException;
|
||||
import org.owasp.dependencycheck.data.UpdateService;
|
||||
import org.owasp.dependencycheck.dependency.Dependency;
|
||||
import org.owasp.dependencycheck.utils.FileUtils;
|
||||
import org.owasp.dependencycheck.utils.InvalidSettingException;
|
||||
import org.owasp.dependencycheck.utils.Settings;
|
||||
|
||||
/**
|
||||
* Scans files, directories, etc. for Dependencies. Analyzers are loaded and
|
||||
@@ -45,38 +45,49 @@ import org.codesecure.dependencycheck.utils.FileUtils;
|
||||
* Analyzer is associated with the file type then the file is turned into a
|
||||
* dependency.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
* @author Jeremy Long (jeremy.long@owasp.org)
|
||||
*/
|
||||
public class Engine {
|
||||
|
||||
/**
|
||||
* The list of dependencies.
|
||||
*/
|
||||
protected List<Dependency> dependencies = new ArrayList<Dependency>();
|
||||
private final List<Dependency> dependencies = new ArrayList<Dependency>();
|
||||
/**
|
||||
* A Map of analyzers grouped by Analysis phase.
|
||||
*/
|
||||
protected EnumMap<AnalysisPhase, List<Analyzer>> analyzers =
|
||||
private final EnumMap<AnalysisPhase, List<Analyzer>> analyzers =
|
||||
new EnumMap<AnalysisPhase, List<Analyzer>>(AnalysisPhase.class);
|
||||
/**
|
||||
* A set of extensions supported by the analyzers.
|
||||
*/
|
||||
protected Set<String> extensions = new HashSet<String>();
|
||||
private final Set<String> extensions = new HashSet<String>();
|
||||
|
||||
/**
|
||||
* Creates a new Engine.
|
||||
*/
|
||||
public Engine() {
|
||||
doUpdates();
|
||||
boolean autoUpdate = true;
|
||||
try {
|
||||
autoUpdate = Settings.getBoolean(Settings.KEYS.AUTO_UPDATE);
|
||||
} catch (InvalidSettingException ex) {
|
||||
Logger.getLogger(Engine.class.getName()).log(Level.WARNING, "Invalid setting for auto-update.");
|
||||
}
|
||||
if (autoUpdate) {
|
||||
doUpdates();
|
||||
}
|
||||
loadAnalyzers();
|
||||
}
|
||||
|
||||
/**
|
||||
* Creates a new Engine
|
||||
* Creates a new Engine.
|
||||
*
|
||||
* @param autoUpdate indicates whether or not data should be updated from
|
||||
* the Internet.
|
||||
* @deprecated this function should no longer be used; the autoupdate flag should be set using
|
||||
* <code>Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, value);</code>
|
||||
*/
|
||||
@Deprecated
|
||||
public Engine(boolean autoUpdate) {
|
||||
if (autoUpdate) {
|
||||
doUpdates();
|
||||
@@ -94,10 +105,10 @@ public class Engine {
|
||||
analyzers.put(phase, new ArrayList<Analyzer>());
|
||||
}
|
||||
|
||||
AnalyzerService service = AnalyzerService.getInstance();
|
||||
Iterator<Analyzer> iterator = service.getAnalyzers();
|
||||
final AnalyzerService service = AnalyzerService.getInstance();
|
||||
final Iterator<Analyzer> iterator = service.getAnalyzers();
|
||||
while (iterator.hasNext()) {
|
||||
Analyzer a = iterator.next();
|
||||
final Analyzer a = iterator.next();
|
||||
analyzers.get(a.getAnalysisPhase()).add(a);
|
||||
if (a.getSupportedExtensions() != null) {
|
||||
extensions.addAll(a.getSupportedExtensions());
|
||||
@@ -116,7 +127,7 @@ public class Engine {
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the dependencies identified
|
||||
* Get the dependencies identified.
|
||||
*
|
||||
* @return the dependencies identified
|
||||
*/
|
||||
@@ -132,7 +143,7 @@ public class Engine {
|
||||
* @param path the path to a file or directory to be analyzed.
|
||||
*/
|
||||
public void scan(String path) {
|
||||
File file = new File(path);
|
||||
final File file = new File(path);
|
||||
if (file.exists()) {
|
||||
if (file.isDirectory()) {
|
||||
scanDirectory(file);
|
||||
@@ -149,12 +160,14 @@ public class Engine {
|
||||
* @param dir the directory to scan.
|
||||
*/
|
||||
protected void scanDirectory(File dir) {
|
||||
File[] files = dir.listFiles();
|
||||
for (File f : files) {
|
||||
if (f.isDirectory()) {
|
||||
scanDirectory(f);
|
||||
} else {
|
||||
scanFile(f);
|
||||
final File[] files = dir.listFiles();
|
||||
if (files != null) {
|
||||
for (File f : files) {
|
||||
if (f.isDirectory()) {
|
||||
scanDirectory(f);
|
||||
} else {
|
||||
scanFile(f);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -167,18 +180,18 @@ public class Engine {
|
||||
*/
|
||||
protected void scanFile(File file) {
|
||||
if (!file.isFile()) {
|
||||
String msg = String.format("Path passed to scanFile(File) is not a file: %s.", file.toString());
|
||||
final String msg = String.format("Path passed to scanFile(File) is not a file: %s.", file.toString());
|
||||
Logger.getLogger(Engine.class.getName()).log(Level.WARNING, msg);
|
||||
}
|
||||
String fileName = file.getName();
|
||||
String extension = FileUtils.getFileExtension(fileName);
|
||||
final String fileName = file.getName();
|
||||
final String extension = FileUtils.getFileExtension(fileName);
|
||||
if (extension != null) {
|
||||
if (extensions.contains(extension)) {
|
||||
Dependency dependency = new Dependency(file);
|
||||
final Dependency dependency = new Dependency(file);
|
||||
dependencies.add(dependency);
|
||||
}
|
||||
} else {
|
||||
String msg = String.format("No file extension found on file '%s'. The file was not analyzed.",
|
||||
final String msg = String.format("No file extension found on file '%s'. The file was not analyzed.",
|
||||
file.toString());
|
||||
Logger.getLogger(Engine.class.getName()).log(Level.FINEST, msg);
|
||||
}
|
||||
@@ -188,74 +201,89 @@ public class Engine {
|
||||
* Runs the analyzers against all of the dependencies.
|
||||
*/
|
||||
public void analyzeDependencies() {
|
||||
//phase one initialize
|
||||
for (AnalysisPhase phase : AnalysisPhase.values()) {
|
||||
List<Analyzer> analyzerList = analyzers.get(phase);
|
||||
|
||||
final List<Analyzer> analyzerList = analyzers.get(phase);
|
||||
for (Analyzer a : analyzerList) {
|
||||
try {
|
||||
a.initialize();
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(Engine.class.getName()).log(Level.SEVERE, "Exception occured initializing " + a.getName() + ".", ex);
|
||||
Logger.getLogger(Engine.class.getName()).log(Level.SEVERE,
|
||||
"Exception occurred initializing " + a.getName() + ".", ex);
|
||||
try {
|
||||
a.close();
|
||||
} catch (Exception ex1) {
|
||||
Logger.getLogger(Engine.class.getName()).log(Level.FINER, null, ex1);
|
||||
}
|
||||
continue;
|
||||
}
|
||||
for (Dependency d : dependencies) {
|
||||
if (a.supportsExtension(d.getFileExtension())) {
|
||||
try {
|
||||
if (a instanceof ArchiveAnalyzer) {
|
||||
ArchiveAnalyzer aa = (ArchiveAnalyzer) a;
|
||||
aa.analyze(d, this);
|
||||
} else {
|
||||
a.analyze(d);
|
||||
}
|
||||
} catch (AnalysisException ex) {
|
||||
d.addAnalysisException(ex);
|
||||
} catch (IOException ex) {
|
||||
String msg = String.format("IOException occured while analyzing the file '%s'.",
|
||||
d.getActualFilePath());
|
||||
Logger.getLogger(Engine.class.getName()).log(Level.SEVERE, msg, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
try {
|
||||
a.close();
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(Engine.class.getName()).log(Level.SEVERE, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//Now cycle through all of the analyzers one last time to call
|
||||
// cleanup on any archiveanalyzers. These should only exist in the
|
||||
// initial phase, but we are going to be thourough just in case.
|
||||
// analysis phases
|
||||
for (AnalysisPhase phase : AnalysisPhase.values()) {
|
||||
List<Analyzer> analyzerList = analyzers.get(phase);
|
||||
final List<Analyzer> analyzerList = analyzers.get(phase);
|
||||
|
||||
for (Analyzer a : analyzerList) {
|
||||
if (a instanceof ArchiveAnalyzer) {
|
||||
ArchiveAnalyzer aa = (ArchiveAnalyzer) a;
|
||||
aa.cleanup();
|
||||
//need to create a copy of the collection because some of the
|
||||
// analyzers may modify it. This prevents ConcurrentModificationExceptions.
|
||||
final Set<Dependency> dependencySet = new HashSet<Dependency>();
|
||||
dependencySet.addAll(dependencies);
|
||||
for (Dependency d : dependencySet) {
|
||||
if (a.supportsExtension(d.getFileExtension())) {
|
||||
try {
|
||||
a.analyze(d, this);
|
||||
} catch (AnalysisException ex) {
|
||||
d.addAnalysisException(ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//close/cleanup
|
||||
for (AnalysisPhase phase : AnalysisPhase.values()) {
|
||||
final List<Analyzer> analyzerList = analyzers.get(phase);
|
||||
for (Analyzer a : analyzerList) {
|
||||
try {
|
||||
a.close();
|
||||
} catch (Exception ex) {
|
||||
Logger.getLogger(Engine.class.getName()).log(Level.WARNING, null, ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Cycles through the cached web data sources and calls update on all of them.
|
||||
*/
|
||||
private void doUpdates() {
|
||||
UpdateService service = UpdateService.getInstance();
|
||||
Iterator<CachedWebDataSource> iterator = service.getDataSources();
|
||||
final UpdateService service = UpdateService.getInstance();
|
||||
final Iterator<CachedWebDataSource> iterator = service.getDataSources();
|
||||
while (iterator.hasNext()) {
|
||||
CachedWebDataSource source = iterator.next();
|
||||
final CachedWebDataSource source = iterator.next();
|
||||
try {
|
||||
source.update();
|
||||
} catch (UpdateException ex) {
|
||||
Logger.getLogger(Engine.class.getName()).log(Level.SEVERE, "Unable to update " + source.getClass().getName(), ex);
|
||||
Logger.getLogger(Engine.class.getName()).log(Level.WARNING,
|
||||
"Unable to update Cached Web DataSource, using local data instead. Results may not include recent vulnerabilities.");
|
||||
Logger.getLogger(Engine.class.getName()).log(Level.INFO,
|
||||
String.format("Unable to update details for %s",
|
||||
source.getClass().getName()), ex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a full list of all of the analyzers. This is useful
|
||||
* for reporting which analyzers where used.
|
||||
* @return a list of Analyzers
|
||||
*/
|
||||
public List<Analyzer> getAnalyzers() {
|
||||
final List<Analyzer> ret = new ArrayList<Analyzer>();
|
||||
for (AnalysisPhase phase : AnalysisPhase.values()) {
|
||||
final List<Analyzer> analyzerList = analyzers.get(phase);
|
||||
ret.addAll(analyzerList);
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
@@ -1,29 +1,30 @@
|
||||
package org.codesecure.dependencycheck.analyzer;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
* This file is part of Dependency-Check.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* Dependency-Check is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* Dependency-Check is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
* Dependency-Check. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
package org.owasp.dependencycheck.analyzer;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
* @author Jeremy Long (jeremy.long@owasp.org)
|
||||
*/
|
||||
public abstract class AbstractAnalyzer implements Analyzer {
|
||||
|
||||
@@ -37,12 +38,24 @@ public abstract class AbstractAnalyzer implements Analyzer {
|
||||
* @return a Set of strings.
|
||||
*/
|
||||
protected static Set<String> newHashSet(String... strings) {
|
||||
Set<String> set = new HashSet<String>();
|
||||
final Set<String> set = new HashSet<String>();
|
||||
|
||||
//yes, in Java7 we could use Array.toList(...) - but I'm trying to keep this Java 6 compliant.
|
||||
for (String s : strings) {
|
||||
set.add(s);
|
||||
}
|
||||
Collections.addAll(set, strings);
|
||||
return set;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* The initialize method does nothing for this Analyzer.
|
||||
*/
|
||||
public void initialize() {
|
||||
//do nothing
|
||||
}
|
||||
|
||||
/**
|
||||
* The close method does nothing for this Analyzer.
|
||||
*/
|
||||
public void close() {
|
||||
//do nothing
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,33 @@
|
||||
package org.codesecure.dependencycheck.analyzer;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
* This file is part of Dependency-Check.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* Dependency-Check is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* Dependency-Check is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
* Dependency-Check. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
package org.owasp.dependencycheck.analyzer;
|
||||
|
||||
/**
|
||||
* An exception thrown when the analysis of a dependency fails.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
* @author Jeremy Long (jeremy.long@owasp.org)
|
||||
*/
|
||||
public class AnalysisException extends Exception {
|
||||
|
||||
/**
|
||||
* The serial version UID for serialization.
|
||||
*/
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
@@ -1,56 +1,64 @@
|
||||
package org.codesecure.dependencycheck.analyzer;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
* This file is part of Dependency-Check.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* Dependency-Check is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* Dependency-Check is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
* Dependency-Check. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
package org.owasp.dependencycheck.analyzer;
|
||||
|
||||
/**
|
||||
* An enumeration defining the phases of analysis.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
* @author Jeremy Long (jeremy.long@owasp.org)
|
||||
*/
|
||||
public enum AnalysisPhase {
|
||||
|
||||
/**
|
||||
* The first phase of analysis.
|
||||
* Initialization phase.
|
||||
*/
|
||||
INITIAL,
|
||||
/**
|
||||
* The second phase of analysis.
|
||||
* Information collection phase.
|
||||
*/
|
||||
INFORMATION_COLLECTION,
|
||||
/**
|
||||
* The third phase of analysis.
|
||||
* Pre identifier analysis phase.
|
||||
*/
|
||||
PRE_IDENTIFIER_ANALYSIS,
|
||||
/**
|
||||
* The fourth phase of analysis.
|
||||
* Identifier analysis phase.
|
||||
*/
|
||||
IDENTIFIER_ANALYSIS,
|
||||
/**
|
||||
* The fifth phase of analysis.
|
||||
* Post identifier analysis phase.
|
||||
*/
|
||||
POST_IDENTIFIER_ANALYSIS,
|
||||
/**
|
||||
* The sixth phase of analysis.
|
||||
* Pre finding analysis phase.
|
||||
*/
|
||||
PRE_FINDING_ANALYSIS,
|
||||
/**
|
||||
* Finding analysis phase.
|
||||
*/
|
||||
FINDING_ANALYSIS,
|
||||
/**
|
||||
* The seventh and final phase of analysis.
|
||||
* Post analysis phase.
|
||||
*/
|
||||
POST_FINDING_ANALYSIS,
|
||||
/**
|
||||
* The final analysis phase.
|
||||
*/
|
||||
FINAL
|
||||
}
|
||||
@@ -1,46 +1,49 @@
|
||||
package org.codesecure.dependencycheck.analyzer;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
* This file is part of Dependency-Check.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* Dependency-Check is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* Dependency-Check is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
* Dependency-Check. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
package org.owasp.dependencycheck.analyzer;
|
||||
|
||||
import java.util.Set;
|
||||
import org.codesecure.dependencycheck.dependency.Dependency;
|
||||
import org.owasp.dependencycheck.Engine;
|
||||
import org.owasp.dependencycheck.dependency.Dependency;
|
||||
|
||||
/**
|
||||
* An interface that defines an Analyzer that is used to identify Dependencies.
|
||||
* An analyzer will collect information about the dependency in the form of
|
||||
* Evidence.
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
* @author Jeremy Long (jeremy.long@owasp.org)
|
||||
*/
|
||||
public interface Analyzer {
|
||||
|
||||
/**
|
||||
* Analyzes the given dependency. The analysis could be anything from
|
||||
* identifying an Idenifier for the dependency, to finding vulnerabilities,
|
||||
* identifying an Identifier for the dependency, to finding vulnerabilities,
|
||||
* etc. Additionally, if the analyzer collects enough information to add a
|
||||
* description or license information for the dependency it should be added.
|
||||
*
|
||||
* @param dependency a dependency to analyze.
|
||||
* @param engine the engine that is scanning the dependencies - this is useful
|
||||
* if we need to check other dependencies
|
||||
* @throws AnalysisException is thrown if there is an error analyzing the
|
||||
* dependency file
|
||||
*/
|
||||
void analyze(Dependency dependency) throws AnalysisException;
|
||||
void analyze(Dependency dependency, Engine engine) throws AnalysisException;
|
||||
|
||||
/**
|
||||
* <p>Returns a list of supported file extensions. An example would be an
|
||||
@@ -68,7 +71,7 @@ public interface Analyzer {
|
||||
* Returns whether or not this analyzer can process the given extension.
|
||||
*
|
||||
* @param extension the file extension to test for support.
|
||||
* @return whether or not the specified file extension is supported by tihs
|
||||
* @return whether or not the specified file extension is supported by this
|
||||
* analyzer.
|
||||
*/
|
||||
boolean supportsExtension(String extension);
|
||||
@@ -1,37 +1,43 @@
|
||||
package org.codesecure.dependencycheck.analyzer;
|
||||
/*
|
||||
* This file is part of DependencyCheck.
|
||||
* This file is part of Dependency-Check.
|
||||
*
|
||||
* DependencyCheck is free software: you can redistribute it and/or modify it
|
||||
* Dependency-Check is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* DependencyCheck is distributed in the hope that it will be useful, but
|
||||
* Dependency-Check is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* DependencyCheck. If not, see http://www.gnu.org/licenses/.
|
||||
* Dependency-Check. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
package org.owasp.dependencycheck.analyzer;
|
||||
|
||||
import java.util.Iterator;
|
||||
import java.util.ServiceLoader;
|
||||
|
||||
/**
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@gmail.com)
|
||||
* @author Jeremy Long (jeremy.long@owasp.org)
|
||||
*/
|
||||
public class AnalyzerService {
|
||||
|
||||
private static AnalyzerService service;
|
||||
private ServiceLoader<Analyzer> loader;
|
||||
public final class AnalyzerService {
|
||||
|
||||
/**
|
||||
* Creates a new instance of AnalyzerService
|
||||
* The analyzer service singleton.
|
||||
*/
|
||||
private static AnalyzerService service;
|
||||
/**
|
||||
* The service loader for analyzers.
|
||||
*/
|
||||
private final ServiceLoader<Analyzer> loader;
|
||||
|
||||
/**
|
||||
* Creates a new instance of AnalyzerService.
|
||||
*/
|
||||
private AnalyzerService() {
|
||||
loader = ServiceLoader.load(Analyzer.class);
|
||||
@@ -0,0 +1,297 @@
|
||||
/*
|
||||
* This file is part of Dependency-Check.
|
||||
*
|
||||
* Dependency-Check is free software: you can redistribute it and/or modify it
|
||||
* under the terms of the GNU General Public License as published by the Free
|
||||
* Software Foundation, either version 3 of the License, or (at your option) any
|
||||
* later version.
|
||||
*
|
||||
* Dependency-Check is distributed in the hope that it will be useful, but
|
||||
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||||
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
|
||||
* details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License along with
|
||||
* Dependency-Check. If not, see http://www.gnu.org/licenses/.
|
||||
*
|
||||
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
|
||||
*/
|
||||
package org.owasp.dependencycheck.analyzer;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.ListIterator;
|
||||
import java.util.Set;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import org.owasp.dependencycheck.Engine;
|
||||
import org.owasp.dependencycheck.dependency.Dependency;
|
||||
import org.owasp.dependencycheck.utils.DependencyVersion;
|
||||
import org.owasp.dependencycheck.utils.DependencyVersionUtil;
|
||||
|
||||
/**
|
||||
* <p>This analyzer ensures dependencies that should be grouped together, to
|
||||
* remove excess noise from the report, are grouped. An example would be Spring,
|
||||
* Spring Beans, Spring MVC, etc. If they are all for the same version and have
|
||||
* the same relative path then these should be grouped into a single dependency
|
||||
* under the core/main library.</p>
|
||||
* <p>Note, this grouping only works on dependencies with identified CVE
|
||||
* entries</p>
|
||||
*
|
||||
* @author Jeremy Long (jeremy.long@owasp.org)
|
||||
*/
|
||||
public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Analyzer {
|
||||
|
||||
/**
|
||||
* The set of file extensions supported by this analyzer.
|
||||
*/
|
||||
private static final Set<String> EXTENSIONS = null;
|
||||
/**
|
||||
* The name of the analyzer.
|
||||
*/
|
||||
private static final String ANALYZER_NAME = "Dependency Bundling Analyzer";
|
||||
/**
|
||||
* The phase that this analyzer is intended to run in.
|
||||
*/
|
||||
private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.PRE_FINDING_ANALYSIS;
|
||||
/**
|
||||
* A pattern for obtaining the first part of a filename.
|
||||
*/
|
||||
private static final Pattern STARTING_TEXT_PATTERN = Pattern.compile("^[a-zA-Z]*");
|
||||
|
||||
/**
|
||||
* Returns a list of file EXTENSIONS supported by this analyzer.
|
||||
*
|
||||
* @return a list of file EXTENSIONS supported by this analyzer.
|
||||
*/
|
||||
public Set<String> getSupportedExtensions() {
|
||||
return EXTENSIONS;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the name of the analyzer.
|
||||
*
|
||||
* @return the name of the analyzer.
|
||||
*/
|
||||
public String getName() {
|
||||
return ANALYZER_NAME;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns whether or not this analyzer can process the given extension.
|
||||
*
|
||||
* @param extension the file extension to test for support
|
||||
* @return whether or not the specified file extension is supported by this
|
||||
* analyzer.
|
||||
*/
|
||||
public boolean supportsExtension(String extension) {
|
||||
return true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the phase that the analyzer is intended to run in.
|
||||
*
|
||||
* @return the phase that the analyzer is intended to run in.
|
||||
*/
|
||||
public AnalysisPhase getAnalysisPhase() {
|
||||
return ANALYSIS_PHASE;
|
||||
}
|
||||
/**
|
||||
* a flag indicating if this analyzer has run. This analyzer only runs once.
|
||||
*/
|
||||
private boolean analyzed = false;
|
||||
|
||||
/**
|
||||
* Analyzes a set of dependencies. If they have been found to have the same
|
||||
* base path and the same set of identifiers they are likely related. The
|
||||
* related dependencies are bundled into a single reportable item.
|
||||
*
|
||||
* @param ignore this analyzer ignores the dependency being analyzed
|
||||
* @param engine the engine that is scanning the dependencies
|
||||
* @throws AnalysisException is thrown if there is an error reading the JAR
|
||||
* file.
|
||||
*/
|
||||
public void analyze(Dependency ignore, Engine engine) throws AnalysisException {
|
||||
if (!analyzed) {
|
||||
analyzed = true;
|
||||
final Set<Dependency> dependenciesToRemove = new HashSet<Dependency>();
|
||||
final ListIterator<Dependency> mainIterator = engine.getDependencies().listIterator();
|
||||
//for (Dependency nextDependency : engine.getDependencies()) {
|
||||
while (mainIterator.hasNext()) {
|
||||
final Dependency dependency = mainIterator.next();
|
||||
if (mainIterator.hasNext()) {
|
||||
final ListIterator<Dependency> subIterator = engine.getDependencies().listIterator(mainIterator.nextIndex());
|
||||
while (subIterator.hasNext()) {
|
||||
final Dependency nextDependency = subIterator.next();
|
||||
|
||||
if (identifiersMatch(dependency, nextDependency)
|
||||
&& hasSameBasePath(dependency, nextDependency)
|
||||
&& fileNameMatch(dependency, nextDependency)) {
|
||||
|
||||
if (isCore(dependency, nextDependency)) {
|
||||
dependency.addRelatedDependency(nextDependency);
|
||||
//move any "related dependencies" to the new "parent" dependency
|
||||
final Iterator<Dependency> i = nextDependency.getRelatedDependencies().iterator();
|
||||
while (i.hasNext()) {
|
||||
dependency.addRelatedDependency(i.next());
|
||||
i.remove();
|
||||
}
|
||||
dependenciesToRemove.add(nextDependency);
|
||||
} else {
|
||||
if (isCore(nextDependency, dependency)) {
|
||||
nextDependency.addRelatedDependency(dependency);
|
||||
//move any "related dependencies" to the new "parent" dependency
|
||||
final Iterator<Dependency> i = dependency.getRelatedDependencies().iterator();
|
||||
while (i.hasNext()) {
|
||||
nextDependency.addRelatedDependency(i.next());
|
||||
i.remove();
|
||||
}
|
||||
dependenciesToRemove.add(dependency);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
//removing dependencies here as ensuring correctness and avoiding ConcurrentUpdateExceptions
|
||||
// was difficult because of the inner iterator.
|
||||
for (Dependency d : dependenciesToRemove) {
|
||||
engine.getDependencies().remove(d);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Attempts to trim a maven repo to a common base path. This is typically
|
||||
* [drive]\[repo_location]\repository\[path1]\[path2].
|
||||
*
|
||||
* @param path the path to trim
|
||||
* @return a string representing the base path.
|
||||
*/
|
||||
private String getBaseRepoPath(final String path) {
|
||||
int pos = path.indexOf("repository" + File.separator) + 11;
|
||||
if (pos < 0) {
|
||||
return path;
|
||||
}
|
||||
int tmp = path.indexOf(File.separator, pos);
|
||||
if (tmp <= 0) {
|
||||
return path;
|
||||
}
|
||||
if (tmp > 0) {
|
||||
pos = tmp + 1;
|
||||
}
|
||||
tmp = path.indexOf(File.separator, pos);
|
||||
if (tmp > 0) {
|
||||
pos = tmp + 1;
|
||||
}
|
||||
return path.substring(0, pos);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the file names (and version if it exists) of the two
|
||||
* dependencies are sufficiently similiar.
|
||||
* @param dependency1 a dependency2 to compare
|
||||
* @param dependency2 a dependency2 to compare
|
||||
* @return true if the identifiers in the two supplied dependencies are equal
|
||||
*/
|
||||
private boolean fileNameMatch(Dependency dependency1, Dependency dependency2) {
|
||||
if (dependency1 == null || dependency1.getFileName() == null
|
||||
|| dependency2 == null || dependency2.getFileName() == null) {
|
||||
return false;
|
||||
}
|
||||
final String fileName1 = dependency1.getFileName();
|
||||
final String fileName2 = dependency2.getFileName();
|
||||
//version check
|
||||
final DependencyVersion version1 = DependencyVersionUtil.parseVersionFromFileName(fileName1);
|
||||
final DependencyVersion version2 = DependencyVersionUtil.parseVersionFromFileName(fileName2);
|
||||
if (version1 != null && version2 != null) {
|
||||
if (!version1.equals(version2)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
//filename check
|
||||
final Matcher match1 = STARTING_TEXT_PATTERN.matcher(fileName1);
|
||||
final Matcher match2 = STARTING_TEXT_PATTERN.matcher(fileName2);
|
||||
if (match1.find() && match2.find()) {
|
||||
return match1.group().equals(match2.group());
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the identifiers in the two supplied dependencies are equal.
|
||||
* @param dependency1 a dependency2 to compare
|
||||
* @param dependency2 a dependency2 to compare
|
||||
* @return true if the identifiers in the two supplied dependencies are equal
|
||||
*/
|
||||
private boolean identifiersMatch(Dependency dependency1, Dependency dependency2) {
|
||||
if (dependency1 == null || dependency1.getIdentifiers() == null
|
||||
|| dependency2 == null || dependency2.getIdentifiers() == null) {
|
||||
return false;
|
||||
}
|
||||
return dependency1.getIdentifiers().size() > 0
|
||||
&& dependency2.getIdentifiers().equals(dependency1.getIdentifiers());
|
||||
}
|
||||
|
||||
/**
|
||||
* Determines if the two dependencies have the same base path.
|
||||
* @param dependency1 a Dependency object
|
||||
* @param dependency2 a Dependency object
|
||||
* @return true if the base paths of the dependencies are identical
|
||||
*/
|
||||
private boolean hasSameBasePath(Dependency dependency1, Dependency dependency2) {
|
||||
if (dependency1 == null || dependency2 == null) {
|
||||
return false;
|
||||
}
|
||||
final File lFile = new File(dependency1.getFilePath());
|
||||
String left = lFile.getParent();
|
||||
final File rFile = new File(dependency2.getFilePath());
|
||||
String right = rFile.getParent();
|
||||
if (left == null) {
|
||||
if (right == null) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
if (left.equalsIgnoreCase(right)) {
|
||||
return true;
|
||||
}
|
||||
if (left.matches(".*[/\\\\]repository[/\\\\].*") && right.matches(".*[/\\\\]repository[/\\\\].*")) {
|
||||
left = getBaseRepoPath(left);
|
||||
right = getBaseRepoPath(right);
|
||||
}
|
||||
return left.equalsIgnoreCase(right);
|
||||
}
|
||||
|
||||
/**
|
||||
* This is likely a very broken attempt at determining if the 'left'
|
||||
* dependency is the 'core' library in comparison to the 'right' library.
|
||||
*
|
||||
* TODO - consider splitting on /\._-\s/ and checking if all of one side is fully contained in the other
|
||||
* With the exception of the word "core". This might work even on groups when we don't have a CVE.
|
||||
*
|
||||
* @param left the dependency to test
|
||||
* @param right the dependency to test against
|
||||
* @return a boolean indicating whether or not the left dependency should be
|
||||
* considered the "core" version.
|
||||
*/
|
||||
private boolean isCore(Dependency left, Dependency right) {
|
||||
final String leftName = left.getFileName().toLowerCase();
|
||||
final String rightName = right.getFileName().toLowerCase();
|
||||
|
||||
if (rightName.contains("core") && !leftName.contains("core")) {
|
||||
return false;
|
||||
} else if (!rightName.contains("core") && leftName.contains("core")) {
|
||||
return true;
|
||||
} else {
|
||||
//TODO should we be splitting the name on [-_(.\d)+] and seeing if the
|
||||
// parts are contained in the other side?
|
||||
if (leftName.length() > rightName.length()) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user