Compare commits

..

354 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
344 changed files with 15187 additions and 22359 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.9</version>
<version>1.2.11</version>
</parent>
<artifactId>dependency-check-ant</artifactId>
@@ -280,7 +280,6 @@ Copyright (c) 2013 - Jeremy Long. All Rights Reserved.
<reportSets>
<reportSet>
<reports>
<report>index</report>
<report>summary</report>
<report>license</report>
<report>help</report>
@@ -293,6 +292,7 @@ Copyright (c) 2013 - Jeremy Long. All Rights Reserved.
<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>

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 {
@@ -261,6 +261,29 @@ public class DependencyCheckTask extends Task {
public void setAutoUpdate(boolean autoUpdate) {
this.autoUpdate = autoUpdate;
}
/**
* 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.
@@ -605,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;
@@ -912,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");

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
@@ -53,7 +54,7 @@ zipExtensions | A comma-separated list of additional file extensions t
jarAnalyzer | Sets whether the Jar Analyzer will be used. | 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,7 +27,7 @@ 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

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.9</version>
<version>1.2.11</version>
</parent>
<artifactId>dependency-check-cli</artifactId>
@@ -184,7 +184,6 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
<reportSets>
<reportSet>
<reports>
<report>index</report>
<report>summary</report>
<report>license</report>
<report>help</report>
@@ -197,6 +196,7 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
<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>

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 {
@@ -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,10 +323,17 @@ 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.")
@@ -333,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)
@@ -350,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)
@@ -364,6 +377,8 @@ public final class CliParser {
.addOption(disableJarAnalyzer)
.addOption(disableArchiveAnalyzer)
.addOption(disableAssemblyAnalyzer)
.addOption(disablePythonDistributionAnalyzer)
.addOption(disablePythonPackageAnalyzer)
.addOption(disableNuspecAnalyzer)
.addOption(disableCentralAnalyzer)
.addOption(disableNexusAnalyzer)
@@ -453,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.
*
@@ -689,12 +722,21 @@ 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.
*
* @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.
*
@@ -770,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.
*/
@@ -881,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,27 +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
-------|-----------------------|-----------------|-----------------------------------------------------------------------------|---------------
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;
| \-\-disableArchive | | Sets whether the Archive Analyzer will be used. | false
| \-\-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
| \-\-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.9</version>
<version>1.2.11</version>
</parent>
<artifactId>dependency-check-core</artifactId>
@@ -219,11 +219,26 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
</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>
@@ -519,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>
@@ -677,6 +704,65 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<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>

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 {
@@ -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 {

View File

@@ -54,7 +54,7 @@ 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.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class CPEAnalyzer implements Analyzer {
@@ -160,6 +160,10 @@ 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.
@@ -418,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;
@@ -450,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) {

View File

@@ -33,7 +33,7 @@ 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.jaxb.pom.PomUtils;
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;
@@ -76,10 +76,6 @@ public class CentralAnalyzer extends AbstractFileTypeAnalyzer {
* The searcher itself.
*/
private CentralSearch searcher;
/**
* Utility to read POM files.
*/
private PomUtils pomUtil = new PomUtils();
/**
* Field indicating if the analyzer is enabled.
*/
@@ -216,7 +212,7 @@ public class CentralAnalyzer extends AbstractFileTypeAnalyzer {
}
LOGGER.fine(String.format("Downloading %s", ma.getPomUrl()));
Downloader.fetchFile(new URL(ma.getPomUrl()), pomFile);
pomUtil.analyzePOM(dependency, pomFile);
PomUtils.analyzePOM(dependency, pomFile);
} catch (DownloadFailedException ex) {
final String msg = String.format("Unable to download pom.xml for %s from Central; "

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

@@ -42,7 +42,7 @@ import org.owasp.dependencycheck.utils.LogUtils;
* <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 {

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

@@ -29,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 {

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,26 +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.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.PomUtils;
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;
/**
* 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 {
@@ -149,17 +142,11 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
*/
private static final Pattern HTML_DETECTION_PATTERN = Pattern.compile("\\<[a-z]+.*/?\\>", Pattern.CASE_INSENSITIVE);
/**
* The POM Utility for parsing POM files.
*/
private PomUtils pomUtils = null;
//</editor-fold>
/**
* Constructs a new JarAnalyzer.
*/
public JarAnalyzer() {
pomUtils = new PomUtils();
}
//<editor-fold defaultstate="collapsed" desc="All standard implmentation details of Analyzer">
@@ -289,6 +276,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
}
}
for (String path : pomEntries) {
LOGGER.fine(String.format("Reading pom entry: %s", path));
Properties pomProperties = null;
try {
if (externalPom == null) {
@@ -315,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 = pomUtils.readPom(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());
@@ -353,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 {
@@ -380,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());
}
}
@@ -423,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 = pomUtils.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);
}
/**
@@ -482,71 +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 = pomUtils.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;
}
/**
* 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
* @return true if there was evidence within the pom that we could use; otherwise false
*/
private boolean setPomEvidence(Dependency dependency, Model pom, Properties pomProperties, List<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;
@@ -564,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);
@@ -592,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;
@@ -614,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);
@@ -638,16 +564,15 @@ 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;
}
@@ -974,62 +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.
*/
public static String interpolateString(String text, Properties properties) {
final Properties props = properties;
if (text == null) {
return text;
}
if (props == null) {
return text;
}
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.
*
@@ -1137,7 +1006,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
* @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(List<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;
}
@@ -1169,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
*/
public static 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) {
@@ -1202,6 +1070,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
}
if (license != null) {
dependency.setLicense(license);
}
}
}

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

@@ -33,7 +33,7 @@ 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.jaxb.pom.PomUtils;
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;
@@ -45,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
@@ -89,10 +89,6 @@ public class NexusAnalyzer extends AbstractFileTypeAnalyzer {
* Field indicating if the analyzer is enabled.
*/
private final boolean enabled = checkEnabled();
/**
* Field for doing POM work
*/
private final PomUtils pomUtil = new PomUtils();
/**
* Determines if this analyzer is enabled
@@ -233,7 +229,7 @@ public class NexusAnalyzer extends AbstractFileTypeAnalyzer {
}
LOGGER.fine(String.format("Downloading %s", ma.getPomUrl()));
Downloader.fetchFile(new URL(ma.getPomUrl()), pomFile);
pomUtil.analyzePOM(dependency, 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());

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

@@ -123,7 +123,7 @@ 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));
final NodeList atts = (NodeList) xpath.evaluate("./arr[@name='ec']/str", docs.item(i), XPathConstants.NODESET);
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++) {
@@ -134,8 +134,18 @@ public class CentralSearch {
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, jarAvailable, pomAvailable));
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

@@ -51,7 +51,7 @@ 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.
*
* @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 {

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

@@ -32,7 +32,7 @@ import org.apache.lucene.util.Version;
* 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

@@ -24,7 +24,7 @@ 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 {

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 {

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 {

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 {
/**

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

@@ -27,7 +27,7 @@ public class MavenArtifact {
/**
* The base URL for download artifacts from Central.
*/
private static final String CENTRAL_CONTENT_URL = "http://search.maven.org/remotecontent?filepath=";
private static final String CENTRAL_CONTENT_URL = "//search.maven.org/remotecontent?filepath=";
/**
* The groupId
@@ -80,19 +80,26 @@ public class MavenArtifact {
* @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) {
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 = this.CENTRAL_CONTENT_URL + groupId.replace('.', '/') + "/" + artifactId.replace('.', '/') + "/"
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 = this.CENTRAL_CONTENT_URL + groupId.replace('.', '/') + "/" + artifactId.replace('.', '/') + "/"
this.pomUrl = base + groupId.replace('.', '/') + "/" + artifactId + "/"
+ version + "/" + artifactId + "-" + version + ".pom";
}
}

View File

@@ -40,20 +40,26 @@ 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.
@@ -98,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
@@ -163,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

@@ -31,6 +31,7 @@ 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;
@@ -47,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 {
@@ -59,6 +60,10 @@ 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
@@ -68,6 +73,7 @@ public class CveDB {
*/
public CveDB() throws DatabaseException {
super();
statementBundle = java.util.ResourceBundle.getBundle("data/dbStatements");
try {
open();
databaseProperties = new DatabaseProperties(this);
@@ -162,116 +168,7 @@ 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 = ? "
+ "ORDER BY cve, cpe"; //, previousVersion
//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.
@@ -285,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();
@@ -317,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)));
@@ -342,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));
@@ -368,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);
@@ -408,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);
@@ -419,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);
@@ -460,7 +357,7 @@ public class CveDB {
PreparedStatement ps;
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();
@@ -518,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()) {
@@ -542,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()) {
@@ -593,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();
@@ -762,7 +661,7 @@ public class CveDB {
public void cleanupDatabase() {
PreparedStatement ps = null;
try {
ps = getConnection().prepareStatement(CLEANUP_ORPHANS);
ps = getConnection().prepareStatement(statementBundle.getString("CLEANUP_ORPHANS"));
if (ps != null) {
ps.executeUpdate();
}

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 {

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

@@ -34,7 +34,7 @@ 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 {

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 {

View File

@@ -36,7 +36,7 @@ import org.xml.sax.helpers.DefaultHandler;
/**
* A SAX Handler that will parse the NVD CVE XML (schema version 2.0).
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public class NvdCve20Handler extends DefaultHandler {

View File

@@ -1,16 +1,8 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.data.nvdcve.xml</title>
* </head>
* <body>
* <p>Contains classes used to parse the NVD CVE XML file.</p>
* <p>The basic use is that the Importer is called to import an NVD CVE file.
* The Importer instantiates an Indexer object (which extends Index). The
* Indexer creates a partial-unmarshalling SAX parser (implemented in the
* NvdCveXmlFilter) that extracts VulnerabilityTypes (aka Entry) from the NVD
* CVE data file and stores these into a Lucene Index.</p>
* </body>
* </html>
* Contains classes used to parse the NVD CVE XML file.<br/><br/>
*
* The basic use is that the Importer is called to import an NVD CVE file. The Importer instantiates an Indexer object (which
* extends Index). The Indexer creates a partial-unmarshalling SAX parser (implemented in the NvdCveXmlFilter) that extracts
* VulnerabilityTypes (aka Entry) from the NVD CVE data file and stores these into a Lucene Index.
*/
package org.owasp.dependencycheck.data.update.xml;

View File

@@ -20,7 +20,7 @@ package org.owasp.dependencycheck.dependency;
/**
* A confidence enumeration.
*
* @author Jeremy Long <jeremy.long@owasp.org>
* @author Jeremy Long
*/
public enum Confidence {

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