Compare commits

..

491 Commits

Author SHA1 Message Date
Jeremy Long
1a042fab4b version 1.2.11
Former-commit-id: a7da992577504112a168f71e0dde9364d2a68ad0
2015-05-12 06:02:29 -04:00
Jeremy Long
c3f000c5ef version 1.2.11
Former-commit-id: cd3b5ef7fa3dce4e40933c9278b2a2a46fcf6f20
2015-05-12 06:02:29 -04:00
Jeremy Long
e848dd5bee version 1.2.11
Former-commit-id: 3b4665a8697668081e87f7082ed26931cd98b022
2015-05-12 06:02:28 -04:00
Jeremy Long
566e11f755 version 1.2.11
Former-commit-id: 2650031e6240ca78460d1f4eca9d533a51404bff
2015-05-12 06:02:28 -04:00
Jeremy Long
13aa00e465 version 1.2.11
Former-commit-id: 962ba27959c0648f7c271cbe3b10235c390f561e
2015-05-12 06:02:28 -04:00
Jeremy Long
e9df060e0c version 1.2.11
Former-commit-id: 25145940a45388db1a01e954246ebcc50cda41d9
2015-05-12 06:02:28 -04:00
Jeremy Long
c4724e8020 version 1.2.11
Former-commit-id: 90b6adbbf9a01bee641cdca7e2fda2cacd6266bc
2015-05-12 06:02:27 -04:00
Jeremy Long
9c36087dae updated sample report
Former-commit-id: 3147df8191930f55ffcb6810b0d5751fbb93b2fd
2015-05-12 05:23:45 -04:00
Jeremy Long
99dd04a1c1 findbugs correction
Former-commit-id: 79dc73b57f2d025754e0fc717610e9a067f1a155
2015-05-11 20:31:50 -04:00
Jeremy Long
29c47e3e96 findbugs correction
Former-commit-id: 55b3830b5d31908e452ea6c688b0213aa04a7f41
2015-05-11 20:31:36 -04:00
Jeremy Long
659248ff22 findbugs correction
Former-commit-id: 3c3c89dfa3bb71a23db3ff5e5f80ef098a8f5e9a
2015-05-11 20:31:25 -04:00
Jeremy Long
71a7e8d2dc findbugs correction
Former-commit-id: a58d1242d8a3ea307a83314f7b77e66f392d4ef3
2015-05-11 20:31:14 -04:00
Jeremy Long
caabdc6584 checkstyle corrections
Former-commit-id: 14e427f40af0fd7577d0711a80003e53811ef4e3
2015-05-10 08:30:52 -04:00
Jeremy Long
0b92d2ec17 checkstyle corrections
Former-commit-id: fe41cc533ce48a09ad80321018150d0a6b396eff
2015-05-10 08:30:43 -04:00
Jeremy Long
db8bcd8fd6 checkstyle corrections
Former-commit-id: 0d71fe52d044822ed051e7f9692a46bc76abe739
2015-05-10 08:30:33 -04:00
Jeremy Long
17cb96ef41 checkstyle corrections
Former-commit-id: d7f292f1a188081247290db6a372a2f53decced9
2015-05-10 08:19:04 -04:00
Jeremy Long
2248380c90 checkstyle corrections
Former-commit-id: 2326fa7a3cf7e2e478a4fd0edf773a449e8688a6
2015-05-10 08:19:03 -04:00
Jeremy Long
ffe64d2f8f checkstyle corrections
Former-commit-id: 2382f87c687a9c22e60dd399298ec2693c2f52ef
2015-05-10 08:19:03 -04:00
Jeremy Long
a0c624fca6 checkstyle corrections
Former-commit-id: effc24928a851553bdaf23bd0f589add9db6c7c6
2015-05-10 08:19:02 -04:00
Jeremy Long
31022ea8de checkstyle corrections
Former-commit-id: 0fd9070170429a79aa7efdd9c7c5d85e88e8a10f
2015-05-10 08:19:02 -04:00
Jeremy Long
0d0de4d5b3 checkstyle corrections
Former-commit-id: f830829cad039031b0e9a630c10ca95fd64a2e24
2015-05-10 08:19:02 -04:00
Jeremy Long
1fdb4c4627 checkstyle corrections
Former-commit-id: 982cd5df66cc4b41e73deddd7e1ae749a2cb955e
2015-05-10 08:19:01 -04:00
Jeremy Long
76665c54e2 checkstyle corrections
Former-commit-id: 61ed77caae7ee3f9ca10cafa511fa8cbcdd24fa2
2015-05-10 08:19:01 -04:00
Jeremy Long
04166766da checkstyle corrections
Former-commit-id: 7a96e04aeb874f27248375b47ad7d1f0aee6b8dc
2015-05-10 08:19:01 -04:00
Jeremy Long
aa7f903210 checkstyle corrections
Former-commit-id: 0067c70b027c153e56a7e48d7fe1066aadba9016
2015-05-10 08:19:01 -04:00
Jeremy Long
c4ca53cdf9 checkstyle corrections
Former-commit-id: 585bac09a04d92bd9f503ee93beb9260cf65e63c
2015-05-10 08:19:00 -04:00
Jeremy Long
d5885acd6e checkstyle corrections
Former-commit-id: 02db425ee86feb94346bfaf6e7cb8eb6b3b078b3
2015-05-10 08:19:00 -04:00
Jeremy Long
550b3332a3 checkstyle corrections
Former-commit-id: ca9d957a11e4f1b4184ac19b8938314a43b09d36
2015-05-10 08:19:00 -04:00
Jeremy Long
93b98576b8 checkstyle corrections
Former-commit-id: 4235986f29cd91b212024844edf4360d1204deba
2015-05-10 08:19:00 -04:00
Jeremy Long
e6f2c25167 checkstyle corrections
Former-commit-id: 7f488144815cb3065b6f5304a3d44e700319f4e9
2015-05-10 08:18:59 -04:00
Jeremy Long
0b207c6141 added test cases
Former-commit-id: 2f23cb9e248dfbbc7be40252172c560b48acef57
2015-05-10 07:16:48 -04:00
Jeremy Long
3ed5e85646 added code to strip -py2 from the identified version
Former-commit-id: 4e8f8f21a3ac21099b6ea4524f5299da95973943
2015-05-10 07:16:22 -04:00
Jeremy Long
4068da33c8 updated to resolve issue #218
Former-commit-id: b99559ce5f57014d6f94961cb321097793436678
2015-05-09 08:00:21 -04:00
Jeremy Long
d1d53ee65b updated to use HTTP or HTTPS as appropriate for the download URL
Former-commit-id: a285898cfb8ae9d2dd92549b8136c64cc551d1a4
2015-05-09 07:58:40 -04:00
Jeremy Long
38413c4f64 updated to determine if HTTP or HTTPS should be used when downloading the artifacts
Former-commit-id: b3281bfc2a57e4fd94298e06179ff5f268dfc51b
2015-05-09 07:54:56 -04:00
Jeremy Long
a6bb6cd170 fixed bug causing false positives on CPE entries with a vendor or product descriptor that is two or less characters as part of fix for #229
Former-commit-id: b4c9c8bcb2b5f542933747067b516b9247443d96
2015-05-09 05:28:31 -04:00
Jeremy Long
145bf70420 updated documentation per issue #230
Former-commit-id: 28c50979be4f2fbdbab36cc75d65c45d7729ff27
2015-05-08 19:03:15 -04:00
Jeremy Long
e2c92c57e6 updated documentation per issue #230
Former-commit-id: e3c4e4efb1720ed0fcfb8d530857ca445852c4da
2015-05-08 19:02:47 -04:00
Jeremy Long
bcc2173768 changed confidence of maven identifier per issue #229
Former-commit-id: f5d4ad0fa35e4b6bf1975dc3aa8dc3bb862011fe
2015-05-06 16:24:15 -04:00
Jeremy Long
aa1df53ab0 fixed copy/paste error when checking for oss parent group/artifact
Former-commit-id: 432420dd19272d47e3073c0c6513de69c75c4409
2015-05-06 06:46:03 -04:00
Jeremy Long
fb6a2a2c37 fixed typo
Former-commit-id: 5ddb2be656057820ae6a6b347d1738fe5096165d
2015-05-06 06:45:25 -04:00
Jeremy Long
f403fc732c added additional test dependencies
Former-commit-id: d0726c02f7fb3ea07d6558d9344c51b23532e379
2015-05-06 06:36:05 -04:00
Jeremy Long
03aa7c56a2 corrected markdown syntax
Former-commit-id: 00ae7bfdb5b956f8c848b97fe218aa40f02de7be
2015-05-05 19:38:52 -04:00
Jeremy Long
547d6d4bcc fixed formating issues
Former-commit-id: d602cf23c16ec7b1a7e77011ab7dd0e08579aa18
2015-05-05 19:38:28 -04:00
Jeremy Long
2cba8f906d fixed formating issues
Former-commit-id: cecd4d7cddac6bf4ce7e9c7012c613a24766ccc4
2015-05-05 19:38:05 -04:00
Jeremy Long
bb5ee6a347 added related works
Former-commit-id: ced0b755e4d6c0c19b0de1cc9d33f5a934ad8ec2
2015-05-05 19:35:03 -04:00
Jeremy Long
34604efde4 added content to resolve issue #220
Former-commit-id: e7d0a7739051f098f36a818fbdfec4eed920647c
2015-05-05 18:42:46 -04:00
Jeremy Long
c232a4fbad updated and linked documentation
Former-commit-id: 175e477cc1d6bf395a2b83a96a56174b8c7a67cb
2015-05-05 05:38:28 -04:00
Jeremy Long
0c5dfdbe24 added more documentation
Former-commit-id: 1f3ef3a136bf05da797236b898371b4f7edb56a4
2015-05-04 06:21:46 -04:00
Jeremy Long
c0f9a382b3 minor fix to sorting
Former-commit-id: de65b06be56d1d6ed3d6913819227b7f49f916d5
2015-05-03 07:54:15 -04:00
Jeremy Long
8ca32fcace patched issue #219
Former-commit-id: bc925ade007ee8736c65fd039f26a26812c0a5b4
2015-05-03 07:42:32 -04:00
Jeremy Long
0461a9fc89 moved string interpolation to Model
Former-commit-id: 111849899d090f7ca5433fd6c8688e1ba7b80cda
2015-05-03 07:22:37 -04:00
Jeremy Long
2b600290ae added tests for Model
Former-commit-id: c02ad169f661616b9ab51779bb0fad6642cf30b7
2015-05-03 07:21:41 -04:00
Jeremy Long
56fd3f2566 moved interpolate string test to ModelTest
Former-commit-id: 399a9f462da994e9687345bca2f510c2bd393921
2015-05-03 07:21:15 -04:00
Jeremy Long
142e06e752 Removed code duplication by using the JarAnalyzer's setPomEvidence
Former-commit-id: fea72403f300fe9d3ca095d94e7368a2426182c1
2015-05-03 07:20:44 -04:00
Jeremy Long
cbf2a047be moved string interpolation from JarAnalyzer to Model
Former-commit-id: dcc442ef1d938ccd8db82fc20f10b3c1aef0818b
2015-05-03 07:19:31 -04:00
Jeremy Long
1880e22d22 added equals, hashcode, and tostring
Former-commit-id: d29f3d164d55448bf8a38ef73f2071f44b67a865
2015-05-03 07:18:53 -04:00
Jeremy Long
963b1eae1c fixed unit test
Former-commit-id: d4560b518805dcdf20d17f92c7b214dad2fa9676
2015-05-02 20:53:35 -04:00
Jeremy Long
d173573e6c minor format/comment updates
Former-commit-id: 40f4da7591189b7f3b31a51120df75c709f18f04
2015-05-02 20:52:57 -04:00
Jeremy Long
b6c0426c1c refactored initialization of the analyzer
Former-commit-id: c9e32fbd039c87eafc25bf0bf62dad23c6a7279a
2015-05-02 07:31:05 -04:00
Jeremy Long
4f18e9ee7f auto-format changed indentations
Former-commit-id: 1ef56dd84a5167644c2767cefdee54d555175c55
2015-05-02 07:30:15 -04:00
Jeremy Long
e227b90370 add table sorting per issue #222
Former-commit-id: 74e47bf4c0d109e3e3e0372f5b13804025196fc1
2015-05-01 05:36:38 -04:00
Jeremy Long
360b112bd2 added Node Security Project
Former-commit-id: ddf86a1e16684666c3dc62c57ebeec68fe471dec
2015-04-29 16:12:56 -04:00
Jeremy Long
ff7027439d initial version of Python Analyzer documentation
Former-commit-id: acf1de698829521f47299b12e6f44b30675a3bec
2015-04-29 16:12:30 -04:00
Jeremy Long
a5ed91611a minor update to documentation
Former-commit-id: 8ded385a196c8c4e120b2f33646954310d8903bf
2015-04-29 16:12:03 -04:00
Jeremy Long
168b1c3684 minor update to documentation
Former-commit-id: b41917cd2cd2dbb1c3099f32bb3cb453ed6b9157
2015-04-29 16:11:25 -04:00
Jeremy Long
7e1141ff16 Merge pull request #217 from dwvisser/python-github-pr
Add Analyzers for Python Distribution Files and Packages

Former-commit-id: 972a63525744bbbd510b4ae2d92028dc3079787a
2015-04-26 08:14:03 -04:00
Jeremy Long
168d55c54c removed un-needed plugin
Former-commit-id: 406dd00f2803302e68f16d3f52503845c581a3f1
2015-04-23 06:18:27 -04:00
Jeremy Long
d5ed2bc765 updated site structure and data
Former-commit-id: 9745b59268f55930b3fdff9c24ad219715cb714a
2015-04-22 20:21:31 -04:00
Jeremy Long
940a4613ee updated list
Former-commit-id: 02501953376253591f9af5ee8372af51a6357b90
2015-04-22 20:20:57 -04:00
Dale Visser
4f6d96e16b Added class, mozilla, sendfile and yacc to suppression, since all are *not* Python-based.
Former-commit-id: d4467d0b1ca70134a61c7f039180ec6dc115de6b
2015-04-21 16:53:14 -04:00
Dale Visser
707d9925a8 Added file, gnupg, mongodb, openssl and sendmail to suppression, since all are *not* Python-based.
Former-commit-id: a3bb880e64a207d48e9efdbd8520aa37f9886c26
2015-04-21 16:08:44 -04:00
Dale Visser
657340c912 Suppression of site-packages with vendor = python_software_foundation.
Former-commit-id: 2473db879a0edfac46618cde9d474a9ebd1be2dc
2015-04-20 16:17:15 -04:00
Jeremy Long
3e220704a1 updated documentation
Former-commit-id: 8445473727eb9d6b0122fa640a107ebeef8f5001
2015-04-19 08:15:04 -04:00
Jeremy Long
4a2309a3f8 updated documentation
Former-commit-id: a41eadec0c691ce907b64a688a60325dd61f9ae7
2015-04-19 08:14:55 -04:00
Jeremy Long
09122be7be externalized sql statements as part of issue #216
Former-commit-id: ea18ad69c2e7b6cc9d276fc30333d2fd16926858
2015-04-16 06:08:33 -04:00
Jeremy Long
e26ec47ad7 externalized sql statements as part of issue #216
Former-commit-id: 3af237a7f227f741fd4a948de5281a978ce59fec
2015-04-15 06:26:36 -04:00
Dale Visser
05ae73eea2 Suppress all mappings to python:python CPEs coming from site-packages or dist-packages.
Added command-line options to disable Python scanning.


Former-commit-id: cf8f1188f77316e7974a02d4dabf156462b9e1d2
2015-04-14 10:39:22 -04:00
Dale Visser
511d2b9457 Added PythonPackageAnalyzer, for directly analyzing Python library, a.k.a.,
package, source code.


Former-commit-id: 3154ea4ecddd794cb3e7f3686972fd7a6cc2177c
2015-04-14 10:37:38 -04:00
Dale Visser
bf96c24ec3 Added capability to scan Python egg distribution format (.egg and .zip).
Changed copyright notices to IDA, and added as possible copyyright holder in
checkstyle-header file, and some whitespace fixes.


Former-commit-id: ac4288dff7c3c40e64dc733791c80035f73cc602
2015-04-14 10:36:28 -04:00
Dale Visser
e328ec990c Added capability to scan extracted egg and wheel metadata in the local Python
environment.


Former-commit-id: b0259d38134bf18b1eb72db9951dbe2d04ba8fb9
2015-04-14 10:32:04 -04:00
Dale Visser
a5dee0cb27 Added PythonDistributionAnalyzer, including unit tests with test data, with
capability to analyze the Python wheel distribution format. Using
javax.mail.internet.InternetHeaders to parse metadata files.


Former-commit-id: 478ab6be7b0f30f7991144039e33a6f69dd261ed
2015-04-14 10:30:36 -04:00
Jeremy Long
7fb5d5bde5 resolved issue #213
Former-commit-id: e50ac440ea63132f387c28fc2f8e0f3ff81d9896
2015-04-14 07:03:07 -04:00
Jeremy Long
5a329b4a6d version 1.2.11-SNAPSHOT
Former-commit-id: c0aa23ec9d12d6cb175aa43356f492dae78d7c3a
2015-04-14 07:02:41 -04:00
Jeremy Long
500f6c5b6f version 1.2.10
Former-commit-id: 0da4b8daeb214ee8b1ee3410cde0e4842f9c8003
2015-04-13 17:33:43 -04:00
Jeremy Long
29f76ba62a updated to resolve issue #210
Former-commit-id: cc5f3b351cee90af187712b328ab35d599ccbba6
2015-04-07 08:58:40 -04:00
Jeremy Long
70e0c84a20 updated pom parsing to resolve issue #210
Former-commit-id: e1092139cc27a01fba8ecfa37aa3904ee96154e6
2015-04-07 08:56:45 -04:00
Jeremy Long
3dd95180e0 initial test of pom utils
Former-commit-id: f9515f9647fbb134a97ae944189167a020858048
2015-04-07 08:55:43 -04:00
Jeremy Long
dcd8fc0320 added pojo class to hold data from pom.xml
Former-commit-id: cf66a8d5a6fe180b7253813af1ea7ff20695957f
2015-04-07 06:59:58 -04:00
Jeremy Long
bcd9fb0be9 updated to correctly use utility class PomUtils
Former-commit-id: 4c8cb205df42785aa71fa5f0621a52946000c200
2015-04-07 06:58:58 -04:00
Jeremy Long
a088d20612 replaced jaxb with sax parser
Former-commit-id: 68b01f1943cae8778cb9dd257f84f1c5321aadf4
2015-04-07 06:58:00 -04:00
Jeremy Long
29fb347bbb replaced jaxb with sax parser
Former-commit-id: a1c0325c9d68675931947a5beade6f0ee65814ba
2015-04-07 06:57:13 -04:00
Jeremy Long
b2a436b3bc replaced jaxb with sax parser
Former-commit-id: 3a68df99ece4b86e13b266650ad4ab496a864704
2015-04-07 06:57:09 -04:00
Jeremy Long
d288912df1 replaced jaxb with sax parser
Former-commit-id: e414ec7919c8709a9d099f7dbcbf349161206c22
2015-04-07 06:57:09 -04:00
Jeremy Long
7bde6baaac replaced jaxb with sax parser
Former-commit-id: a52e0ca02d5bb11aead699d62a38e50b1dd6670b
2015-04-07 06:57:08 -04:00
Jeremy Long
26ca6d9b77 replaced jaxb with sax parser
Former-commit-id: ad48ae623b717e9ffb4b1918ba039805931e9998
2015-04-07 06:57:08 -04:00
Jeremy Long
961626a136 removed jaxb
Former-commit-id: 0f7887da58f135eed0e669209e33409000d1807d
2015-04-07 06:57:07 -04:00
Jeremy Long
641a311537 removed jaxb
Former-commit-id: 2a307afe8d3381572133af1ae9d0cd489e3ae934
2015-04-07 06:57:07 -04:00
Jeremy Long
995ba02357 removed jaxb
Former-commit-id: 413724fb7e584e246764add0979e20e260b14343
2015-04-07 06:57:07 -04:00
Jeremy Long
fb3e6e4208 removed jaxb
Former-commit-id: 881feef75155fc031df63f187d01ad8e150075e8
2015-04-07 06:57:06 -04:00
Jeremy Long
e5363f7c8f removed jaxb
Former-commit-id: eb799f07859ef7476d71e1265a162fd32907c637
2015-04-07 06:57:06 -04:00
Jeremy Long
d1a128b897 removed jaxb
Former-commit-id: f477e060a011528b7a5c8bfd50382f6684b4e607
2015-04-07 06:57:06 -04:00
Jeremy Long
2b5fb4d75a removed jaxb
Former-commit-id: 551ef5c2b41551e08252a1e14574190a840b3055
2015-04-07 06:57:06 -04:00
Jeremy Long
6439ddde23 removed jaxb
Former-commit-id: 0a2fee66a643fd6d5ac6a1be279a59dc401a362a
2015-04-07 06:57:05 -04:00
Jeremy Long
f2994ed4ff removed jaxb
Former-commit-id: c6113b6436bc4789c68482358355f732d7f9f465
2015-04-07 06:57:05 -04:00
Jeremy Long
019bf67f93 removed jaxb
Former-commit-id: 4cf9a4a3d4f05efb2fa49f63339d144a3888e03d
2015-04-07 06:57:05 -04:00
Jeremy Long
78c1dcd0d0 removed jaxb
Former-commit-id: 76e89bd3b8b91b8a740427d56b5db36c1a990860
2015-04-07 06:57:04 -04:00
Jeremy Long
e07b30df85 removed jaxb
Former-commit-id: 5b4dd75c3b11a5b342a59ff33da7b55d4d18b8cd
2015-04-07 06:57:04 -04:00
Jeremy Long
96cd517c36 removed jaxb
Former-commit-id: 1e93d173b0fb6e9252c755ba792564237710c9be
2015-04-07 06:57:04 -04:00
Jeremy Long
2cb8e00c99 removed jaxb
Former-commit-id: 3e74c70e0423bd455f7043bbfd5725295d3a5600
2015-04-07 06:57:03 -04:00
Jeremy Long
92f093009e removed jaxb
Former-commit-id: aca14c70fed2421dc444eec2256e290154dc9ff6
2015-04-07 06:57:03 -04:00
Jeremy Long
27256a1854 removed jaxb
Former-commit-id: e5eaaa4d41b7d4c105979151b39e4627c268229a
2015-04-07 06:57:03 -04:00
Jeremy Long
ba782ca56f removed jaxb
Former-commit-id: e9ba1c00a0d2cc00584d1a16a1b2e383d5b5bcb7
2015-04-07 06:57:02 -04:00
Jeremy Long
3f3e33a366 removed jaxb
Former-commit-id: beb3d86fc7a6cf9668c89985e9799d63551b95f9
2015-04-07 06:57:02 -04:00
Jeremy Long
343fd75477 removed jaxb
Former-commit-id: 9f33ebbd388afe6e022f909a20ca463ca6958f5a
2015-04-07 06:57:02 -04:00
Jeremy Long
7bcfb6ff49 removed jaxb
Former-commit-id: ab8aceb365aa303ff4dc99b4eedc89bfd7dce3fd
2015-04-07 06:57:01 -04:00
Jeremy Long
78ec08792f removed jaxb
Former-commit-id: 4c0685feb62da31bc0deb6f5c310df6eb20e21df
2015-04-07 06:57:01 -04:00
Jeremy Long
461b41f300 removed jaxb
Former-commit-id: a854bb2d722766fcc336563c12b0fea6a7d8d031
2015-04-07 06:57:00 -04:00
Jeremy Long
5b246424fb removed jaxb
Former-commit-id: 417c552c2311709c35c82999f773fab484b6bd80
2015-04-07 06:57:00 -04:00
Jeremy Long
6af4b4cd5e removed jaxb
Former-commit-id: 621b2070136bad0374dd37ec12e788a789498d87
2015-04-07 06:57:00 -04:00
Jeremy Long
6d348eb5a7 removed jaxb
Former-commit-id: 4f0eeb2569e46b55821492771776f5573bb0def8
2015-04-07 06:57:00 -04:00
Jeremy Long
b26f6b697a removed jaxb
Former-commit-id: 376893da54ccb8e3d27aeb03734b6814dc846500
2015-04-07 06:56:59 -04:00
Jeremy Long
554510bb78 removed jaxb
Former-commit-id: 2e945592f021a0c3508cf153ad84bcb2c0102de7
2015-04-07 06:56:59 -04:00
Jeremy Long
3f2e5b7c69 removed jaxb
Former-commit-id: 975161363155f5b297a18bce8765e2479c3a6177
2015-04-07 06:56:59 -04:00
Jeremy Long
3c4989f5ca removed jaxb
Former-commit-id: 9b590ecce2ad7a2c960aaf5c6d3b9825c2059045
2015-04-07 06:56:58 -04:00
Jeremy Long
d33c649be6 removed jaxb
Former-commit-id: 0db8ef041849af552d6b066045bbf6ff2d96f686
2015-04-07 06:56:58 -04:00
Jeremy Long
c55954e5e8 removed jaxb
Former-commit-id: e6c17d8f70b15886dc32b635e0b7cd2e5fdb427a
2015-04-07 06:56:58 -04:00
Jeremy Long
678311e65b removed jaxb
Former-commit-id: c4ab6153cbaedd5b06b6c725145f53266b8e99c2
2015-04-07 06:56:57 -04:00
Jeremy Long
ab1d3075e8 removed jaxb
Former-commit-id: 88ba3f6e18e6276fb60e7d3c9eb7ee8891cade8e
2015-04-07 06:56:57 -04:00
Jeremy Long
0a6f8b7ac1 removed jaxb
Former-commit-id: 1452d82d2388610b3becb43d6fd50f9e7b4231f4
2015-04-07 06:56:57 -04:00
Jeremy Long
422a1f78fc removed jaxb
Former-commit-id: 41fa4ae4098fcde985a888141fc6f3229c3ca680
2015-04-07 06:56:56 -04:00
Jeremy Long
f21af8bd1e removed jaxb
Former-commit-id: d33ce17573b849f6b7426d813b1a6e882122c399
2015-04-07 06:56:56 -04:00
Jeremy Long
924278e387 removed jaxb
Former-commit-id: 20d7bfb8bd4c9a097da746de0d087add935f51ff
2015-04-07 06:56:56 -04:00
Jeremy Long
c6ea4466fb removed jaxb
Former-commit-id: 104c5d60aecfd53603e8e59edc58335949334319
2015-04-07 06:56:55 -04:00
Jeremy Long
318cc7a8fb removed jaxb
Former-commit-id: f4bc144353738f9742b6e746005907577aa5def9
2015-04-07 06:56:55 -04:00
Jeremy Long
9554a30286 added test dependency
Former-commit-id: 424bb6900a580fd5fa1e58979e28329273a17199
2015-04-06 19:59:56 -04:00
Jeremy Long
5336da52d9 added Hugo Costa as a contributor
Former-commit-id: c7b9bf343a5087d1e6b384a6e38e38ba6900e900
2015-04-06 19:59:31 -04:00
Jeremy Long
bd0c2e4ee4 added test dependency to test issue #210
Former-commit-id: cdb4911037e3e74cb3e56f488c3c496595f08187
2015-04-05 16:41:56 -04:00
Jeremy Long
64aad66adc changed config on javadoc so it does not fail with jdk8
Former-commit-id: 6300a8fd8bf2c6314f5a963fb10fd85cf3e59ac8
2015-04-05 12:54:36 -04:00
Jeremy Long
587bf131db updated sample report
Former-commit-id: b04eedcc48cd6461585742dd2e2b9b9661d6875b
2015-04-05 11:03:40 -04:00
Jeremy Long
fc96c727ec added logo
Former-commit-id: 28f42f846833db2ae8fe5f5d7504678067db836c
2015-04-05 10:46:27 -04:00
Jeremy Long
d17bd5bd9e added logo
Former-commit-id: 9a831f9ba0d3af212e681dd8ac6a3cecdf2cf851
2015-04-05 10:45:19 -04:00
Jeremy Long
b22a935a6c updated package info
Former-commit-id: 4050b01bfc1c92862fc71f23239c1d5202a5126e
2015-04-05 10:44:24 -04:00
Jeremy Long
a7c1d594dc updated package-info
Former-commit-id: 5d02d7dacbc0e20efffdaecc5a1630d102114fa5
2015-04-05 09:31:34 -04:00
Jeremy Long
dd20a9c7cc updated package-info
Former-commit-id: cd69861ebd1c3ef2e8a679b87d08acd43b49e7bd
2015-04-05 09:31:34 -04:00
Jeremy Long
e0994e0e54 updated package-info
Former-commit-id: 385c57cab581f700ec110dc02245c4b37976148d
2015-04-05 09:31:34 -04:00
Jeremy Long
0f8ce09646 updated package-info
Former-commit-id: d93c76a844ab6c9177856ab74b27f8d7e9d547b1
2015-04-05 09:31:33 -04:00
Jeremy Long
871e27d19f updated package-info
Former-commit-id: 3375a31fca8abb2d7553e0dfb39c96cc2bb8a44b
2015-04-05 09:31:33 -04:00
Jeremy Long
c429df3280 updated package-info
Former-commit-id: 864920215f4b1620550c5bba2822d596f885d0be
2015-04-05 09:31:33 -04:00
Jeremy Long
13f355c385 updated package-info
Former-commit-id: ee67619c2480dc0de800055da7d00c5312146ee6
2015-04-05 09:31:32 -04:00
Jeremy Long
d33ddefb2d updated package-info
Former-commit-id: abee416d7c2690d66f255d69efc34855a82064db
2015-04-05 09:31:32 -04:00
Jeremy Long
75b3f4b3c8 updated package-info
Former-commit-id: 191f7b8866bdc2e5c9ea9b5aac2c4ab1a23a5881
2015-04-05 09:31:32 -04:00
Jeremy Long
03ce1d2ea8 updated package-info
Former-commit-id: a38dc7f72dda348947817f35ecaa0eadc39ac99c
2015-04-05 09:31:31 -04:00
Jeremy Long
08eae2b09c updated package-info
Former-commit-id: 206b5f173ad7f2f87dc5a5ff8232a4099f07ef29
2015-04-05 09:31:31 -04:00
Jeremy Long
c94f9e2d2b updated package-info
Former-commit-id: 44e0d6bf55997292b7570d0cb8ae61c41ee5c001
2015-04-05 09:31:31 -04:00
Jeremy Long
520370688c updated package-info
Former-commit-id: c577b32102ac872b713df1c88b2af3424f00565c
2015-04-05 09:31:31 -04:00
Jeremy Long
725949db2f updated package-info
Former-commit-id: 2af313130c4d4a180896eb465685413385ddbdf2
2015-04-05 09:31:30 -04:00
Jeremy Long
5d647155b6 updated package-info
Former-commit-id: 9ca5a2b3bd7e86495d73c97bde84e731c22e1e61
2015-04-05 09:31:30 -04:00
Jeremy Long
c152bd0517 updated package-info
Former-commit-id: cda9f52d0d8f46523bc65f0b84ba9bc62e16b065
2015-04-05 09:31:30 -04:00
Jeremy Long
f35146d93d updated package-info
Former-commit-id: 85603781da2c18a1275e13385080abcf662a331b
2015-04-05 09:31:29 -04:00
Jeremy Long
e8e58555d0 updated package-info
Former-commit-id: 7e59b9f0cd75ce84b6d230856458d0a44b167d0d
2015-04-05 09:31:29 -04:00
Jeremy Long
7190dcc04e updated package-info
Former-commit-id: c459f7479fc476f19ee1ba52dc162a9ead751fc8
2015-04-05 09:31:29 -04:00
Jeremy Long
b623e3b3c8 updated package-info
Former-commit-id: 5f1e580af20320d75e7af5a00d9f6eababfe15a2
2015-04-05 09:31:28 -04:00
Jeremy Long
d78e82bd56 updated package-info
Former-commit-id: 232d2259875911ee517ed71dd741801f285a7ad4
2015-04-05 09:31:28 -04:00
Jeremy Long
ff478253e3 updated package-info
Former-commit-id: fe210fb0ea9a25612dc869e6086f4d63c29e282b
2015-04-05 09:31:28 -04:00
Jeremy Long
85c3368cda updated package-info
Former-commit-id: e4991a34fc6959d2d7352722a8fdc8d9d9249857
2015-04-05 09:31:28 -04:00
Jeremy Long
a4095cec8d updated package-info
Former-commit-id: be1142cf59d4755dc703d400d449574ca7775087
2015-04-05 09:31:27 -04:00
Jeremy Long
c840ce249f updated javadoc author
Former-commit-id: df65c5c6389d9fc4c884c4ecab728ab825d3ccea
2015-04-05 09:22:17 -04:00
Jeremy Long
b70812fc3d updated javadoc author
Former-commit-id: adfd776cd02132c2da6b3d3b77b13db0f8675551
2015-04-05 09:22:16 -04:00
Jeremy Long
3ccf06321d updated javadoc author
Former-commit-id: 0c72c9263cc012d64ff46969fa7f77a8b730cf4a
2015-04-05 09:22:16 -04:00
Jeremy Long
1d5dd5ea11 updated javadoc author
Former-commit-id: d72d2947df15f40a6febf9df7d2b6d4da1575c4c
2015-04-05 09:22:16 -04:00
Jeremy Long
0cadd88769 updated javadoc author
Former-commit-id: a0dc3aea76c887631da951f9467af28f1c8d4d89
2015-04-05 09:22:15 -04:00
Jeremy Long
75499a3321 updated javadoc author
Former-commit-id: 958d2b0792543e10fd902b6f24177820c1a45de1
2015-04-05 09:22:15 -04:00
Jeremy Long
5096027523 updated javadoc author
Former-commit-id: 8344848ff8c6c3255cf1be2f9699366d4b94cfe0
2015-04-05 09:22:15 -04:00
Jeremy Long
5c8c07794d updated javadoc author
Former-commit-id: 4b602ba266e8e539cb5f0341f4a3207c05c13850
2015-04-05 09:22:14 -04:00
Jeremy Long
18a72bbb59 updated javadoc author
Former-commit-id: 789d787c659b501f3ee4c82242c4c8e9eead9b49
2015-04-05 09:22:14 -04:00
Jeremy Long
7b3c4475da updated javadoc author
Former-commit-id: d705f8956b50fc3afd0526880b42d9c9309349e3
2015-04-05 09:22:14 -04:00
Jeremy Long
419c446f01 updated javadoc author
Former-commit-id: f1de29baff37ed811a85ef8cda22bc2d4eabb0c7
2015-04-05 09:22:14 -04:00
Jeremy Long
735c16cc11 updated javadoc author
Former-commit-id: ce3dc0b7869c50bcf8b3bd8f59adb62a369b1bf4
2015-04-05 09:22:13 -04:00
Jeremy Long
ed41abcf9d updated javadoc author
Former-commit-id: 7b01912bb9e86f7545c6309637cecc1104fedef8
2015-04-05 09:22:13 -04:00
Jeremy Long
b750a8c802 updated javadoc author
Former-commit-id: 20ad9f99f500c5488744accbdc5280d32cb7cb1e
2015-04-05 09:22:13 -04:00
Jeremy Long
1ee75dd8cb updated javadoc author
Former-commit-id: e2bcedcb3763492a4a21054cdfb7a23214c5dd96
2015-04-05 09:22:12 -04:00
Jeremy Long
396efad518 updated javadoc author
Former-commit-id: 5b12bb57ebafec5490482df506364df38b4d2820
2015-04-05 09:22:12 -04:00
Jeremy Long
8f33be262a updated javadoc author
Former-commit-id: 9b172db31e69c1e0ecfa47c8b3c3056f0f660917
2015-04-05 09:22:12 -04:00
Jeremy Long
9daa111f9c updated javadoc author
Former-commit-id: bb9eaba78f1575d83249b36300ea62132430b548
2015-04-05 09:22:11 -04:00
Jeremy Long
889bf22840 updated javadoc author
Former-commit-id: e036917954ab04da8901c4147884c33c47784802
2015-04-05 09:22:11 -04:00
Jeremy Long
f46e96c7de updated javadoc author
Former-commit-id: 1944424e30f21c49bceb1e9ac7f334c1e51cc442
2015-04-05 09:22:11 -04:00
Jeremy Long
9be6dc2935 updated javadoc author
Former-commit-id: 71af3fb7cfbb1c805b99ddc74cab774913ebb4b5
2015-04-05 09:22:10 -04:00
Jeremy Long
6188f6d74a updated javadoc author
Former-commit-id: 44997fec64aff42545e9e0a5c5ec4ebbd9cdb2ca
2015-04-05 09:22:10 -04:00
Jeremy Long
8837fab9fa updated javadoc author
Former-commit-id: 2234a090e2446137023f9df091b8a85d9a745487
2015-04-05 09:22:09 -04:00
Jeremy Long
316339011b updated javadoc author
Former-commit-id: d7e75e84d406203c6d2ca820a759972d403bd8e9
2015-04-05 09:22:09 -04:00
Jeremy Long
fe7121e057 updated javadoc author
Former-commit-id: 9e608bda0c4159337d6de0a727ec014404c027ee
2015-04-05 09:22:09 -04:00
Jeremy Long
bc09bfd3ba updated javadoc author
Former-commit-id: a83c5adc7e113a30fc5c18a0f7b71c7efaec0455
2015-04-05 09:22:08 -04:00
Jeremy Long
26f19cead1 updated javadoc author
Former-commit-id: 424fb69a163625765e263573307da1aca2f53471
2015-04-05 09:22:08 -04:00
Jeremy Long
777b35f412 updated javadoc author
Former-commit-id: 593115789ba670e60ce966a52c5d6b04393530e3
2015-04-05 09:22:08 -04:00
Jeremy Long
9e94ffb422 updated javadoc author
Former-commit-id: 66012a54190236c40c679a43749a1525fb981980
2015-04-05 09:22:07 -04:00
Jeremy Long
b6a38bf4d1 updated javadoc author
Former-commit-id: 29b815170175af50e9e88fbb35f7e690f7c0dd02
2015-04-05 09:22:07 -04:00
Jeremy Long
92d12ec68e updated javadoc author
Former-commit-id: 47f25243b5b1bb13bae43f6e3949c03c9c270fef
2015-04-05 09:22:07 -04:00
Jeremy Long
93dd5e4b31 updated javadoc author
Former-commit-id: af11a440ee1c2938cad612d8d367d0b9a6068d17
2015-04-05 09:22:07 -04:00
Jeremy Long
79e325e2ab updated javadoc author
Former-commit-id: a9b00911d1d2e58ad26a1843f08100676047bf24
2015-04-05 09:22:06 -04:00
Jeremy Long
0e095018a4 updated javadoc author
Former-commit-id: f48ca4839aabc0a524fc650b55813e4a94ed2e84
2015-04-05 09:22:06 -04:00
Jeremy Long
7040071ab9 updated javadoc author
Former-commit-id: facf33488cda4af6cf5bad4e7cb74fb36768734a
2015-04-05 09:22:05 -04:00
Jeremy Long
e157350d03 updated javadoc author
Former-commit-id: 86395763274c8880e77bab58504fbef84ebc835f
2015-04-05 09:22:05 -04:00
Jeremy Long
28f6ef5eec updated javadoc author
Former-commit-id: eef141b45e5214cf443d82b11cbbc72edbc9b1e6
2015-04-05 09:22:05 -04:00
Jeremy Long
15bcee3d10 updated javadoc author
Former-commit-id: 2e2d5260afc76c52de66d14cf79db0a9e5254dfb
2015-04-05 09:22:04 -04:00
Jeremy Long
67dbf70f5b updated javadoc author
Former-commit-id: 37a7181707149b1670e10b692cab1c105d3f7b7f
2015-04-05 09:22:04 -04:00
Jeremy Long
c75b99837f updated javadoc author
Former-commit-id: 627b185b0dcc2329c3584db140eb48b7d19ddbf2
2015-04-05 09:22:03 -04:00
Jeremy Long
cbc951be62 updated javadoc author
Former-commit-id: 0f27e547cd080b87e10049385e15a190c83bf1d3
2015-04-05 09:22:03 -04:00
Jeremy Long
f5b38852a7 updated javadoc author
Former-commit-id: e4ba8b60bbabf5357671d262f7e51d375f035713
2015-04-05 09:22:03 -04:00
Jeremy Long
45b5fd3762 updated javadoc author
Former-commit-id: 03bc2f6657bcee87080f63a39b482fac029c691c
2015-04-05 09:22:02 -04:00
Jeremy Long
04c14f3a27 updated javadoc author
Former-commit-id: bece55f77feb1cbd3a44f34e925ef05df207d284
2015-04-05 09:22:02 -04:00
Jeremy Long
a55d89cc93 updated javadoc author
Former-commit-id: ba2f0672fe8bc4c3a5e33c9ec63d4a832315a07d
2015-04-05 09:22:02 -04:00
Jeremy Long
888801ab0c updated javadoc author
Former-commit-id: d1a8192239e3ec78caf9d25e9cb1ce8aaca6ae9c
2015-04-05 09:22:01 -04:00
Jeremy Long
731528ef6e updated javadoc author
Former-commit-id: 3e8a18f4a43c8a19a1c0367a55b41c8512209bdf
2015-04-05 09:22:01 -04:00
Jeremy Long
d7fbd0df47 updated javadoc author
Former-commit-id: 1ced9da6fc9dc722e1a31de5c3395bd6b285d532
2015-04-05 09:22:01 -04:00
Jeremy Long
6f95e6d499 updated javadoc author
Former-commit-id: b46f4707e56e95e7359e3033a926a00a39c20f38
2015-04-05 09:22:00 -04:00
Jeremy Long
79e6a13b29 updated javadoc author
Former-commit-id: b12db8dfae7a5b34ae136957ff24f773df763682
2015-04-05 09:22:00 -04:00
Jeremy Long
b9a53775b6 updated javadoc author
Former-commit-id: 7cd4642264106e5772b942f97bb44e4dc938ad7d
2015-04-05 09:22:00 -04:00
Jeremy Long
1b15603227 updated javadoc author
Former-commit-id: 5614c10fe48b95e019d1c2ab77e3e1ba9bdacfb0
2015-04-05 09:21:59 -04:00
Jeremy Long
a7ffeb7016 updated javadoc author
Former-commit-id: e63cbab39d36b0136a819861d761f8cddc2f45c8
2015-04-05 09:21:59 -04:00
Jeremy Long
13b1c0fe0c updated javadoc author
Former-commit-id: 65462fd6b12c13b63108eb191801f2a0dc1df222
2015-04-05 09:21:58 -04:00
Jeremy Long
1d259c510f updated javadoc author
Former-commit-id: b939fe30eee6c1422c7c4efcf5c2385402d5c9b1
2015-04-05 09:21:58 -04:00
Jeremy Long
56783bbf4d updated javadoc author
Former-commit-id: c2fcf6e846e73e7d0bb1b6e205e755c0dee053e1
2015-04-05 09:21:58 -04:00
Jeremy Long
e63c296b16 updated javadoc author
Former-commit-id: 57b85879b008a9915e780791a97bee3a7ee4c87b
2015-04-05 09:21:58 -04:00
Jeremy Long
57450a65cf updated javadoc author
Former-commit-id: c23bc2250251ad0872676843a42fad0ed6c6b04a
2015-04-05 09:21:57 -04:00
Jeremy Long
716b52ef90 updated javadoc author
Former-commit-id: 2392c4a656c8919ef5ac00c3f3ba49681e758874
2015-04-05 09:21:57 -04:00
Jeremy Long
6ab8552f44 updated javadoc author
Former-commit-id: 5bebd493ea9a6e1d88f611d73be5c5889d4c2353
2015-04-05 09:21:56 -04:00
Jeremy Long
9880483690 updated javadoc author
Former-commit-id: 65596d2877aa7ffd991227f5853a2582ae28da5e
2015-04-05 09:21:56 -04:00
Jeremy Long
7b9b459b74 updated javadoc author
Former-commit-id: e2cb159cab7da584f8449a202126a97fcfbf8118
2015-04-05 09:21:56 -04:00
Jeremy Long
0723606120 updated javadoc author
Former-commit-id: bc82c40243b3ba06eb699cb0e51da88633edd8fa
2015-04-05 09:21:55 -04:00
Jeremy Long
4261e9eb29 updated javadoc author
Former-commit-id: 21f0c81d58d78ad4fb2614f2229c5c4c7136802c
2015-04-05 09:21:55 -04:00
Jeremy Long
a322556c66 updated javadoc author
Former-commit-id: 1f78887b2fefcfaf5b995f0e3c0f177507fc8af3
2015-04-05 09:21:55 -04:00
Jeremy Long
b6d3efa042 updated javadoc author
Former-commit-id: 9b059f0264a83076651ff7f2c7c777b250a32f03
2015-04-05 09:21:54 -04:00
Jeremy Long
4019a0615c updated javadoc author
Former-commit-id: 04d2b404e05a3d256f5264919434f9e42c3115fb
2015-04-05 09:21:54 -04:00
Jeremy Long
376e486c47 updated javadoc author
Former-commit-id: faae701f01ee6387b1398ac685a80ad08b331a46
2015-04-05 09:21:54 -04:00
Jeremy Long
5b7c47682b updated javadoc author
Former-commit-id: e4b0e6584872a99d9185093e4ebfb027d8e4b7ed
2015-04-05 09:21:53 -04:00
Jeremy Long
741a803ea7 updated javadoc author
Former-commit-id: 5162f0cb6c5b49148f57248c69fe8503564c668d
2015-04-05 09:21:53 -04:00
Jeremy Long
8a886f5434 updated javadoc author
Former-commit-id: ebeeadb36fbe79a541a66d5b823a07c18645b6d1
2015-04-05 09:21:52 -04:00
Jeremy Long
01514af188 updated javadoc author
Former-commit-id: f818712696e4bee22e34213314e46121829d448a
2015-04-05 09:21:52 -04:00
Jeremy Long
c5d5dccc57 updated javadoc author
Former-commit-id: 99ea41063450a2aa935647c485200197b1d30c10
2015-04-05 09:21:52 -04:00
Jeremy Long
5e58304448 updated javadoc author
Former-commit-id: a2422be3b9eb08ee7a8de380f5d062c7d93e2563
2015-04-05 09:21:51 -04:00
Jeremy Long
dd9c4bfa42 updated javadoc author
Former-commit-id: c4cabe37f0152f01ebb207d1ecf0d7121ce120a5
2015-04-05 09:21:51 -04:00
Jeremy Long
e6a559f0d1 updated javadoc author
Former-commit-id: ef4555f15cb4f4ef82ed618ca65abfe5bc9a61a9
2015-04-05 09:21:51 -04:00
Jeremy Long
f1c860f68c updated javadoc author
Former-commit-id: feb156e25fe847555b1d0b2bee20c8ac5d44572f
2015-04-05 09:21:50 -04:00
Jeremy Long
cd175816e2 updated javadoc author
Former-commit-id: 3ce50ed038fea725567ac467b3e25d06a6af2f0a
2015-04-05 09:21:50 -04:00
Jeremy Long
1d74d2e241 updated javadoc author
Former-commit-id: ebc89915ab35e8ccc329a2d9e6229ac8d47ec7f5
2015-04-05 09:21:50 -04:00
Jeremy Long
c4479a36a9 updated javadoc author
Former-commit-id: 1339c60872f7cc1e7c573a7ca3d6a68d4e00706f
2015-04-05 09:21:49 -04:00
Jeremy Long
cc2c18243e updated javadoc author
Former-commit-id: 92c8dc2bcbb8da1a41084acfa392326e32939e29
2015-04-05 09:21:49 -04:00
Jeremy Long
211d34fcef updated javadoc author
Former-commit-id: 469d1881d6d50e441204abd24c95ecda0040ea31
2015-04-05 09:21:48 -04:00
Jeremy Long
dc60c24d89 updated javadoc author
Former-commit-id: 6c7daa183556f05cdb8c89bba90e71f9737fb2ae
2015-04-05 09:21:48 -04:00
Jeremy Long
922e6437cf updated javadoc author
Former-commit-id: fe5c364466522eacbbf2cc52e32ccd6c5b1e4ba5
2015-04-05 09:21:47 -04:00
Jeremy Long
1058157827 updated javadoc author
Former-commit-id: 8cd3670afd8b5be3aea7b80040836ef54bda0725
2015-04-05 09:21:47 -04:00
Jeremy Long
33b38e686a updated javadoc author
Former-commit-id: bc280f51596877c6a59fa0b15a60b494a7081ebe
2015-04-05 09:21:47 -04:00
Jeremy Long
a6014f30dd updated javadoc author
Former-commit-id: e6db05a05dddce2cc87110f0a926280a2fbcc411
2015-04-05 09:21:46 -04:00
Jeremy Long
3fc75df55d updated javadoc author
Former-commit-id: de65aa7dc89a1befe46bdcbbabca8cb63cfbe1f4
2015-04-05 09:21:46 -04:00
Jeremy Long
2bcd9d78e8 updated javadoc author
Former-commit-id: 59253e1927d2910c882865f5a9a052b4d66e004f
2015-04-05 09:21:46 -04:00
Jeremy Long
723b9e9cea updated javadoc author
Former-commit-id: ad409cc8c07c126a119bb6b6ab21c7dde38ec656
2015-04-05 09:21:45 -04:00
Jeremy Long
efb7088cd8 updated javadoc author
Former-commit-id: a5f88426208091e934fee073c8e075d323e6a82a
2015-04-05 09:21:45 -04:00
Jeremy Long
f2131102f5 updated javadoc author
Former-commit-id: 009df028d14ef0d78ca74f63e1c9cd9984d1109f
2015-04-05 09:21:45 -04:00
Jeremy Long
eae04bb156 updated javadoc author
Former-commit-id: b8ab72134701d8f4846c104e25fde499fdedb3e9
2015-04-05 09:21:44 -04:00
Jeremy Long
11716128df updated javadoc author
Former-commit-id: 05a564adebe1121e20d3be4d961ed4b09f94742d
2015-04-05 09:21:44 -04:00
Jeremy Long
5122808189 updated javadoc author
Former-commit-id: e47179411fd0dff94f876f7db37e69584fd3786b
2015-04-05 09:21:44 -04:00
Jeremy Long
3c1905f941 updated javadoc author
Former-commit-id: b5fa72ecbcf831459fbde0d45d65006a2cd0d049
2015-04-05 09:21:43 -04:00
Jeremy Long
3348086c00 updated javadoc author
Former-commit-id: f68b96df72699fd541ac14af9a98e198729017d6
2015-04-05 09:21:43 -04:00
Jeremy Long
919efc5037 updated javadoc author
Former-commit-id: be4a6f9d5c5d1f43ddbe2324a68036e6e459d1a2
2015-04-05 09:21:42 -04:00
Jeremy Long
04ab0e09d5 updated javadoc author
Former-commit-id: c1f55752be340dac6c6fd234640d60b64a553a88
2015-04-05 09:21:42 -04:00
Jeremy Long
c8862cb927 updated javadoc author
Former-commit-id: 07943962fcaaddbb23f7c68400f7f7d868745e01
2015-04-05 09:21:42 -04:00
Jeremy Long
ac135ec2b6 updated javadoc author
Former-commit-id: cf4872f514d35b74be8abdb1ae54897b0ed8c254
2015-04-05 09:21:41 -04:00
Jeremy Long
0257000d1a updated javadoc author
Former-commit-id: a5cf1d6894c53d8635bf14a0cd1454130c451151
2015-04-05 09:21:41 -04:00
Jeremy Long
608b95e941 updated javadoc author
Former-commit-id: 022735ae188f0db1dc859581c0a6583b8c669b5f
2015-04-05 09:21:41 -04:00
Jeremy Long
e6a2c5b5b4 updated javadoc author
Former-commit-id: 13ed43813582e20381731943e1518ec6fd01f7c3
2015-04-05 09:21:40 -04:00
Jeremy Long
a546aadba1 updated javadoc author
Former-commit-id: fc7b5f76a67eaab2e78f6f385252030de63438c9
2015-04-05 09:21:40 -04:00
Jeremy Long
5934588b2c updated javadoc author
Former-commit-id: d4a4d6b17f22aa039dadd3e2c63a69432a1fc03d
2015-04-05 09:21:40 -04:00
Jeremy Long
3ad5482a30 updated javadoc author
Former-commit-id: d705171c799bfc2815f63306cc31a25ad8c3a360
2015-04-05 09:21:39 -04:00
Jeremy Long
c3902447af updated javadoc author
Former-commit-id: 2cbd83d6544a19dd4d15d5d88f2f1dff30432251
2015-04-05 09:21:39 -04:00
Jeremy Long
764aa466f4 updated javadoc author
Former-commit-id: 3bdcfe1fae3dca5c0c934c97b1c48e117255de09
2015-04-05 09:21:38 -04:00
Jeremy Long
9ffda6cd17 updated javadoc author
Former-commit-id: d13fac65cb7ed951698130523baaf241146addde
2015-04-05 09:21:38 -04:00
Jeremy Long
8281fb09fc updated javadoc author
Former-commit-id: c559dad07d948c834f7aa451475e0e52895abd26
2015-04-05 09:21:38 -04:00
Jeremy Long
b6988f96fb updated javadoc author
Former-commit-id: 3f11465c5f678401d93b0aa12ce267ca0ba3d523
2015-04-05 09:21:37 -04:00
Jeremy Long
4597c13d9a updated javadoc author
Former-commit-id: ea95eaf016057dd9316d3841f453d2c2cb7cac61
2015-04-05 09:21:37 -04:00
Jeremy Long
acf7297c8d updated javadoc author
Former-commit-id: bef2871312d17e886101fbfaf804a0910e9eaac9
2015-04-05 09:21:37 -04:00
Jeremy Long
bbdc8298d9 updated javadoc author
Former-commit-id: 4e217219079d10b0a7a33444eccb5a218784290d
2015-04-05 09:21:36 -04:00
Jeremy Long
4d9f102033 updated javadoc author
Former-commit-id: ab1f753c303338c0be531e46fb2338fc8e429403
2015-04-05 09:21:36 -04:00
Jeremy Long
0056e1052c updated javadoc author
Former-commit-id: 78a6833acf9011146dcb529bdf14f6d96fbe9741
2015-04-05 09:21:36 -04:00
Jeremy Long
7b729e078b updated javadoc author
Former-commit-id: dfeb34c3ff80b4a18c01284edd0e547165227e64
2015-04-05 09:21:35 -04:00
Jeremy Long
6a0623f1e7 updated javadoc author
Former-commit-id: 868f59d066f98252f72456a942b4dc5e3c20ea03
2015-04-05 09:21:35 -04:00
Jeremy Long
542c871152 updated javadoc author
Former-commit-id: 1ce5048775cad33c5c2e7c1ad2ba09539d2ce8e8
2015-04-05 09:21:35 -04:00
Jeremy Long
77189eeeb1 updated javadoc author
Former-commit-id: e6fe0c911571602a216b7092c743de117ec28feb
2015-04-05 09:21:34 -04:00
Jeremy Long
340172ab56 updated javadoc author
Former-commit-id: 557d8fb6c19d3e6c2bebd500c500533d2dcfa7cd
2015-04-05 09:21:34 -04:00
Jeremy Long
afcfed1c67 updated javadoc author
Former-commit-id: cfbefad580b452ed98b8b336338946eb6a7ca506
2015-04-05 09:21:33 -04:00
Jeremy Long
59ce3bb64d updated javadoc author
Former-commit-id: 9f8d8178aa290507894b8ea64cc6ca18ab72c6f6
2015-04-05 09:21:33 -04:00
Jeremy Long
81c5aa73d2 updated javadoc author
Former-commit-id: d255d240647ef205febf61f9373da728c4b58c6d
2015-04-05 09:21:33 -04:00
Jeremy Long
12ff05208c updated javadoc author
Former-commit-id: 1a683cf8ef016bab26be3653adc957ae5edd7cc3
2015-04-05 09:21:32 -04:00
Jeremy Long
dc0ef70699 updated javadoc author
Former-commit-id: ff5f1f9fe7357a87602364537f93d9c5fddf1574
2015-04-05 09:21:32 -04:00
Jeremy Long
6ce735dcc7 updated javadoc author
Former-commit-id: 1bbedeb9c9ec23d07822f89234318289794c1fd4
2015-04-05 09:21:32 -04:00
Jeremy Long
faf3298f7a updated javadoc author
Former-commit-id: 13a111fb531dc07d909febaffa7eb86e63f04db5
2015-04-05 09:21:31 -04:00
Jeremy Long
4f1b6b4bf1 updated javadoc author
Former-commit-id: 9880049e15071f42fd2be262e34a8536e574b43d
2015-04-05 09:21:31 -04:00
Jeremy Long
99702fdb67 updated javadoc author
Former-commit-id: 1e4a45aaaadcd37891fcd51cb258cbcb94083696
2015-04-05 09:21:30 -04:00
Jeremy Long
7bce7691e4 updated javadoc author
Former-commit-id: b4904e00c4cf2077ff02386dd75aced6b69370b5
2015-04-05 09:21:30 -04:00
Jeremy Long
7f90160936 updated javadoc author
Former-commit-id: efb4c51cea724c4b2e6ff3bbab111893f6ebc887
2015-04-05 09:21:30 -04:00
Jeremy Long
f367ad7185 updated javadoc author
Former-commit-id: 4802729f76f07cedf9ea678822a7b884792ded9b
2015-04-05 09:21:29 -04:00
Jeremy Long
29a31476b1 updated javadoc author
Former-commit-id: dddb1eaf50985adbc1c6a8603c3ada0b58deee57
2015-04-05 09:21:29 -04:00
Jeremy Long
b844b66614 updated javadoc author
Former-commit-id: 577d5887c89e2df966220ac51588f6a4810d00e2
2015-04-05 09:21:29 -04:00
Jeremy Long
3e6fa1ed1f updated javadoc author
Former-commit-id: a3a72fdd91082968ff0f927ff391b01a03abbccc
2015-04-05 09:21:28 -04:00
Jeremy Long
e141b4eb9f updated javadoc author
Former-commit-id: 556a8a0c649d625684000d0f4d0db3beff0e92d9
2015-04-05 09:21:28 -04:00
Jeremy Long
c794194bb5 updated javadoc author
Former-commit-id: b5ed0d4b6191df9e3b4320cb79274f42b0ad0089
2015-04-05 09:21:27 -04:00
Jeremy Long
3a31902e78 updated javadoc author
Former-commit-id: aba79f7dd00f77d02dcedf5dff3152e38b960b8d
2015-04-05 09:21:27 -04:00
Jeremy Long
fedafe55c3 updated javadoc author
Former-commit-id: b4c0e0ab694ce650bf48eb4e246fe6eb43c99889
2015-04-05 09:21:27 -04:00
Jeremy Long
1c0b885267 updated javadoc author
Former-commit-id: f420200f47b0c2161c57af24d2b70db60f23cd4b
2015-04-05 09:21:26 -04:00
Jeremy Long
8e4791048b updated javadoc author
Former-commit-id: aba167a3ba3a67a8da23729f969de406a4f7ce10
2015-04-05 09:21:26 -04:00
Jeremy Long
e28be6f2b7 updated javadoc author
Former-commit-id: 30f7e50b4d38804ef4fa16d140239566db5f8cac
2015-04-05 09:21:26 -04:00
Jeremy Long
55271b8e83 updated javadoc author
Former-commit-id: faf88eac765f642fa25bcf730634e79c17d107ac
2015-04-05 09:21:25 -04:00
Jeremy Long
8b5d8679f7 updated javadoc author
Former-commit-id: 55ca887799f155a48b09297313fe7be22ab71f1f
2015-04-05 09:21:25 -04:00
Jeremy Long
51d8ced8ce updated javadoc author
Former-commit-id: cf9eab6585eabf35eee74f22400683f14b4b35c1
2015-04-05 09:21:25 -04:00
Jeremy Long
1cc94dd60b updated javadoc author
Former-commit-id: 9a52b80f8d67e5ad2861eff891382196eb605c68
2015-04-05 09:21:24 -04:00
Jeremy Long
6d107e79b6 updated javadoc author
Former-commit-id: 5f2a68378d7d566f71e8146206a93e36b7987c4a
2015-04-05 09:21:24 -04:00
Jeremy Long
6f44b4dce1 updated javadoc author
Former-commit-id: d8293e9a910e979cd40a4d4c8a017bd0cca291f9
2015-04-05 09:21:24 -04:00
Jeremy Long
1600492780 updated javadoc author
Former-commit-id: 98a7c3b5faed0c15a25fd93bdaca9ed806847ac0
2015-04-05 09:21:23 -04:00
Jeremy Long
5f396cc647 updated javadoc author
Former-commit-id: 07d4d2adb4de14796b58f1e1c722f2a88f1fc45f
2015-04-05 09:21:23 -04:00
Jeremy Long
49bd45d88c updated javadoc author
Former-commit-id: 3c79ef2eef1fdffc2bae0e45091fffb6af1e41d6
2015-04-05 09:21:23 -04:00
Jeremy Long
c41e673346 updated javadoc author
Former-commit-id: bdc0c240959e2ce9c5dc194bb9fa32083e5287e9
2015-04-05 09:21:22 -04:00
Jeremy Long
cf8d1a490c updated javadoc author
Former-commit-id: e40d29b2150990e9c093d5cfe991003239895d09
2015-04-05 09:21:22 -04:00
Jeremy Long
962f20296c updated javadoc author
Former-commit-id: 41514e76ebd6db3fbb4f955c28443f9ce436cbeb
2015-04-05 09:21:22 -04:00
Jeremy Long
e9c1ae1893 updated javadoc author
Former-commit-id: df80e5ee5504e57c95cc89e9af8d9c8910074ab0
2015-04-05 09:21:21 -04:00
Jeremy Long
5db51a2abf updated javadoc author
Former-commit-id: 8d5db6e14ce0231f572f85f580b276880964e4d9
2015-04-05 09:21:21 -04:00
Jeremy Long
63be1efed9 updated javadoc author
Former-commit-id: 2b327604180bb6f96d599f618af6e42e6a9cf1c2
2015-04-05 09:21:21 -04:00
Jeremy Long
7fe3c659e0 updated javadoc author
Former-commit-id: 1129346d7f495fa50b2f1c84c53817d3b0cab0e8
2015-04-05 09:21:20 -04:00
Jeremy Long
4d76c7685c updated javadoc author
Former-commit-id: bf53d2c21d0244de8cb6130274329e51ebe7dcc2
2015-04-05 09:21:20 -04:00
Jeremy Long
b50bcde028 updated javadoc author
Former-commit-id: a3289db80cf37f081d3ae56e9ad27914398b92d6
2015-04-05 09:21:20 -04:00
Jeremy Long
9a8b61ae47 updated javadoc author
Former-commit-id: 506514c92c0939aa40306cc238cf94fb9301f62c
2015-04-05 09:21:19 -04:00
Jeremy Long
c31880d8de updated javadoc author
Former-commit-id: 9d63c24fdef328dfa0161e0dbc874f04e6a20246
2015-04-05 09:21:19 -04:00
Jeremy Long
1496dc8e7d updated javadoc author
Former-commit-id: 4e26403ffcd24b6884c89cc608856db72d7e0e6b
2015-04-05 09:21:18 -04:00
Jeremy Long
cdbd513e42 updated javadoc author
Former-commit-id: b8f9f04bdb055931b1f8ba1553187ee17a5f68c3
2015-04-05 09:21:18 -04:00
Jeremy Long
653bf1764e updated javadoc author
Former-commit-id: 6ef2a7148b546249425675b6c1996a0b2f39fb53
2015-04-05 09:21:18 -04:00
Jeremy Long
df08acfe9e updated javadoc author
Former-commit-id: 3c6beecbf580b21d2c45ca105dcbd217d4d9a9ad
2015-04-05 09:21:17 -04:00
Jeremy Long
e7a5287bb4 added bypass so test would be ignored under 1.8
Former-commit-id: 65f2316643266d144e063dd329a8298d3058a78c
2015-04-05 08:38:24 -04:00
Jeremy Long
656f26cc9d added test case
Former-commit-id: 2330a397a8af99797a16c8201f1baac124089e6f
2015-04-05 08:37:43 -04:00
Jeremy Long
52385ddac4 added new logo
Former-commit-id: 97baa927bb9fa7f56c40323329c7b385ebd541a2
2015-04-05 08:36:51 -04:00
Jeremy Long
50c58667ba added new logo
Former-commit-id: 9a70c59f2a89d92a746e6c7eab056c2b7d093843
2015-04-05 08:36:16 -04:00
Jeremy Long
9cc6ca5ebe bug fix - the compareTo needed to be case insensitive
Former-commit-id: d4507585c046d06002a58b1bc39220c68cc04e6d
2015-04-05 08:35:31 -04:00
Jeremy Long
34b82a3f84 new favicon
Former-commit-id: 4389b32bab06787552eca7510b184856bffffdcd
2015-03-29 06:30:49 -04:00
Jeremy Long
d0401f3f8d Add an update only option
Former-commit-id: 67253232762acb61e1400dc60443e556f71db874
2015-03-28 12:17:24 -04:00
Jeremy Long
f247978d12 Merge branch 'master' of github.com:jeremylong/DependencyCheck
Former-commit-id: b4c8b0aceafa5975733d800161a68fc95d36667d
2015-03-28 07:22:10 -04:00
Jeremy Long
999116c75e patch to resolve issue #202
Former-commit-id: 576831ec73c00b957a6700dd753894f5429de071
2015-03-28 07:21:53 -04:00
Steve Springett
04e9f5b15b Fixed syntax for PR #204
Former-commit-id: 61875128cd3b710c4aadb2621ab1e6a11b8f7b8e
2015-03-26 13:00:51 -05:00
Steve Springett
78b0f7798f Merge pull request #204 from rperam/master
Property to control whether external reports need to be generated or not

Former-commit-id: 8a53f09f1e4af41695c48d057eee963a24903b5d
2015-03-26 10:38:23 -05:00
Rudra Peram
b0727ef3cf Set a property to determine whether external reports need to be generated or not
Former-commit-id: 83ce9ecd722f47140198e276ecc86d279f39d881
2015-03-25 23:52:48 -07:00
RK
01fb31fc15 Merge pull request #1 from jeremylong/master
Update from jeremylong/DependencyCheck

Former-commit-id: 93d5034211fec0e3f1c3bdf8ef3a305d141097ad
2015-03-25 23:43:40 -07:00
Jeremy Long
a1187acc31 changed default timeout to 10 seconds
Former-commit-id: 0240be0f5ec3db514310c1ce47eaf906d198bc3a
2015-03-20 09:01:13 -04:00
Jeremy Long
fe4a24a651 removed nexus auth test code
Former-commit-id: 9b5f8cbceb5a6a273dfd7ba85bf16510dab3ddb5
2015-03-18 10:07:01 -04:00
Jeremy Long
3dcce572d3 added the capability to follow more then a single redirect when downloading a file
Former-commit-id: cc3382fec2c168119474ee6bae7b5f250163c2da
2015-03-18 05:47:37 -04:00
Jeremy Long
ece69014ce added auth to nexus search
Former-commit-id: eb0b5e8ab0dcb27fe2edcb79b9dc9898c13bcb6b
2015-03-16 06:50:12 -04:00
Jeremy Long
fc6bb67e56 version 1.2.10-SNAPSHOT
Former-commit-id: aa597102bf8e24cb876b1d7c805ba8f2e06fda22
2015-03-06 19:49:05 -05:00
Jeremy Long
968de2947b fixed javadoc
Former-commit-id: e5736e49452f0d620438d2e6174cb35bcf236eaf
2015-03-06 19:40:29 -05:00
Jeremy Long
6f9ba0033f version 1.2.9
Former-commit-id: f775a71e328b2ff44d9b004b9991b4bbad8a4725
2015-03-06 05:59:59 -05:00
Jeremy Long
4d4672fc4d corrected & operator to use &&
Former-commit-id: cb1dd513f85db07ec54b1fa94328f2ec057eff94
2015-03-05 06:16:31 -05:00
Jeremy Long
70859eb719 checkstyle correction
Former-commit-id: 6ce90b5c6d192835568995cd33d56330cea53cfb
2015-03-05 06:15:43 -05:00
Jeremy Long
ae9daf7f33 updated (c)
Former-commit-id: 305ab5d6faa8f05a1689b57aabf551dd66fed070
2015-03-03 05:59:52 -05:00
Jeremy Long
ff0daa8d66 reverted to lucene 4.7.2 - new versions of lucene are built using JDK 1.7+ and cause issues for the dependency-check Maven Plugin
Former-commit-id: 514cc4922c7f00f55b1dcd102f6d45491e90a5d8
2015-03-01 21:43:52 -05:00
Jeremy Long
09f1a0ac92 checkstyle corrections
Former-commit-id: 6e12b975c1975566ebef47fedef24c179a753e05
2015-03-01 10:00:13 -05:00
Jeremy Long
e562be77f6 additional hints added for spring
Former-commit-id: e9e26f6c31b4ae220e1e7686efe6388638ec7c99
2015-03-01 08:22:56 -05:00
Jeremy Long
af7c6bc2a0 additional patch for issue #196
Former-commit-id: 10b55f932b5ee52fa1f9ae3b96c15649dd5d6062
2015-03-01 07:01:24 -05:00
Jeremy Long
e49cbcf345 Merge pull request #198 from colezlaw/master
Modified NexusAnalyzer to download POM if required

Former-commit-id: 286748f7227706fb0dd49ecd3fd26c127581e7a6
2015-02-28 13:36:27 -05:00
Jeremy Long
b4218ff0e8 added maven-plugin-plugin to the checkfule suppressions
Former-commit-id: 1e523645f46c51cef743370271db819ec00001a1
2015-02-28 13:34:40 -05:00
Jeremy Long
4af174d27b updated checkstyle configuration so file summary is not displayed
Former-commit-id: ee580f6fd2c78cedb96a2dd43917040a4df24133
2015-02-28 13:34:06 -05:00
Jeremy Long
203a7da23a added test scope to test dependencies in the dependency management section
Former-commit-id: 63281cbc83c6003cba2c8a441e0117ade505e5a4
2015-02-28 13:33:19 -05:00
Jeremy Long
9833ff20d1 changed access modifier so tests will pass
Former-commit-id: 95ccefd362c0dbea2dbc33f7aeea2d515f5e8b6c
2015-02-28 07:13:52 -05:00
Jeremy Long
638b3c0695 checkstyle correction
Former-commit-id: 01f643ad33e0475d2c2daaa5076ec604952df8d6
2015-02-28 06:46:10 -05:00
Jeremy Long
01ef2e1061 checkstyle corrections
Former-commit-id: b821a8b9a680c875a3013099a362b0277d97119f
2015-02-26 09:15:28 -05:00
Jeremy Long
56aea8ad24 Merge branch 'master' of https://github.com/jeremylong/DependencyCheck
Former-commit-id: 9d51cd721bb160351b4fc6ff27e835b8e3d2820b
2015-02-26 08:47:30 -05:00
Jeremy Long
d530eddc57 final commit to patch issue #185
Former-commit-id: 1e77bec21239a0ea228795df7bfa5678d9930d6c
2015-02-26 08:47:07 -05:00
Will Stranathan
1eab76aab8 Updated error messages to reflect Nexus
Former-commit-id: 60bd62aebbf52844150a58fe4afea45be867f249
2015-02-22 14:56:25 -05:00
Will Stranathan
167dbd7368 Merging upstream/master
Former-commit-id: f77993de8ea6e0de68d4b5cd0da653692ffcbaa9
2015-02-22 14:55:27 -05:00
Jeremy Long
2594fb1c5f removed unused collection
Former-commit-id: 5f3c6eab38eae99fef70909650a5eddf2a374a56
2015-02-22 10:57:52 -05:00
Jeremy Long
c57d21e9bc Merge pull request #199 from hansjoachim/upgrade
Upgrade jmockit to latest version

Former-commit-id: 3e0228c85439742b8188b6b3bf3ba8c8e16bfb82
2015-02-22 10:28:47 -05:00
Jeremy Long
9c15bdfe41 Merge branch 'master' of https://github.com/jeremylong/DependencyCheck
Former-commit-id: 7a189b5240ff2c831c6d6f42555148f5f00586bd
2015-02-22 10:24:59 -05:00
Jeremy Long
64dedf892d work in progress
Former-commit-id: 74f303b69fa5af225b75d6643aed60e66a4cf081
2015-02-22 10:24:45 -05:00
Jeremy Long
d6fc456039 work in progress
Former-commit-id: 0ff4b90e22accc5adb1d91735fe4979838fdc651
2015-02-22 10:23:31 -05:00
Jeremy Long
df606674db added referenced projects to the report to resolve issue #185
Former-commit-id: 61eb8b70dccedf12b745d4c9a73e8f6bc2a0f9c8
2015-02-22 10:22:44 -05:00
Jeremy Long
1e3a7ff4ba Merge pull request #200 from hansjoachim/issues
Fixes SonarQube Issues

Former-commit-id: dff1448e1897a6691a99977130b063a424645e8a
2015-02-22 10:18:34 -05:00
Hans Joachim Desserud
b53de8c69b Move jmockit to dependencyManagement so that we get a common version in all places it is used
Former-commit-id: 2cfab936074b17a8f9b080a5272c6da757e32921
2015-02-22 12:50:52 +01:00
Hans Joachim Desserud
0f3ffaf270 Use dependencyManagement to keep track of version numbers
Former-commit-id: 954e599f46ab4a18e00cbd09a968e2d5dd6e0d0d
2015-02-22 12:46:54 +01:00
Hans Joachim Desserud
25238d5fb5 Prefer interfaces over concrete classes. I have updated internal usage and accepted parameters. I have not touched return values for public/protected methods since they may be called externally and I don't want to break assignments from these.
Former-commit-id: e534f9acf569a258dd72a568dfe69e70486eb697
2015-02-22 12:19:49 +01:00
Hans Joachim Desserud
cf677bd70e Prefer checking isEmpty over size() > 0. Plus fix some typos
Former-commit-id: 754f300c0b120c0c9098c17c19dbd11aa7a39844
2015-02-22 11:42:14 +01:00
Hans Joachim Desserud
42939e4922 Compare with equalsIgnoreCase instead of changing casing
Former-commit-id: ab89ed68cb5e25d14d5fbd7ba93dc93948523d82
2015-02-22 11:20:36 +01:00
Hans Joachim Desserud
7c4cc1334b Place array designator on the type instead of the variable
Former-commit-id: 2e29bc1c61400e3bdb6b35b0b21a5cbb04cbf37a
2015-02-22 11:05:58 +01:00
Hans Joachim Desserud
ff4a1e0ac6 Place modifiers in expected order
Former-commit-id: 0cf3616fd9a737f4ca143b6f46165bdbf0e14aec
2015-02-22 10:58:31 +01:00
Hans Joachim Desserud
069e22049d Upgrade jmockit to latest version
Former-commit-id: 8e429f8b304f6c4db4ed7a88ee775f78e80260b3
2015-02-21 16:35:45 +01:00
Jeremy Long
135ed5c614 fixed NPE
Former-commit-id: 05f57ec103791b6c5ea019c54c828b3c97a415b9
2015-02-21 10:29:41 -05:00
Will Stranathan
13d7d29630 Modified NexusAnalyzer to download POM if required
NexusAnalyzer previously would just get GAV for a
match, but the POM may be separate from the jar
and contain other valuable information. This
includes refactoring of the analyzePom into
PomUtils.


Former-commit-id: f7311e08324d8bc6a5860f4be2b0e409fdcf9ba3
2015-02-19 21:08:45 -05:00
Jeremy Long
889f315c0a general checkstyl, findbugs, and PMD corrections
Former-commit-id: ec59d464725a33d8c07c79bf7128036a10fe1890
2015-02-18 21:09:38 -05:00
Jeremy Long
5a0e280899 Merge pull request #197 from ahi/master
Removes the test for default Maven repository directory.

Former-commit-id: cc261e0e6b54e169862118003bb639d52f5c94ba
2015-02-18 20:17:17 -05:00
Jeremy Long
ccb5e234b3 moved methods from JarAnalyzer to the new PomUtils so that a POM could be parsed and analyzed within other analyzers (part of patch for issue #196)
Former-commit-id: 4e649f678e59f4eaf379eba21a6ad87348fe8525
2015-02-18 20:14:04 -05:00
Jeremy Long
2caccab85f set flag on URLConnection indicating that redirects should be followed (part of patch for issue #196)
Former-commit-id: 52758186ebf2f818b6cf107af1e12b92e3c2e370
2015-02-18 20:11:30 -05:00
Jeremy Long
085ab48f3f added code so that the Downloader now follows 1 level of redirection to download the file (part of patch for issue #196)
Former-commit-id: ecd914dbcacad1e12a243fdff90f043ef114c160
2015-02-18 20:10:44 -05:00
Jeremy Long
a28c2819fa added pom URL as part of patch for issue #196 and improved the URL provided for the jar file itself
Former-commit-id: 8f485f53031a7e244d4a8f8d0c055e6b38fca746
2015-02-18 20:09:42 -05:00
Jeremy Long
40beec2e40 additional parsing of the data from Central was used to determine if the POM file is available in Central (part of the patch for issue #196)
Former-commit-id: 1805be75b101546b166c9eb4ad1efc30e53983cf
2015-02-18 20:08:14 -05:00
Jeremy Long
d136aeda84 pom parsing was externalized so that it could be used in multiple locations to assist in the resolution of issue #196
Former-commit-id: cbdde3b4b2dcabf0ff9e3f49cc3d36c62e67a1bb
2015-02-18 20:06:51 -05:00
Jeremy Long
fdd6c47cd5 if pom was not found/analyzed by the JAR Analyzer and the POM exists in Central it is downloaded, parsed, and the resulting evidence is added to the dependency to resolve issue #196
Former-commit-id: 9a36b30d4d4c265a41ae95bf5a9e95b281349425
2015-02-18 20:05:00 -05:00
Jeremy Long
c5a2b5b3d8 minor code cleanup, reformatting, and added some additional verbose logging
Former-commit-id: 9d6cf651a22a679f155a04313a09de56c90e0399
2015-02-18 19:56:56 -05:00
Ahmet Kiyak
babe4739c5 Removes the test for default Maven repository directory.
Error: If the M3_REPO directory is not set to a path that contains */m2/repository/* the DependencyCheck doesn't read <library>.pom file. Some dependencies like "spring-core-3.2.0.RELEASE.jar" are not found due to this error.

Fix: Remove the test for default Maven repository directory. The existing check for the existence of <library>.pom file is sufficient.

Former-commit-id: 8d7c51f611b5d26d505cfc3fe9f8b94c12174000
2015-02-17 18:57:24 +01:00
Jeremy Long
49e8ee443c added generic methods to get references to resources to resolve issue #181
Former-commit-id: 465d3310b1ad5b54e49ab65e5e0e4b003f79998b
2015-02-13 06:18:56 -05:00
Jeremy Long
a5d8ce07d8 added @Ignore due to test case failure - this analyzer may need to be removed
Former-commit-id: d3a2112342b66ab1b012678a7adf5b5492e9669f
2015-02-13 06:17:29 -05:00
Jeremy Long
babc016b48 added project references
Former-commit-id: ba4a058648203b8749b31e889994a5ddfc72d7b3
2015-02-12 20:49:04 -05:00
Jeremy Long
a5f378d755 removed commented out code
Former-commit-id: db1075a0d07f4c5af904691e200b3792533521b3
2015-02-12 20:48:36 -05:00
Jeremy Long
ebf995537e added project references
Former-commit-id: e6e63edce05c2985fd20b544839a033f5f050d20
2015-02-12 20:47:55 -05:00
Jeremy Long
49edb6c2e1 nop
Former-commit-id: 90c0ace35561abff762037b4388f5aedd6adfa4f
2015-02-08 19:28:29 -05:00
Jeremy Long
423f26852f updated URL to central
Former-commit-id: b2b0741a5c32de3dbfd6e2d7953447b3348ad7e5
2015-02-08 19:28:04 -05:00
Jeremy Long
f931412bee changed the url for Maven Central
Former-commit-id: cfe3c6efd45094b1a12d8e147e1d121064b48630
2015-02-08 07:50:29 -05:00
Jeremy Long
bef0657801 fixed unit test
Former-commit-id: 7bd2d15b7ae30f5a84f2ef4ce62bf893fb7c03e4
2015-02-08 07:49:56 -05:00
Jeremy Long
d79d5b5f33 added project references as part of patch for issue #185
Former-commit-id: 3146c47f89031eaf09e513b6eb757bcc98ee9edf
2015-02-08 07:17:16 -05:00
Jeremy Long
4c5489efd3 added project references as part of patch for issue #185
Former-commit-id: 5a4473d0b91b28de8c5caaba51ceed42e670532c
2015-02-08 06:59:06 -05:00
Jeremy Long
d5753b9589 updated to address issue #193
Former-commit-id: 8361c2fdbec4191e52db16b870406e3e45d97d0d
2015-02-07 18:16:07 -05:00
Jeremy Long
a841027d48 added additional supporessions
Former-commit-id: a9810fa2e2051204d481e975de0922ec7d4183ef
2015-02-07 18:15:41 -05:00
Jeremy Long
73bea8e63f removed ignoreTrivial from the cobertura configuration to resolve NPE exceptions
Former-commit-id: 228db3acc3260c5c0e8b4b0f4cf701993c33aaa1
2015-02-04 07:26:06 -05:00
Jeremy Long
bbc8bab4da Updated the explanation of the report
Former-commit-id: 5542025ae1e49797d224afabee822a6ca4460c23
2015-02-04 07:21:31 -05:00
Jeremy Long
019f6dfb8b added properties file to the documentation
Former-commit-id: 6e409f83b42828d97258d5bcdbb70e3c02d5ba80
2015-02-03 23:04:17 -05:00
Jeremy Long
3b6a2a2908 added test dependency to verify the fix for issue #180
Former-commit-id: 7f90c990b90b7a76a06be2318e578a98f8a7db13
2015-01-30 05:31:42 -05:00
Jeremy Long
c2b757ad6f re-added the struts1/2 fix and fixed other bugs in patch for issue #180
Former-commit-id: 93d45b91a46171788ac1a6c703055e5f196dcc0d
2015-01-28 18:50:51 -05:00
Jeremy Long
efeba40f2b fixed bug in patch for issue #180
Former-commit-id: a547268f56b373a6959d1be212629f39d66581d6
2015-01-27 06:57:51 -05:00
Jeremy Long
018e4bc382 patch for issue #180
Former-commit-id: 95760c8ee82b1e382dc3785525ac6027c0be8069
2015-01-25 11:15:43 -05:00
Jeremy Long
88924ea520 changed where the flag is set to only update once in a multi-module project (from issue #168) to resolve issue #191
Former-commit-id: 56b8342ffeead397b2c9554c36bf360cb4c2b7fe
2015-01-21 19:27:13 -05:00
Jeremy Long
4461c2e4a4 patch to resolve the issue with xmltooling discussed in issue #186
Former-commit-id: c3327bee9055c91659648d4835f8436478e7f41d
2015-01-21 18:58:51 -05:00
Jeremy Long
1c4aceb0fb added additional optional dependencies for testing purposes for issue #186
Former-commit-id: 5111120fee1f04a39e3144beb234895275581899
2015-01-21 18:58:08 -05:00
Jeremy Long
a5b396a60d Merge branch 'hansjoachim-site'
Former-commit-id: 4639280f19d7dcf26836321dfdd8da566c08be0b
2015-01-21 06:55:56 -05:00
Jeremy Long
efd96ed892 Merge branch 'site' of https://github.com/hansjoachim/DependencyCheck into hansjoachim-site
Former-commit-id: 43d9f4c5b73321bb945e1e57610f221d8fa2d4d7
2015-01-21 06:48:51 -05:00
Jeremy Long
fe88785846 Merge branch 'hansjoachim-comment'
Former-commit-id: 028894f4e5050e40a93a3fc7ec99c3ca149b9624
2015-01-21 06:45:52 -05:00
Hans Joachim Desserud
0dcb0fb325 Add comment/warning
Former-commit-id: a3f9bfa48cec45f8a55ce1bf6990f03b5f9290bd
2015-01-17 16:42:38 +01:00
Hans Joachim Desserud
0825843d0f Roll back version of maven-site-plugin
Former-commit-id: c2a9527e4050a7eb22e80a6e26c030d1b6fe6be6
2015-01-17 16:01:46 +01:00
Hans Joachim Desserud
8c4df134e4 Move out github plugin for maven-site and upgraded to 0.10
Former-commit-id: 45dad89f070e56febe09a3ccac2377db57bb3540
2015-01-17 16:01:13 +01:00
Hans Joachim Desserud
dfed5067f3 Upgrade maven-site-plugin to 3.4
Former-commit-id: e0f74e12a0a277f288ba0d50ef0c0960cafeb0df
2015-01-17 13:21:57 +01:00
Hans Joachim Desserud
2b78e8fdc1 Unify maven-site-plugin version
Former-commit-id: 1c22ab1a8eec75474f7612f3892d12490269f2ed
2015-01-17 12:41:37 +01:00
Hans Joachim Desserud
63c7a9d926 And since the annotation was switched to avoid name collision, the full name is no longer needed
Former-commit-id: ddbe16d074ca2fed635c2e9f4ca8157af0fe9c24
2015-01-11 11:09:02 +01:00
Hans Joachim Desserud
6609481cc1 Switch to non-deprecated FindBugs-SuppressWarnings tags which should avoid name collision
Former-commit-id: a4a978ee4a6621033064488a71577bdb93cddab4
2015-01-10 21:23:44 +01:00
Hans Joachim Desserud
a37853def6 Also StandardAnalyzer can use the Version-less constructor. The superclass Analyzer will actually default to LUCENE_CURRENT which is equivalent with LATEST which was sent in
Former-commit-id: 43c8e3350b72bac8eb952ff138887c7232ecb39c
2015-01-10 19:52:42 +01:00
Hans Joachim Desserud
9f348cfa16 The Version-less constructor for StopFilter will simply default to Version.LATEST under the hood which is exactly what we send in.
Former-commit-id: cc3010532e9203d663d977f0df0892d8f5694b5f
2015-01-10 19:41:25 +01:00
Hans Joachim Desserud
52293f2596 More elaborate comment on issue which should be fixed once the next release of ant-testutil is out
Former-commit-id: e65ea8afeeb2cc631385ad6bf1e80c7cee745c7a
2015-01-10 19:28:12 +01:00
Jeremy Long
54d3a73282 Merge branch 'hansjoachim-annotation-plugin'
Former-commit-id: 0a6db65e7fb24c2d6ba88390cf001dc9eb481813
2015-01-08 05:19:11 -05:00
Jeremy Long
ab2d3b70cb Merge branch 'annotation-plugin' of https://github.com/hansjoachim/DependencyCheck into hansjoachim-annotation-plugin
Former-commit-id: c9f32139e631cea5ea1ba8baa9424ae8e85e5dd5
2015-01-08 05:18:52 -05:00
Jeremy Long
451df460f6 Merge branch 'hansjoachim-deprecated'
Former-commit-id: ae805c6225dba9b15d406b7ccfb4e8240b1e9e46
2015-01-08 05:17:24 -05:00
Jeremy Long
b4afa01887 Merge branch 'deprecated' of https://github.com/hansjoachim/DependencyCheck into hansjoachim-deprecated
Former-commit-id: 201977aad5d979ef4615fa590f5d9113e9ff5727
2015-01-08 05:15:21 -05:00
Jeremy Long
2ea95f5bf9 Merge branch 'hansjoachim-plugins'
Former-commit-id: 222f2760d05cbf73dfff28488b4ce86faf50561e
2015-01-07 20:42:37 -05:00
Jeremy Long
22602f42f2 moved the reports from the site plugin to the reporting section
Former-commit-id: 885270d15bd24e921ddc97b112d612aaa7c48ac4
2015-01-07 20:42:07 -05:00
Jeremy Long
b2c5183043 add reporting section and the hamcrest-core test dependency
Former-commit-id: c0e857a71fe3c5136bdf261737cec165191bdafb
2015-01-07 20:41:38 -05:00
Hans Joachim Desserud
9f6559c7fb Upgrade maven-plugin-annotations to latest version
Former-commit-id: 4465128b4f06f0c1f17551afdc7652617ef7ceec
2015-01-07 19:03:20 +01:00
Hans Joachim Desserud
ef04c16237 Removed deprecated classes
Former-commit-id: 7b4de8148c8de485d39842b2fdecc8cbc2895da3
2015-01-06 21:23:47 +01:00
Jeremy Long
dd85bfd2ab Merge branch 'plugins' of https://github.com/hansjoachim/DependencyCheck into hansjoachim-plugins
Former-commit-id: 8666df46726bab861cbecd01319bad0219693092
2015-01-06 06:23:13 -05:00
Jeremy Long
7152a05bfd Merge branch 'hansjoachim-deprecated'
Former-commit-id: 72e1c4591f35bcd74a6c420c5a7322e263935169
2015-01-06 06:21:54 -05:00
Hans Joachim Desserud
754c2fc9bf Replaced deprecated constructors which contained parameter Version.
When looking into the code, these ended up toggling behaviour if Lucene version was later than 3.1.


Former-commit-id: b7641118b16ccfc904c8aaab3b2636d909d5b1d9
2015-01-05 21:51:11 +01:00
Hans Joachim Desserud
85ad0b881f Also removed old version number from gpg-plugin
Former-commit-id: 278ebc103fb3fb54e6f01f14cacfb2d93bbd074a
2015-01-05 20:04:14 +01:00
Hans Joachim Desserud
db6c471cc6 Add gpg-plugin to pluginManagement and upgrade it to 1.5
Former-commit-id: 28c94304a02bd3148a07ce37ef96a9259d61d7f9
2015-01-05 19:49:37 +01:00
Hans Joachim Desserud
300d990276 Set required maven version to the strictest option for all modules
Former-commit-id: 998498cd118460f42e35c10dfc42162e8f717de9
2015-01-05 19:36:25 +01:00
Jeremy Long
9c55b889cb updated version to 1.2.9-SNAPSHOT
Former-commit-id: bab73b0b3361a9b9689f272030e7a5b51e73a962
2015-01-04 12:43:18 -05:00
Jeremy Long
735f76cc0b Merge branch 'hansjoachim-minor-fixes'
Former-commit-id: b28f3820f63001c20a5c0d94efeb8afde58de9a4
2015-01-04 12:35:54 -05:00
Jeremy Long
d1c27a4298 Merge branch 'minor-fixes' of https://github.com/hansjoachim/DependencyCheck into hansjoachim-minor-fixes
Former-commit-id: b9de007127351691152d0403fa9d7a8656195fd2
2015-01-04 12:35:44 -05:00
Jeremy Long
650f09bbc5 Merge branch 'hansjoachim-dependencies'
Former-commit-id: 55ff93bf9425fc4d06f2282ed282d9b66982a8c9
2015-01-04 12:34:40 -05:00
Hans Joachim Desserud
08bf16971a Removed redundant semicolon
Former-commit-id: 45e93e66ff7a8f4fc67cb8680ffdbd362d763d5f
2015-01-04 15:01:56 +01:00
Hans Joachim Desserud
ccb149240e Removed duplicate groupId already covered by parent
Former-commit-id: 4db4a1186c947238339aef227154bad363d7ee85
2015-01-04 14:44:50 +01:00
Hans Joachim Desserud
ae22719985 This deprecated value should be fixed at least
Former-commit-id: b65317611bbe1784b0b8b14b7c31e86623952cf8
2015-01-03 22:11:05 +01:00
Hans Joachim Desserud
55c4d729bb Upgrade maven-release-plugin to version 2.5.1
Former-commit-id: 969df121db73b824e40137c9b6420bc85ec03e4d
2015-01-03 17:28:59 +01:00
Hans Joachim Desserud
429f0966f0 Move maven-enforcer-plugin and -plugin-plugin to pluginManagement. Upgraded them to the latest version
Former-commit-id: a8226623cddfbc034b6293f48946e2109c426dde
2015-01-03 17:22:42 +01:00
Hans Joachim Desserud
7a246b90b9 Upgrade maven-shade-plugin to 2.3. This requires building with maven 3.0 or later for that module
Former-commit-id: 9792754be3cb1c931a1736c41a258fa31556912a
2015-01-03 16:42:13 +01:00
Hans Joachim Desserud
d2e7de5505 Unify cobertura-maven-plugin version number
Former-commit-id: f3c995b91cf8b480f4c03ccec8d9371dba75eb35
2015-01-03 16:34:08 +01:00
Hans Joachim Desserud
a9eab16502 Add and upgrade assembly-plugin
Former-commit-id: e8c20c61a1bd78065f7ae4eed6751015a3d414c8
2015-01-03 16:30:28 +01:00
Hans Joachim Desserud
d59cce8080 Move non-version configuration out of pluginManagement
Former-commit-id: c3983849102331d42aa5dd562ccc319b1c5e9104
2015-01-03 16:09:06 +01:00
Hans Joachim Desserud
9390e71dd9 Upgrade Apache Lucene to 4.10.3. Would have needed to import the type for a parameter in one constructor, but since it was unused I took the liberty of simply removing it
Former-commit-id: 6e65307276619ed29354269fab2d5458b532766e
2015-01-03 14:23:57 +01:00
Hans Joachim Desserud
65992243fa Upgrade dependency-plugin to 2.9
Former-commit-id: 028218cd6c24e75216a41e14e79bd23a2073515a
2015-01-03 13:48:12 +01:00
Hans Joachim Desserud
c81b8b0171 Excplicitly state version numbers for some plugins used
Former-commit-id: b33cbe06b416423593c8b405747295cc86e998a7
2015-01-03 13:45:17 +01:00
Hans Joachim Desserud
0671d12628 On second thought, try to upgrade the version numbers for this profile manually.
Former-commit-id: 6ee31dfb9407fa9d04c1a2dd8e1eae2b2047109f
2015-01-03 13:31:42 +01:00
Hans Joachim Desserud
a892c5e7b7 Turns out surefire-plugin was used a different place too, which is why the old version number still turned up.
Former-commit-id: afab74d409527aae0e60094f18e48ed9e044ac37
2015-01-03 11:53:40 +01:00
Hans Joachim Desserud
b5c21ffbf0 Unify maven-failsafe-plugin version and upgrade it to 2.18.1
Former-commit-id: 73383c93e2bd5aecc2ad5005fe2cfaeaac700ca7
2015-01-02 22:49:08 +01:00
Hans Joachim Desserud
bb2b25cca5 Unify maven-jar-plugin version and upgrade it to 2.5
Former-commit-id: b0da5b80252e9b07ccb7d955487f595caef4d4bc
2015-01-02 22:15:49 +01:00
Hans Joachim Desserud
b3867244ba Unify maven-surefire-plugin version and upgrade it to 2.18.1
Former-commit-id: 0c5f41e379f4b20f32efb8435ab9efe9fd77d7d8
2015-01-02 21:46:13 +01:00
Hans Joachim Desserud
6bf8d396e0 Upgraded Apache Lucene to 4.7.1.
Former-commit-id: 2f723dc78ed258dc53685c917cb83aacf6f1eb25
2015-01-02 18:03:01 +01:00
Hans Joachim Desserud
6394c1a7b4 Upgraded to Apache Lucene 4.6.1. The method BaseTokenStreamTestCase.checkOneTermReuse was removed in http://svn.apache.org/viewvc?view=revision&revision=1525362, updated copied test case accordingly.
Former-commit-id: 0344bfcec4a08040eb693ca49c91218badbb2c96
2015-01-02 17:41:04 +01:00
Hans Joachim Desserud
ccd656845d Use a common version number for resources-plugin
Former-commit-id: 253864d637907491e2e21500540c3c2f6e03627c
2015-01-02 16:44:19 +01:00
Hans Joachim Desserud
2931e8454c Upgrade maven-compiler-plugin to version 3.2
Former-commit-id: 870aad70a81c782bd209f9c49288460234f69fca
2015-01-02 15:53:52 +01:00
Hans Joachim Desserud
112b158795 Move maven-compiler-plugin (along with common configuration) in under pluginManagement so we have the information in a single place
Former-commit-id: e729555a7edb1e41759bf8f1851cbfc81bd8917a
2015-01-02 15:51:41 +01:00
Hans Joachim Desserud
921001000f Require maven 2.2.1 (based on current plugin usage)
Former-commit-id: e8d8d98e84982792405af30b6dec11d201ac6895
2015-01-02 15:35:47 +01:00
Hans Joachim Desserud
3e3a8e9f98 Added comment on now-deprecated class
Former-commit-id: b5a365e8a60440462e25f132b4533ccb63a618f3
2015-01-01 21:39:22 +01:00
Hans Joachim Desserud
7440a039fd commons-cli doens't seem to be used in -core
Former-commit-id: 944ab0af44b76fb756d1364f3668a46f30e6db57
2015-01-01 15:25:09 +01:00
Hans Joachim Desserud
e73f9ab02f Upgrade h2 to latest stable 1.3.x release. Changing to 1.4.x resulted in test failure, though from reading their website 1.4.x seem to still be a beta release.
Former-commit-id: caaf2c9ab015efea1d9fb9e1a27cef2d80a2a8df
2015-01-01 15:03:51 +01:00
Hans Joachim Desserud
59815b858e Upgrade commons-compress
Former-commit-id: 10854e2ace5adda595f1c128967cd5b3651a8dee
2015-01-01 14:38:31 +01:00
Hans Joachim Desserud
7df7f59d93 Coordinated lucene version numbers
Former-commit-id: e01b8f67226f02b8e717b455053444d1388c6afd
2015-01-01 14:18:43 +01:00
Hans Joachim Desserud
e971bc1991 Upgrade some dependencies in core
Former-commit-id: 46e52a37b74f817b74c0c74f594ae848cdaa7de6
2015-01-01 14:09:16 +01:00
Hans Joachim Desserud
a3f0f12779 Upgraded dependencies for maven plugin to latest version
Former-commit-id: 8ec25f0991a91799e58b75e09cf78ae4ae3ebcb8
2015-01-01 13:41:21 +01:00
Hans Joachim Desserud
2a9c214593 Upgrade ant to latest version
Former-commit-id: ca9562702accbce4d924dd877d7045bfa603a3f4
2015-01-01 12:59:09 +01:00
Jeremy Long
3fc37f3e5e Merge pull request #178 from hansjoachim/junit4.12
Upgrade to junit 4.12

Former-commit-id: ea40044f7576c2281e734699b1f8a1d538b038f5
2014-12-31 17:09:05 -05:00
=
ebe4423e25 Upgrade to junit 4.12
Former-commit-id: 7cd88ac5702a5035d7a2e15b157ab6f8468d6f43
2014-12-31 16:45:56 +01:00
Jeremy Long
cfafb4a101 ensured CentralAnalyzer is not enabled during some tests
Former-commit-id: 69ca1ebf12080c448b4a3113f6c90da90e2e6da9
2014-12-31 07:49:27 -05:00
Jeremy Long
8d538a9977 improved error reporting to assist users dealing with issue #177
Former-commit-id: bc9191cb97d11b3c5455a5e1980d1be9c0bbc4d5
2014-12-31 07:43:30 -05:00
351 changed files with 17202 additions and 23885 deletions

3
.gitignore vendored
View File

@@ -10,6 +10,7 @@
.settings
maven-eclipse.xml
.externalToolBuilders
.pmd
# Netbeans configuration
nb-configuration.xml
/target/
@@ -22,4 +23,4 @@ _site/**
#unknown as to why these are showing up... but need to be ignored.
.LCKpom.xml~
#coverity
/cov-int/
/cov-int/

View File

@@ -20,7 +20,7 @@ Copyright (c) 2013 - Jeremy Long. All Rights Reserved.
<parent>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-parent</artifactId>
<version>1.2.8</version>
<version>1.2.11</version>
</parent>
<artifactId>dependency-check-ant</artifactId>
@@ -68,7 +68,6 @@ Copyright (c) 2013 - Jeremy Long. All Rights Reserved.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>2.6</version>
<configuration>
<escapeWindowsPaths>false</escapeWindowsPaths>
</configuration>
@@ -191,10 +190,18 @@ Copyright (c) 2013 - Jeremy Long. All Rights Reserved.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<version>2.1</version>
<version>2.3</version>
<configuration>
<transformers>
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
@@ -218,29 +225,13 @@ Copyright (c) 2013 - Jeremy Long. All Rights Reserved.
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
<excludes>
<exclude>**/checkstyle*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<instrumentation>
<!--instrumentation>
<ignoreTrivial>true</ignoreTrivial>
</instrumentation>
</instrumentation-->
<check>
<branchRate>85</branchRate>
<lineRate>85</lineRate>
@@ -269,7 +260,6 @@ Copyright (c) 2013 - Jeremy Long. All Rights Reserved.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<systemProperties>
<property>
@@ -279,162 +269,139 @@ Copyright (c) 2013 - Jeremy Long. All Rights Reserved.
</systemProperties>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<showDeprecation>false</showDeprecation>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-module-markdown</artifactId>
<version>1.5</version>
</dependency>
</dependencies>
<configuration>
<skipDeploy>true</skipDeploy>
<reportPlugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
<reportSets>
<reportSet>
<reports>
<report>index</report>
<report>summary</report>
<report>license</report>
<report>help</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<bottom>Copyright© 2012-14 Jeremy Long. All Rights Reserved.</bottom>
</configuration>
<reportSets>
<reportSet>
<id>default</id>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.1</version>
<reportSets>
<reportSet>
<reports>
<report>dependency-updates-report</report>
<report>plugin-updates-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.16</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</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-checkstyle-plugin</artifactId>
<version>2.11</version>
<configuration>
<enableRulesSummary>false</enableRulesSummary>
<configLocation>${basedir}/../src/main/config/checkstyle-checks.xml</configLocation>
<headerLocation>${basedir}/../src/main/config/checkstyle-header.txt</headerLocation>
<suppressionsLocation>${basedir}/../src/main/config/checkstyle-suppressions.xml</suppressionsLocation>
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<targetJdk>1.6</targetJdk>
<linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding>
<excludes>
<exclude>**/generated/*.java</exclude>
</excludes>
<rulesets>
<ruleset>../src/main/config/dcrules.xml</ruleset>
<ruleset>/rulesets/java/basic.xml</ruleset>
<ruleset>/rulesets/java/imports.xml</ruleset>
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
</rulesets>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.3</version>
</plugin>
</reportPlugins>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
<reportSets>
<reportSet>
<reports>
<report>summary</report>
<report>license</report>
<report>help</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<failOnError>false</failOnError>
<bottom>Copyright© 2012-15 Jeremy Long. All Rights Reserved.</bottom>
</configuration>
<reportSets>
<reportSet>
<id>default</id>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.1</version>
<reportSets>
<reportSet>
<reports>
<report>dependency-updates-report</report>
<report>plugin-updates-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.16</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</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-checkstyle-plugin</artifactId>
<version>2.11</version>
<configuration>
<enableRulesSummary>false</enableRulesSummary>
<enableFilesSummary>false</enableFilesSummary>
<configLocation>${basedir}/../src/main/config/checkstyle-checks.xml</configLocation>
<headerLocation>${basedir}/../src/main/config/checkstyle-header.txt</headerLocation>
<suppressionsLocation>${basedir}/../src/main/config/checkstyle-suppressions.xml</suppressionsLocation>
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.0.1</version>
<configuration>
<targetJdk>1.6</targetJdk>
<linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding>
<excludes>
<exclude>**/generated/*.java</exclude>
</excludes>
<rulesets>
<ruleset>../src/main/config/dcrules.xml</ruleset>
<ruleset>/rulesets/java/basic.xml</ruleset>
<ruleset>/rulesets/java/imports.xml</ruleset>
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
</rulesets>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.3</version>
</plugin>
</plugins>
</reporting>
<dependencies>
<dependency>
<groupId>org.owasp</groupId>
@@ -456,12 +423,12 @@ Copyright (c) 2013 - Jeremy Long. All Rights Reserved.
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant</artifactId>
<version>1.9.3</version>
<version>1.9.4</version>
</dependency>
<dependency>
<groupId>org.apache.ant</groupId>
<artifactId>ant-testutil</artifactId>
<version>1.9.3</version>
<version>1.9.4</version>
<scope>test</scope>
</dependency>
</dependencies>

View File

@@ -46,7 +46,7 @@ import org.owasp.dependencycheck.utils.Settings;
/**
* An Ant task definition to execute dependency-check during an Ant build.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class DependencyCheckTask extends Task {
@@ -98,8 +98,8 @@ public class DependencyCheckTask extends Task {
}
/**
* Returns the path. If the path has not been initialized yet, this class is synchronized, and will instantiate the
* path object.
* Returns the path. If the path has not been initialized yet, this class is synchronized, and will instantiate the path
* object.
*
* @return the path
*/
@@ -215,9 +215,9 @@ public class DependencyCheckTask extends Task {
this.reportOutputDirectory = reportOutputDirectory;
}
/**
* Specifies if the build should be failed if a CVSS score above a specified level is identified. The default is 11
* which means since the CVSS scores are 0-10, by default the build will never fail and the CVSS score is set to 11.
* The valid range for the fail build on CVSS is 0 to 11, where anything above 10 will not cause the build to fail.
* Specifies if the build should be failed if a CVSS score above a specified level is identified. The default is 11 which
* means since the CVSS scores are 0-10, by default the build will never fail and the CVSS score is set to 11. The valid range
* for the fail build on CVSS is 0 to 11, where anything above 10 will not cause the build to fail.
*/
private float failBuildOnCVSS = 11;
@@ -239,8 +239,8 @@ public class DependencyCheckTask extends Task {
this.failBuildOnCVSS = failBuildOnCVSS;
}
/**
* Sets whether auto-updating of the NVD CVE/CPE data is enabled. It is not recommended that this be turned to
* false. Default is true.
* Sets whether auto-updating of the NVD CVE/CPE data is enabled. It is not recommended that this be turned to false. Default
* is true.
*/
private boolean autoUpdate = true;
@@ -262,8 +262,31 @@ public class DependencyCheckTask extends Task {
this.autoUpdate = autoUpdate;
}
/**
* The report format to be generated (HTML, XML, VULN, ALL). This configuration option has no affect if using this
* within the Site plugin unless the externalReport is set to true. Default is HTML.
* Whether only the update phase should be executed.
*/
private boolean updateOnly = false;
/**
* Get the value of updateOnly.
*
* @return the value of updateOnly
*/
public boolean isUpdateOnly() {
return updateOnly;
}
/**
* Set the value of updateOnly.
*
* @param updateOnly new value of updateOnly
*/
public void setUpdateOnly(boolean updateOnly) {
this.updateOnly = updateOnly;
}
/**
* The report format to be generated (HTML, XML, VULN, ALL). This configuration option has no affect if using this within the
* Site plugin unless the externalReport is set to true. Default is HTML.
*/
private String reportFormat = "HTML";
@@ -322,8 +345,7 @@ public class DependencyCheckTask extends Task {
* Set the value of proxyServer.
*
* @param proxyUrl new value of proxyServer
* @deprecated use {@link org.owasp.dependencycheck.taskdefs.DependencyCheckTask#setProxyServer(java.lang.String)}
* instead
* @deprecated use {@link org.owasp.dependencycheck.taskdefs.DependencyCheckTask#setProxyServer(java.lang.String)} instead
*/
@Deprecated
public void setProxyUrl(String proxyUrl) {
@@ -565,7 +587,7 @@ public class DependencyCheckTask extends Task {
private boolean centralAnalyzerEnabled = false;
/**
* Get the value of centralAnalyzerEnabled
* Get the value of centralAnalyzerEnabled.
*
* @return the value of centralAnalyzerEnabled
*/
@@ -574,7 +596,7 @@ public class DependencyCheckTask extends Task {
}
/**
* Set the value of centralAnalyzerEnabled
* Set the value of centralAnalyzerEnabled.
*
* @param centralAnalyzerEnabled new value of centralAnalyzerEnabled
*/
@@ -606,7 +628,7 @@ public class DependencyCheckTask extends Task {
}
/**
* The URL of the Nexus server.
* The URL of a Nexus server's REST API end point (http://domain/nexus/service/local).
*/
private String nexusUrl;
@@ -764,8 +786,8 @@ public class DependencyCheckTask extends Task {
}
/**
* Additional ZIP File extensions to add analyze. This should be a comma-separated list of file extensions to treat
* like ZIP files.
* Additional ZIP File extensions to add analyze. This should be a comma-separated list of file extensions to treat like ZIP
* files.
*/
private String zipExtensions;
@@ -913,46 +935,51 @@ public class DependencyCheckTask extends Task {
Engine engine = null;
try {
engine = new Engine(DependencyCheckTask.class.getClassLoader());
for (Resource resource : path) {
final FileProvider provider = resource.as(FileProvider.class);
if (provider != null) {
final File file = provider.getFile();
if (file != null && file.exists()) {
engine.scan(file);
}
}
}
try {
engine.analyzeDependencies();
DatabaseProperties prop = null;
CveDB cve = null;
//todo - should this be its own task?
if (updateOnly) {
engine.doUpdates();
} else {
try {
cve = new CveDB();
cve.open();
prop = cve.getDatabaseProperties();
} catch (DatabaseException ex) {
LOGGER.log(Level.FINE, "Unable to retrieve DB Properties", ex);
} finally {
if (cve != null) {
cve.close();
for (Resource resource : path) {
final FileProvider provider = resource.as(FileProvider.class);
if (provider != null) {
final File file = provider.getFile();
if (file != null && file.exists()) {
engine.scan(file);
}
}
}
}
final ReportGenerator reporter = new ReportGenerator(applicationName, engine.getDependencies(), engine.getAnalyzers(), prop);
reporter.generateReports(reportOutputDirectory, reportFormat);
if (this.failBuildOnCVSS <= 10) {
checkForFailure(engine.getDependencies());
engine.analyzeDependencies();
DatabaseProperties prop = null;
CveDB cve = null;
try {
cve = new CveDB();
cve.open();
prop = cve.getDatabaseProperties();
} catch (DatabaseException ex) {
LOGGER.log(Level.FINE, "Unable to retrieve DB Properties", ex);
} finally {
if (cve != null) {
cve.close();
}
}
final ReportGenerator reporter = new ReportGenerator(applicationName, engine.getDependencies(), engine.getAnalyzers(), prop);
reporter.generateReports(reportOutputDirectory, reportFormat);
if (this.failBuildOnCVSS <= 10) {
checkForFailure(engine.getDependencies());
}
if (this.showSummary) {
showSummary(engine.getDependencies());
}
} catch (IOException ex) {
LOGGER.log(Level.FINE, "Unable to generate dependency-check report", ex);
throw new BuildException("Unable to generate dependency-check report", ex);
} catch (Exception ex) {
LOGGER.log(Level.FINE, "An exception occurred; unable to continue task", ex);
throw new BuildException("An exception occurred; unable to continue task", ex);
}
if (this.showSummary) {
showSummary(engine.getDependencies());
}
} catch (IOException ex) {
LOGGER.log(Level.FINE, "Unable to generate dependency-check report", ex);
throw new BuildException("Unable to generate dependency-check report", ex);
} catch (Exception ex) {
LOGGER.log(Level.FINE, "An exception occurred; unable to continue task", ex);
throw new BuildException("An exception occurred; unable to continue task", ex);
}
} catch (DatabaseException ex) {
LOGGER.log(Level.SEVERE, "Unable to connect to the dependency-check database; analysis has stopped");
@@ -980,8 +1007,8 @@ public class DependencyCheckTask extends Task {
}
/**
* Takes the properties supplied and updates the dependency-check settings. Additionally, this sets the system
* properties required to change the proxy server, port, and connection timeout.
* Takes the properties supplied and updates the dependency-check settings. Additionally, this sets the system properties
* required to change the proxy server, port, and connection timeout.
*/
private void populateSettings() {
Settings.initialize();

View File

@@ -1,11 +1,4 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.taskdefs</title>
* </head>
* <body>
* This package includes the Ant task definitions.
* </body>
* </html>
*/
package org.owasp.dependencycheck.taskdefs;

View File

@@ -26,6 +26,7 @@ The following properties can be set on the dependency-check-maven plugin.
Property | Description | Default Value
---------------------|------------------------------------|------------------
autoUpdate | Sets whether auto-updating of the NVD CVE/CPE data is enabled. It is not recommended that this be turned to false. | true
updateOnly | If set to true only the update phase of dependency-check will be executed; no scan will be executed and no report will be generated. | false
externalReport | When using as a Site plugin this parameter sets whether or not the external report format should be used. | false
outputDirectory | The location to write the report(s). Note, this is not used if generating the report as part of a `mvn site` build | 'target'
failBuildOnCVSS | Specifies if the build should be failed if a CVSS score above a specified level is identified. The default is 11 which means since the CVSS scores are 0-10, by default the build will never fail. | 11
@@ -51,9 +52,9 @@ Property | Description
archiveAnalyzerEnabled | Sets whether the Archive Analyzer will be used. | true
zipExtensions | A comma-separated list of additional file extensions to be treated like a ZIP file, the contents will be extracted and analyzed. | &nbsp;
jarAnalyzer | Sets whether the Jar Analyzer will be used. | true
centralAnalyzerEnabled | Sets whether the Central Analyzer will be used. If this analyzer is being disabled there is a good chance you also want to disable the Nexus Analyzer (see below). | true
centralAnalyzerEnabled | Sets whether the Central Analyzer will be used. **Disabling this analyzer is not recommended as it could lead to false negatives (e.g. libraries that have vulnerabilities may not be reported correctly).** If this analyzer is being disabled there is a good chance you also want to disable the Nexus Analyzer (see below). | true
nexusAnalyzerEnabled | Sets whether Nexus Analyzer will be used. This analyzer is superceded by the Central Analyzer; however, you can configure this to run against a Nexus Pro installation. | true
nexusUrl | Defines the Nexus Pro URL. If not set the Nexus Analyzer will be disabled. | &nbsp;
nexusUrl | Defines the Nexus web service endpoint (example http://domain.enterprise/nexus/service/local/). If not set the Nexus Analyzer will be disabled. | &nbsp;
nexusUsesProxy | Whether or not the defined proxy should be used when connecting to Nexus. | true
nuspecAnalyzerEnabled | Sets whether or not the .NET Nuget Nuspec Analyzer will be used. | true
assemblyAnalyzerEnabled | Sets whether or not the .NET Assembly Analyzer should be used. | true

View File

@@ -1,3 +1,10 @@
About
====================
OWASP dependency-check-ant is an Ant Task that uses dependency-check-core to detect publicly
disclosed vulnerabilities associated with the project's dependencies. The task will
generate a report listing the dependency, any identified Common Platform Enumeration (CPE)
identifiers, and the associated Common Vulnerability and Exposure (CVE) entries.
Installation
====================
Download dependency-check-ant from [bintray here](http://dl.bintray.com/jeremy-long/owasp/dependency-check-ant-${project.version}.jar).
@@ -19,7 +26,7 @@ must add the classpath to the taskdef:
```
It is important to understand that the first time this task is executed it may
take 20 minutes or more as it downloads and processes the data from the National
take 10 minutes or more as it downloads and processes the data from the National
Vulnerability Database (NVD) hosted by NIST: https://nvd.nist.gov
After the first batch download, as long as the task is executed at least once every

View File

@@ -1,6 +1,6 @@
Usage
====================
First, add the dependency-check-ant taskdef to your build.xml (see the [installation guide](installation.html):
First, add the dependency-check-ant taskdef to your build.xml (see the [installation guide](installation.html)):
```xml
<taskdef name="dependency-check" classname="org.owasp.dependencycheck.taskdefs.DependencyCheckTask"/>

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -18,7 +18,9 @@ Copyright (c) 2013 Jeremy Long. All Rights Reserved.
-->
<project name="dependency-check-ant">
<bannerLeft>
<name>dependency-check-ant</name>
<name>OWASP dependency-check-ant</name>
<alt>OWASP dependency-check-ant</alt>
<src>./images/dc-ant.svg</src>
</bannerLeft>
<body>
<breadcrumbs>
@@ -29,7 +31,6 @@ Copyright (c) 2013 Jeremy Long. All Rights Reserved.
<item name="Usage" href="usage.html"/>
<item name="Configuration" href="configuration.html"/>
</menu>
<menu ref="Project Documentation" />
<menu ref="reports" />
</body>
</project>

View File

@@ -27,9 +27,13 @@ import org.owasp.dependencycheck.utils.Settings;
/**
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class DependencyCheckTaskTest extends BuildFileTest {
//TODO: The use of deprecated class BuildFileTestcan possibly
//be replaced with BuildFileRule. However, it currently isn't included in the ant-testutil jar.
//This should be fixed in ant-testutil 1.9.5, so we can check back once that has been released.
//Reference: http://mail-archives.apache.org/mod_mbox/ant-user/201406.mbox/%3C000001cf87ba$8949b690$9bdd23b0$@de%3E
@Before
@Override

View File

@@ -20,7 +20,7 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
<parent>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-parent</artifactId>
<version>1.2.8</version>
<version>1.2.11</version>
</parent>
<artifactId>dependency-check-cli</artifactId>
@@ -60,27 +60,21 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<mainClass>org.owasp.dependencycheck.App</mainClass>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
<excludes>
<exclude>**/checkstyle*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<instrumentation>
<!--instrumentation>
<ignoreTrivial>true</ignoreTrivial>
</instrumentation>
</instrumentation-->
<check>
<branchRate>85</branchRate>
<lineRate>85</lineRate>
@@ -114,7 +108,6 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<systemProperties>
<property>
@@ -133,160 +126,10 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<showDeprecation>false</showDeprecation>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-module-markdown</artifactId>
<version>1.5</version>
</dependency>
</dependencies>
<configuration>
<skipDeploy>true</skipDeploy>
<reportPlugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
<reportSets>
<reportSet>
<reports>
<report>index</report>
<report>summary</report>
<report>license</report>
<report>help</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<bottom>Copyright© 2012-14 Jeremy Long. All Rights Reserved.</bottom>
</configuration>
<reportSets>
<reportSet>
<id>default</id>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.1</version>
<reportSets>
<reportSet>
<reports>
<report>dependency-updates-report</report>
<report>plugin-updates-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.16</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</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-checkstyle-plugin</artifactId>
<version>2.11</version>
<configuration>
<enableRulesSummary>false</enableRulesSummary>
<configLocation>${basedir}/../src/main/config/checkstyle-checks.xml</configLocation>
<headerLocation>${basedir}/../src/main/config/checkstyle-header.txt</headerLocation>
<suppressionsLocation>${basedir}/../src/main/config/checkstyle-suppressions.xml</suppressionsLocation>
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.1</version>
<configuration>
<targetJdk>1.6</targetJdk>
<linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding>
<excludes>
<exclude>**/generated/*.java</exclude>
</excludes>
<rulesets>
<ruleset>../src/main/config/dcrules.xml</ruleset>
<ruleset>/rulesets/java/basic.xml</ruleset>
<ruleset>/rulesets/java/imports.xml</ruleset>
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
</rulesets>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.3</version>
</plugin>
</reportPlugins>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.8.1</version>
<configuration>
<programs>
<program>
@@ -332,6 +175,137 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
<reportSets>
<reportSet>
<reports>
<report>summary</report>
<report>license</report>
<report>help</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<failOnError>false</failOnError>
<bottom>Copyright© 2012-15 Jeremy Long. All Rights Reserved.</bottom>
</configuration>
<reportSets>
<reportSet>
<id>default</id>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.1</version>
<reportSets>
<reportSet>
<reports>
<report>dependency-updates-report</report>
<report>plugin-updates-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.16</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
</reportSets>
</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-checkstyle-plugin</artifactId>
<version>2.11</version>
<configuration>
<enableRulesSummary>false</enableRulesSummary>
<enableFilesSummary>false</enableFilesSummary>
<configLocation>${basedir}/../src/main/config/checkstyle-checks.xml</configLocation>
<headerLocation>${basedir}/../src/main/config/checkstyle-header.txt</headerLocation>
<suppressionsLocation>${basedir}/../src/main/config/checkstyle-suppressions.xml</suppressionsLocation>
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.1</version>
<configuration>
<targetJdk>1.6</targetJdk>
<linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding>
<excludes>
<exclude>**/generated/*.java</exclude>
</excludes>
<rulesets>
<ruleset>../src/main/config/dcrules.xml</ruleset>
<ruleset>/rulesets/java/basic.xml</ruleset>
<ruleset>/rulesets/java/imports.xml</ruleset>
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
</rulesets>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.3</version>
</plugin>
</plugins>
</reporting>
<dependencies>
<dependency>
<groupId>commons-cli</groupId>

View File

@@ -41,7 +41,7 @@ import org.owasp.dependencycheck.utils.Settings;
/**
* The command line interface for the DependencyCheck application.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class App {
@@ -95,12 +95,15 @@ public class App {
if (cli.isGetVersion()) {
cli.printVersionInfo();
} else if (cli.isUpdateOnly()) {
populateSettings(cli);
runUpdateOnly();
} else if (cli.isRunScan()) {
populateSettings(cli);
try {
runScan(cli.getReportDirectory(), cli.getReportFormat(), cli.getApplicationName(), cli.getScanFiles(), cli.getExcludeList());
} catch (InvalidScanPathException ex) {
Logger.getLogger(App.class.getName()).log(Level.SEVERE, "An invalid scan path was detected; unable to scan '//*' paths");
LOGGER.log(Level.SEVERE, "An invalid scan path was detected; unable to scan '//*' paths");
}
} else {
cli.printHelp();
@@ -212,11 +215,29 @@ public class App {
}
}
/**
* Only executes the update phase of dependency-check.
*/
private void runUpdateOnly() {
Engine engine = null;
try {
engine = new Engine();
engine.doUpdates();
} catch (DatabaseException ex) {
LOGGER.log(Level.SEVERE, "Unable to connect to the dependency-check database; analysis has stopped");
LOGGER.log(Level.FINE, "", ex);
} finally {
if (engine != null) {
engine.cleanup();
}
}
}
/**
* Updates the global Settings.
*
* @param cli a reference to the CLI Parser that contains the command line arguments used to set the corresponding
* settings in the core engine.
* @param cli a reference to the CLI Parser that contains the command line arguments used to set the corresponding settings in
* the core engine.
*/
private void populateSettings(CliParser cli) {
@@ -231,6 +252,8 @@ public class App {
final String suppressionFile = cli.getSuppressionFile();
final boolean jarDisabled = cli.isJarDisabled();
final boolean archiveDisabled = cli.isArchiveDisabled();
final boolean pyDistDisabled = cli.isPythonDistributionDisabled();
final boolean pyPkgDisabled = cli.isPythonPackageDisabled();
final boolean assemblyDisabled = cli.isAssemblyDisabled();
final boolean nuspecDisabled = cli.isNuspecDisabled();
final boolean centralDisabled = cli.isCentralDisabled();
@@ -296,6 +319,8 @@ public class App {
//File Type Analyzer Settings
Settings.setBoolean(Settings.KEYS.ANALYZER_JAR_ENABLED, !jarDisabled);
Settings.setBoolean(Settings.KEYS.ANALYZER_ARCHIVE_ENABLED, !archiveDisabled);
Settings.setBoolean(Settings.KEYS.ANALYZER_PYTHON_DISTRIBUTION_ENABLED, !pyDistDisabled);
Settings.setBoolean(Settings.KEYS.ANALYZER_PYTHON_PACKAGE_ENABLED, !pyPkgDisabled);
Settings.setBoolean(Settings.KEYS.ANALYZER_NUSPEC_ENABLED, !nuspecDisabled);
Settings.setBoolean(Settings.KEYS.ANALYZER_ASSEMBLY_ENABLED, !assemblyDisabled);

View File

@@ -20,6 +20,7 @@ package org.owasp.dependencycheck;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.logging.Logger;
import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.HelpFormatter;
@@ -36,7 +37,7 @@ import org.owasp.dependencycheck.utils.Settings;
/**
* A utility to parse command line arguments for the DependencyCheck.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public final class CliParser {
@@ -84,8 +85,8 @@ public final class CliParser {
/**
* Validates that the command line arguments are valid.
*
* @throws FileNotFoundException if there is a file specified by either the SCAN or CPE command line arguments that
* does not exist.
* @throws FileNotFoundException if there is a file specified by either the SCAN or CPE command line arguments that does not
* exist.
* @throws ParseException is thrown if there is an exception parsing the command line.
*/
private void validateArgs() throws FileNotFoundException, ParseException {
@@ -112,8 +113,8 @@ public final class CliParser {
}
/**
* Validates whether or not the path(s) points at a file that exists; if the path(s) does not point to an existing
* file a FileNotFoundException is thrown.
* Validates whether or not the path(s) points at a file that exists; if the path(s) does not point to an existing file a
* FileNotFoundException is thrown.
*
* @param paths the paths to validate if they exists
* @param optType the option being validated (e.g. scan, out, etc.)
@@ -140,7 +141,7 @@ public final class CliParser {
throw new FileNotFoundException(msg);
} else if (!path.contains("*") && !path.contains("?")) {
File f = new File(path);
if ("o".equals(argumentName.substring(0, 1).toLowerCase()) && !"ALL".equals(this.getReportFormat().toUpperCase())) {
if ("o".equalsIgnoreCase(argumentName.substring(0, 1)) && !"ALL".equalsIgnoreCase(this.getReportFormat())) {
final String checkPath = path.toLowerCase();
if (checkPath.endsWith(".html") || checkPath.endsWith(".xml") || checkPath.endsWith(".htm")) {
if (f.getParentFile() == null) {
@@ -257,8 +258,8 @@ public final class CliParser {
}
/**
* Adds the advanced command line options to the given options collection. These are split out for purposes of being
* able to display two different help messages.
* Adds the advanced command line options to the given options collection. These are split out for purposes of being able to
* display two different help messages.
*
* @param options a collection of command line arguments
* @throws IllegalArgumentException thrown if there is an exception
@@ -266,6 +267,9 @@ public final class CliParser {
@SuppressWarnings("static-access")
private void addAdvancedOptions(final Options options) throws IllegalArgumentException {
final Option updateOnly = OptionBuilder.withLongOpt(ARGUMENT.UPDATE_ONLY)
.withDescription("Only update the local NVD data cache; no scan will be executed.").create();
final Option data = OptionBuilder.withArgName("path").hasArg().withLongOpt(ARGUMENT.DATA_DIRECTORY)
.withDescription("The location of the H2 Database file. This option should generally not be set.")
.create(ARGUMENT.DATA_DIRECTORY_SHORT);
@@ -319,12 +323,20 @@ public final class CliParser {
final Option disableNuspecAnalyzer = OptionBuilder.withLongOpt(ARGUMENT.DISABLE_NUSPEC)
.withDescription("Disable the Nuspec Analyzer.")
.create();
final Option disableAssemblyAnalyzer = OptionBuilder.withLongOpt(ARGUMENT.DISABLE_ASSEMBLY)
.withDescription("Disable the .NET Assembly Analyzer.")
.create();
final Option disablePythonDistributionAnalyzer = OptionBuilder.withLongOpt(ARGUMENT.DISABLE_PY_DIST)
.withDescription("Disable the Python Distribution Analyzer.").create();
final Option disablePythonPackageAnalyzer = OptionBuilder.withLongOpt(ARGUMENT.DISABLE_PY_PKG)
.withDescription("Disable the Python Package Analyzer.").create();
final Option disableCentralAnalyzer = OptionBuilder.withLongOpt(ARGUMENT.DISABLE_CENTRAL)
.withDescription("Disable the Central Analyzer. If this analyzer is disabled it is likely you also want to disable the Nexus Analyzer.")
.withDescription("Disable the Central Analyzer. If this analyzer is disabled it is likely you also want to disable "
+ "the Nexus Analyzer.")
.create();
final Option disableNexusAnalyzer = OptionBuilder.withLongOpt(ARGUMENT.DISABLE_NEXUS)
@@ -332,7 +344,8 @@ public final class CliParser {
.create();
final Option nexusUrl = OptionBuilder.withArgName("url").hasArg().withLongOpt(ARGUMENT.NEXUS_URL)
.withDescription("The url to the Nexus Pro Server. If not set the Nexus Analyzer will be disabled.")
.withDescription("The url to the Nexus Server's REST API Endpoint (http://domain/nexus/service/local). "
+ "If not set the Nexus Analyzer will be disabled.")
.create();
final Option nexusUsesProxy = OptionBuilder.withArgName("true/false").hasArg().withLongOpt(ARGUMENT.NEXUS_USES_PROXY)
@@ -349,7 +362,8 @@ public final class CliParser {
.withDescription("The path to Mono for .NET Assembly analysis on non-windows systems.")
.create();
options.addOption(proxyPort)
options.addOption(updateOnly)
.addOption(proxyPort)
.addOption(proxyServer)
.addOption(proxyUsername)
.addOption(proxyPassword)
@@ -363,6 +377,8 @@ public final class CliParser {
.addOption(disableJarAnalyzer)
.addOption(disableArchiveAnalyzer)
.addOption(disableAssemblyAnalyzer)
.addOption(disablePythonDistributionAnalyzer)
.addOption(disablePythonPackageAnalyzer)
.addOption(disableNuspecAnalyzer)
.addOption(disableCentralAnalyzer)
.addOption(disableNexusAnalyzer)
@@ -373,8 +389,8 @@ public final class CliParser {
}
/**
* Adds the deprecated command line options to the given options collection. These are split out for purposes of not
* including them in the help message. We need to add the deprecated options so as not to break existing scripts.
* Adds the deprecated command line options to the given options collection. These are split out for purposes of not including
* them in the help message. We need to add the deprecated options so as not to break existing scripts.
*
* @param options a collection of command line arguments
* @throws IllegalArgumentException thrown if there is an exception
@@ -452,6 +468,24 @@ public final class CliParser {
return (line != null) && line.hasOption(ARGUMENT.DISABLE_ASSEMBLY);
}
/**
* Returns true if the disablePyDist command line argument was specified.
*
* @return true if the disablePyDist command line argument was specified; otherwise false
*/
public boolean isPythonDistributionDisabled() {
return (line != null) && line.hasOption(ARGUMENT.DISABLE_PY_DIST);
}
/**
* Returns true if the disablePyPkg command line argument was specified.
*
* @return true if the disablePyPkg command line argument was specified; otherwise false
*/
public boolean isPythonPackageDisabled() {
return (line != null) && line.hasOption(ARGUMENT.DISABLE_PY_PKG);
}
/**
* Returns true if the disableNexus command line argument was specified.
*
@@ -484,8 +518,7 @@ public final class CliParser {
}
/**
* Returns true if the Nexus Analyzer should use the configured proxy to connect to Nexus; otherwise false is
* returned.
* Returns true if the Nexus Analyzer should use the configured proxy to connect to Nexus; otherwise false is returned.
*
* @return true if the Nexus Analyzer should use the configured proxy to connect to Nexus; otherwise false
*/
@@ -687,15 +720,23 @@ public final class CliParser {
}
/**
* Checks if the auto update feature has been disabled. If it has been disabled via the command line this will
* return false.
* Checks if the auto update feature has been disabled. If it has been disabled via the command line this will return false.
*
* @return if auto-update is allowed.
* @return <code>true</code> if auto-update is allowed; otherwise <code>false</code>
*/
public boolean isAutoUpdate() {
return (line == null) || !line.hasOption(ARGUMENT.DISABLE_AUTO_UPDATE);
}
/**
* Checks if the update only flag has been set.
*
* @return <code>true</code> if the update only flag has been set; otherwise <code>false</code>.
*/
public boolean isUpdateOnly() {
return (line == null) || line.hasOption(ARGUMENT.UPDATE_ONLY);
}
/**
* Returns the database driver name if specified; otherwise null is returned.
*
@@ -771,6 +812,10 @@ public final class CliParser {
* The short CLI argument name specifying that the CPE/CVE/etc. data should not be automatically updated.
*/
public static final String DISABLE_AUTO_UPDATE_SHORT = "n";
/**
* The long CLI argument name specifying that only the update phase should be executed; no scan should be run.
*/
public static final String UPDATE_ONLY = "updateonly";
/**
* The long CLI argument name specifying the directory to write the reports to.
*/
@@ -882,6 +927,14 @@ public final class CliParser {
* Disables the Archive Analyzer.
*/
public static final String DISABLE_ARCHIVE = "disableArchive";
/**
* Disables the Python Distribution Analyzer.
*/
public static final String DISABLE_PY_DIST = "disablePyDist";
/**
* Disables the Python Package Analyzer.
*/
public static final String DISABLE_PY_PKG = "disablePyPkg";
/**
* Disables the Assembly Analyzer.
*/

View File

@@ -20,7 +20,7 @@ package org.owasp.dependencycheck;
/**
* Thrown if an invalid path is encountered.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
class InvalidScanPathException extends Exception {

View File

@@ -1,12 +1,4 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck</title>
* </head>
* <body>
* Includes the main entry point for the DependencyChecker.
* </body>
* </html>
*/
*/
package org.owasp.dependencycheck;

View File

@@ -19,26 +19,30 @@ Short | Argument&nbsp;Name&nbsp;&nbsp; | Parameter | Description | Requir
Advanced Options
================
Short | Argument&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Parameter | Description | Default&nbsp;Value
-------|-----------------------|-----------------|-----------------------------------------------------------------------------|---------------
| \-\-disableArchive | | Sets whether the Archive Analyzer will be used. | false
Short | Argument&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Parameter | Description | Default&nbsp;Value
-------|-----------------------|-----------------|----------------------------------------------------------------------------------|-------------------
\-P | \-\-propertyfile | \<file\> | Specifies a file that contains properties to use instead of applicaion defaults. | &nbsp;
| \-\-updateonly | | If set only the update phase of dependency-check will be executed; no scan will be executed and no report will be generated. | &nbsp;
| \-\-disablePyDist | | Sets whether the Python Distribution Analyzer will be used. | false
| \-\-disablePyPkg | | Sets whether the Python Package Analyzer will be used. | false
| \-\-disableArchive | | Sets whether the Archive Analyzer will be used. | false
| \-\-zipExtensions | \<strings\> | A comma-separated list of additional file extensions to be treated like a ZIP file, the contents will be extracted and analyzed. | &nbsp;
| \-\-disableJar | | Sets whether the Jar Analyzer will be used. | false
| \-\-disableCentral | | Sets whether the Central Analyzer will be used. If this analyzer is being disabled there is a good chance you also want to disable the Nexus Analyzer. | false
| \-\-disableJar | | Sets whether the Jar Analyzer will be used. | false
| \-\-disableCentral | | Sets whether the Central Analyzer will be used. **Disabling this analyzer is not recommended as it could lead to false negatives (e.g. libraries that have vulnerabilities may not be reported correctly).** If this analyzer is being disabled there is a good chance you also want to disable the Nexus Analyzer. | false
| \-\-disableNexus | | Sets whether the Nexus Analyzer will be used. Note, this has been superceded by the Central Analyzer. However, you can configure the Nexus URL to utilize an internally hosted Nexus Pro server. | false
| \-\-nexus | \<url\> | The url to the Nexus Pro Server. If not set the Nexus Analyzer will be disabled. | &nbsp;
| \-\-nexusUsesProxy | \<true\|false\> | Whether or not the defined proxy should be used when connecting to Nexus. | true
| \-\-disableNuspec | | Sets whether or not the .NET Nuget Nuspec Analyzer will be used. | false
| \-\-disableAssembly | | Sets whether or not the .NET Assembly Analyzer should be used. | false
| \-\-pathToMono | \<path\> | The path to Mono for .NET Assembly analysis on non-windows systems. | &nbsp;
| \-\-proxyserver | \<server\> | The proxy server to use when downloading resources. | &nbsp;
| \-\-proxyport | \<port\> | The proxy port to use when downloading resources. | &nbsp;
| \-\-connectiontimeout | \<timeout\> | The connection timeout (in milliseconds) to use when downloading resources. | &nbsp;
| \-\-proxypass | \<pass\> | The proxy password to use when downloading resources. | &nbsp;
| \-\-proxyuser | \<user\> | The proxy username to use when downloading resources. | &nbsp;
| \-\-connectionString | \<connStr\> | The connection string to the database. | &nbsp;
| \-\-dbDriverName | \<driver\> | The database driver name. | &nbsp;
| \-\-nexus | \<url\> | The url to the Nexus Server's web service end point (example: http://domain.enterprise/nexus/service/local/). If not set the Nexus Analyzer will be disabled. | &nbsp;
| \-\-nexusUsesProxy | \<true\|false\> | Whether or not the defined proxy should be used when connecting to Nexus. | true
| \-\-disableNuspec | | Sets whether or not the .NET Nuget Nuspec Analyzer will be used. | false
| \-\-disableAssembly | | Sets whether or not the .NET Assembly Analyzer should be used. | false
| \-\-pathToMono | \<path\> | The path to Mono for .NET Assembly analysis on non-windows systems. | &nbsp;
| \-\-proxyserver | \<server\> | The proxy server to use when downloading resources. | &nbsp;
| \-\-proxyport | \<port\> | The proxy port to use when downloading resources. | &nbsp;
| \-\-connectiontimeout | \<timeout\> | The connection timeout (in milliseconds) to use when downloading resources. | &nbsp;
| \-\-proxypass | \<pass\> | The proxy password to use when downloading resources. | &nbsp;
| \-\-proxyuser | \<user\> | The proxy username to use when downloading resources. | &nbsp;
| \-\-connectionString | \<connStr\> | The connection string to the database. | &nbsp;
| \-\-dbDriverName | \<driver\> | The database driver name. | &nbsp;
| \-\-dbDriverPath | \<path\> | The path to the database driver; note, this does not need to be set unless the JAR is outside of the class path. | &nbsp;
| \-\-dbPassword | \<password\> | The password for connecting to the database. | &nbsp;
| \-\-dbUser | \<user\> | The username used to connect to the database. | &nbsp;
| \-\-dbPassword | \<password\> | The password for connecting to the database. | &nbsp;
| \-\-dbUser | \<user\> | The username used to connect to the database. | &nbsp;
\-d | \-\-data | \<path\> | The location of the data directory used to store persistent data. This option should generally not be set. | &nbsp;

View File

@@ -1,3 +1,10 @@
About
====================
OWASP dependency-check-cli is an command line tool that uses dependency-check-core to detect
publicly disclosed vulnerabilities associated with the scanned project dependencies. The tool
will generate a report listing the dependency, any identified Common Platform Enumeration (CPE)
identifiers, and the associated Common Vulnerability and Exposure (CVE) entries.
Installation & Usage
====================
Download the dependency-check command line tool [here](http://dl.bintray.com/jeremy-long/owasp/dependency-check-${project.version}-release.zip).

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 10 KiB

View File

@@ -18,17 +18,18 @@ Copyright (c) 2013 Jeremy Long. All Rights Reserved.
-->
<project name="dependency-check-cli">
<bannerLeft>
<name>dependency-check-cli</name>
<name>OWASP dependency-check-cli</name>
<alt>OWASP dependency-check-cli</alt>
<src>./images/dc-cli.svg</src>
</bannerLeft>
<body>
<breadcrumbs>
<item name="dependency-check" href="../index.html"/>
</breadcrumbs>
<menu name="Getting Started">
<item name="Installation" href="installation.html"/>
<item name="Installation" href="index.html"/>
<item name="Configuration" href="arguments.html"/>
</menu>
<menu ref="Project Documentation" />
<menu ref="reports" />
</body>
</project>

View File

@@ -34,7 +34,7 @@ import org.owasp.dependencycheck.utils.Settings;
/**
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class CliParserTest {

View File

@@ -20,7 +20,7 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<parent>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-parent</artifactId>
<version>1.2.8</version>
<version>1.2.11</version>
</parent>
<artifactId>dependency-check-core</artifactId>
@@ -93,7 +93,6 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.8</version>
<executions>
<execution>
<phase>generate-resources</phase>
@@ -110,7 +109,6 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<id>jar</id>
@@ -127,24 +125,13 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
</goals>
</execution>
</executions>
<configuration>
<archive>
<manifest>
<addDefaultImplementationEntries>true</addDefaultImplementationEntries>
</manifest>
</archive>
<excludes>
<exclude>**/checkstyle*</exclude>
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
<configuration>
<instrumentation>
<ignoreTrivial>true</ignoreTrivial>
<!--ignoreTrivial>true</ignoreTrivial-->
<ignores>
<ignore>.*\$KEYS\.class</ignore>
<ignore>.*\$Element\.class</ignore>
@@ -192,7 +179,6 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<configuration>
<systemProperties>
<property>
@@ -213,201 +199,164 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.16</version>
<configuration>
<systemProperties>
<property>
<name>data.directory</name>
<value>${project.build.directory}/data</value>
</property>
<property>
<name>temp.directory</name>
<value>${project.build.directory}/temp</value>
</property>
</systemProperties>
<includes>
<include>**/*IntegrationTest.java</include>
</includes>
</configuration>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
<goal>verify</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.3</version>
<dependencies>
<dependency>
<groupId>org.apache.maven.doxia</groupId>
<artifactId>doxia-module-markdown</artifactId>
<version>1.5</version>
</dependency>
</dependencies>
<configuration>
<skipDeploy>true</skipDeploy>
<reportPlugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
<reportSets>
<reportSet>
<reports>
<report>index</report>
<report>summary</report>
<report>license</report>
<report>help</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<bottom>Copyright© 2012-14 Jeremy Long. All Rights Reserved.</bottom>
</configuration>
<reportSets>
<reportSet>
<id>default</id>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.1</version>
<reportSets>
<reportSet>
<reports>
<report>dependency-updates-report</report>
<report>plugin-updates-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.16</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
<reportSet>
<id>integration-tests</id>
<reports>
<report>report-only</report>
<report>failsafe-report-only</report>
</reports>
</reportSet>
</reportSets>
</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-checkstyle-plugin</artifactId>
<version>2.11</version>
<configuration>
<enableRulesSummary>false</enableRulesSummary>
<configLocation>${basedir}/../src/main/config/checkstyle-checks.xml</configLocation>
<headerLocation>${basedir}/../src/main/config/checkstyle-header.txt</headerLocation>
<suppressionsLocation>${basedir}/../src/main/config/checkstyle-suppressions.xml</suppressionsLocation>
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.1</version>
<configuration>
<targetJdk>1.6</targetJdk>
<linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding>
<excludes>
<exclude>**/generated/*.java</exclude>
</excludes>
<rulesets>
<ruleset>../src/main/config/dcrules.xml</ruleset>
<ruleset>/rulesets/java/basic.xml</ruleset>
<ruleset>/rulesets/java/imports.xml</ruleset>
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
</rulesets>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.3</version>
</plugin>
<dependency>
<groupId>org.codehaus.mojo</groupId>
<artifactId>javancss-maven-plugin</artifactId>
<version>2.0</version>
</dependency>
</reportPlugins>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.1</version>
<configuration>
<showDeprecation>false</showDeprecation>
<compilerArgument>-Xlint:unchecked</compilerArgument>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<reporting>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-project-info-reports-plugin</artifactId>
<version>2.7</version>
<reportSets>
<reportSet>
<reports>
<report>summary</report>
<report>license</report>
<report>help</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<failOnError>false</failOnError>
<bottom>Copyright© 2012-15 Jeremy Long. All Rights Reserved.</bottom>
</configuration>
<reportSets>
<reportSet>
<id>default</id>
<reports>
<report>javadoc</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.1</version>
<reportSets>
<reportSet>
<reports>
<report>dependency-updates-report</report>
<report>plugin-updates-report</report>
</reports>
</reportSet>
</reportSets>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jxr-plugin</artifactId>
<version>2.4</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>cobertura-maven-plugin</artifactId>
<version>2.6</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-report-plugin</artifactId>
<version>2.16</version>
<reportSets>
<reportSet>
<reports>
<report>report-only</report>
</reports>
</reportSet>
<reportSet>
<id>integration-tests</id>
<reports>
<report>report-only</report>
<report>failsafe-report-only</report>
</reports>
</reportSet>
</reportSets>
</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-checkstyle-plugin</artifactId>
<version>2.11</version>
<configuration>
<enableRulesSummary>false</enableRulesSummary>
<enableFilesSummary>false</enableFilesSummary>
<configLocation>${basedir}/../src/main/config/checkstyle-checks.xml</configLocation>
<headerLocation>${basedir}/../src/main/config/checkstyle-header.txt</headerLocation>
<suppressionsLocation>${basedir}/../src/main/config/checkstyle-suppressions.xml</suppressionsLocation>
<suppressionsFileExpression>checkstyle.suppressions.file</suppressionsFileExpression>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-pmd-plugin</artifactId>
<version>3.1</version>
<configuration>
<targetJdk>1.6</targetJdk>
<linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding>
<excludes>
<exclude>**/generated/*.java</exclude>
</excludes>
<rulesets>
<ruleset>../src/main/config/dcrules.xml</ruleset>
<ruleset>/rulesets/java/basic.xml</ruleset>
<ruleset>/rulesets/java/imports.xml</ruleset>
<ruleset>/rulesets/java/unusedcode.xml</ruleset>
</rulesets>
</configuration>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.3</version>
</plugin>
</plugins>
</reporting>
<dependencies>
<!-- Note, to stay compatible with Jenkins installations only JARs compiled to 1.6 can be used -->
<dependency>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-utils</artifactId>
@@ -416,30 +365,24 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-test-framework</artifactId>
<version>4.3.1</version>
<version>${apache.lucene.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<version>1.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
<version>2.0.1</version>
<version>3.0.0</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.8.1</version>
<version>1.9</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
@@ -449,22 +392,22 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.5</version>
<version>2.6</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-core</artifactId>
<version>4.5.1</version>
<version>${apache.lucene.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-analyzers-common</artifactId>
<version>4.5.1</version>
<version>${apache.lucene.version}</version>
</dependency>
<dependency>
<groupId>org.apache.lucene</groupId>
<artifactId>lucene-queryparser</artifactId>
<version>4.5.1</version>
<version>${apache.lucene.version}</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
@@ -474,7 +417,7 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<version>1.3.172</version>
<version>1.3.176</version>
</dependency>
<dependency>
<groupId>org.jsoup</groupId>
@@ -591,6 +534,18 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>uk.ltd.getahead</groupId>
<artifactId>dwr</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.sun.mail</groupId>
<artifactId>mailapi</artifactId>
<version>1.5.2</version>
</dependency>
</dependencies>
<profiles>
<profile>
@@ -606,7 +561,7 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.16</version>
<version>2.18.1</version>
<configuration>
<skip>true</skip>
</configuration>
@@ -614,7 +569,7 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>2.16</version>
<version>2.18.1</version>
<configuration>
<systemProperties>
<property>
@@ -728,8 +683,92 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
<version>3.0</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.opensaml</groupId>
<artifactId>xmltooling</artifactId>
<version>1.4.1</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
<version>3.2.12.RELEASE</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.3.1</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.google.gerrit</groupId>
<artifactId>gerrit-extension-api</artifactId>
<version>2.11</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.google.apis</groupId>
<artifactId>google-api-services-sqladmin</artifactId>
<version>v1beta4-rev5-1.20.0</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.google.gwt.google-apis</groupId>
<artifactId>gwt-gears</artifactId>
<version>1.2.1</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.mozilla</groupId>
<artifactId>rhino</artifactId>
<version>1.7.6</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.microsoft.windowsazure</groupId>
<artifactId>microsoft-azure-api-media</artifactId>
<version>0.5.0</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.microsoft.windowsazure</groupId>
<artifactId>microsoft-azure-api-management-sql</artifactId>
<version>0.5.0</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.microsoft.bingads</groupId>
<artifactId>microsoft.bingads</artifactId>
<version>9.3.4</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
</profiles>
<properties>
<!-- new versions of lucene are compiled with JDK 1.7 and cannot be used ubiquitously in Jenkins
this, we cannot upgrade beyond 4.7.2 -->
<apache.lucene.version>4.7.2</apache.lucene.version>
</properties>
</project>

View File

@@ -44,11 +44,10 @@ import org.owasp.dependencycheck.utils.InvalidSettingException;
import org.owasp.dependencycheck.utils.Settings;
/**
* Scans files, directories, etc. for Dependencies. Analyzers are loaded and used to process the files found by the
* scan, if a file is encountered and an Analyzer is associated with the file type then the file is turned into a
* dependency.
* Scans files, directories, etc. for Dependencies. Analyzers are loaded and used to process the files found by the scan, if a
* file is encountered and an Analyzer is associated with the file type then the file is turned into a dependency.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class Engine {
@@ -116,7 +115,7 @@ public class Engine {
* Loads the analyzers specified in the configuration file (or system properties).
*/
private void loadAnalyzers() {
if (analyzers.size() > 0) {
if (!analyzers.isEmpty()) {
return;
}
for (AnalysisPhase phase : AnalysisPhase.values()) {
@@ -163,8 +162,8 @@ public class Engine {
}
/**
* Scans an array of files or directories. If a directory is specified, it will be scanned recursively. Any
* dependencies identified are added to the dependency collection.
* Scans an array of files or directories. If a directory is specified, it will be scanned recursively. Any dependencies
* identified are added to the dependency collection.
*
* @param paths an array of paths to files or directories to be analyzed
* @return the list of dependencies scanned
@@ -184,8 +183,8 @@ public class Engine {
}
/**
* Scans a given file or directory. If a directory is specified, it will be scanned recursively. Any dependencies
* identified are added to the dependency collection.
* Scans a given file or directory. If a directory is specified, it will be scanned recursively. Any dependencies identified
* are added to the dependency collection.
*
* @param path the path to a file or directory to be analyzed
* @return the list of dependencies scanned
@@ -196,8 +195,8 @@ public class Engine {
}
/**
* Scans an array of files or directories. If a directory is specified, it will be scanned recursively. Any
* dependencies identified are added to the dependency collection.
* Scans an array of files or directories. If a directory is specified, it will be scanned recursively. Any dependencies
* identified are added to the dependency collection.
*
* @param files an array of paths to files or directories to be analyzed.
* @return the list of dependencies
@@ -216,8 +215,8 @@ public class Engine {
}
/**
* Scans a list of files or directories. If a directory is specified, it will be scanned recursively. Any
* dependencies identified are added to the dependency collection.
* Scans a list of files or directories. If a directory is specified, it will be scanned recursively. Any dependencies
* identified are added to the dependency collection.
*
* @param files a set of paths to files or directories to be analyzed
* @return the list of dependencies scanned
@@ -236,8 +235,8 @@ public class Engine {
}
/**
* Scans a list of files or directories. If a directory is specified, it will be scanned recursively. Any
* dependencies identified are added to the dependency collection.
* Scans a list of files or directories. If a directory is specified, it will be scanned recursively. Any dependencies
* identified are added to the dependency collection.
*
* @param files a set of paths to files or directories to be analyzed
* @return the list of dependencies scanned
@@ -256,8 +255,8 @@ public class Engine {
}
/**
* Scans a given file or directory. If a directory is specified, it will be scanned recursively. Any dependencies
* identified are added to the dependency collection.
* Scans a given file or directory. If a directory is specified, it will be scanned recursively. Any dependencies identified
* are added to the dependency collection.
*
* @param file the path to a file or directory to be analyzed
* @return the list of dependencies scanned
@@ -319,16 +318,17 @@ public class Engine {
return null;
}
final String fileName = file.getName();
final String extension = FileUtils.getFileExtension(fileName);
String extension = FileUtils.getFileExtension(fileName);
if (null == extension) {
extension = fileName;
}
Dependency dependency = null;
if (extension != null) {
if (supportsExtension(extension)) {
dependency = new Dependency(file);
dependencies.add(dependency);
if (supportsExtension(extension)) {
dependency = new Dependency(file);
if (extension == null ? fileName == null : extension.equals(fileName)) {
dependency.setFileExtension(extension);
}
} else {
final String msg = String.format("No file extension found on file '%s'. The file was not analyzed.", file.toString());
LOGGER.log(Level.FINE, msg);
dependencies.add(dependency);
}
return dependency;
}
@@ -468,7 +468,7 @@ public class Engine {
/**
* Cycles through the cached web data sources and calls update on all of them.
*/
private void doUpdates() {
public void doUpdates() {
LOGGER.info("Checking for updates");
final UpdateService service = new UpdateService(serviceClassLoader);
final Iterator<CachedWebDataSource> iterator = service.getDataSources();

View File

@@ -34,10 +34,10 @@ import org.owasp.dependencycheck.reporting.ReportGenerator;
import org.owasp.dependencycheck.utils.Settings;
/**
* This class provides a way to easily conduct a scan solely based on existing evidence metadata rather than collecting
* evidence from the files themselves. This class is based on the Ant task and Maven plugin with the exception that it
* takes a list of dependencies that can be programmatically added from data in a spreadsheet, database or some other
* datasource and conduct a scan based on this pre-defined evidence.
* This class provides a way to easily conduct a scan solely based on existing evidence metadata rather than collecting evidence
* from the files themselves. This class is based on the Ant task and Maven plugin with the exception that it takes a list of
* dependencies that can be programmatically added from data in a spreadsheet, database or some other datasource and conduct a
* scan based on this pre-defined evidence.
*
* <h2>Example:</h2>
* <pre>
@@ -161,9 +161,9 @@ public class DependencyCheckScanAgent {
}
/**
* Specifies if the build should be failed if a CVSS score above a specified level is identified. The default is 11
* which means since the CVSS scores are 0-10, by default the build will never fail and the CVSS score is set to 11.
* The valid range for the fail build on CVSS is 0 to 11, where anything above 10 will not cause the build to fail.
* Specifies if the build should be failed if a CVSS score above a specified level is identified. The default is 11 which
* means since the CVSS scores are 0-10, by default the build will never fail and the CVSS score is set to 11. The valid range
* for the fail build on CVSS is 0 to 11, where anything above 10 will not cause the build to fail.
*/
private float failBuildOnCVSS = 11;
@@ -186,8 +186,8 @@ public class DependencyCheckScanAgent {
}
/**
* Sets whether auto-updating of the NVD CVE/CPE data is enabled. It is not recommended that this be turned to
* false. Default is true.
* Sets whether auto-updating of the NVD CVE/CPE data is enabled. It is not recommended that this be turned to false. Default
* is true.
*/
private boolean autoUpdate = true;
@@ -210,8 +210,31 @@ public class DependencyCheckScanAgent {
}
/**
* The report format to be generated (HTML, XML, VULN, ALL). This configuration option has no affect if using this
* within the Site plugin unless the externalReport is set to true. Default is HTML.
* flag indicating whether or not to generate a report of findings.
*/
private boolean generateReport = true;
/**
* Get the value of generateReport.
*
* @return the value of generateReport
*/
public boolean isGenerateReport() {
return generateReport;
}
/**
* Set the value of generateReport.
*
* @param generateReport new value of generateReport
*/
public void setGenerateReport(boolean generateReport) {
this.generateReport = generateReport;
}
/**
* The report format to be generated (HTML, XML, VULN, ALL). This configuration option has no affect if using this within the
* Site plugin unless the externalReport is set to true. Default is HTML.
*/
private ReportGenerator.Format reportFormat = ReportGenerator.Format.HTML;
@@ -671,8 +694,8 @@ public class DependencyCheckScanAgent {
}
/**
* Additional ZIP File extensions to add analyze. This should be a comma-separated list of file extensions to treat
* like ZIP files.
* Additional ZIP File extensions to add analyze. This should be a comma-separated list of file extensions to treat like ZIP
* files.
*/
private String zipExtensions;
@@ -813,8 +836,7 @@ public class DependencyCheckScanAgent {
* Executes the Dependency-Check on the dependent libraries.
*
* @return the Engine used to scan the dependencies.
* @throws org.owasp.dependencycheck.data.nvdcve.DatabaseException thrown if there is an exception connecting to the
* database
* @throws org.owasp.dependencycheck.data.nvdcve.DatabaseException thrown if there is an exception connecting to the database
*/
private Engine executeDependencyCheck() throws DatabaseException {
populateSettings();
@@ -860,8 +882,8 @@ public class DependencyCheckScanAgent {
}
/**
* Takes the properties supplied and updates the dependency-check settings. Additionally, this sets the system
* properties required to change the proxy server, port, and connection timeout.
* Takes the properties supplied and updates the dependency-check settings. Additionally, this sets the system properties
* required to change the proxy server, port, and connection timeout.
*/
private void populateSettings() {
Settings.initialize();
@@ -942,14 +964,16 @@ public class DependencyCheckScanAgent {
/**
* Executes the dependency-check and generates the report.
*
* @throws org.owasp.dependencycheck.exception.ScanAgentException thrown if there is an exception executing the
* scan.
* @return a reference to the engine used to perform the scan.
* @throws org.owasp.dependencycheck.exception.ScanAgentException thrown if there is an exception executing the scan.
*/
public void execute() throws ScanAgentException {
public Engine execute() throws ScanAgentException {
Engine engine = null;
try {
engine = executeDependencyCheck();
generateExternalReports(engine, new File(this.reportOutputDirectory));
if (this.generateReport) {
generateExternalReports(engine, new File(this.reportOutputDirectory));
}
if (this.showSummary) {
showSummary(engine.getDependencies());
}
@@ -966,6 +990,7 @@ public class DependencyCheckScanAgent {
engine.cleanup();
}
}
return engine;
}
/**
@@ -973,8 +998,7 @@ public class DependencyCheckScanAgent {
* configuration.
*
* @param dependencies the list of dependency objects
* @throws org.owasp.dependencycheck.exception.ScanAgentException thrown if there is an exception executing the
* scan.
* @throws org.owasp.dependencycheck.exception.ScanAgentException thrown if there is an exception executing the scan.
*/
private void checkForFailure(List<Dependency> dependencies) throws ScanAgentException {
final StringBuilder ids = new StringBuilder();

View File

@@ -1,13 +1,6 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.agent</title>
* </head>
* <body>
* The agent package holds an agent API that can be used by other applications that have information about dependencies;
* but would rather implement something in their code directly rather then spawn a process to run the entire
* dependency-check engine. This basically provides programmatic access to running a scan.
* </body>
* </html>
* The agent package holds an agent API that can be used by other applications that have information about dependencies; but would
* rather implement something in their code directly rather then spawn a process to run the entire dependency-check engine. This
* basically provides programmatic access to running a scan.
*/
package org.owasp.dependencycheck.agent;

View File

@@ -19,7 +19,7 @@ package org.owasp.dependencycheck.analyzer;
/**
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public abstract class AbstractAnalyzer implements Analyzer {

View File

@@ -31,7 +31,7 @@ import org.owasp.dependencycheck.utils.Settings;
/**
* The base FileTypeAnalyzer that all analyzers that have specific file types they analyze should extend.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public abstract class AbstractFileTypeAnalyzer extends AbstractAnalyzer implements FileTypeAnalyzer {

View File

@@ -38,7 +38,7 @@ import org.owasp.dependencycheck.utils.Settings;
/**
* Abstract base suppression analyzer that contains methods for parsing the suppression xml file.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public abstract class AbstractSuppressionAnalyzer extends AbstractAnalyzer {

View File

@@ -20,7 +20,7 @@ package org.owasp.dependencycheck.analyzer;
/**
* An enumeration defining the phases of analysis.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public enum AnalysisPhase {

View File

@@ -25,7 +25,7 @@ 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@owasp.org>
* @author Jeremy Long
*/
public interface Analyzer {

View File

@@ -24,7 +24,7 @@ import java.util.ServiceLoader;
* The Analyzer Service Loader. This class loads all services that implement
* org.owasp.dependencycheck.analyzer.Analyzer.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class AnalyzerService {

View File

@@ -54,7 +54,7 @@ import org.owasp.dependencycheck.utils.Settings;
* An analyzer that extracts files from archives and ensures any supported files contained within the archive are added
* to the dependency list.</p>
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
@@ -110,7 +110,7 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
static {
final String additionalZipExt = Settings.getString(Settings.KEYS.ADDITIONAL_ZIP_EXTENSIONS);
if (additionalZipExt != null) {
final HashSet<String> ext = new HashSet<String>(Arrays.asList(additionalZipExt));
final Set<String> ext = new HashSet<String>(Arrays.asList(additionalZipExt));
ZIPPABLES.addAll(ext);
}
EXTENSIONS.addAll(ZIPPABLES);
@@ -382,7 +382,7 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
fos = new FileOutputStream(file);
bos = new BufferedOutputStream(fos, BUFFER_SIZE);
int count;
final byte data[] = new byte[BUFFER_SIZE];
final byte[] data = new byte[BUFFER_SIZE];
while ((count = input.read(data, 0, BUFFER_SIZE)) != -1) {
bos.write(data, 0, count);
}

View File

@@ -51,10 +51,10 @@ import org.owasp.dependencycheck.utils.DependencyVersion;
import org.owasp.dependencycheck.utils.DependencyVersionUtil;
/**
* CPEAnalyzer is a utility class that takes a project dependency and attempts to discern if there is an associated CPE.
* It uses the evidence contained within the dependency to search the Lucene index.
* CPEAnalyzer is a utility class that takes a project dependency and attempts to discern if there is an associated CPE. It uses
* the evidence contained within the dependency to search the Lucene index.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class CPEAnalyzer implements Analyzer {
@@ -130,8 +130,8 @@ public class CPEAnalyzer implements Analyzer {
* Opens the data source.
*
* @throws IOException when the Lucene directory to be queried does not exist or is corrupt.
* @throws DatabaseException when the database throws an exception. This usually occurs when the database is in use
* by another process.
* @throws DatabaseException when the database throws an exception. This usually occurs when the database is in use by another
* process.
*/
public void open() throws IOException, DatabaseException {
LOGGER.log(Level.FINE, "Opening the CVE Database");
@@ -160,9 +160,13 @@ public class CPEAnalyzer implements Analyzer {
}
}
public boolean isOpen() {
return cpe != null && cpe.isOpen();
}
/**
* Searches the data store of CPE entries, trying to identify the CPE for the given dependency based on the evidence
* contained within. The dependency passed in is updated with any identified CPE values.
* Searches the data store of CPE entries, trying to identify the CPE for the given dependency based on the evidence contained
* within. The dependency passed in is updated with any identified CPE values.
*
* @param dependency the dependency to search for CPE entries on.
* @throws CorruptIndexException is thrown when the Lucene index is corrupt.
@@ -176,15 +180,12 @@ public class CPEAnalyzer implements Analyzer {
for (Confidence confidence : Confidence.values()) {
if (dependency.getVendorEvidence().contains(confidence)) {
vendors = addEvidenceWithoutDuplicateTerms(vendors, dependency.getVendorEvidence(), confidence);
LOGGER.fine(String.format("vendor search: %s", vendors));
}
if (dependency.getProductEvidence().contains(confidence)) {
products = addEvidenceWithoutDuplicateTerms(products, dependency.getProductEvidence(), confidence);
LOGGER.fine(String.format("product search: %s", products));
}
/* bug fix for #40 - version evidence is not showing up as "used" in the reports if there is no
* CPE identified. As such, we are "using" the evidence and ignoring the results. */
// if (dependency.getVersionEvidence().contains(confidence)) {
// addEvidenceWithoutDuplicateTerms("", dependency.getVersionEvidence(), confidence);
// }
if (!vendors.isEmpty() && !products.isEmpty()) {
final List<IndexEntry> entries = searchCPE(vendors, products, dependency.getProductEvidence().getWeighting(),
dependency.getVendorEvidence().getWeighting());
@@ -193,9 +194,11 @@ public class CPEAnalyzer implements Analyzer {
}
boolean identifierAdded = false;
for (IndexEntry e : entries) {
LOGGER.fine(String.format("Verifying entry: %s", e.toString()));
if (verifyEntry(e, dependency)) {
final String vendor = e.getVendor();
final String product = e.getProduct();
LOGGER.fine(String.format("identified vendor/product: %s/%s", vendor, product));
identifierAdded |= determineIdentifiers(dependency, vendor, product, confidence);
}
}
@@ -207,9 +210,9 @@ public class CPEAnalyzer implements Analyzer {
}
/**
* Returns the text created by concatenating the text and the values from the EvidenceCollection (filtered for a
* specific confidence). This attempts to prevent duplicate terms from being added.<br/<br/> Note, if the evidence
* is longer then 200 characters it will be truncated.
* Returns the text created by concatenating the text and the values from the EvidenceCollection (filtered for a specific
* confidence). This attempts to prevent duplicate terms from being added.<br/<br/> Note, if the evidence is longer then 200
* characters it will be truncated.
*
* @param text the base text.
* @param ec an EvidenceCollection
@@ -244,8 +247,8 @@ public class CPEAnalyzer implements Analyzer {
* version.</p>
*
* <p>
* If either the vendorWeightings or productWeightings lists have been populated this data is used to add weighting
* factors to the search.</p>
* If either the vendorWeightings or productWeightings lists have been populated this data is used to add weighting factors to
* the search.</p>
*
* @param vendor the text used to search the vendor field
* @param product the text used to search the product field
@@ -256,7 +259,7 @@ public class CPEAnalyzer implements Analyzer {
protected List<IndexEntry> searchCPE(String vendor, String product,
Set<String> vendorWeightings, Set<String> productWeightings) {
final ArrayList<IndexEntry> ret = new ArrayList<IndexEntry>(MAX_QUERY_RESULTS);
final List<IndexEntry> ret = new ArrayList<IndexEntry>(MAX_QUERY_RESULTS);
final String searchString = buildSearch(vendor, product, vendorWeightings, productWeightings);
if (searchString == null) {
@@ -270,13 +273,6 @@ public class CPEAnalyzer implements Analyzer {
final IndexEntry entry = new IndexEntry();
entry.setVendor(doc.get(Fields.VENDOR));
entry.setProduct(doc.get(Fields.PRODUCT));
// if (d.score < 0.08) {
// System.out.print(entry.getVendor());
// System.out.print(":");
// System.out.print(entry.getProduct());
// System.out.print(":");
// System.out.println(d.score);
// }
entry.setSearchScore(d.score);
if (!ret.contains(entry)) {
ret.add(entry);
@@ -301,8 +297,8 @@ public class CPEAnalyzer implements Analyzer {
* Builds a Lucene search string by properly escaping data and constructing a valid search query.</p>
*
* <p>
* If either the possibleVendor or possibleProducts lists have been populated this data is used to add weighting
* factors to the search string generated.</p>
* If either the possibleVendor or possibleProducts lists have been populated this data is used to add weighting factors to
* the search string generated.</p>
*
* @param vendor text to search the vendor field
* @param product text to search the product field
@@ -328,9 +324,8 @@ public class CPEAnalyzer implements Analyzer {
}
/**
* This method constructs a Lucene query for a given field. The searchText is split into separate words and if the
* word is within the list of weighted words then an additional weighting is applied to the term as it is appended
* into the query.
* This method constructs a Lucene query for a given field. The searchText is split into separate words and if the word is
* within the list of weighted words then an additional weighting is applied to the term as it is appended into the query.
*
* @param sb a StringBuilder that the query text will be appended to.
* @param field the field within the Lucene index that the query is searching.
@@ -401,8 +396,8 @@ public class CPEAnalyzer implements Analyzer {
}
/**
* Ensures that the CPE Identified matches the dependency. This validates that the product, vendor, and version
* information for the CPE are contained within the dependencies evidence.
* Ensures that the CPE Identified matches the dependency. This validates that the product, vendor, and version information
* for the CPE are contained within the dependencies evidence.
*
* @param entry a CPE entry.
* @param dependency the dependency that the CPE entries could be for.
@@ -427,17 +422,6 @@ public class CPEAnalyzer implements Analyzer {
* @return whether or not the EvidenceCollection contains the string
*/
private boolean collectionContainsString(EvidenceCollection ec, String text) {
//<editor-fold defaultstate="collapsed" desc="This code fold contains an old version of the code, delete once more testing is done">
// String[] splitText = text.split("[\\s_-]");
//
// for (String search : splitText) {
// //final String search = text.replaceAll("[\\s_-]", "").toLowerCase();
// if (ec.containsUsedString(search)) {
// return true;
// }
// }
//</editor-fold>
//TODO - likely need to change the split... not sure if this will work for CPE with special chars
if (text == null) {
return false;
@@ -459,9 +443,16 @@ public class CPEAnalyzer implements Analyzer {
list.add(word);
}
}
if (tempWord != null && !list.isEmpty()) {
final String tmp = list.get(list.size() - 1) + tempWord;
list.add(tmp);
if (tempWord != null) {
if (!list.isEmpty()) {
final String tmp = list.get(list.size() - 1) + tempWord;
list.add(tmp);
} else {
list.add(tempWord);
}
}
if (list.isEmpty()) {
return false;
}
boolean contains = true;
for (String word : list) {
@@ -491,9 +482,9 @@ public class CPEAnalyzer implements Analyzer {
}
/**
* Retrieves a list of CPE values from the CveDB based on the vendor and product passed in. The list is then
* validated to find only CPEs that are valid for the given dependency. It is possible that the CPE identified is a
* best effort "guess" based on the vendor, product, and version information.
* Retrieves a list of CPE values from the CveDB based on the vendor and product passed in. The list is then validated to find
* only CPEs that are valid for the given dependency. It is possible that the CPE identified is a best effort "guess" based on
* the vendor, product, and version information.
*
* @param dependency the Dependency being analyzed
* @param vendor the vendor for the CPE being analyzed
@@ -601,8 +592,8 @@ public class CPEAnalyzer implements Analyzer {
*/
BEST_GUESS,
/**
* The entire vendor/product group must be added (without a guess at version) because there is a CVE with a VS
* that only specifies vendor/product.
* The entire vendor/product group must be added (without a guess at version) because there is a CVE with a VS that only
* specifies vendor/product.
*/
BROAD_MATCH
}
@@ -750,8 +741,7 @@ public class CPEAnalyzer implements Analyzer {
//</editor-fold>
/**
* Standard implementation of compareTo that compares identifier confidence, evidence confidence, and then the
* identifier.
* Standard implementation of compareTo that compares identifier confidence, evidence confidence, and then the identifier.
*
* @param o the IdentifierMatch to compare to
* @return the natural ordering of IdentifierMatch

View File

@@ -17,6 +17,7 @@
*/
package org.owasp.dependencycheck.analyzer;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
@@ -24,18 +25,23 @@ import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.commons.io.FileUtils;
import org.owasp.dependencycheck.Engine;
import org.owasp.dependencycheck.analyzer.exception.AnalysisException;
import org.owasp.dependencycheck.data.central.CentralSearch;
import org.owasp.dependencycheck.data.nexus.MavenArtifact;
import org.owasp.dependencycheck.dependency.Confidence;
import org.owasp.dependencycheck.dependency.Dependency;
import org.owasp.dependencycheck.dependency.Evidence;
import org.owasp.dependencycheck.xml.pom.PomUtils;
import org.owasp.dependencycheck.utils.DownloadFailedException;
import org.owasp.dependencycheck.utils.Downloader;
import org.owasp.dependencycheck.utils.InvalidSettingException;
import org.owasp.dependencycheck.utils.Settings;
/**
* Analyzer which will attempt to locate a dependency, and the GAV information, by querying Central for the dependency's
* SHA-1 digest.
* Analyzer which will attempt to locate a dependency, and the GAV information, by querying Central for the dependency's SHA-1
* digest.
*
* @author colezlaw
*/
@@ -62,8 +68,7 @@ public class CentralAnalyzer extends AbstractFileTypeAnalyzer {
private static final Set<String> SUPPORTED_EXTENSIONS = newHashSet("jar");
/**
* The analyzer should be disabled if there are errors, so this is a flag to determine if such an error has
* occurred.
* The analyzer should be disabled if there are errors, so this is a flag to determine if such an error has occurred.
*/
private boolean errorFlag = false;
@@ -71,7 +76,6 @@ public class CentralAnalyzer extends AbstractFileTypeAnalyzer {
* The searcher itself.
*/
private CentralSearch searcher;
/**
* Field indicating if the analyzer is enabled.
*/
@@ -188,6 +192,39 @@ public class CentralAnalyzer extends AbstractFileTypeAnalyzer {
for (MavenArtifact ma : mas) {
LOGGER.fine(String.format("Central analyzer found artifact (%s) for dependency (%s)", ma.toString(), dependency.getFileName()));
dependency.addAsEvidence("central", ma, confidence);
boolean pomAnalyzed = false;
for (Evidence e : dependency.getVendorEvidence()) {
if ("pom".equals(e.getSource())) {
pomAnalyzed = true;
break;
}
}
if (!pomAnalyzed && ma.getPomUrl() != null) {
File pomFile = null;
try {
final File baseDir = Settings.getTempDirectory();
pomFile = File.createTempFile("pom", ".xml", baseDir);
if (!pomFile.delete()) {
final String msg = String.format("Unable to fetch pom.xml for %s from Central; "
+ "this could result in undetected CPE/CVEs.", dependency.getFileName());
LOGGER.warning(msg);
LOGGER.fine("Unable to delete temp file");
}
LOGGER.fine(String.format("Downloading %s", ma.getPomUrl()));
Downloader.fetchFile(new URL(ma.getPomUrl()), pomFile);
PomUtils.analyzePOM(dependency, pomFile);
} catch (DownloadFailedException ex) {
final String msg = String.format("Unable to download pom.xml for %s from Central; "
+ "this could result in undetected CPE/CVEs.", dependency.getFileName());
LOGGER.warning(msg);
} finally {
if (pomFile != null && !FileUtils.deleteQuietly(pomFile)) {
pomFile.deleteOnExit();
}
}
}
}
} catch (IllegalArgumentException iae) {
LOGGER.info(String.format("invalid sha1-hash on %s", dependency.getFileName()));
@@ -198,4 +235,5 @@ public class CentralAnalyzer extends AbstractFileTypeAnalyzer {
errorFlag = true;
}
}
}

View File

@@ -26,7 +26,7 @@ import org.owasp.dependencycheck.suppression.SuppressionRule;
* The suppression analyzer processes an externally defined XML document that complies with the suppressions.xsd schema.
* Any identified CPE entries within the dependencies that match will be removed.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class CpeSuppressionAnalyzer extends AbstractSuppressionAnalyzer {

View File

@@ -36,13 +36,13 @@ import org.owasp.dependencycheck.utils.LogUtils;
/**
* <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>
* 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>
* @author Jeremy Long
*/
public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Analyzer {
@@ -91,8 +91,8 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
//</editor-fold>
/**
* 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.
* 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
@@ -130,7 +130,6 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
} else if (cpeIdentifiersMatch(dependency, nextDependency)
&& hasSameBasePath(dependency, nextDependency)
&& fileNameMatch(dependency, nextDependency)) {
if (isCore(dependency, nextDependency)) {
mergeDependencies(dependency, nextDependency, dependenciesToRemove);
} else {
@@ -151,10 +150,10 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
* Adds the relatedDependency to the dependency's related dependencies.
*
* @param dependency the main dependency
* @param relatedDependency a collection of dependencies to be removed from the main analysis loop, this is the
* source of dependencies to remove
* @param dependenciesToRemove a collection of dependencies that will be removed from the main analysis loop, this
* function adds to this collection
* @param relatedDependency a collection of dependencies to be removed from the main analysis loop, this is the source of
* dependencies to remove
* @param dependenciesToRemove a collection of dependencies that will be removed from the main analysis loop, this function
* adds to this collection
*/
private void mergeDependencies(final Dependency dependency, final Dependency relatedDependency, final Set<Dependency> dependenciesToRemove) {
dependency.addRelatedDependency(relatedDependency);
@@ -163,12 +162,14 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
dependency.addRelatedDependency(i.next());
i.remove();
}
if (dependency.getSha1sum().equals(relatedDependency.getSha1sum())) {
dependency.addAllProjectReferences(relatedDependency.getProjectReferences());
}
dependenciesToRemove.add(relatedDependency);
}
/**
* Attempts to trim a maven repo to a common base path. This is typically
* [drive]\[repo_location]\repository\[path1]\[path2].
* 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.
@@ -207,21 +208,6 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
final String fileName1 = dependency1.getActualFile().getName();
final String fileName2 = dependency2.getActualFile().getName();
// //REMOVED because this is attempting to duplicate what is in the hasSameBasePath function.
// final File one = new File(fileName1);
// final File two = new File(fileName2);
// final String oneParent = one.getParent();
// final String twoParent = two.getParent();
// if (oneParent != null) {
// if (oneParent.equals(twoParent)) {
// fileName1 = one.getName();
// fileName2 = two.getName();
// } else {
// return false;
// }
// } else if (twoParent != null) {
// return false;
// }
//version check
final DependencyVersion version1 = DependencyVersionUtil.parseVersion(fileName1);
final DependencyVersion version2 = DependencyVersionUtil.parseVersion(fileName2);
@@ -321,8 +307,8 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
}
/**
* This is likely a very broken attempt at determining if the 'left' dependency is the 'core' library in comparison
* to the 'right' library.
* This is likely a very broken attempt at determining if the 'left' dependency is the 'core' library in comparison to the
* 'right' library.
*
* @param left the dependency to test
* @param right the dependency to test against
@@ -379,13 +365,12 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
}
/**
* Determines if the jar is shaded and the created pom.xml identified the same CPE as the jar - if so, the pom.xml
* dependency should be removed.
* Determines if the jar is shaded and the created pom.xml identified the same CPE as the jar - if so, the pom.xml dependency
* should be removed.
*
* @param dependency a dependency to check
* @param nextDependency another dependency to check
* @return true if on of the dependencies is a pom.xml and the identifiers between the two collections match;
* otherwise false
* @return true if on of the dependencies is a pom.xml and the identifiers between the two collections match; otherwise false
*/
private boolean isShadedJar(Dependency dependency, Dependency nextDependency) {
final String mainName = dependency.getFileName().toLowerCase();
@@ -399,8 +384,8 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
}
/**
* Determines which path is shortest; if path lengths are equal then we use compareTo of the string method to
* determine if the first path is smaller.
* Determines which path is shortest; if path lengths are equal then we use compareTo of the string method to determine if the
* first path is smaller.
*
* @param left the first path to compare
* @param right the second path to compare

View File

@@ -38,7 +38,7 @@ import org.owasp.dependencycheck.dependency.VulnerableSoftware;
/**
* This analyzer attempts to remove some well known false positives - specifically regarding the java runtime.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class FalsePositiveAnalyzer extends AbstractAnalyzer {

View File

@@ -29,7 +29,7 @@ import org.owasp.dependencycheck.utils.DependencyVersionUtil;
*
* Takes a dependency and analyzes the filename and determines the hashes.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class FileNameAnalyzer extends AbstractAnalyzer implements Analyzer {

View File

@@ -20,7 +20,7 @@ package org.owasp.dependencycheck.analyzer;
/**
* An Analyzer that scans specific file types.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public interface FileTypeAnalyzer extends Analyzer {

View File

@@ -19,6 +19,7 @@ package org.owasp.dependencycheck.analyzer;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Set;
import org.owasp.dependencycheck.Engine;
import org.owasp.dependencycheck.analyzer.exception.AnalysisException;
@@ -28,7 +29,7 @@ import org.owasp.dependencycheck.dependency.Evidence;
/**
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class HintAnalyzer extends AbstractAnalyzer implements Analyzer {
@@ -64,8 +65,8 @@ public class HintAnalyzer extends AbstractAnalyzer implements Analyzer {
//</editor-fold>
/**
* The HintAnalyzer uses knowledge about a dependency to add additional information to help in identification of
* identifiers or vulnerabilities.
* The HintAnalyzer uses knowledge about a dependency to add additional information to help in identification of identifiers
* or vulnerabilities.
*
* @param dependency The dependency being analyzed
* @param engine The scanning engine
@@ -84,24 +85,39 @@ public class HintAnalyzer extends AbstractAnalyzer implements Analyzer {
Confidence.HIGH);
final Evidence springTest3 = new Evidence("Manifest",
"Implementation-Title",
"spring-core",
Confidence.HIGH);
final Evidence springTest4 = new Evidence("Manifest",
"Bundle-Vendor",
"SpringSource",
Confidence.HIGH);
Set<Evidence> evidence = dependency.getProductEvidence().getEvidence();
if (evidence.contains(springTest1) || evidence.contains(springTest2)) {
dependency.getProductEvidence().addEvidence("hint analyzer", "product", "springsource_spring_framework", Confidence.HIGH);
final Evidence springTest5 = new Evidence("jar",
"package name",
"springframework",
Confidence.LOW);
//springsource/vware problem
final Set<Evidence> product = dependency.getProductEvidence().getEvidence();
final Set<Evidence> vendor = dependency.getVendorEvidence().getEvidence();
if (product.contains(springTest1) || product.contains(springTest2) || product.contains(springTest3)
|| (dependency.getFileName().contains("spring") && (product.contains(springTest5) || vendor.contains(springTest5)))) {
dependency.getProductEvidence().addEvidence("hint analyzer", "product", "springsource spring framework", Confidence.HIGH);
dependency.getVendorEvidence().addEvidence("hint analyzer", "vendor", "SpringSource", Confidence.HIGH);
dependency.getVendorEvidence().addEvidence("hint analyzer", "vendor", "vmware", Confidence.HIGH);
}
evidence = dependency.getVendorEvidence().getEvidence();
if (evidence.contains(springTest3)) {
if (vendor.contains(springTest4)) {
dependency.getProductEvidence().addEvidence("hint analyzer", "product", "springsource_spring_framework", Confidence.HIGH);
dependency.getVendorEvidence().addEvidence("hint analyzer", "vendor", "vmware", Confidence.HIGH);
}
//sun/oracle problem
final Iterator<Evidence> itr = dependency.getVendorEvidence().iterator();
final ArrayList<Evidence> newEntries = new ArrayList<Evidence>();
final List<Evidence> newEntries = new ArrayList<Evidence>();
while (itr.hasNext()) {
final Evidence e = itr.next();
if ("sun".equalsIgnoreCase(e.getValue(false))) {

View File

@@ -19,15 +19,12 @@ package org.owasp.dependencycheck.analyzer;
import java.io.BufferedOutputStream;
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.InputStreamReader;
import java.io.OutputStream;
import java.io.Reader;
import java.io.UnsupportedEncodingException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Enumeration;
@@ -46,36 +43,22 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import java.util.zip.ZipEntry;
import javax.xml.bind.JAXBContext;
import javax.xml.bind.JAXBElement;
import javax.xml.bind.JAXBException;
import javax.xml.bind.Unmarshaller;
import javax.xml.parsers.ParserConfigurationException;
import javax.xml.parsers.SAXParser;
import javax.xml.parsers.SAXParserFactory;
import javax.xml.transform.sax.SAXSource;
import org.jsoup.Jsoup;
import org.owasp.dependencycheck.Engine;
import org.owasp.dependencycheck.analyzer.exception.AnalysisException;
import org.owasp.dependencycheck.dependency.Confidence;
import org.owasp.dependencycheck.dependency.Dependency;
import org.owasp.dependencycheck.dependency.EvidenceCollection;
import org.owasp.dependencycheck.jaxb.pom.MavenNamespaceFilter;
import org.owasp.dependencycheck.jaxb.pom.generated.License;
import org.owasp.dependencycheck.jaxb.pom.generated.Model;
import org.owasp.dependencycheck.jaxb.pom.generated.Organization;
import org.owasp.dependencycheck.xml.pom.License;
import org.owasp.dependencycheck.xml.pom.PomUtils;
import org.owasp.dependencycheck.xml.pom.Model;
import org.owasp.dependencycheck.utils.FileUtils;
import org.owasp.dependencycheck.utils.NonClosingStream;
import org.owasp.dependencycheck.utils.Settings;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.XMLFilter;
import org.xml.sax.XMLReader;
/**
* Used to load a JAR file and collect information that can be used to determine the associated CPE.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class JarAnalyzer extends AbstractFileTypeAnalyzer {
@@ -158,24 +141,12 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
* A pattern to detect HTML within text.
*/
private static final Pattern HTML_DETECTION_PATTERN = Pattern.compile("\\<[a-z]+.*/?\\>", Pattern.CASE_INSENSITIVE);
/**
* The unmarshaller used to parse the pom.xml from a JAR file.
*/
private Unmarshaller pomUnmarshaller;
//</editor-fold>
//</editor-fold>
/**
* Constructs a new JarAnalyzer.
*/
public JarAnalyzer() {
try {
//final JAXBContext jaxbContext = JAXBContext.newInstance("org.owasp.dependencycheck.jaxb.pom.generated");
final JAXBContext jaxbContext = JAXBContext.newInstance(Model.class);
pomUnmarshaller = jaxbContext.createUnmarshaller();
} catch (JAXBException ex) { //guess we will just have a null pointer exception later...
LOGGER.log(Level.SEVERE, "Unable to load parser. See the log for more details.");
LOGGER.log(Level.FINE, null, ex);
}
}
//<editor-fold defaultstate="collapsed" desc="All standard implmentation details of Analyzer">
@@ -243,7 +214,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
@Override
public void analyzeFileType(Dependency dependency, Engine engine) throws AnalysisException {
try {
final ArrayList<ClassNameInformation> classNames = collectClassNames(dependency);
final List<ClassNameInformation> classNames = collectClassNames(dependency);
final String fileName = dependency.getFileName().toLowerCase();
if (classNames.isEmpty()
&& (fileName.endsWith("-sources.jar")
@@ -262,8 +233,8 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
}
/**
* 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.
* 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
* @param classes a collection of class name information
@@ -271,7 +242,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
* @throws AnalysisException is thrown if there is an exception parsing the pom
* @return whether or not evidence was added to the dependency
*/
protected boolean analyzePOM(Dependency dependency, ArrayList<ClassNameInformation> classes, Engine engine) throws AnalysisException {
protected boolean analyzePOM(Dependency dependency, List<ClassNameInformation> classes, Engine engine) throws AnalysisException {
boolean foundSomething = false;
final JarFile jar;
try {
@@ -295,20 +266,17 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
}
File externalPom = null;
if (pomEntries.isEmpty()) {
if (dependency.getActualFilePath().matches(".*\\.m2.repository\\b.*")) {
String pomPath = dependency.getActualFilePath();
pomPath = pomPath.substring(0, pomPath.lastIndexOf('.')) + ".pom";
externalPom = new File(pomPath);
if (externalPom.isFile()) {
pomEntries.add(pomPath);
} else {
return false;
}
String pomPath = dependency.getActualFilePath();
pomPath = pomPath.substring(0, pomPath.lastIndexOf('.')) + ".pom";
externalPom = new File(pomPath);
if (externalPom.isFile()) {
pomEntries.add(pomPath);
} else {
return false;
}
}
for (String path : pomEntries) {
LOGGER.fine(String.format("Reading pom entry: %s", path));
Properties pomProperties = null;
try {
if (externalPom == null) {
@@ -335,16 +303,18 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
newDependency.setFileName(displayName);
newDependency.setFilePath(displayPath);
setPomEvidence(newDependency, pom, pomProperties, null);
pom.processProperties(pomProperties);
setPomEvidence(newDependency, pom, null);
engine.getDependencies().add(newDependency);
Collections.sort(engine.getDependencies());
} else {
if (externalPom == null) {
pom = retrievePom(path, jar);
pom = PomUtils.readPom(path, jar);
} else {
pom = retrievePom(externalPom);
pom = PomUtils.readPom(externalPom);
}
foundSomething |= setPomEvidence(dependency, pom, pomProperties, classes);
pom.processProperties(pomProperties);
foundSomething |= setPomEvidence(dependency, pom, classes);
}
} catch (AnalysisException ex) {
final String msg = String.format("An error occured while analyzing '%s'.", dependency.getActualFilePath());
@@ -373,6 +343,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
reader = new InputStreamReader(jar.getInputStream(propEntry), "UTF-8");
pomProperties = new Properties();
pomProperties.load(reader);
LOGGER.fine(String.format("Read pom.properties: %s", propPath));
} finally {
if (reader != null) {
try {
@@ -400,6 +371,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
final JarEntry entry = entries.nextElement();
final String entryName = (new File(entry.getName())).getName().toLowerCase();
if (!entry.isDirectory() && "pom.xml".equals(entryName)) {
LOGGER.fine(String.format("POM Entry found: %s", entry.getName()));
pomEntries.add(entry.getName());
}
}
@@ -428,7 +400,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
fos = new FileOutputStream(file);
bos = new BufferedOutputStream(fos, BUFFER_SIZE);
int count;
final byte data[] = new byte[BUFFER_SIZE];
final byte[] data = new byte[BUFFER_SIZE];
while ((count = input.read(data, 0, BUFFER_SIZE)) != -1) {
bos.write(data, 0, count);
}
@@ -443,33 +415,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
closeStream(fos);
closeStream(input);
}
Model model = null;
FileInputStream fis = null;
try {
fis = new FileInputStream(file);
final InputStreamReader reader = new InputStreamReader(fis, "UTF-8");
final InputSource xml = new InputSource(reader);
final SAXSource source = new SAXSource(xml);
model = readPom(source);
} catch (FileNotFoundException ex) {
final String msg = String.format("Unable to parse pom '%s' in jar '%s' (File Not Found)", path, jar.getName());
LOGGER.log(Level.WARNING, msg);
LOGGER.log(Level.FINE, "", ex);
throw new AnalysisException(ex);
} catch (UnsupportedEncodingException ex) {
final String msg = String.format("Unable to parse pom '%s' in jar '%s' (IO Exception)", path, jar.getName());
LOGGER.log(Level.WARNING, msg);
LOGGER.log(Level.FINE, "", ex);
throw new AnalysisException(ex);
} catch (AnalysisException ex) {
final String msg = String.format("Unable to parse pom '%s' in jar '%s'", path, jar.getName());
LOGGER.log(Level.WARNING, msg);
LOGGER.log(Level.FINE, "", ex);
throw ex;
} finally {
closeStream(fis);
}
return model;
return PomUtils.readPom(file);
}
/**
@@ -502,138 +448,55 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
}
}
/**
* Retrieves the specified POM from a jar file and converts it to a Model.
*
* @param path the path to the pom.xml file within the jar file
* @param jar the jar file to extract the pom from
* @return returns a
* @throws AnalysisException is thrown if there is an exception extracting or parsing the POM
* {@link org.owasp.dependencycheck.jaxb.pom.generated.Model} object
*/
private Model retrievePom(String path, JarFile jar) throws AnalysisException {
final ZipEntry entry = jar.getEntry(path);
Model model = null;
if (entry != null) { //should never be null
try {
final NonClosingStream stream = new NonClosingStream(jar.getInputStream(entry));
final InputStreamReader reader = new InputStreamReader(stream, "UTF-8");
final InputSource xml = new InputSource(reader);
final SAXSource source = new SAXSource(xml);
model = readPom(source);
} catch (SecurityException ex) {
final String msg = String.format("Unable to parse pom '%s' in jar '%s'; invalid signature", path, jar.getName());
LOGGER.log(Level.WARNING, msg);
LOGGER.log(Level.FINE, null, ex);
throw new AnalysisException(ex);
} catch (IOException ex) {
final String msg = String.format("Unable to parse pom '%s' in jar '%s' (IO Exception)", path, jar.getName());
LOGGER.log(Level.WARNING, msg);
LOGGER.log(Level.FINE, "", ex);
throw new AnalysisException(ex);
} catch (Throwable ex) {
final String msg = String.format("Unexpected error during parsing of the pom '%s' in jar '%s'", path, jar.getName());
LOGGER.log(Level.WARNING, msg);
LOGGER.log(Level.FINE, "", ex);
throw new AnalysisException(ex);
}
}
return model;
}
/**
* Reads in the specified POM and converts it to a Model.
*
* @param file the pom.xml file
* @return returns a
* @throws AnalysisException is thrown if there is an exception extracting or parsing the POM
* {@link org.owasp.dependencycheck.jaxb.pom.generated.Model} object
*/
private Model retrievePom(File file) throws AnalysisException {
Model model = null;
try {
final FileInputStream stream = new FileInputStream(file);
final InputStreamReader reader = new InputStreamReader(stream, "UTF-8");
final InputSource xml = new InputSource(reader);
final SAXSource source = new SAXSource(xml);
model = readPom(source);
} catch (SecurityException ex) {
final String msg = String.format("Unable to parse pom '%s'; invalid signature", file.getPath());
LOGGER.log(Level.WARNING, msg);
LOGGER.log(Level.FINE, null, ex);
throw new AnalysisException(ex);
} catch (IOException ex) {
final String msg = String.format("Unable to parse pom '%s'(IO Exception)", file.getPath());
LOGGER.log(Level.WARNING, msg);
LOGGER.log(Level.FINE, "", ex);
throw new AnalysisException(ex);
} catch (Throwable ex) {
final String msg = String.format("Unexpected error during parsing of the pom '%s'", file.getPath());
LOGGER.log(Level.WARNING, msg);
LOGGER.log(Level.FINE, "", ex);
throw new AnalysisException(ex);
}
return model;
}
/**
* Retrieves the specified POM from a jar file and converts it to a Model.
*
* @param source the SAXSource input stream to read the POM from
* @return returns the POM object
* @throws AnalysisException is thrown if there is an exception extracting or parsing the POM
* {@link org.owasp.dependencycheck.jaxb.pom.generated.Model} object
*/
private Model readPom(SAXSource source) throws AnalysisException {
Model model = null;
try {
final XMLFilter filter = new MavenNamespaceFilter();
final SAXParserFactory spf = SAXParserFactory.newInstance();
final SAXParser sp = spf.newSAXParser();
final XMLReader xr = sp.getXMLReader();
filter.setParent(xr);
final JAXBElement<Model> el = pomUnmarshaller.unmarshal(source, Model.class);
model = el.getValue();
} catch (SecurityException ex) {
throw new AnalysisException(ex);
} catch (ParserConfigurationException ex) {
throw new AnalysisException(ex);
} catch (SAXException ex) {
throw new AnalysisException(ex);
} catch (JAXBException ex) {
throw new AnalysisException(ex);
} catch (Throwable ex) {
throw new AnalysisException(ex);
}
return model;
}
/**
* Sets evidence from the pom on the supplied dependency.
*
* @param dependency the dependency to set data on
* @param pom the information from the pom
* @param pomProperties the pom properties file (null if none exists)
* @param classes a collection of ClassNameInformation - containing data about the fully qualified class names
* within the JAR file being analyzed
* @param classes a collection of ClassNameInformation - containing data about the fully qualified class names within the JAR
* file being analyzed
* @return true if there was evidence within the pom that we could use; otherwise false
*/
private boolean setPomEvidence(Dependency dependency, Model pom, Properties pomProperties, ArrayList<ClassNameInformation> classes) {
public static boolean setPomEvidence(Dependency dependency, Model pom, List<ClassNameInformation> classes) {
boolean foundSomething = false;
boolean addAsIdentifier = true;
if (pom == null) {
return foundSomething;
}
String groupid = interpolateString(pom.getGroupId(), pomProperties);
String parentGroupId = null;
String groupid = pom.getGroupId();
String parentGroupId = pom.getParentGroupId();
String artifactid = pom.getArtifactId();
String parentArtifactId = pom.getParentArtifactId();
String version = pom.getVersion();
String parentVersion = pom.getParentVersion();
if (pom.getParent() != null) {
parentGroupId = interpolateString(pom.getParent().getGroupId(), pomProperties);
if ((groupid == null || groupid.isEmpty()) && parentGroupId != null && !parentGroupId.isEmpty()) {
groupid = parentGroupId;
}
if ("org.sonatype.oss".equals(parentGroupId) && "oss-parent".equals(parentArtifactId)) {
parentGroupId = null;
parentArtifactId = null;
parentVersion = null;
}
if ((groupid == null || groupid.isEmpty()) && parentGroupId != null && !parentGroupId.isEmpty()) {
groupid = parentGroupId;
}
final String originalGroupID = groupid;
if (groupid.startsWith("org.") || groupid.startsWith("com.")) {
groupid = groupid.substring(4);
}
if ((artifactid == null || artifactid.isEmpty()) && parentArtifactId != null && !parentArtifactId.isEmpty()) {
artifactid = parentArtifactId;
}
final String originalArtifactID = artifactid;
if (artifactid.startsWith("org.") || artifactid.startsWith("com.")) {
artifactid = artifactid.substring(4);
}
if ((version == null || version.isEmpty()) && parentVersion != null && !parentVersion.isEmpty()) {
version = parentVersion;
}
if (groupid != null && !groupid.isEmpty()) {
foundSomething = true;
@@ -651,20 +514,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
addAsIdentifier = false;
}
String artifactid = interpolateString(pom.getArtifactId(), pomProperties);
String parentArtifactId = null;
if (pom.getParent() != null) {
parentArtifactId = interpolateString(pom.getParent().getArtifactId(), pomProperties);
if ((artifactid == null || artifactid.isEmpty()) && parentArtifactId != null && !parentArtifactId.isEmpty()) {
artifactid = parentArtifactId;
}
}
final String originalArtifactID = artifactid;
if (artifactid != null && !artifactid.isEmpty()) {
if (artifactid.startsWith("org.") || artifactid.startsWith("com.")) {
artifactid = artifactid.substring(4);
}
foundSomething = true;
dependency.getProductEvidence().addEvidence("pom", "artifactid", artifactid, Confidence.HIGHEST);
dependency.getVendorEvidence().addEvidence("pom", "artifactid", artifactid, Confidence.LOW);
@@ -679,16 +529,6 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
} else {
addAsIdentifier = false;
}
//version
String version = interpolateString(pom.getVersion(), pomProperties);
String parentVersion = null;
if (pom.getParent() != null) {
parentVersion = interpolateString(pom.getParent().getVersion(), pomProperties);
if ((version == null || version.isEmpty()) && parentVersion != null && !parentVersion.isEmpty()) {
version = parentVersion;
}
}
if (version != null && !version.isEmpty()) {
foundSomething = true;
@@ -701,22 +541,21 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
}
if (addAsIdentifier) {
dependency.addIdentifier("maven", String.format("%s:%s:%s", originalGroupID, originalArtifactID, version), null, Confidence.LOW);
dependency.addIdentifier("maven", String.format("%s:%s:%s", originalGroupID, originalArtifactID, version), null, Confidence.HIGH);
}
// org name
final Organization org = pom.getOrganization();
if (org != null && org.getName() != null) {
foundSomething = true;
final String orgName = interpolateString(org.getName(), pomProperties);
if (orgName != null && !orgName.isEmpty()) {
dependency.getVendorEvidence().addEvidence("pom", "organization name", orgName, Confidence.HIGH);
addMatchingValues(classes, orgName, dependency.getVendorEvidence());
}
final String org = pom.getOrganization();
if (org != null && !org.isEmpty()) {
dependency.getVendorEvidence().addEvidence("pom", "organization name", org, Confidence.HIGH);
dependency.getProductEvidence().addEvidence("pom", "organization name", org, Confidence.LOW);
addMatchingValues(classes, org, dependency.getVendorEvidence());
addMatchingValues(classes, org, dependency.getProductEvidence());
}
//pom name
final String pomName = interpolateString(pom.getName(), pomProperties);
if (pomName != null && !pomName.isEmpty()) {
final String pomName = pom.getName();
if (pomName
!= null && !pomName.isEmpty()) {
foundSomething = true;
dependency.getProductEvidence().addEvidence("pom", "name", pomName, Confidence.HIGH);
dependency.getVendorEvidence().addEvidence("pom", "name", pomName, Confidence.HIGH);
@@ -725,31 +564,30 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
}
//Description
if (pom.getDescription() != null) {
final String description = pom.getDescription();
if (description != null && !description.isEmpty()) {
foundSomething = true;
final String description = interpolateString(pom.getDescription(), pomProperties);
if (description != null && !description.isEmpty()) {
final String trimmedDescription = addDescription(dependency, description, "pom", "description");
addMatchingValues(classes, trimmedDescription, dependency.getVendorEvidence());
addMatchingValues(classes, trimmedDescription, dependency.getProductEvidence());
}
final String trimmedDescription = addDescription(dependency, description, "pom", "description");
addMatchingValues(classes, trimmedDescription, dependency.getVendorEvidence());
addMatchingValues(classes, trimmedDescription, dependency.getProductEvidence());
}
extractLicense(pom, pomProperties, dependency);
extractLicense(pom, dependency);
return foundSomething;
}
/**
* 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.
* 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 classNames a list of class names
* @param dependency a dependency to analyze
* @param addPackagesAsEvidence a flag indicating whether or not package names should be added as evidence.
*/
protected void analyzePackageNames(ArrayList<ClassNameInformation> classNames,
protected void analyzePackageNames(List<ClassNameInformation> classNames,
Dependency dependency, boolean addPackagesAsEvidence) {
final HashMap<String, Integer> vendorIdentifiers = new HashMap<String, Integer>();
final HashMap<String, Integer> productIdentifiers = new HashMap<String, Integer>();
final Map<String, Integer> vendorIdentifiers = new HashMap<String, Integer>();
final Map<String, Integer> productIdentifiers = new HashMap<String, Integer>();
analyzeFullyQualifiedClassNames(classNames, vendorIdentifiers, productIdentifiers);
final int classCount = classNames.size();
@@ -791,7 +629,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
* @return whether evidence was identified parsing the manifest
* @throws IOException if there is an issue reading the JAR file
*/
protected boolean parseManifest(Dependency dependency, ArrayList<ClassNameInformation> classInformation) throws IOException {
protected boolean parseManifest(Dependency dependency, List<ClassNameInformation> classInformation) throws IOException {
boolean foundSomething = false;
JarFile jar = null;
try {
@@ -948,18 +786,17 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
}
/**
* Adds a description to the given dependency. If the description contains one of the following strings beyond 100
* characters, then the description used will be trimmed to that position:
* Adds a description to the given dependency. If the description contains one of the following strings beyond 100 characters,
* then the description used will be trimmed to that position:
* <ul><li>"such as"</li><li>"like "</li><li>"will use "</li><li>"* uses "</li></ul>
*
* @param dependency a dependency
* @param description the description
* @param source the source of the evidence
* @param key the "name" of the evidence
* @return if the description is trimmed, the trimmed version is returned; otherwise the original description is
* returned
* @return if the description is trimmed, the trimmed version is returned; otherwise the original description is returned
*/
private String addDescription(Dependency dependency, String description, String source, String key) {
public static String addDescription(Dependency dependency, String description, String source, String key) {
if (dependency.getDescription() == null) {
dependency.setDescription(description);
}
@@ -1062,63 +899,6 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
}
}
/**
* <p>
* A utility 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.</p>
* <p>
* <b>Note:</b> if there is no property found the reference will be removed. In other words, if the interpolated
* string will be replaced with an empty string.
* </p>
* <p>
* Example:</p>
* <code>
* Properties p = new Properties();
* p.setProperty("key", "value");
* String s = interpolateString("'${key}' and '${nothing}'", p);
* System.out.println(s);
* </code>
* <p>
* Will result in:</p>
* <code>
* 'value' and ''
* </code>
*
* @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) {
Properties props = properties;
if (text == null) {
return text;
}
if (props == null) {
props = new Properties();
}
final int pos = text.indexOf("${");
if (pos < 0) {
return text;
}
final int end = text.indexOf("}");
if (end < pos) {
return text;
}
final String propName = text.substring(pos + 2, end);
String propValue = interpolateString(props.getProperty(propName), props);
if (propValue == null) {
propValue = "";
}
final 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(), props); //yes yes, this should be a loop...
}
/**
* Determines if the key value pair from the manifest is for an "import" type entry for package names.
*
@@ -1133,14 +913,14 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
}
/**
* Cycles through an enumeration of JarEntries, contained within the dependency, and returns a list of the class
* names. This does not include core Java package names (i.e. java.* or javax.*).
* Cycles through an enumeration of JarEntries, contained within the dependency, and returns a list of the class names. This
* does not include core Java package names (i.e. java.* or javax.*).
*
* @param dependency the dependency being analyzed
* @return an list of fully qualified class names
*/
private ArrayList<ClassNameInformation> collectClassNames(Dependency dependency) {
final ArrayList<ClassNameInformation> classNames = new ArrayList<ClassNameInformation>();
private List<ClassNameInformation> collectClassNames(Dependency dependency) {
final List<ClassNameInformation> classNames = new ArrayList<ClassNameInformation>();
JarFile jar = null;
try {
jar = new JarFile(dependency.getActualFilePath());
@@ -1171,17 +951,17 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
}
/**
* Cycles through the list of class names and places the package levels 0-3 into the provided maps for vendor and
* product. This is helpful when analyzing vendor/product as many times this is included in the package name.
* Cycles through the list of class names and places the package levels 0-3 into the provided maps for vendor and product.
* This is helpful when analyzing vendor/product as many times this is included in the package name.
*
* @param classNames a list of class names
* @param vendor HashMap of possible vendor names from package names (e.g. owasp)
* @param product HashMap of possible product names from package names (e.g. dependencycheck)
*/
private void analyzeFullyQualifiedClassNames(ArrayList<ClassNameInformation> classNames,
HashMap<String, Integer> vendor, HashMap<String, Integer> product) {
private void analyzeFullyQualifiedClassNames(List<ClassNameInformation> classNames,
Map<String, Integer> vendor, Map<String, Integer> product) {
for (ClassNameInformation entry : classNames) {
final ArrayList<String> list = entry.getPackageStructure();
final List<String> list = entry.getPackageStructure();
addEntry(vendor, list.get(0));
if (list.size() == 2) {
@@ -1203,13 +983,13 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
}
/**
* Adds an entry to the specified collection and sets the Integer (e.g. the count) to 1. If the entry already exists
* in the collection then the Integer is incremented by 1.
* Adds an entry to the specified collection and sets the Integer (e.g. the count) to 1. If the entry already exists in the
* collection then the Integer is incremented by 1.
*
* @param collection a collection of strings and their occurrence count
* @param key the key to add to the collection
*/
private void addEntry(HashMap<String, Integer> collection, String key) {
private void addEntry(Map<String, Integer> collection, String key) {
if (collection.containsKey(key)) {
collection.put(key, collection.get(key) + 1);
} else {
@@ -1218,15 +998,15 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
}
/**
* Cycles through the collection of class name information to see if parts of the package names are contained in the
* provided value. If found, it will be added as the HIGHEST confidence evidence because we have more then one
* source corroborating the value.
* Cycles through the collection of class name information to see if parts of the package names are contained in the provided
* value. If found, it will be added as the HIGHEST confidence evidence because we have more then one source corroborating the
* value.
*
* @param classes a collection of class name information
* @param value the value to check to see if it contains a package name
* @param evidence the evidence collection to add new entries too
*/
private void addMatchingValues(ArrayList<ClassNameInformation> classes, String value, EvidenceCollection evidence) {
private static void addMatchingValues(List<ClassNameInformation> classes, String value, EvidenceCollection evidence) {
if (value == null || value.isEmpty() || classes == null || classes.isEmpty()) {
return;
}
@@ -1258,23 +1038,22 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
* Extracts the license information from the pom and adds it to the dependency.
*
* @param pom the pom object
* @param pomProperties the properties, used for string interpolation
* @param dependency the dependency to add license information too
*/
private void extractLicense(Model pom, Properties pomProperties, Dependency dependency) {
public static void extractLicense(Model pom, Dependency dependency) {
//license
if (pom.getLicenses() != null) {
String license = null;
for (License lic : pom.getLicenses().getLicense()) {
for (License lic : pom.getLicenses()) {
String tmp = null;
if (lic.getName() != null) {
tmp = interpolateString(lic.getName(), pomProperties);
tmp = lic.getName();
}
if (lic.getUrl() != null) {
if (tmp == null) {
tmp = interpolateString(lic.getUrl(), pomProperties);
tmp = lic.getUrl();
} else {
tmp += ": " + interpolateString(lic.getUrl(), pomProperties);
tmp += ": " + lic.getUrl();
}
}
if (tmp == null) {
@@ -1291,6 +1070,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
}
if (license != null) {
dependency.setLicense(license);
}
}
}
@@ -1302,9 +1082,9 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
/**
* <p>
* Stores information about a given class name. This class will keep the fully qualified class name and a list
* of the important parts of the package structure. Up to the first four levels of the package structure are
* stored, excluding a leading "org" or "com". Example:</p>
* Stores information about a given class name. This class will keep the fully qualified class name and a list of the
* important parts of the package structure. Up to the first four levels of the package structure are stored, excluding a
* leading "org" or "com". Example:</p>
* <code>ClassNameInformation obj = new ClassNameInformation("org.owasp.dependencycheck.analyzer.JarAnalyzer");
* System.out.println(obj.getName());
* for (String p : obj.getPackageStructure())

View File

@@ -35,7 +35,7 @@ import org.owasp.dependencycheck.utils.Settings;
*
* Used to analyze a JavaScript file to gather information to aid in identification of a CPE identifier.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class JavaScriptAnalyzer extends AbstractFileTypeAnalyzer {

View File

@@ -17,6 +17,7 @@
*/
package org.owasp.dependencycheck.analyzer;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.MalformedURLException;
@@ -24,13 +25,18 @@ import java.net.URL;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.commons.io.FileUtils;
import org.owasp.dependencycheck.Engine;
import org.owasp.dependencycheck.analyzer.exception.AnalysisException;
import org.owasp.dependencycheck.data.nexus.MavenArtifact;
import org.owasp.dependencycheck.data.nexus.NexusSearch;
import org.owasp.dependencycheck.dependency.Confidence;
import org.owasp.dependencycheck.dependency.Dependency;
import org.owasp.dependencycheck.dependency.Evidence;
import org.owasp.dependencycheck.xml.pom.PomUtils;
import org.owasp.dependencycheck.utils.InvalidSettingException;
import org.owasp.dependencycheck.utils.DownloadFailedException;
import org.owasp.dependencycheck.utils.Downloader;
import org.owasp.dependencycheck.utils.Settings;
/**
@@ -39,10 +45,10 @@ import org.owasp.dependencycheck.utils.Settings;
* There are two settings which govern this behavior:
*
* <ul>
* <li>{@link org.owasp.dependencycheck.utils.Settings.KEYS#ANALYZER_NEXUS_ENABLED} determines whether this analyzer is
* even enabled. This can be overridden by setting the system property.</li>
* <li>{@link org.owasp.dependencycheck.utils.Settings.KEYS#ANALYZER_NEXUS_URL} the URL to a Nexus service to search by
* SHA-1. There is an expected <code>%s</code> in this where the SHA-1 will get entered.</li>
* <li>{@link org.owasp.dependencycheck.utils.Settings.KEYS#ANALYZER_NEXUS_ENABLED} determines whether this analyzer is even
* enabled. This can be overridden by setting the system property.</li>
* <li>{@link org.owasp.dependencycheck.utils.Settings.KEYS#ANALYZER_NEXUS_URL} the URL to a Nexus service to search by SHA-1.
* There is an expected <code>%s</code> in this where the SHA-1 will get entered.</li>
* </ul>
*
* @author colezlaw
@@ -202,6 +208,38 @@ public class NexusAnalyzer extends AbstractFileTypeAnalyzer {
try {
final MavenArtifact ma = searcher.searchSha1(dependency.getSha1sum());
dependency.addAsEvidence("nexus", ma, Confidence.HIGH);
boolean pomAnalyzed = false;
LOGGER.fine("POM URL " + ma.getPomUrl());
for (Evidence e : dependency.getVendorEvidence()) {
if ("pom".equals(e.getSource())) {
pomAnalyzed = true;
break;
}
}
if (!pomAnalyzed && ma.getPomUrl() != null) {
File pomFile = null;
try {
final File baseDir = Settings.getTempDirectory();
pomFile = File.createTempFile("pom", ".xml", baseDir);
if (!pomFile.delete()) {
final String msg = String.format("Unable to fetch pom.xml for %s from Nexus repository; "
+ "this could result in undetected CPE/CVEs.", dependency.getFileName());
LOGGER.warning(msg);
LOGGER.fine("Unable to delete temp file");
}
LOGGER.fine(String.format("Downloading %s", ma.getPomUrl()));
Downloader.fetchFile(new URL(ma.getPomUrl()), pomFile);
PomUtils.analyzePOM(dependency, pomFile);
} catch (DownloadFailedException ex) {
final String msg = String.format("Unable to download pom.xml for %s from Nexus repository; "
+ "this could result in undetected CPE/CVEs.", dependency.getFileName());
LOGGER.warning(msg);
} finally {
if (pomFile != null && !FileUtils.deleteQuietly(pomFile)) {
pomFile.deleteOnExit();
}
}
}
} catch (IllegalArgumentException iae) {
//dependency.addAnalysisException(new AnalysisException("Invalid SHA-1"));
LOGGER.info(String.format("invalid sha-1 hash on %s", dependency.getFileName()));

View File

@@ -32,7 +32,7 @@ import org.owasp.dependencycheck.dependency.Vulnerability;
* NvdCveAnalyzer is a utility class that takes a project dependency and attempts to discern 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@owasp.org>
* @author Jeremy Long
*/
public class NvdCveAnalyzer implements Analyzer {

View File

@@ -0,0 +1,368 @@
/*
* This file is part of dependency-check-core.
*
* Licensed 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.
*
* Copyright (c) 2015 Institute for Defense Analyses. All Rights Reserved.
*/
package org.owasp.dependencycheck.analyzer;
import java.io.BufferedInputStream;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FilenameFilter;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.regex.Pattern;
import javax.mail.MessagingException;
import javax.mail.internet.InternetHeaders;
import org.apache.commons.io.filefilter.NameFileFilter;
import org.apache.commons.io.filefilter.SuffixFileFilter;
import org.apache.commons.io.input.AutoCloseInputStream;
import org.apache.commons.lang.StringUtils;
import org.owasp.dependencycheck.Engine;
import org.owasp.dependencycheck.analyzer.exception.AnalysisException;
import org.owasp.dependencycheck.dependency.Confidence;
import org.owasp.dependencycheck.dependency.Dependency;
import org.owasp.dependencycheck.dependency.EvidenceCollection;
import org.owasp.dependencycheck.utils.ExtractionException;
import org.owasp.dependencycheck.utils.ExtractionUtil;
import org.owasp.dependencycheck.utils.FileUtils;
import org.owasp.dependencycheck.utils.Settings;
import org.owasp.dependencycheck.utils.UrlStringUtils;
/**
* Used to analyze a Wheel or egg distribution files, or their contents in unzipped form, and collect information that can be used
* to determine the associated CPE.
*
* @author Dale Visser <dvisser@ida.org>
*/
public class PythonDistributionAnalyzer extends AbstractFileTypeAnalyzer {
/**
* Name of egg metatdata files to analyze.
*/
private static final String PKG_INFO = "PKG-INFO";
/**
* Name of wheel metadata files to analyze.
*/
private static final String METADATA = "METADATA";
/**
* The logger.
*/
private static final Logger LOGGER = Logger
.getLogger(PythonDistributionAnalyzer.class.getName());
/**
* The count of directories created during analysis. This is used for creating temporary directories.
*/
private static int dirCount = 0;
/**
* The name of the analyzer.
*/
private static final String ANALYZER_NAME = "Python Distribution 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 = newHashSet("whl", "egg",
"zip", METADATA, PKG_INFO);
/**
* Used to match on egg archive candidate extenssions.
*/
private static final Pattern EGG_OR_ZIP = Pattern.compile("egg|zip");
/**
* The parent directory for the individual directories per archive.
*/
private File tempFileLocation;
/**
* Filter that detects *.dist-info files (but doesn't verify they are directories.
*/
private static final FilenameFilter DIST_INFO_FILTER = new SuffixFileFilter(
".dist-info");
/**
* Filter that detects files named "METADATA".
*/
private static final FilenameFilter EGG_INFO_FILTER = new NameFileFilter(
"EGG-INFO");
/**
* Filter that detects files named "METADATA".
*/
private static final FilenameFilter METADATA_FILTER = new NameFileFilter(
METADATA);
/**
* Filter that detects files named "PKG-INFO".
*/
private static final FilenameFilter PKG_INFO_FILTER = new NameFileFilter(
PKG_INFO);
/**
* Returns a list of file EXTENSIONS supported by this analyzer.
*
* @return a list of file EXTENSIONS supported by this analyzer.
*/
@Override
public Set<String> getSupportedExtensions() {
return EXTENSIONS;
}
/**
* Returns the name of the analyzer.
*
* @return the name of the analyzer.
*/
@Override
public String getName() {
return ANALYZER_NAME;
}
/**
* 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;
}
/**
* Returns the key used in the properties file to reference the analyzer's enabled property.
*
* @return the analyzer's enabled property setting key
*/
@Override
protected String getAnalyzerEnabledSettingKey() {
return Settings.KEYS.ANALYZER_PYTHON_DISTRIBUTION_ENABLED;
}
@Override
protected void analyzeFileType(Dependency dependency, Engine engine)
throws AnalysisException {
if ("whl".equals(dependency.getFileExtension())) {
collectMetadataFromArchiveFormat(dependency, DIST_INFO_FILTER,
METADATA_FILTER);
} else if (EGG_OR_ZIP.matcher(
StringUtils.stripToEmpty(dependency.getFileExtension()))
.matches()) {
collectMetadataFromArchiveFormat(dependency, EGG_INFO_FILTER,
PKG_INFO_FILTER);
} else {
final File actualFile = dependency.getActualFile();
final String name = actualFile.getName();
final boolean metadata = METADATA.equals(name);
if (metadata || PKG_INFO.equals(name)) {
final File parent = actualFile.getParentFile();
final String parentName = parent.getName();
dependency.setDisplayFileName(parentName + "/" + name);
if (parent.isDirectory()
&& (metadata && parentName.endsWith(".dist-info")
|| parentName.endsWith(".egg-info") || "EGG-INFO"
.equals(parentName))) {
collectWheelMetadata(dependency, actualFile);
}
}
}
}
/**
* Collects the meta data from an archive.
*
* @param dependency the archive being scanned
* @param folderFilter the filter to apply to the folder
* @param metadataFilter the filter to apply to the meta data
* @throws AnalysisException thrown when there is a problem analyzing the dependency
*/
private void collectMetadataFromArchiveFormat(Dependency dependency,
FilenameFilter folderFilter, FilenameFilter metadataFilter)
throws AnalysisException {
final File temp = getNextTempDirectory();
LOGGER.fine(String.format("%s exists? %b", temp, temp.exists()));
try {
ExtractionUtil.extractFilesUsingFilter(
new File(dependency.getActualFilePath()), temp,
metadataFilter);
} catch (ExtractionException ex) {
throw new AnalysisException(ex);
}
collectWheelMetadata(
dependency,
getMatchingFile(getMatchingFile(temp, folderFilter),
metadataFilter));
}
/**
* Makes sure a usable temporary directory is available.
*
* @throws Exception an AnalyzeException is thrown when the temp directory cannot be created
*/
@Override
protected void initializeFileTypeAnalyzer() throws Exception {
final File baseDir = Settings.getTempDirectory();
tempFileLocation = File.createTempFile("check", "tmp", baseDir);
if (!tempFileLocation.delete()) {
final String msg = String.format(
"Unable to delete temporary file '%s'.",
tempFileLocation.getAbsolutePath());
throw new AnalysisException(msg);
}
if (!tempFileLocation.mkdirs()) {
final String msg = String.format(
"Unable to create directory '%s'.",
tempFileLocation.getAbsolutePath());
throw new AnalysisException(msg);
}
}
/**
* Deletes any files extracted from the Wheel during analysis.
*/
@Override
public void close() {
if (tempFileLocation != null && tempFileLocation.exists()) {
LOGGER.log(Level.FINE, "Attempting to delete temporary files");
final boolean success = FileUtils.delete(tempFileLocation);
if (!success) {
LOGGER.log(Level.WARNING,
"Failed to delete some temporary files, see the log for more details");
}
}
}
/**
* Gathers evidence from the METADATA file.
*
* @param dependency the dependency being analyzed
* @param file a reference to the manifest/properties file
* @throws AnalysisException thrown when there is an error
*/
private static void collectWheelMetadata(Dependency dependency, File file)
throws AnalysisException {
final InternetHeaders headers = getManifestProperties(file);
addPropertyToEvidence(headers, dependency.getVersionEvidence(),
"Version", Confidence.HIGHEST);
addPropertyToEvidence(headers, dependency.getProductEvidence(), "Name",
Confidence.HIGHEST);
final String url = headers.getHeader("Home-page", null);
final EvidenceCollection vendorEvidence = dependency
.getVendorEvidence();
if (StringUtils.isNotBlank(url)) {
if (UrlStringUtils.isUrl(url)) {
vendorEvidence.addEvidence(METADATA, "vendor", url,
Confidence.MEDIUM);
}
}
addPropertyToEvidence(headers, vendorEvidence, "Author", Confidence.LOW);
final String summary = headers.getHeader("Summary", null);
if (StringUtils.isNotBlank(summary)) {
JarAnalyzer
.addDescription(dependency, summary, METADATA, "summary");
}
}
/**
* Adds a value to the evidence collection.
*
* @param headers the properties collection
* @param evidence the evidence collection to add the value
* @param property the property name
* @param confidence the confidence of the evidence
*/
private static void addPropertyToEvidence(InternetHeaders headers,
EvidenceCollection evidence, String property, Confidence confidence) {
final String value = headers.getHeader(property, null);
LOGGER.fine(String.format("Property: %s, Value: %s", property, value));
if (StringUtils.isNotBlank(value)) {
evidence.addEvidence(METADATA, property, value, confidence);
}
}
/**
* Returns a list of files that match the given filter, this does not recursively scan the directory.
*
* @param folder the folder to filter
* @param filter the filter to apply to the files in the directory
* @return the list of Files in the directory that match the provided filter
*/
private static File getMatchingFile(File folder, FilenameFilter filter) {
File result = null;
final File[] matches = folder.listFiles(filter);
if (null != matches && 1 == matches.length) {
result = matches[0];
}
return result;
}
/**
* Reads the manifest entries from the provided file.
*
* @param manifest the manifest
* @return the manifest entries
*/
private static InternetHeaders getManifestProperties(File manifest) {
final InternetHeaders result = new InternetHeaders();
if (null == manifest) {
LOGGER.fine("Manifest file not found.");
} else {
try {
result.load(new AutoCloseInputStream(new BufferedInputStream(
new FileInputStream(manifest))));
} catch (MessagingException e) {
LOGGER.log(Level.WARNING, e.getMessage(), e);
} catch (FileNotFoundException e) {
LOGGER.log(Level.WARNING, e.getMessage(), e);
}
}
return result;
}
/**
* Retrieves the next temporary destingation directory for extracting an archive.
*
* @return a directory
* @throws AnalysisException thrown if unable to create temporary directory
*/
private File getNextTempDirectory() throws AnalysisException {
File directory;
// getting an exception for some directories not being able to be
// created; might be because the directory already exists?
do {
dirCount += 1;
directory = new File(tempFileLocation, String.valueOf(dirCount));
} while (directory.exists());
if (!directory.mkdirs()) {
throw new AnalysisException(String.format(
"Unable to create temp directory '%s'.",
directory.getAbsolutePath()));
}
return directory;
}
}

View File

@@ -0,0 +1,323 @@
/*
* This file is part of dependency-check-core.
*
* Licensed 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.
*
* Copyright (c) 2015 Institute for Defense Analyses. All Rights Reserved.
*/
package org.owasp.dependencycheck.analyzer;
import java.io.File;
import java.io.FileFilter;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Set;
import java.util.logging.Logger;
import java.util.regex.Matcher;
import java.util.regex.Pattern;
import org.apache.commons.io.FileUtils;
import org.apache.commons.io.filefilter.NameFileFilter;
import org.apache.commons.io.filefilter.SuffixFileFilter;
import org.owasp.dependencycheck.Engine;
import org.owasp.dependencycheck.analyzer.exception.AnalysisException;
import org.owasp.dependencycheck.dependency.Confidence;
import org.owasp.dependencycheck.dependency.Dependency;
import org.owasp.dependencycheck.dependency.EvidenceCollection;
import org.owasp.dependencycheck.utils.Settings;
import org.owasp.dependencycheck.utils.UrlStringUtils;
/**
* Used to analyze a Python package, and collect information that can be used to determine the associated CPE.
*
* @author Dale Visser <dvisser@ida.org>
*/
public class PythonPackageAnalyzer extends AbstractFileTypeAnalyzer {
/**
* Used when compiling file scanning regex patterns.
*/
private static final int REGEX_OPTIONS = Pattern.DOTALL
| Pattern.CASE_INSENSITIVE;
/**
* The logger.
*/
private static final Logger LOGGER = Logger
.getLogger(PythonDistributionAnalyzer.class.getName());
/**
* Filename extensions for files to be analyzed.
*/
private static final Set<String> EXTENSIONS = Collections
.unmodifiableSet(Collections.singleton("py"));
/**
* Pattern for matching the module docstring in a source file.
*/
private static final Pattern MODULE_DOCSTRING = Pattern.compile(
"^(['\\\"]{3})(.*?)\\1", REGEX_OPTIONS);
/**
* Matches assignments to version variables in Python source code.
*/
private static final Pattern VERSION_PATTERN = Pattern.compile(
"\\b(__)?version(__)? *= *(['\"]+)(\\d+\\.\\d+.*?)\\3",
REGEX_OPTIONS);
/**
* Matches assignments to title variables in Python source code.
*/
private static final Pattern TITLE_PATTERN = compileAssignPattern("title");
/**
* Matches assignments to summary variables in Python source code.
*/
private static final Pattern SUMMARY_PATTERN = compileAssignPattern("summary");
/**
* Matches assignments to URL/URL variables in Python source code.
*/
private static final Pattern URI_PATTERN = compileAssignPattern("ur[il]");
/**
* Matches assignments to home page variables in Python source code.
*/
private static final Pattern HOMEPAGE_PATTERN = compileAssignPattern("home_?page");
/**
* Matches assignments to author variables in Python source code.
*/
private static final Pattern AUTHOR_PATTERN = compileAssignPattern("author");
/**
* Filter that detects files named "__init__.py".
*/
private static final FileFilter INIT_PY_FILTER = new NameFileFilter("__init__.py");
/**
* The file filter for python files.
*/
private static final FileFilter PY_FILTER = new SuffixFileFilter(".py");
/**
* Returns the name of the Python Package Analyzer.
*
* @return the name of the analyzer
*/
@Override
public String getName() {
return "Python Package Analyzer";
}
/**
* Tell that we are used for information collection.
*
* @return INFORMATION_COLLECTION
*/
@Override
public AnalysisPhase getAnalysisPhase() {
return AnalysisPhase.INFORMATION_COLLECTION;
}
/**
* Returns the set of supported file extensions.
*
* @return the set of supported file extensions
*/
@Override
protected Set<String> getSupportedExtensions() {
return EXTENSIONS;
}
/**
* No-op initializer implementation.
*
* @throws Exception never thrown
*/
@Override
protected void initializeFileTypeAnalyzer() throws Exception {
// Nothing to do here.
}
/**
* Utility function to create a regex pattern matcher.
*
* @param name the value to use when constructing the assignment pattern
* @return the compiled Pattern
*/
private static Pattern compileAssignPattern(String name) {
return Pattern.compile(
String.format("\\b(__)?%s(__)?\\b *= *(['\"]+)(.*?)\\3", name),
REGEX_OPTIONS);
}
/**
* Analyzes python packages and adds evidence to the dependency.
*
* @param dependency the dependency being analyzed
* @param engine the engine being used to perform the scan
* @throws AnalysisException thrown if there is an unrecoverable error analyzing the dependency
*/
@Override
protected void analyzeFileType(Dependency dependency, Engine engine)
throws AnalysisException {
final File file = dependency.getActualFile();
final File parent = file.getParentFile();
final String parentName = parent.getName();
boolean found = false;
if (INIT_PY_FILTER.accept(file)) {
for (final File sourcefile : parent.listFiles(PY_FILTER)) {
found |= analyzeFileContents(dependency, sourcefile);
}
}
if (found) {
dependency.setDisplayFileName(parentName + "/__init__.py");
dependency.getProductEvidence().addEvidence(file.getName(),
"PackageName", parentName, Confidence.MEDIUM);
} else {
// copy, alter and set in case some other thread is iterating over
final List<Dependency> deps = new ArrayList<Dependency>(
engine.getDependencies());
deps.remove(dependency);
engine.setDependencies(deps);
}
}
/**
* This should gather information from leading docstrings, file comments, and assignments to __version__, __title__,
* __summary__, __uri__, __url__, __home*page__, __author__, and their all caps equivalents.
*
* @param dependency the dependency being analyzed
* @param file the file name to analyze
* @return whether evidence was found
* @throws AnalysisException thrown if there is an unrecoverable error
*/
private boolean analyzeFileContents(Dependency dependency, File file)
throws AnalysisException {
String contents = "";
try {
contents = FileUtils.readFileToString(file).trim();
} catch (IOException e) {
throw new AnalysisException(
"Problem occured while reading dependency file.", e);
}
boolean found = false;
if (!contents.isEmpty()) {
final String source = file.getName();
found = gatherEvidence(VERSION_PATTERN, contents, source,
dependency.getVersionEvidence(), "SourceVersion",
Confidence.MEDIUM);
found |= addSummaryInfo(dependency, SUMMARY_PATTERN, 4, contents,
source, "summary");
if (INIT_PY_FILTER.accept(file)) {
found |= addSummaryInfo(dependency, MODULE_DOCSTRING, 2,
contents, source, "docstring");
}
found |= gatherEvidence(TITLE_PATTERN, contents, source,
dependency.getProductEvidence(), "SourceTitle",
Confidence.LOW);
final EvidenceCollection vendorEvidence = dependency
.getVendorEvidence();
found |= gatherEvidence(AUTHOR_PATTERN, contents, source,
vendorEvidence, "SourceAuthor", Confidence.MEDIUM);
try {
found |= gatherHomePageEvidence(URI_PATTERN, vendorEvidence,
source, "URL", contents);
found |= gatherHomePageEvidence(HOMEPAGE_PATTERN,
vendorEvidence, source, "HomePage", contents);
} catch (MalformedURLException e) {
LOGGER.warning(e.getMessage());
}
}
return found;
}
/**
* Adds summary information to the dependency
*
* @param dependency the dependency being analyzed
* @param pattern the pattern used to perform analysis
* @param group the group from the pattern that indicates the data to use
* @param contents the data being analyzed
* @param source the source name to use when recording the evidence
* @param key the key name to use when recording the evidence
* @return true if evidence was collected; otherwise false
*/
private boolean addSummaryInfo(Dependency dependency, Pattern pattern,
int group, String contents, String source, String key) {
final Matcher matcher = pattern.matcher(contents);
final boolean found = matcher.find();
if (found) {
JarAnalyzer.addDescription(dependency, matcher.group(group),
source, key);
}
return found;
}
/**
* Collects evidence from the home page URL.
*
* @param pattern the pattern to match
* @param evidence the evidence collection to add the evidence to
* @param source the source of the evidence
* @param name the name of the evidence
* @param contents the home page URL
* @return true if evidence was collected; otherwise false
* @throws MalformedURLException thrown if the URL is malformed
*/
private boolean gatherHomePageEvidence(Pattern pattern,
EvidenceCollection evidence, String source, String name,
String contents) throws MalformedURLException {
final Matcher matcher = pattern.matcher(contents);
boolean found = false;
if (matcher.find()) {
final String url = matcher.group(4);
if (UrlStringUtils.isUrl(url)) {
found = true;
evidence.addEvidence(source, name, url, Confidence.MEDIUM);
}
}
return found;
}
/**
* Gather evidence from a Python source file usin the given string assignment regex pattern.
*
* @param pattern to scan contents with
* @param contents of Python source file
* @param source for storing evidence
* @param evidence to store evidence in
* @param name of evidence
* @param confidence in evidence
* @return whether evidence was found
*/
private boolean gatherEvidence(Pattern pattern, String contents,
String source, EvidenceCollection evidence, String name,
Confidence confidence) {
final Matcher matcher = pattern.matcher(contents);
final boolean found = matcher.find();
if (found) {
evidence.addEvidence(source, name, matcher.group(4), confidence);
}
return found;
}
@Override
protected String getAnalyzerEnabledSettingKey() {
return Settings.KEYS.ANALYZER_PYTHON_PACKAGE_ENABLED;
}
}

View File

@@ -26,7 +26,7 @@ import org.owasp.dependencycheck.suppression.SuppressionRule;
* The suppression analyzer processes an externally defined XML document that complies with the suppressions.xsd schema.
* Any identified Vulnerability entries within the dependencies that match will be removed.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class VulnerabilitySuppressionAnalyzer extends AbstractSuppressionAnalyzer {

View File

@@ -20,7 +20,7 @@ package org.owasp.dependencycheck.analyzer.exception;
/**
* An exception thrown when the analysis of a dependency fails.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class AnalysisException extends Exception {

View File

@@ -20,7 +20,7 @@ package org.owasp.dependencycheck.analyzer.exception;
/**
* An exception thrown when files in an archive cannot be extracted.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class ArchiveExtractionException extends Exception {

View File

@@ -1,12 +1,4 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.analyzer.exception</title>
* </head>
* <body>
* <p>
* A collection of exception classes used within the analyzers.</p>
* </body>
* </html>
* A collection of exception classes used within the analyzers.
*/
package org.owasp.dependencycheck.analyzer.exception;

View File

@@ -1,13 +1,4 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.analyzer</title>
* </head>
* <body>
* Analyzers are used to inspect the identified dependencies, collect Evidence,
* and process the dependencies.
* </body>
* </html>
*/
* Analyzers are used to inspect the identified dependencies, collect Evidence, and process the dependencies.
*/
package org.owasp.dependencycheck.analyzer;

View File

@@ -60,8 +60,8 @@ public class CentralSearch {
/**
* Creates a NexusSearch for the given repository URL.
*
* @param rootURL the URL of the repository on which searches should execute. Only parameters are added to this (so
* it should end in /select)
* @param rootURL the URL of the repository on which searches should execute. Only parameters are added to this (so it should
* end in /select)
*/
public CentralSearch(URL rootURL) {
this.rootURL = rootURL;
@@ -75,13 +75,12 @@ public class CentralSearch {
}
/**
* Searches the configured Central URL for the given sha1 hash. If the artifact is found, a
* <code>MavenArtifact</code> is populated with the GAV.
* Searches the configured Central URL for the given sha1 hash. If the artifact is found, a <code>MavenArtifact</code> is
* populated with the GAV.
*
* @param sha1 the SHA-1 hash string for which to search
* @return the populated Maven GAV.
* @throws IOException if it's unable to connect to the specified repository or if the specified artifact is not
* found.
* @throws IOException if it's unable to connect to the specified repository or if the specified artifact is not found.
*/
public List<MavenArtifact> searchSha1(String sha1) throws IOException {
if (null == sha1 || !sha1.matches("^[0-9A-Fa-f]{40}$")) {
@@ -124,8 +123,29 @@ public class CentralSearch {
final String a = xpath.evaluate("./str[@name='a']", docs.item(i));
LOGGER.finest(String.format("ArtifactId: %s", a));
final String v = xpath.evaluate("./str[@name='v']", docs.item(i));
NodeList atts = (NodeList) xpath.evaluate("./arr[@name='ec']/str", docs.item(i), XPathConstants.NODESET);
boolean pomAvailable = false;
boolean jarAvailable = false;
for (int x = 0; x < atts.getLength(); x++) {
final String tmp = xpath.evaluate(".", atts.item(x));
if (".pom".equals(tmp)) {
pomAvailable = true;
} else if (".jar".equals(tmp)) {
jarAvailable = true;
}
}
atts = (NodeList) xpath.evaluate("./arr[@name='tags']/str", docs.item(i), XPathConstants.NODESET);
boolean useHTTPS = false;
for (int x = 0; x < atts.getLength(); x++) {
final String tmp = xpath.evaluate(".", atts.item(x));
if ("https".equals(tmp)) {
useHTTPS = true;
}
}
LOGGER.finest(String.format("Version: %s", v));
result.add(new MavenArtifact(g, a, v, url.toString()));
result.add(new MavenArtifact(g, a, v, jarAvailable, pomAvailable, useHTTPS));
}
return result;

View File

@@ -1,14 +1,7 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.data.central</title>
* </head>
* <body>
* <p>
* Contains classes related to searching Maven Central.</p>
* <p>
* These are used to abstract Maven Central searching away from OWASP Dependency Check so they can be reused elsewhere.</p>
* </body>
* </html>
*
* Contains classes related to searching Maven Central.<br/><br/>
*
* These are used to abstract Maven Central searching away from OWASP Dependency Check so they can be reused elsewhere.
*/
package org.owasp.dependencycheck.data.central;

View File

@@ -48,10 +48,10 @@ import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
import org.owasp.dependencycheck.utils.Pair;
/**
* An in memory lucene index that contains the vendor/product combinations from the CPE (application) identifiers within
* the NVD CVE data.
* An in memory lucene index that contains the vendor/product combinations from the CPE (application) identifiers within the NVD
* CVE data.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public final class CpeMemoryIndex {

View File

@@ -20,7 +20,7 @@ package org.owasp.dependencycheck.data.cpe;
/**
* Fields is a collection of field names used within the Lucene index for CPE entries.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public final class Fields {

View File

@@ -24,7 +24,7 @@ import java.net.URLDecoder;
/**
* A CPE entry containing the name, vendor, product, and version.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class IndexEntry implements Serializable {

View File

@@ -20,7 +20,7 @@ package org.owasp.dependencycheck.data.cpe;
/**
* An exception thrown when the there is an issue using the in-memory CPE Index.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class IndexException extends Exception {

View File

@@ -1,12 +1,4 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.data.cpe</title>
* </head>
* <body>
* Contains classes for working with the CPE Lucene Index.
* </body>
* </html>
*/
*/
package org.owasp.dependencycheck.data.cpe;

View File

@@ -26,7 +26,7 @@ import java.util.logging.Logger;
/**
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public final class CweDB {

View File

@@ -25,7 +25,7 @@ import org.xml.sax.helpers.DefaultHandler;
/**
* A SAX Handler that will parse the CWE XML.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class CweHandler extends DefaultHandler {

View File

@@ -1,12 +1,4 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.data.cwe</title>
* </head>
* <body>
* Contains classes for working with the CWE Database.
* </body>
* </html>
*/
*/
package org.owasp.dependencycheck.data.cwe;

View File

@@ -25,7 +25,7 @@ import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
/**
* An abstract tokenizing filter that can be used as the base for a tokenizing filter.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public abstract class AbstractTokenizingFilter extends TokenFilter {
@@ -72,7 +72,7 @@ public abstract class AbstractTokenizingFilter extends TokenFilter {
* @return whether or not a new term was added
*/
protected boolean addTerm() {
final boolean termAdded = tokens.size() > 0;
final boolean termAdded = !tokens.isEmpty();
if (termAdded) {
final String term = tokens.pop();
clearAttributes();

View File

@@ -24,7 +24,7 @@ import org.apache.lucene.util.Version;
/**
* Tokenizes the input breaking it into tokens when non-alpha/numeric characters are found.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class AlphaNumericTokenizer extends CharTokenizer {

View File

@@ -21,7 +21,7 @@ import org.apache.lucene.search.similarities.DefaultSimilarity;
/**
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class DependencySimilarity extends DefaultSimilarity {

View File

@@ -29,10 +29,10 @@ import org.apache.lucene.util.Version;
/**
* <p>
* A Lucene Analyzer that utilizes the WhitespaceTokenizer, WordDelimiterFilter, LowerCaseFilter, and StopFilter. The
* intended purpose of this Analyzer is to index the CPE fields vendor and product.</p>
* A Lucene Analyzer that utilizes the WhitespaceTokenizer, WordDelimiterFilter, LowerCaseFilter, and StopFilter. The intended
* purpose of this Analyzer is to index the CPE fields vendor and product.</p>
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class FieldAnalyzer extends Analyzer {

View File

@@ -17,21 +17,22 @@
*/
package org.owasp.dependencycheck.data.lucene;
import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
import org.apache.lucene.util.Version;
/**
* <p>
* Lucene utils is a set of utilize written to make constructing Lucene queries simpler.</p>
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public final class LuceneUtils {
/**
* The current version of Lucene being used. Declaring this one place so an upgrade doesn't require hunting through
* the code base.
* The current version of Lucene being used. Declaring this one place so an upgrade doesn't require hunting through the code
* base.
*/
public static final Version CURRENT_VERSION = Version.LUCENE_45;
public static final Version CURRENT_VERSION = Version.LUCENE_47;
/**
* Private constructor as this is a utility class.
@@ -46,7 +47,7 @@ public final class LuceneUtils {
* @param text the data to be escaped
*/
@SuppressWarnings("fallthrough")
@edu.umd.cs.findbugs.annotations.SuppressWarnings(
@SuppressFBWarnings(
value = "SF_SWITCH_NO_DEFAULT",
justification = "The switch below does have a default.")
public static void appendEscapedLuceneQuery(StringBuilder buf,

View File

@@ -30,7 +30,7 @@ import org.apache.lucene.util.Version;
/**
* A Lucene field analyzer used to analyzer queries against the CPE data.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class SearchFieldAnalyzer extends Analyzer {
@@ -39,8 +39,7 @@ public class SearchFieldAnalyzer extends Analyzer {
*/
private final Version version;
/**
* A local reference to the TokenPairConcatenatingFilter so that we can clear any left over state if this analyzer
* is re-used.
* A local reference to the TokenPairConcatenatingFilter so that we can clear any left over state if this analyzer is re-used.
*/
private TokenPairConcatenatingFilter concatenatingFilter;
@@ -85,8 +84,7 @@ public class SearchFieldAnalyzer extends Analyzer {
/**
* <p>
* Resets the analyzer and clears any internal state data that may have been left-over from previous uses of the
* analyzer.</p>
* Resets the analyzer and clears any internal state data that may have been left-over from previous uses of the analyzer.</p>
* <p>
* <b>If this analyzer is re-used this method must be called between uses.</b></p>
*/

View File

@@ -1,72 +0,0 @@
/*
* This file is part of dependency-check-core.
*
* Licensed 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.
*
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
*/
package org.owasp.dependencycheck.data.lucene;
import java.io.Reader;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.core.LowerCaseFilter;
import org.apache.lucene.analysis.core.WhitespaceTokenizer;
import org.apache.lucene.util.Version;
/**
* SearchVersionAnalyzer is a Lucene Analyzer used to analyze version information.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @deprecated version information is no longer stored in lucene
*/
@Deprecated
public class SearchVersionAnalyzer extends Analyzer {
//TODO consider implementing payloads/custom attributes...
// 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/
/**
* The Lucene Version used.
*/
private final Version version;
/**
* Creates a new SearchVersionAnalyzer.
*
* @param version the Lucene version
*/
public SearchVersionAnalyzer(Version version) {
this.version = version;
}
/**
* Creates the TokenStreamComponents
*
* @param fieldName the field name being analyzed
* @param reader the reader containing the input
* @return the TokenStreamComponents
*/
@Override
protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
final Tokenizer source = new WhitespaceTokenizer(version, reader);
TokenStream stream = source;
stream = new LowerCaseFilter(version, stream);
stream = new VersionTokenizingFilter(stream);
return new TokenStreamComponents(source, stream);
}
}

View File

@@ -29,7 +29,7 @@ import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
* <p>
* <b>Example:</b> "Spring Framework Core" -> "Spring SpringFramework Framework FrameworkCore Core".</p>
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public final class TokenPairConcatenatingFilter extends TokenFilter {
@@ -92,7 +92,7 @@ public final class TokenPairConcatenatingFilter extends TokenFilter {
//if we have a previousTerm - write it out as its own token concatenated
// with the current word (if one is available).
if (previousWord != null && words.size() > 0) {
if (previousWord != null && !words.isEmpty()) {
final String word = words.getFirst();
clearAttributes();
termAtt.append(previousWord).append(word);
@@ -100,7 +100,7 @@ public final class TokenPairConcatenatingFilter extends TokenFilter {
return true;
}
//if we have words, write it out as a single token
if (words.size() > 0) {
if (!words.isEmpty()) {
final String word = words.removeFirst();
clearAttributes();
termAtt.append(word);

View File

@@ -33,7 +33,7 @@ import org.owasp.dependencycheck.utils.UrlStringUtils;
* <p>
* <b>Example:</b> "3.0.0.RELEASE" -> "3 3.0 3.0.0 RELEASE 3.0.0.RELEASE".</p>
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public final class UrlTokenizingFilter extends AbstractTokenizingFilter {
/**
@@ -60,7 +60,7 @@ public final class UrlTokenizingFilter extends AbstractTokenizingFilter {
public boolean incrementToken() throws IOException {
final LinkedList<String> tokens = getTokens();
final CharTermAttribute termAtt = getTermAtt();
if (tokens.size() == 0 && input.incrementToken()) {
if (tokens.isEmpty() && input.incrementToken()) {
final String text = new String(termAtt.buffer(), 0, termAtt.length());
if (UrlStringUtils.containsUrl(text)) {
final String[] parts = text.split("\\s");

View File

@@ -1,71 +0,0 @@
/*
* This file is part of dependency-check-core.
*
* Licensed 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.
*
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
*/
package org.owasp.dependencycheck.data.lucene;
import java.io.Reader;
import org.apache.lucene.analysis.Analyzer;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.Tokenizer;
import org.apache.lucene.analysis.core.LowerCaseFilter;
import org.apache.lucene.analysis.core.WhitespaceTokenizer;
import org.apache.lucene.util.Version;
/**
* VersionAnalyzer is a Lucene Analyzer used to analyze version information.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @deprecated version information is no longer stored in lucene
*/
@Deprecated
public class VersionAnalyzer extends Analyzer {
//TODO consider implementing payloads/custom attributes...
// 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/
/**
* The Lucene Version used.
*/
private final Version version;
/**
* Creates a new VersionAnalyzer.
*
* @param version the Lucene version
*/
public VersionAnalyzer(Version version) {
this.version = version;
}
/**
* Creates the TokenStreamComponents
*
* @param fieldName the field name being analyzed
* @param reader the reader containing the input
* @return the TokenStreamComponents
*/
@Override
protected TokenStreamComponents createComponents(String fieldName, Reader reader) {
final Tokenizer source = new WhitespaceTokenizer(version, reader);
TokenStream stream = source;
stream = new LowerCaseFilter(version, stream);
return new TokenStreamComponents(source, stream);
}
}

View File

@@ -1,98 +0,0 @@
/*
* This file is part of dependency-check-core.
*
* Licensed 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.
*
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
*/
package org.owasp.dependencycheck.data.lucene;
import java.io.IOException;
import java.util.LinkedList;
import org.apache.lucene.analysis.TokenStream;
import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
/**
* <p>
* Takes a TokenStream and splits or adds tokens to correctly index version numbers.</p>
* <p>
* <b>Example:</b> "3.0.0.RELEASE" -> "3 3.0 3.0.0 RELEASE 3.0.0.RELEASE".</p>
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @deprecated version information is no longer stored in lucene
*/
@Deprecated
public final class VersionTokenizingFilter extends AbstractTokenizingFilter {
/**
* Constructs a new VersionTokenizingFilter.
*
* @param stream the TokenStream that this filter will process
*/
public VersionTokenizingFilter(TokenStream stream) {
super(stream);
}
/**
* Increments the underlying TokenStream and sets CharTermAttributes to construct an expanded set of tokens by
* concatenating tokens with the previous token.
*
* @return whether or not we have hit the end of the TokenStream
* @throws IOException is thrown when an IOException occurs
*/
@Override
public boolean incrementToken() throws IOException {
final LinkedList<String> tokens = getTokens();
final CharTermAttribute termAtt = getTermAtt();
if (tokens.size() == 0 && input.incrementToken()) {
final String version = new String(termAtt.buffer(), 0, termAtt.length());
final String[] toAnalyze = version.split("[_-]");
//ensure we analyze the whole string as one too
analyzeVersion(version);
for (String str : toAnalyze) {
analyzeVersion(str);
}
}
return addTerm();
}
/**
* <p>
* Analyzes the version and adds several copies of the version as different tokens. For example, the version 1.2.7
* would create the tokens 1 1.2 1.2.7. This is useful in discovering the correct version - sometimes a maintenance
* or build number will throw off the version identification.</p>
*
* <p>
* expected&nbsp;format:&nbps;major.minor[.maintenance[.build]]</p>
*
* @param version the version to analyze
*/
private void analyzeVersion(String version) {
//todo should we also be splitting on dash or underscore? we would need
// to incorporate the dash or underscore back in...
final LinkedList<String> tokens = getTokens();
final String[] versionParts = version.split("\\.");
String dottedVersion = null;
for (String current : versionParts) {
if (!current.matches("^/d+$")) {
tokens.add(current);
}
if (dottedVersion == null) {
dottedVersion = current;
} else {
dottedVersion = dottedVersion + "." + current;
}
tokens.add(dottedVersion);
}
}
}

View File

@@ -1,12 +1,4 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.data.lucene</title>
* </head>
* <body>
* Contains classes used to work with the Lucene Indexes.
* </body>
* </html>
*/
*/
package org.owasp.dependencycheck.data.lucene;

View File

@@ -24,6 +24,11 @@ package org.owasp.dependencycheck.data.nexus;
*/
public class MavenArtifact {
/**
* The base URL for download artifacts from Central.
*/
private static final String CENTRAL_CONTENT_URL = "//search.maven.org/remotecontent?filepath=";
/**
* The groupId
*/
@@ -43,6 +48,10 @@ public class MavenArtifact {
* The artifact url. This may change depending on which Nexus server the search took place.
*/
private String artifactUrl;
/**
* The url to download the POM from.
*/
private String pomUrl;
/**
* Creates an empty MavenArtifact.
@@ -58,9 +67,41 @@ public class MavenArtifact {
* @param version the version
*/
public MavenArtifact(String groupId, String artifactId, String version) {
setGroupId(groupId);
setArtifactId(artifactId);
setVersion(version);
this.groupId = groupId;
this.artifactId = artifactId;
this.version = version;
}
/**
* Creates a MavenArtifact with the given attributes.
*
* @param groupId the groupId
* @param artifactId the artifactId
* @param version the version
* @param jarAvailable if the jar file is available from central
* @param pomAvailable if the pom file is available from central
* @param secureDownload if the jar and pom files should be downloaded using HTTPS.
*/
public MavenArtifact(String groupId, String artifactId, String version, boolean jarAvailable, boolean pomAvailable, boolean secureDownload) {
this.groupId = groupId;
this.artifactId = artifactId;
this.version = version;
String base;
if (secureDownload) {
base = "https:" + CENTRAL_CONTENT_URL;
} else {
base = "http:" + CENTRAL_CONTENT_URL;
}
if (jarAvailable) {
//org/springframework/spring-core/3.2.0.RELEASE/spring-core-3.2.0.RELEASE.pom
this.artifactUrl = base + groupId.replace('.', '/') + "/" + artifactId + "/"
+ version + "/" + artifactId + "-" + version + ".jar";
}
if (pomAvailable) {
//org/springframework/spring-core/3.2.0.RELEASE/spring-core-3.2.0.RELEASE.pom
this.pomUrl = base + groupId.replace('.', '/') + "/" + artifactId + "/"
+ version + "/" + artifactId + "-" + version + ".pom";
}
}
/**
@@ -72,10 +113,10 @@ public class MavenArtifact {
* @param url the artifactLink url
*/
public MavenArtifact(String groupId, String artifactId, String version, String url) {
setGroupId(groupId);
setArtifactId(artifactId);
setVersion(version);
setArtifactUrl(url);
this.groupId = groupId;
this.artifactId = artifactId;
this.version = version;
this.artifactUrl = url;
}
/**
@@ -159,6 +200,25 @@ public class MavenArtifact {
public String getArtifactUrl() {
return artifactUrl;
}
/**
* Get the value of pomUrl.
*
* @return the value of pomUrl
*/
public String getPomUrl() {
return pomUrl;
}
/**
* Set the value of pomUrl.
*
* @param pomUrl new value of pomUrl
*/
public void setPomUrl(String pomUrl) {
this.pomUrl = pomUrl;
}
}
// vim: cc=120:sw=4:ts=4:sts=4

View File

@@ -40,26 +40,32 @@ import org.w3c.dom.Document;
public class NexusSearch {
/**
* The root URL for the Nexus repository service
* The root URL for the Nexus repository service.
*/
private final URL rootURL;
/**
* Whether to use the Proxy when making requests
* Whether to use the Proxy when making requests.
*/
private boolean useProxy;
/**
* The username to use if the Nexus requires authentication.
*/
private String userName = null;
/**
* The password to use if the Nexus requires authentication.
*/
private char[] password;
/**
* Used for logging.
*/
private static final Logger LOGGER = Logger.getLogger(NexusSearch.class
.getName());
private static final Logger LOGGER = Logger.getLogger(NexusSearch.class.getName());
/**
* Creates a NexusSearch for the given repository URL.
*
* @param rootURL the root URL of the repository on which searches should execute. full URL's are calculated
* relative to this URL, so it should end with a /
* @param rootURL the root URL of the repository on which searches should execute. full URL's are calculated relative to this
* URL, so it should end with a /
*/
public NexusSearch(URL rootURL) {
this.rootURL = rootURL;
@@ -78,13 +84,12 @@ public class NexusSearch {
}
/**
* Searches the configured Nexus repository for the given sha1 hash. If the artifact is found, a
* <code>MavenArtifact</code> is populated with the coordinate information.
* Searches the configured Nexus repository for the given sha1 hash. If the artifact is found, a <code>MavenArtifact</code> is
* populated with the coordinate information.
*
* @param sha1 The SHA-1 hash string for which to search
* @return the populated Maven coordinates
* @throws IOException if it's unable to connect to the specified repository or if the specified artifact is not
* found.
* @throws IOException if it's unable to connect to the specified repository or if the specified artifact is not found.
*/
public MavenArtifact searchSha1(String sha1) throws IOException {
if (null == sha1 || !sha1.matches("^[0-9A-Fa-f]{40}$")) {
@@ -99,10 +104,9 @@ public class NexusSearch {
// Determine if we need to use a proxy. The rules:
// 1) If the proxy is set, AND the setting is set to true, use the proxy
// 2) Otherwise, don't use the proxy (either the proxy isn't configured,
// or proxy is specifically
// set to false
final HttpURLConnection conn = URLConnectionFactory.createHttpURLConnection(url, useProxy);
// or proxy is specifically set to false
HttpURLConnection conn;
conn = URLConnectionFactory.createHttpURLConnection(url, useProxy);
conn.setDoOutput(true);
// JSON would be more elegant, but there's not currently a dependency
@@ -131,7 +135,18 @@ public class NexusSearch {
.evaluate(
"/org.sonatype.nexus.rest.model.NexusArtifact/artifactLink",
doc);
return new MavenArtifact(groupId, artifactId, version, link);
final String pomLink = xpath
.evaluate(
"/org.sonatype.nexus.rest.model.NexusArtifact/pomLink",
doc);
final MavenArtifact ma = new MavenArtifact(groupId, artifactId, version);
if (link != null && !"".equals(link)) {
ma.setArtifactUrl(link);
}
if (pomLink != null && !"".equals(pomLink)) {
ma.setPomUrl(pomLink);
}
return ma;
} catch (Throwable e) {
// Anything else is jacked-up XML stuff that we really can't recover
// from well
@@ -153,8 +168,10 @@ public class NexusSearch {
* @return whether the repository is listening and returns the /status URL correctly
*/
public boolean preflightRequest() {
HttpURLConnection conn;
try {
final HttpURLConnection conn = URLConnectionFactory.createHttpURLConnection(new URL(rootURL, "status"), useProxy);
final URL url = new URL(rootURL, "status");
conn = URLConnectionFactory.createHttpURLConnection(url, useProxy);
conn.addRequestProperty("Accept", "application/xml");
conn.connect();
if (conn.getResponseCode() != 200) {

View File

@@ -1,14 +1,6 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.data.nexus</title>
* </head>
* <body>
* <p>
* Contains classes related to searching a Nexus repository.</p>
* <p>
* These are used to abstract Nexus searching away from OWASP Dependency Check so they can be reused elsewhere.</p>
* </body>
* </html>
* Contains classes related to searching a Nexus repository.<br/><br/>
*
* These are used to abstract Nexus searching away from OWASP Dependency Check so they can be reused elsewhere.
*/
package org.owasp.dependencycheck.data.nexus;

View File

@@ -1,15 +1,5 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.data.nuget</title>
* </head>
* <body>
* <p>
* Contains classes related to parsing Nuget related files</p>
* <p>
* These are used to abstract away Nuget-related handling from Dependency Check
* so they can be used elsewhere.</p>
* </body>
* </html>
* Contains classes related to parsing Nuget related files<br/><br/>
* These are used to abstract away Nuget-related handling from Dependency Check so they can be used elsewhere.
*/
package org.owasp.dependencycheck.data.nuget;

View File

@@ -39,7 +39,7 @@ import org.owasp.dependencycheck.utils.Settings;
* obtaining a connection will ensure the database file exists and that the appropriate table structure has been
* created.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public final class ConnectionFactory {

View File

@@ -21,7 +21,7 @@ package org.owasp.dependencycheck.data.nvdcve;
* An exception used to indicate the db4o database is corrupt. This could be due to invalid data or a complete failure
* of the db.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
class CorruptDatabaseException extends DatabaseException {

View File

@@ -25,10 +25,13 @@ import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
import java.util.ResourceBundle;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
@@ -45,7 +48,7 @@ import org.owasp.dependencycheck.utils.Settings;
/**
* The database holding information about the NVD CVE data.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class CveDB {
@@ -57,15 +60,20 @@ public class CveDB {
* Database connection
*/
private Connection conn;
/**
* The bundle of statements used when accessing the database.
*/
private ResourceBundle statementBundle = null;
/**
* Creates a new CveDB object and opens the database connection. Note, the connection must be closed by the caller
* by calling the close method.
* Creates a new CveDB object and opens the database connection. Note, the connection must be closed by the caller by calling
* the close method.
*
* @throws DatabaseException thrown if there is an exception opening the database.
*/
public CveDB() throws DatabaseException {
super();
statementBundle = java.util.ResourceBundle.getBundle("data/dbStatements");
try {
open();
databaseProperties = new DatabaseProperties(this);
@@ -160,118 +168,10 @@ public class CveDB {
public DatabaseProperties getDatabaseProperties() {
return databaseProperties;
}
//<editor-fold defaultstate="collapsed" desc="Constants to create, maintain, and retrieve data from the CVE Database">
/**
* SQL Statement to delete references by vulnerability ID.
*/
private static final String DELETE_REFERENCE = "DELETE FROM reference WHERE cveid = ?";
/**
* SQL Statement to delete software by vulnerability ID.
*/
private static final String DELETE_SOFTWARE = "DELETE FROM software WHERE cveid = ?";
/**
* SQL Statement to delete a vulnerability by CVE.
*/
private static final String DELETE_VULNERABILITY = "DELETE FROM vulnerability WHERE id = ?";
/**
* SQL Statement to cleanup orphan entries. Yes, the db schema could be a little tighter, but what we have works
* well to keep the data file size down a bit.
*/
private static final String CLEANUP_ORPHANS = "DELETE FROM CpeEntry WHERE id not in (SELECT CPEEntryId FROM Software); ";
/**
* SQL Statement to insert a new reference.
*/
private static final String INSERT_REFERENCE = "INSERT INTO reference (cveid, name, url, source) VALUES (?, ?, ?, ?)";
/**
* SQL Statement to insert a new software.
*/
private static final String INSERT_SOFTWARE = "INSERT INTO software (cveid, cpeEntryId, previousVersion) VALUES (?, ?, ?)";
/**
* SQL Statement to insert a new cpe.
*/
private static final String INSERT_CPE = "INSERT INTO cpeEntry (cpe, vendor, product) VALUES (?, ?, ?)";
/**
* SQL Statement to get a CPEProductID.
*/
private static final String SELECT_CPE_ID = "SELECT id FROM cpeEntry WHERE cpe = ?";
/**
* SQL Statement to insert a new vulnerability.
*/
private static final String INSERT_VULNERABILITY = "INSERT INTO vulnerability (cve, description, cwe, cvssScore, cvssAccessVector, "
+ "cvssAccessComplexity, cvssAuthentication, cvssConfidentialityImpact, cvssIntegrityImpact, cvssAvailabilityImpact) "
+ "VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
/**
* SQL Statement to update a vulnerability.
*/
private static final String UPDATE_VULNERABILITY = "UPDATE vulnerability SET description=?, cwe=?, cvssScore=?, cvssAccessVector=?, "
+ "cvssAccessComplexity=?, cvssAuthentication=?, cvssConfidentialityImpact=?, cvssIntegrityImpact=?, cvssAvailabilityImpact=? "
+ "WHERE id=?";
/**
* SQL Statement to find CVE entries based on CPE data.
*/
private static final String SELECT_CVE_FROM_SOFTWARE = "SELECT cve, cpe, previousVersion "
+ "FROM software INNER JOIN vulnerability ON vulnerability.id = software.cveId "
+ "INNER JOIN cpeEntry ON cpeEntry.id = software.cpeEntryId "
+ "WHERE vendor = ? AND product = ?";
//unfortunately, the version info is too complicated to do in a select. Need to filter this afterwards
// + " AND (version = '-' OR previousVersion IS NOT NULL OR version=?)";
//
/**
* SQL Statement to find the CPE entry based on the vendor and product.
*/
private static final String SELECT_CPE_ENTRIES = "SELECT cpe FROM cpeEntry WHERE vendor = ? AND product = ?";
/**
* SQL Statement to select references by CVEID.
*/
private static final String SELECT_REFERENCE = "SELECT source, name, url FROM reference WHERE cveid = ?";
/**
* SQL Statement to select vendor and product for lucene index.
*/
private static final String SELECT_VENDOR_PRODUCT_LIST = "SELECT vendor, product FROM cpeEntry GROUP BY vendor, product";
/**
* SQL Statement to select software by CVEID.
*/
private static final String SELECT_SOFTWARE = "SELECT cpe, previousVersion "
+ "FROM software INNER JOIN cpeEntry ON software.cpeEntryId = cpeEntry.id WHERE cveid = ?";
// public static final String SELECT_SOFTWARE = "SELECT part, vendor, product, version, revision, previousVersion "
// + "FROM software INNER JOIN cpeProduct ON cpeProduct.id = software.cpeProductId LEFT JOIN cpeVersion ON "
// + "software.cpeVersionId = cpeVersion.id LEFT JOIN Version ON cpeVersion.versionId = version.id WHERE cveid = ?";
/**
* SQL Statement to select a vulnerability by CVEID.
*/
private static final String SELECT_VULNERABILITY = "SELECT id, description, cwe, cvssScore, cvssAccessVector, cvssAccessComplexity, "
+ "cvssAuthentication, cvssConfidentialityImpact, cvssIntegrityImpact, cvssAvailabilityImpact FROM vulnerability WHERE cve = ?";
/**
* SQL Statement to select a vulnerability's primary key.
*/
private static final String SELECT_VULNERABILITY_ID = "SELECT id FROM vulnerability WHERE cve = ?";
/**
* SQL Statement to retrieve the properties from the database.
*/
private static final String SELECT_PROPERTIES = "SELECT id, value FROM properties";
/**
* SQL Statement to retrieve a property from the database.
*/
@SuppressWarnings("unused")
private static final String SELECT_PROPERTY = "SELECT id, value FROM properties WHERE id = ?";
/**
* SQL Statement to insert a new property.
*/
private static final String INSERT_PROPERTY = "INSERT INTO properties (id, value) VALUES (?, ?)";
/**
* SQL Statement to update a property.
*/
private static final String UPDATE_PROPERTY = "UPDATE properties SET value = ? WHERE id = ?";
/**
* SQL Statement to delete a property.
*/
@SuppressWarnings("unused")
private static final String DELETE_PROPERTY = "DELETE FROM properties WHERE id = ?";
//</editor-fold>
/**
* Searches the CPE entries in the database and retrieves all entries for a given vendor and product combination.
* The returned list will include all versions of the product that are registered in the NVD CVE data.
* Searches the CPE entries in the database and retrieves all entries for a given vendor and product combination. The returned
* list will include all versions of the product that are registered in the NVD CVE data.
*
* @param vendor the identified vendor name of the dependency being analyzed
* @param product the identified name of the product of the dependency being analyzed
@@ -282,7 +182,7 @@ public class CveDB {
ResultSet rs = null;
PreparedStatement ps = null;
try {
ps = getConnection().prepareStatement(SELECT_CPE_ENTRIES);
ps = getConnection().prepareStatement(statementBundle.getString("SELECT_CPE_ENTRIES"));
ps.setString(1, vendor);
ps.setString(2, product);
rs = ps.executeQuery();
@@ -314,7 +214,7 @@ public class CveDB {
ResultSet rs = null;
PreparedStatement ps = null;
try {
ps = getConnection().prepareStatement(SELECT_VENDOR_PRODUCT_LIST);
ps = getConnection().prepareStatement(statementBundle.getString("SELECT_VENDOR_PRODUCT_LIST"));
rs = ps.executeQuery();
while (rs.next()) {
data.add(new Pair<String, String>(rs.getString(1), rs.getString(2)));
@@ -339,7 +239,7 @@ public class CveDB {
PreparedStatement ps = null;
ResultSet rs = null;
try {
ps = getConnection().prepareStatement(SELECT_PROPERTIES);
ps = getConnection().prepareStatement(statementBundle.getString("SELECT_PROPERTIES"));
rs = ps.executeQuery();
while (rs.next()) {
prop.setProperty(rs.getString(1), rs.getString(2));
@@ -365,8 +265,8 @@ public class CveDB {
PreparedStatement insertProperty = null;
try {
try {
updateProperty = getConnection().prepareStatement(UPDATE_PROPERTY);
insertProperty = getConnection().prepareStatement(INSERT_PROPERTY);
updateProperty = getConnection().prepareStatement(statementBundle.getString("UPDATE_PROPERTY"));
insertProperty = getConnection().prepareStatement(statementBundle.getString("INSERT_PROPERTY"));
} catch (SQLException ex) {
LOGGER.log(Level.WARNING, "Unable to save properties to the database");
LOGGER.log(Level.FINE, "Unable to save properties to the database", ex);
@@ -405,7 +305,7 @@ public class CveDB {
PreparedStatement insertProperty = null;
try {
try {
updateProperty = getConnection().prepareStatement(UPDATE_PROPERTY);
updateProperty = getConnection().prepareStatement(statementBundle.getString("UPDATE_PROPERTY"));
} catch (SQLException ex) {
LOGGER.log(Level.WARNING, "Unable to save properties to the database");
LOGGER.log(Level.FINE, "Unable to save properties to the database", ex);
@@ -416,7 +316,7 @@ public class CveDB {
updateProperty.setString(2, key);
if (updateProperty.executeUpdate() == 0) {
try {
insertProperty = getConnection().prepareStatement(INSERT_PROPERTY);
insertProperty = getConnection().prepareStatement(statementBundle.getString("INSERT_PROPERTY"));
} catch (SQLException ex) {
LOGGER.log(Level.WARNING, "Unable to save properties to the database");
LOGGER.log(Level.FINE, "Unable to save properties to the database", ex);
@@ -456,30 +356,41 @@ public class CveDB {
final List<Vulnerability> vulnerabilities = new ArrayList<Vulnerability>();
PreparedStatement ps;
final HashSet<String> cveEntries = new HashSet<String>();
try {
ps = getConnection().prepareStatement(SELECT_CVE_FROM_SOFTWARE);
ps = getConnection().prepareStatement(statementBundle.getString("SELECT_CVE_FROM_SOFTWARE"));
ps.setString(1, cpe.getVendor());
ps.setString(2, cpe.getProduct());
rs = ps.executeQuery();
String currentCVE = "";
final Map<String, Boolean> vulnSoftware = new HashMap<String, Boolean>();
while (rs.next()) {
final String cveId = rs.getString(1);
if (!currentCVE.equals(cveId)) { //check for match and add
final Entry<String, Boolean> matchedCPE = getMatchingSoftware(vulnSoftware, cpe.getVendor(), cpe.getProduct(), detectedVersion);
if (matchedCPE != null) {
final Vulnerability v = getVulnerability(currentCVE);
v.setMatchedCPE(matchedCPE.getKey(), matchedCPE.getValue() ? "Y" : null);
vulnerabilities.add(v);
}
vulnSoftware.clear();
currentCVE = cveId;
}
final String cpeId = rs.getString(2);
final String previous = rs.getString(3);
if (!cveEntries.contains(cveId) && isAffected(cpe.getVendor(), cpe.getProduct(), detectedVersion, cpeId, previous)) {
cveEntries.add(cveId);
final Vulnerability v = getVulnerability(cveId);
v.setMatchedCPE(cpeId, previous);
vulnerabilities.add(v);
}
final Boolean p = previous != null && !previous.isEmpty();
vulnSoftware.put(cpeId, p);
}
//remember to process the last set of CVE/CPE entries
final Entry<String, Boolean> matchedCPE = getMatchingSoftware(vulnSoftware, cpe.getVendor(), cpe.getProduct(), detectedVersion);
if (matchedCPE != null) {
final Vulnerability v = getVulnerability(currentCVE);
v.setMatchedCPE(matchedCPE.getKey(), matchedCPE.getValue() ? "Y" : null);
vulnerabilities.add(v);
}
DBUtils.closeResultSet(rs);
DBUtils.closeStatement(ps);
// for (String cve : cveEntries) {
// final Vulnerability v = getVulnerability(cve);
// vulnerabilities.add(v);
// }
} catch (SQLException ex) {
throw new DatabaseException("Exception retrieving vulnerability for " + cpeStr, ex);
} finally {
@@ -504,7 +415,7 @@ public class CveDB {
ResultSet rsS = null;
Vulnerability vuln = null;
try {
psV = getConnection().prepareStatement(SELECT_VULNERABILITY);
psV = getConnection().prepareStatement(statementBundle.getString("SELECT_VULNERABILITY"));
psV.setString(1, cve);
rsV = psV.executeQuery();
if (rsV.next()) {
@@ -528,13 +439,13 @@ public class CveDB {
vuln.setCvssIntegrityImpact(rsV.getString(9));
vuln.setCvssAvailabilityImpact(rsV.getString(10));
psR = getConnection().prepareStatement(SELECT_REFERENCE);
psR = getConnection().prepareStatement(statementBundle.getString("SELECT_REFERENCES"));
psR.setInt(1, cveId);
rsR = psR.executeQuery();
while (rsR.next()) {
vuln.addReference(rsR.getString(1), rsR.getString(2), rsR.getString(3));
}
psS = getConnection().prepareStatement(SELECT_SOFTWARE);
psS = getConnection().prepareStatement(statementBundle.getString("SELECT_SOFTWARE"));
psS.setInt(1, cveId);
rsS = psS.executeQuery();
while (rsS.next()) {
@@ -579,16 +490,18 @@ public class CveDB {
PreparedStatement insertSoftware = null;
try {
selectVulnerabilityId = getConnection().prepareStatement(SELECT_VULNERABILITY_ID);
deleteVulnerability = getConnection().prepareStatement(DELETE_VULNERABILITY);
deleteReferences = getConnection().prepareStatement(DELETE_REFERENCE);
deleteSoftware = getConnection().prepareStatement(DELETE_SOFTWARE);
updateVulnerability = getConnection().prepareStatement(UPDATE_VULNERABILITY);
insertVulnerability = getConnection().prepareStatement(INSERT_VULNERABILITY, Statement.RETURN_GENERATED_KEYS);
insertReference = getConnection().prepareStatement(INSERT_REFERENCE);
selectCpeId = getConnection().prepareStatement(SELECT_CPE_ID);
insertCpe = getConnection().prepareStatement(INSERT_CPE, Statement.RETURN_GENERATED_KEYS);
insertSoftware = getConnection().prepareStatement(INSERT_SOFTWARE);
selectVulnerabilityId = getConnection().prepareStatement(statementBundle.getString("SELECT_VULNERABILITY_ID"));
deleteVulnerability = getConnection().prepareStatement(statementBundle.getString("DELETE_VULNERABILITY"));
deleteReferences = getConnection().prepareStatement(statementBundle.getString("DELETE_REFERENCE"));
deleteSoftware = getConnection().prepareStatement(statementBundle.getString("DELETE_SOFTWARE"));
updateVulnerability = getConnection().prepareStatement(statementBundle.getString("UPDATE_VULNERABILITY"));
insertVulnerability = getConnection().prepareStatement(statementBundle.getString("INSERT_VULNERABILITY"),
Statement.RETURN_GENERATED_KEYS);
insertReference = getConnection().prepareStatement(statementBundle.getString("INSERT_REFERENCE"));
selectCpeId = getConnection().prepareStatement(statementBundle.getString("SELECT_CPE_ID"));
insertCpe = getConnection().prepareStatement(statementBundle.getString("INSERT_CPE"),
Statement.RETURN_GENERATED_KEYS);
insertSoftware = getConnection().prepareStatement(statementBundle.getString("INSERT_SOFTWARE"));
int vulnerabilityId = 0;
selectVulnerabilityId.setString(1, vuln.getName());
ResultSet rs = selectVulnerabilityId.executeQuery();
@@ -742,13 +655,13 @@ public class CveDB {
}
/**
* It is possible that orphaned rows may be generated during database updates. This should be called after all
* updates have been completed to ensure orphan entries are removed.
* It is possible that orphaned rows may be generated during database updates. This should be called after all updates have
* been completed to ensure orphan entries are removed.
*/
public void cleanupDatabase() {
PreparedStatement ps = null;
try {
ps = getConnection().prepareStatement(CLEANUP_ORPHANS);
ps = getConnection().prepareStatement(statementBundle.getString("CLEANUP_ORPHANS"));
if (ps != null) {
ps.executeUpdate();
}
@@ -762,46 +675,80 @@ public class CveDB {
}
/**
* Determines if the given identifiedVersion is affected by the given cpeId and previous version flag. A non-null,
* non-empty string passed to the previous version argument indicates that all previous versions are affected.
* Determines if the given identifiedVersion is affected by the given cpeId and previous version flag. A non-null, non-empty
* string passed to the previous version argument indicates that all previous versions are affected.
*
* @param vendor the vendor of the dependency being analyzed
* @param product the product name of the dependency being analyzed
* @param vulnerableSoftware a map of the vulnerable software with a boolean indicating if all previous versions are affected
* @param identifiedVersion the identified version of the dependency being analyzed
* @param cpeId the cpe identifier of software that has a known vulnerability
* @param previous a flag indicating if previous versions of the product are vulnerable
* @return true if the identified version is affected, otherwise false
*/
protected boolean isAffected(String vendor, String product, DependencyVersion identifiedVersion, String cpeId, String previous) {
boolean affected = false;
final boolean isStruts = "apache".equals(vendor) && "struts".equals(product);
final DependencyVersion v = parseDependencyVersion(cpeId);
final boolean prevAffected = previous != null && !previous.isEmpty();
if (v == null || "-".equals(v.toString())) { //all versions
affected = true;
} else if (identifiedVersion == null || "-".equals(identifiedVersion.toString())) {
if (prevAffected) {
affected = true;
Entry<String, Boolean> getMatchingSoftware(Map<String, Boolean> vulnerableSoftware, String vendor, String product,
DependencyVersion identifiedVersion) {
final boolean isVersionTwoADifferentProduct = "apache".equals(vendor) && "struts".equals(product);
final Set<String> majorVersionsAffectingAllPrevious = new HashSet<String>();
final boolean matchesAnyPrevious = identifiedVersion == null || "-".equals(identifiedVersion.toString());
String majorVersionMatch = null;
for (Entry<String, Boolean> entry : vulnerableSoftware.entrySet()) {
final DependencyVersion v = parseDependencyVersion(entry.getKey());
if (v == null || "-".equals(v.toString())) { //all versions
return entry;
}
} else if (identifiedVersion.equals(v) || (prevAffected && identifiedVersion.compareTo(v) < 0)) {
if (isStruts) { //struts 2 vulns don't affect struts 1
if (identifiedVersion.getVersionParts().get(0).equals(v.getVersionParts().get(0))) {
affected = true;
if (entry.getValue()) {
if (matchesAnyPrevious) {
return entry;
}
} else {
affected = true;
if (identifiedVersion != null && identifiedVersion.getVersionParts().get(0).equals(v.getVersionParts().get(0))) {
majorVersionMatch = v.getVersionParts().get(0);
}
majorVersionsAffectingAllPrevious.add(v.getVersionParts().get(0));
}
}
/*
* TODO consider utilizing the matchThreeVersion method to get additional results. However, this
* might also introduce false positives.
*/
return affected;
if (matchesAnyPrevious) {
return null;
}
final boolean canSkipVersions = majorVersionMatch != null && majorVersionsAffectingAllPrevious.size() > 1;
//yes, we are iterating over this twice. The first time we are skipping versions those that affect all versions
//then later we process those that affect all versions. This could be done with sorting...
for (Entry<String, Boolean> entry : vulnerableSoftware.entrySet()) {
if (!entry.getValue()) {
final DependencyVersion v = parseDependencyVersion(entry.getKey());
//this can't dereference a null 'majorVersionMatch' as canSkipVersions accounts for this.
if (canSkipVersions && !majorVersionMatch.equals(v.getVersionParts().get(0))) {
continue;
}
//this can't dereference a null 'identifiedVersion' because if it was null we would have exited
//in the above loop or just after loop (if matchesAnyPrevious return null).
if (identifiedVersion.equals(v)) {
return entry;
}
}
}
for (Entry<String, Boolean> entry : vulnerableSoftware.entrySet()) {
if (entry.getValue()) {
final DependencyVersion v = parseDependencyVersion(entry.getKey());
//this can't dereference a null 'majorVersionMatch' as canSkipVersions accounts for this.
if (canSkipVersions && !majorVersionMatch.equals(v.getVersionParts().get(0))) {
continue;
}
//this can't dereference a null 'identifiedVersion' because if it was null we would have exited
//in the above loop or just after loop (if matchesAnyPrevious return null).
if (entry.getValue() && identifiedVersion.compareTo(v) <= 0) {
if (!(isVersionTwoADifferentProduct && !identifiedVersion.getVersionParts().get(0).equals(v.getVersionParts().get(0)))) {
return entry;
}
}
}
}
return null;
}
/**
* Parses the version (including revision) from a CPE identifier. If no version is identified then a '-' is
* returned.
* Parses the version (including revision) from a CPE identifier. If no version is identified then a '-' is returned.
*
* @param cpeStr a cpe identifier
* @return a dependency version
@@ -825,9 +772,9 @@ public class CveDB {
*/
private DependencyVersion parseDependencyVersion(VulnerableSoftware cpe) {
DependencyVersion cpeVersion;
if (cpe.getVersion() != null && cpe.getVersion().length() > 0) {
if (cpe.getVersion() != null && !cpe.getVersion().isEmpty()) {
String versionText;
if (cpe.getRevision() != null && cpe.getRevision().length() > 0) {
if (cpe.getRevision() != null && !cpe.getRevision().isEmpty()) {
versionText = String.format("%s.%s", cpe.getVersion(), cpe.getRevision());
} else {
versionText = cpe.getVersion();

View File

@@ -20,7 +20,7 @@ package org.owasp.dependencycheck.data.nvdcve;
/**
* An exception thrown if an operation against the database fails.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class DatabaseException extends Exception {

View File

@@ -32,7 +32,7 @@ import org.owasp.dependencycheck.data.update.exception.UpdateException;
/**
* This is a wrapper around a set of properties that are stored in the database.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class DatabaseProperties {
@@ -154,7 +154,7 @@ public class DatabaseProperties {
* @return a map of the database meta data
*/
public Map<String, String> getMetaData() {
final TreeMap<String, String> map = new TreeMap<String, String>();
final Map<String, String> map = new TreeMap<String, String>();
for (Entry<Object, Object> entry : properties.entrySet()) {
final String key = (String) entry.getKey();
if (!"version".equals(key)) {

View File

@@ -20,7 +20,7 @@ package org.owasp.dependencycheck.data.nvdcve;
/**
* An exception thrown the database driver is unable to be loaded.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class DriverLoadException extends Exception {

View File

@@ -27,13 +27,14 @@ import java.sql.Driver;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
* DriverLoader is a utility class that is used to load database drivers.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public final class DriverLoader {
@@ -75,7 +76,7 @@ public final class DriverLoader {
*/
public static Driver load(String className, String pathToDriver) throws DriverLoadException {
final URLClassLoader parent = (URLClassLoader) ClassLoader.getSystemClassLoader();
final ArrayList<URL> urls = new ArrayList<URL>();
final List<URL> urls = new ArrayList<URL>();
final String[] paths = pathToDriver.split(File.pathSeparator);
for (String path : paths) {
final File file = new File(path);

View File

@@ -34,7 +34,7 @@ import java.util.logging.Logger;
* copy (with more comments and a few more methods implemented) of the DriverShim from:</p>
* <blockquote>http://www.kfu.com/~nsayer/Java/dyn-jdbc.html</blockquote>
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
* @see java.sql.Driver
*/
class DriverShim implements Driver {

View File

@@ -1,12 +1,4 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.data.nvdcve</title>
* </head>
* <body>
* Contains classes used to work with the NVD CVE data.
* </body>
* </html>
*/
*/
package org.owasp.dependencycheck.data.nvdcve;

View File

@@ -23,7 +23,7 @@ import org.owasp.dependencycheck.data.update.exception.UpdateException;
* Defines a data source who's data is retrieved from the Internet. This data can be downloaded and the local cache
* updated.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public interface CachedWebDataSource {

View File

@@ -37,7 +37,7 @@ import org.owasp.dependencycheck.utils.URLConnectionFailureException;
/**
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class EngineVersionCheck implements CachedWebDataSource {

View File

@@ -20,7 +20,7 @@ package org.owasp.dependencycheck.data.update;
/**
* A pojo that contains the Url and timestamp of the current NvdCve XML files.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class NvdCveInfo {

View File

@@ -27,7 +27,7 @@ import org.owasp.dependencycheck.utils.Settings;
/**
* Class responsible for updating the NVD CVE and CPE data stores.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class NvdCveUpdater implements CachedWebDataSource {

View File

@@ -44,7 +44,7 @@ import org.owasp.dependencycheck.utils.Settings;
/**
* Class responsible for updating the NVDCVE data store.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class StandardUpdate {

View File

@@ -24,7 +24,7 @@ import java.util.ServiceLoader;
* The CachedWebDataSource Service Loader. This class loads all services that implement
* org.owasp.dependencycheck.data.update.CachedWebDataSource.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class UpdateService {

View File

@@ -30,7 +30,7 @@ import org.owasp.dependencycheck.utils.Downloader;
* Contains a collection of updateable NvdCveInfo objects. This is used to determine which files need to be downloaded
* and processed.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class UpdateableNvdCve implements java.lang.Iterable<NvdCveInfo>, Iterator<NvdCveInfo> {

View File

@@ -20,7 +20,7 @@ package org.owasp.dependencycheck.data.update.exception;
/**
* An InvalidDataDataException is a generic exception used when trying to load the NVD CVE meta data.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class InvalidDataException extends Exception {

View File

@@ -22,7 +22,7 @@ import java.io.IOException;
/**
* An exception used when an error occurs reading a setting.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class UpdateException extends IOException {

View File

@@ -1,11 +1,5 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.data.update.exception</title>
* </head>
* <body>
* <p>A collection of exception classes used within the application.</p>
* </body>
* </html>
*
* A collection of exception classes used within the application.
*/
package org.owasp.dependencycheck.data.update.exception;

View File

@@ -1,15 +1,9 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.data.update</title>
* </head>
* <body>
* <p>Contains classes used to update the data stores.</p>
* <p>The UpdateService will load, any correctly defined CachedWebDataSource(s)
* and call update() on them. The Cached Data Source must determine if it needs
* to be updated and if so perform the update. The sub packages contain classes
* used to perform the actual updates.</p>
* </body>
* </html>
*
* Contains classes used to update the data stores.<br/><br/>
*
* The UpdateService will load, any correctly defined CachedWebDataSource(s) and call update() on them. The Cached Data Source
* must determine if it needs to be updated and if so perform the update. The sub packages contain classes used to perform the
* actual updates.
*/
package org.owasp.dependencycheck.data.update;

View File

@@ -40,7 +40,7 @@ import org.owasp.dependencycheck.utils.Settings;
/**
* A callable object to download two files.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class DownloadTask implements Callable<Future<ProcessTask>> {

View File

@@ -42,7 +42,7 @@ import org.xml.sax.SAXException;
/**
* A callable task that will process a given set of NVD CVE xml files and update the Cve Database accordingly.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class ProcessTask implements Callable<ProcessTask> {

View File

@@ -1,12 +1,4 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.data.update.task</title>
* </head>
* <body>
* <p>A collection of callable/runnable tasks used to speed up the update
* process.</p>
* </body>
* </html>
* A collection of callable/runnable tasks used to speed up the update process.
*/
package org.owasp.dependencycheck.data.update.task;

View File

@@ -32,7 +32,7 @@ import org.xml.sax.helpers.DefaultHandler;
* CPEs that have previous versions specified. The previous version information is not in the 2.0 version of the schema
* and is useful to ensure accurate identification (or at least complete).
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class NvdCve12Handler extends DefaultHandler {

Some files were not shown because too many files have changed in this diff Show More