Compare commits

..

1348 Commits

Author SHA1 Message Date
Jeremy Long
88a97769de added additional fine grained logging
Former-commit-id: 782dca3f3ed72da8e6c0b4eb9ee38783dd5690c8
2014-12-08 06:39:51 -05:00
Jeremy Long
589c761cb0 resolved null pointer exception
Former-commit-id: 3cc97c878a2bcc09c8a2cea3802278974d56b954
2014-12-08 05:41:58 -05:00
Jeremy Long
3e6787fd61 fixed null pointer exception
Former-commit-id: d66364e752e80fc90fb2fe226b272ba63879d104
2014-12-07 16:30:00 -05:00
Jeremy Long
aff52ee3f5 version 1.2.7
Former-commit-id: 9e666f3f6e65b67e7e144e6fc9ac75a3754c3ebb
2014-12-07 10:13:30 -05:00
Jeremy Long
4555b02592 checkstyle, findbugs, and pmd corrections
Former-commit-id: 85573816e82855343af1d41576ffc2479e8595ed
2014-12-06 13:16:06 -05:00
Jeremy Long
e1d4599a93 added test cases for issue #82
Former-commit-id: e823eb5eb2d19b252cb5bd65c3f74891478a69ee
2014-12-06 11:35:49 -05:00
Jeremy Long
1a1e141cb8 added jmockit
Former-commit-id: 385bef77dce7476ac0983c573b5909b4667e7899
2014-12-06 11:35:20 -05:00
Jeremy Long
33218f41e8 minor changes to support testing
Former-commit-id: ef1a8934c2a118216a06aeba786be0f732a6060a
2014-12-06 11:34:50 -05:00
Jeremy Long
8772cda47a added property to resolve issue #82
Former-commit-id: 711d6f538901aff6a9467fba460b62905dce75b4
2014-12-06 10:20:46 -05:00
Jeremy Long
512eb713e4 added EngineVersionCheck to resolve issue #82
Former-commit-id: ffc483a673187cf7f4a1c3a0ba8a46eb86532316
2014-12-06 10:18:46 -05:00
Jeremy Long
0f90d48c62 added EngineVersionCheck to service loader
Former-commit-id: 8047a173070d8ccaff0e5401472d885245b9ffba
2014-12-06 10:18:03 -05:00
Jeremy Long
658860e396 added new save properties method to support changes for issue #82
Former-commit-id: 56480f2d0233a03aed83ec0e8c8092f599cd0a62
2014-12-06 10:15:28 -05:00
Jeremy Long
7522dae557 changed settings to use a keys instead of hard-coded strings
Former-commit-id: a7c06468b17bd063ac7cf54bbd4982f29fcf529f
2014-12-06 10:14:31 -05:00
Jeremy Long
e34e65a3ba added filtered site resource
Former-commit-id: b6e3475b23a304841a655c4656ec753c9a81b707
2014-12-06 10:13:22 -05:00
Jeremy Long
5a001a2c32 moved withinRange to a utility class
Former-commit-id: d7bd22e42e6a96306e17229e449b9b052ddcb627
2014-12-06 07:44:07 -05:00
Jeremy Long
13a03eb250 moved withinRange to a utility class
Former-commit-id: aab76247ebf674c0e8cdeba56abedb1d510de41c
2014-12-06 07:37:47 -05:00
Jeremy Long
cd863b6cca added additional settings keys
Former-commit-id: 232c1cee317c0c7b7775dd111c82f1ad44882ab9
2014-12-06 07:36:42 -05:00
Jeremy Long
83b182dda5 modified Settings.getString to use a key instead of hard-coded string
Former-commit-id: 6c047637c1e2bb865d4bb504ff67851398a0d88e
2014-12-06 07:36:15 -05:00
Jeremy Long
3b90d1a564 updates to ensure that the logger is initialized correctly
Former-commit-id: c468df5c8dbd16edefae8e65ac28eed394c1fa87
2014-12-03 15:54:03 -05:00
Jeremy Long
d724855dfc minor updates and addition of JavaDoc
Former-commit-id: ac465b9c252dec453f8528b7e466bd61f8d7adb4
2014-12-03 15:53:22 -05:00
Jeremy Long
78008330fe changed order of operations to ensure the Maven engine doesn't call initialize twice
Former-commit-id: bbf613387adc87b605d0003b923421274979313d
2014-12-03 15:44:29 -05:00
Jeremy Long
e716aad224 corrected catch to use a more specific exception
Former-commit-id: 8bcd641d5be83f7ec8d182a55e0b5b52a73136d6
2014-12-03 05:57:10 -05:00
Jeremy Long
aa0d7cb4e9 added initialize method to resolve issue with initializing the logger
Former-commit-id: 9123f1243375c4443e6617db1de69bbcceaf1130
2014-12-03 05:56:33 -05:00
Jeremy Long
0cd43ce35c updates to reduce load times in multi-module projects per issue #168
Former-commit-id: adfaaaddffffa9b078d6b78a1ac031e6d8343f21
2014-12-02 06:43:54 -05:00
Jeremy Long
ac98c8e395 corrected the order of operations so that report aggregation can include the last module
Former-commit-id: 4169dedceee6f35c5357ee9841e94123acec575d
2014-12-01 06:51:57 -05:00
Jeremy Long
70a8fc09c6 Merge branch 'master' of github.com:jeremylong/DependencyCheck
Former-commit-id: f91bf00c7865a26cff5e6d4c8d3ea67d8c472a70
2014-11-30 07:47:14 -05:00
Jeremy Long
5b00d05e2e resolved issue #171
Former-commit-id: 28a30d4d76b2bb44247e26fae4601d32c2df12df
2014-11-30 07:46:28 -05:00
Steve Springett
28c1730a02 Merge remote-tracking branch 'origin/master'
Former-commit-id: 43610b7be6f438085abee3054254daedd7c09177
2014-11-26 15:03:37 +02:00
Steve Springett
c54483d36f Adding missing central analyzer config to scan agent
Former-commit-id: 948e67459ba06c7a4f76efaba16d0dfbbba1aa44
2014-11-26 15:03:10 +02:00
Jeremy Long
2dd02ff8cb Merge branch 'master' of github.com:jeremylong/DependencyCheck
Former-commit-id: 17a1b6ffc03aea4c52760a0e8f721f2a017f9c18
2014-11-26 07:03:42 -05:00
Jeremy Long
46c5501b7a changed ensureDataExists method to resolve startup time delays as part of a fix for issue #168
Former-commit-id: 15e85be9e5e01253f4864d18178da4c395b008eb
2014-11-25 05:58:16 -05:00
Jeremy Long
f154826749 added additionial verbose logging
Former-commit-id: 5d65d0186914d7045b6e5d51c10bc2feb8b2aab4
2014-11-25 05:57:02 -05:00
Jeremy Long
96383ef985 added a check to the open function to prevent losing a reference to an open database connection
Former-commit-id: 62e8386dce392d8c7fbc58febc4f5d4bc35e84f0
2014-11-25 05:55:59 -05:00
Jeremy Long
ab4b19dbab added a database check to ensure data exists - this replaces an older method and reduces startup time to help resolve issue #168
Former-commit-id: 4a8b2db9adf91cef2d89148f0c9b9c2327240221
2014-11-25 05:55:01 -05:00
Steve Springett
cdc53ac570 Minor changes to allow for more flexible use of ReportGenerator outside of the core.
Former-commit-id: ce728f6d7a229571d093ed93e829b6597d084507
2014-11-21 17:29:52 -06:00
Steve Springett
143cc1912e Merge remote-tracking branch 'origin/master'
Former-commit-id: 056feebeb11b34d5da1fb40f90cd1bd9aabeeb9a
2014-11-21 16:21:28 -06:00
Jeremy Long
0d90b676bc changed logging message that indicates default state was moved to the log file rather then standard console output
Former-commit-id: e67218ff539a0c2b34cc78d0208f42d815248d7e
2014-11-21 06:36:28 -05:00
Jeremy Long
5fadbb3d25 changed logging level indicating that the central analyzer is being used instead of NexusAnalyzer - since this is the standard use case it clutters the output, the message now only goes to the log
Former-commit-id: d3faf76c59cf5a80070299a99410b1593c91187c
2014-11-21 06:16:05 -05:00
Steve Springett
0ec99a3e12 Merge remote-tracking branch 'origin/master'
Former-commit-id: 9dab9bc03f82335c16dce4026f6a3a4fc860e5d1
2014-11-17 17:04:24 -06:00
Jeremy Long
1efbc44cc4 reformated
Former-commit-id: 60c32e7e0ccd8d1586e1c691ff1671d192646895
2014-11-17 06:45:19 -05:00
Steve Springett
735fcfeee2 Merge remote-tracking branch 'origin/master'
Former-commit-id: 5eb272a53b94c6346b7c43ee5f0acd45c2e2911c
2014-11-16 12:53:37 -06:00
Jeremy Long
4a77150566 version 1.2.7-SNAPSHOT
Former-commit-id: dfd0fd2bfa6929271e82c833ae5f3abc231219a6
2014-11-16 12:46:46 -05:00
Jeremy Long
180a420219 changed checkstyle off on markers
Former-commit-id: 1a6a854e34d834cf7532439279f55e5538eb1b5d
2014-11-16 12:46:28 -05:00
Jeremy Long
d12ba8f3ef version 1.2.7-SNAPSHOT
Former-commit-id: 8721c2c03a5ecb7f81ebaab4febefda2ff968991
2014-11-16 12:45:51 -05:00
Jeremy Long
f333ef76d9 version 1.2.6
Former-commit-id: d32ff0d840fc1d1a3153da73158adc125a589efc
2014-11-16 09:44:11 -05:00
Jeremy Long
af5ba6854e minor format change
Former-commit-id: 138be9fe55a362d21021b428b36ac65e621fd88a
2014-11-16 09:43:26 -05:00
Jeremy Long
8b7ce06793 initial version
Former-commit-id: efb4fec83ee9d788b3a5b21c683f52dd91113ec0
2014-11-16 08:25:13 -05:00
Jeremy Long
297a5e516f switched to using commons.io.FileUtils to delete files
Former-commit-id: e63309f20e7af759233db5486acc85f2c5c6806d
2014-11-16 08:24:55 -05:00
Jeremy Long
92b11526be updated log messages
Former-commit-id: 4f58ed64efbee2a2d604bdc5bd51394e152bd408
2014-11-16 08:24:17 -05:00
Jeremy Long
299350f655 correctly closed streams when extracting a gzip archive
Former-commit-id: 0a0c917cc3e4c4a004823fba9b7f8ab53f90d557
2014-11-16 06:21:02 -05:00
Jeremy Long
127eafc9b3 removed unused field
Former-commit-id: f44e6398f946abe2faa8ab1b2e3813a6831b9c66
2014-11-16 06:20:27 -05:00
Jeremy Long
ad1ad3a997 turned off checkstyle for a few lines
Former-commit-id: 62bf63649427363c0d86bd72acbb76a9772d1da3
2014-11-16 06:20:07 -05:00
Jeremy Long
82151c5b3f initial version of the test for DownloadTask
Former-commit-id: 5c82a5dda739525be25eed5ee763effe839758d0
2014-11-15 08:23:54 -05:00
Jeremy Long
90457c89ff updated NVD CVE URLs to use gzipped files
Former-commit-id: ca3c5ec40458f200a19cfcda36d518cf4de5a65a
2014-11-15 08:23:13 -05:00
Jeremy Long
3f3ac86d38 minor change to test cases
Former-commit-id: bbfc241e7576b508af819f7fe66892da0511e549
2014-11-15 08:22:43 -05:00
Jeremy Long
aa126039e5 updated NVD CVE URLs to use gzipped files
Former-commit-id: 25c0c2e5df3a6626fae5401209fac93b105b3392
2014-11-15 08:21:44 -05:00
Jeremy Long
662815b1ee added an extract phase if the downloaded file is a .gz
Former-commit-id: 0385e9a7922bc18eccb3b3075cc866c462ae6f2b
2014-11-15 08:21:03 -05:00
Jeremy Long
243c36849c noop
Former-commit-id: e155fa37527c62925bdb7e52d539329e3f9ebabe
2014-11-15 08:20:15 -05:00
Jeremy Long
52d5baaf3f reformated and added checkstyle corrections
Former-commit-id: c68e06287fdd09768c9fade7e534ca421899c9c5
2014-11-12 16:04:23 -05:00
Jeremy Long
89217f778e added package-info
Former-commit-id: 78bd4ce6243fadc58524ec48bb0d964205e044cd
2014-11-12 15:44:43 -05:00
Jeremy Long
9bc9bc9169 made enabled final
Former-commit-id: ded2d5de559091d8383ec26941f166018c33bb7a
2014-11-12 15:44:18 -05:00
Jeremy Long
6b73430473 added javadoc and changes suggested by checkstyle
Former-commit-id: 5f216b873b2d1845747fa4a77159399e818aef5a
2014-11-12 15:43:36 -05:00
Jeremy Long
5ca5bca3df updated javadoc
Former-commit-id: 7b00991a0cf90ca34c8c54b8297014b01e676b04
2014-11-11 15:13:01 -05:00
Jeremy Long
89ab382a18 added additional tests for compareto(version)
Former-commit-id: 0a02681251a30e6b675461b7487198a1cc7eb850
2014-11-11 14:43:47 -05:00
Jeremy Long
bad425c0d7 added test for isAffected
Former-commit-id: 36a6d28ff03e41307574ee40381b0833c5c4ab01
2014-11-11 14:43:15 -05:00
Jeremy Long
cdbbb1b94c made isAffected protected instead of private so that tests could be added
Former-commit-id: e7fd58900b4c8ebbaf06d476870defa4fc921628
2014-11-11 14:42:34 -05:00
Jeremy Long
0a9d8a9b22 reformated and changed logging level from info to fine
Former-commit-id: 035ca7c4d83322734f16f0b51f695bf7e4caa7b0
2014-11-11 14:41:40 -05:00
Jeremy Long
e662041d06 reformated and changed isEnabled to a getter by adding checkEnabled that is called during initialization
Former-commit-id: 3bfb0dd2da37d718708d047e425fb8b125dddf34
2014-11-11 14:41:08 -05:00
Jeremy Long
155464bc87 reformated and changed isEnabled to a getter by adding checkEnabled that is called during initialization
Former-commit-id: d5c1224709469fccacfad7e22cf5a44eecdcab36
2014-11-11 14:40:48 -05:00
Jeremy Long
06cd811ae4 fixed xlint unchecked call warnings
Former-commit-id: b74ee0e63568b7b222f0459ad66a7e281b2f2e2f
2014-11-11 13:41:20 -05:00
Steve Springett
1b2cd354db Merge remote-tracking branch 'origin/master'
Former-commit-id: 9856f3f26b7c6e53d8497b5ef87d7a070abe4e06
2014-11-10 11:32:52 -06:00
Jeremy Long
1b31268f59 Merge branch 'colezlaw-master'
Former-commit-id: fdb3a7414550752692ed807d71782f54cabbdac6
2014-11-10 05:41:10 -05:00
Will Stranathan
b57ef7291f No more separate proxy configuration for Central search. Renamed everything to do with Solr to Central.
Former-commit-id: 4bcee86abf4415bfafc386d10018d9fcb2f6cec4
2014-11-09 21:07:26 -05:00
Jeremy Long
c3bf6aa3f8 updated documentation to reflect change with NexusAnalyzer
Former-commit-id: 6a16bb3fc9f45a77d030d4d0f9999b764fd6fa12
2014-11-09 20:07:22 -05:00
Jeremy Long
d2fa14bbe2 updated documentation to reflect change with NexusAnalyzer
Former-commit-id: bbe1286d3ff9e4886b2eb52fe0ff04962922dd06
2014-11-09 20:06:32 -05:00
Jeremy Long
9b6e55e90c Merge branch 'colezlaw-master'
Former-commit-id: 80adf73356e1a2d24a53cf0f20af1356638084d8
2014-11-09 19:54:03 -05:00
Jeremy Long
afb07b651f Merge branch 'master' of github.com:colezlaw/DependencyCheck into colezlaw-master
Former-commit-id: 1158591ef47032ceed72654ebde6ef5f20782f75
2014-11-09 19:53:26 -05:00
Jeremy Long
e6806fdf2b patch to resolve issue #137 - the output path can be a file name if the format is not ALL
Former-commit-id: 05c638b21f09842781e105259ff58819e4bd3e8c
2014-11-09 19:52:42 -05:00
Will Stranathan
e5ff2cff4e Squashed commits for the new Solr/Central Search capability
Former-commit-id: 28ca3ca0ff5de4e097082f6f73003c0a67455efd
2014-11-08 10:54:02 -05:00
Will Stranathan
17d7d47b9a Renamed Solr to Central search
Former-commit-id: b8bdca6be89497f9baf29c8762803b4652e4974b
2014-11-08 10:53:17 -05:00
Will Stranathan
64e32061ab Re-making due to merge conflict from origin
Former-commit-id: 34a9f3410131b51048ee7f89e8aed2189dafe7fb
2014-11-08 08:50:53 -05:00
Will Stranathan
931110ba6c Initial checkin of work on a Solr analyzer which will replace Nexus on Internet checks
Former-commit-id: 09337f6416fa3140c00413426e17e39c4a1fadc6
2014-11-08 08:47:42 -05:00
Jeremy Long
d90e7820cd improved file path validation and error handling
Former-commit-id: 20d4011b031ac956e9803e807de75e7e505172ae
2014-11-08 06:08:21 -05:00
Jeremy Long
824898dba5 patch for issue #155
Former-commit-id: 57b144d94354c48c9bebabae2cc3d0c120fd2138
2014-11-07 06:42:54 -05:00
Jeremy Long
761dd61ed4 added additional test jar for issue #155
Former-commit-id: 0f8bf0a058eb263f13bd5d0d4262255153201eb5
2014-11-07 06:42:00 -05:00
Jeremy Long
89c63e6d87 checkstyle corrections
Former-commit-id: 77b519236f1afe7ad8eab0407d055e7f9ab4745f
2014-11-05 21:52:52 -05:00
Jeremy Long
a2361f9327 checkstyle corrections
Former-commit-id: b0ad94a8b1ce31891f788fd44e1a9df59775a691
2014-11-05 21:42:32 -05:00
Jeremy Long
ea15205be8 pmd corrections
Former-commit-id: 7cdc5b009285b9b428d4e731cb4b493a24453a9f
2014-11-05 21:31:00 -05:00
Jeremy Long
0a45048535 checkstyle corrections
Former-commit-id: 8807237a0a38f390298a19507ed55d9df156663f
2014-11-05 21:24:34 -05:00
Jeremy Long
1c51655ce3 checkstyle corrections
Former-commit-id: b7acf0b29d86a17f03f996d8d4b7a47e3a9f5eb9
2014-11-05 21:08:34 -05:00
Jeremy Long
7749f0da7c updated to exclude apache ant code from checkstyle
Former-commit-id: 06ab2cb9c3b15c182dac3cd1d0580f6002d607f8
2014-11-05 21:07:08 -05:00
Jeremy Long
5695238f95 updated to exclude apache ant code from PMD and findbugs
Former-commit-id: ce8b95e5f7ba4a98036cce46edc066ff2f2afb79
2014-11-05 21:06:23 -05:00
Jeremy Long
e1feeb7e21 removed failing test case
Former-commit-id: ab7f81d133a7c8cbfed52300e3f31a92121206b7
2014-11-05 19:18:41 -05:00
Jeremy Long
84fecaf040 updated documentation to show that Ant style paths and excludes can now be used
Former-commit-id: be99efc13478905e282d292986821a1851d0f389
2014-11-05 06:26:58 -05:00
Jeremy Long
da77727673 changes to support Ant style paths to resolve issue #153
Former-commit-id: b1666d6652891c4b012457fd5de7f8230938fb45
2014-11-05 06:20:15 -05:00
Jeremy Long
f8c913a3e8 small modification to warnings
Former-commit-id: 1ee729d27fdd7f394df0ea00efcb9f5e2bf663cd
2014-11-05 06:19:43 -05:00
Jeremy Long
2024881ee1 fixed logging level when files cannot be deleted
Former-commit-id: d62acbe447b5cc78b992d910c9431c006e658b2e
2014-11-05 06:19:14 -05:00
Jeremy Long
35ed3a51e5 initial version of InvalidScanPathException
Former-commit-id: a1f909f4e3988ae2f5f00fe72033bfdd7ef89676
2014-11-05 06:17:27 -05:00
Jeremy Long
24b1c4d0a4 removed wild card pattern matching during scan
Former-commit-id: 183963237c378641467f7277f68ba74156442485
2014-11-04 05:50:58 -05:00
Jeremy Long
7ec2458fb5 moved CliParser
Former-commit-id: 69ea743196109849d078df8f7071af0a3027fe99
2014-11-04 05:33:18 -05:00
Jeremy Long
175feaea23 added a modified copy of DirectoryScanner from Apache Ant to resolve issue #153
Former-commit-id: e37eb42cc574e4255533a0e7fbe78f5ed0c83146
2014-11-04 05:27:46 -05:00
Jeremy Long
dda6cf728b added suppression for opendj-ldap-sdk to fix issue #165
Former-commit-id: e8dc84bea2350eb5539475cf77650fafb118f3a4
2014-11-01 07:08:00 -04:00
Jeremy Long
a7fd410b01 stopped trimming org and com off of the groupid so it is consistent with other analyzers
Former-commit-id: c22d3b7af9af00c28ee0df80ba706f70399b80ef
2014-11-01 06:51:05 -04:00
Jeremy Long
d281c36733 updated suppression rule for jersey-client
Former-commit-id: 81920e19da3c29de46207c2132f225cb8c77a840
2014-11-01 06:35:28 -04:00
Jeremy Long
dc91e44c0a added jersey-client 1.11.1 as an optional test dependency
Former-commit-id: d837418656cbfd857adb90662a4d2604fd77a78e
2014-11-01 06:35:05 -04:00
Jeremy Long
7967a858f4 Merge branch 'ctrl-alt-dev-master'
Former-commit-id: 18b9ce0c578195a3275c4cb54ed14f6aff953d2b
2014-10-25 08:10:14 -04:00
Jeremy Long
2081407e38 added pom evidence to dependency - yes, this moves some analysis to the plugin; but in this case that is okay and will allow future enhancements
Former-commit-id: f69fd0701a8db1ab729199c4090dee1cd023d114
2014-10-25 08:09:45 -04:00
Jeremy Long
976eabd527 noop
Former-commit-id: 8c867c80dfb8180ba308837a09b33ac17fd8273a
2014-10-25 08:08:26 -04:00
Jeremy Long
b6d6a5de2b minor changes to clean up test cases
Former-commit-id: 62d409fa6f50d3bbec881277a4604acca7278faa
2014-10-25 08:07:56 -04:00
Jeremy Long
2d58cfe0ce fixed link to the NVD
Former-commit-id: 73ca530e569d4376999c155a8bc1256d935209bf
2014-10-25 08:07:20 -04:00
Jeremy Long
9df8bdff5f cleaned up code to use isEmpty instead of "".equals(string)
Former-commit-id: 8469f91a948ab2ab5b0ce61865a0b11cd6d11717
2014-10-25 08:06:56 -04:00
Jeremy Long
c86b821951 suppressed warning on unchecked cast
Former-commit-id: 633151a31b613071c7bd3e939c6a5c16864b8b88
2014-10-25 08:06:15 -04:00
Jeremy Long
4def086bf9 removed comments
Former-commit-id: 2c48f5b93a97a0642fbc37edd603b0d0baca4368
2014-10-25 08:05:26 -04:00
Jeremy Long
885c890d7d changed the analyzer to use the actual file name rather then the display name
Former-commit-id: 9cc348aaef8fac5e6c64220d94428f168ea8855b
2014-10-25 08:05:01 -04:00
Jeremy Long
06060a6694 improved error handling of invalid search strings
Former-commit-id: 97250e44b27e009b2480d25f8c2ebb7566038086
2014-10-25 08:04:33 -04:00
Jeremy Long
70667814f6 changed display name of files contained in archives so that it doesn't look like an invalid path
Former-commit-id: db3a7edadef81dd7e66c68cf0f4cdf43e12936b6
2014-10-25 08:03:47 -04:00
Jeremy Long
766b7a940c changed scan methods to return a list of dependencies instead of void
Former-commit-id: f0fd1e06708de3159acff0147968b5508a54fc05
2014-10-25 08:02:36 -04:00
Jeremy Long
0c37586357 added Xlint:unchecked
Former-commit-id: e26970bf2cd4606b777bddfc806ba74227da9cba
2014-10-25 08:00:11 -04:00
Jeremy Long
b4aa55ce1f Merge branch 'master' of github.com:ctrl-alt-dev/DependencyCheck into ctrl-alt-dev-master
Former-commit-id: 4d1ab5ecacf0ca7354f57d3a49accd5a173e0a26
2014-10-24 05:36:40 -04:00
Jeremy Long
109443ce77 changed the name property of dependencies identified within an archive
Former-commit-id: 5d778afea68c881efea628d9ecc28596d3cbc9d6
2014-10-23 06:09:39 -04:00
Will Stranathan
5f38741831 Initial checkin of work on a Solr analyzer which will replace Nexus on Internet checks
Former-commit-id: 7b51d0cb1d23122bc73261424b66df24f72370cd
2014-10-22 22:35:03 -04:00
Jeremy Long
c6f391501d added test case for patch to issue #156
Former-commit-id: 8fa1de0566760a41d65614921f4bb764178151f8
2014-10-22 21:43:23 -04:00
Jeremy Long
d1f3105fbd added appropriate sorting to resolve issue #156
Former-commit-id: b5d0dd3e9d337417ea3483b491035009269eaa5c
2014-10-22 21:42:51 -04:00
Jeremy Long
8f88ca9d3d corrected compareTo to use file path, not just file name
Former-commit-id: 98e19c402cd5824aed4b3b4923b7ef72359752cf
2014-10-22 21:12:40 -04:00
Erik Hooijmeijer
f9e4ca0cc2 corrected javadoc
Former-commit-id: 3e0533a8a36afcacb647610f352bfd854e505272
2014-10-22 19:10:54 +02:00
Erik Hooijmeijer
5caf023677 added excludeInternalGroupIds configuration parameter that allows the exclusion of groupIds of internal projects. This is to speed up analysis as internal projects have no public vulnerabilites nor a sonatype listing but do frequently have names that collide with other libraries. The parameter can have multiple values, e.g. <excludeInternalGroupIds><groupId>nl.someinteral.project</groupId><groupId>org.another.one</groupId></excludeInternalGroupIds>
Former-commit-id: ffa0716366c6c7b65d1181f2bd945472b75b5483
2014-10-22 19:08:33 +02:00
Erik Hooijmeijer
35c2f4873c values from the project pom.xml are now taken into account as well
Former-commit-id: ca6c5b40f09959f162b337f2cb4268a57ce46d3d
2014-10-21 20:09:54 +02:00
Jeremy Long
1ed7bab375 additional updates for issue #162, if no pom is present in the jar, but it exists in the repo the pom from the repo will be used
Former-commit-id: 0d1603f45420b57b00149764acca1fe5bd3f3c83
2014-10-17 20:55:58 -04:00
Jeremy Long
f0d1bfb777 added an additional suppression for issue #162
Former-commit-id: 9c3403814b15cbcdebdc9e0d43253016548efb23
2014-10-16 06:57:24 -04:00
Jeremy Long
42519ac843 version 1.2.6-SNAPSHOT
Former-commit-id: 0b301bfa4a942e43976a34195a32982000f34d12
2014-10-14 06:28:14 -04:00
Jeremy Long
8869e13385 Merge pull request #161 from hansjoachim/exceptionTests
Uses ExpectedException to test for exceptions

Former-commit-id: 38f9b007311032db7edec0e1c345130409518855
2014-10-13 05:47:54 -04:00
Hans Joachim Desserud
8f9cbfe806 Unrelated: remove unused before/after
Former-commit-id: 68524208b8c0a197e9682aceec25cff0bc30ff56
2014-10-12 18:29:27 +02:00
Hans Joachim Desserud
6481938626 Test for exceptions with ExpectedException
Former-commit-id: 47c6c559196b4c10a5deb3698805ff7276f0aa83
2014-10-12 18:27:03 +02:00
Jeremy Long
9c7cc2acbf corrected the documentation
Former-commit-id: 428b6b3e07ed250ac11fb6c917c90888c0d20246
2014-10-10 20:03:36 -04:00
Jeremy Long
89a57d4ed3 removed velocity-tools to close issue #160
Former-commit-id: 5ca46405a5aa7521bd0a0de54500d848156491a6
2014-10-10 06:36:47 -04:00
Jeremy Long
732378592b corrected link to the unfortunate realities pdf
Former-commit-id: 285bcfd78f00fa514d3f96b5dcbac2fd18384177
2014-10-08 06:47:27 -04:00
Jeremy Long
19dc46660b corrected link to the unfortunate realities pdf
Former-commit-id: 75332bd18e6ac3ecac5dddda2f3945ae4003bd06
2014-10-08 06:21:55 -04:00
Jeremy Long
4aad3471af fixed javadoc
Former-commit-id: 2402251f2157864ee3c51dd571cb9d21e17856e6
2014-10-08 06:21:20 -04:00
Steve Springett
533b455356 Merge remote-tracking branch 'origin/master'
Former-commit-id: da6ffef3c01da250ecbceadac8a6e955bb47f83f
2014-09-16 18:52:44 -05:00
Jeremy Long
92bd305b00 version 1.2.5
Former-commit-id: b3fe4ea80c4286684eda15a3b9f46cebc4f09ee8
2014-09-16 19:47:17 -04:00
Jeremy Long
f71eb09f74 updated sample report
Former-commit-id: 1de33769f71be8c86116b4a17d8282c69e0abed6
2014-09-16 19:47:07 -04:00
Jeremy Long
83d4a7bc18 moved test case dependency,jersey client, to the allTests profile
Former-commit-id: 58da4d9c21803362133f74c168aea256c51a5824
2014-09-16 05:24:43 -04:00
Steve Springett
58807d9021 Merge remote-tracking branch 'origin/master'
Former-commit-id: d3c49db24c64c2869257d1b3f9a8493e7925e7a7
2014-09-15 01:11:34 -05:00
Jeremy Long
29595324c4 added suppression rules for jersey-client
Former-commit-id: cb8f4081c6d0fc2128a3a3dfda294a541c16adec
2014-09-13 07:10:17 -04:00
Jeremy Long
f9064e526f added test jar to the extended profile test dependencies
Former-commit-id: b24966e3936afd9337dbea5476a696ddf46efc65
2014-09-13 07:09:54 -04:00
Jeremy Long
93ec2e8639 fixed javadoc
Former-commit-id: d06907a74a6fd4cf9ac5e5774af63eda5aba02b3
2014-09-13 05:50:49 -04:00
Jeremy Long
0e2a31709a added test cases to ensure setting the base flag will prevent the identifier from being added to the suppressedIdentifiers collection
Former-commit-id: d369797a3b14fc2c42621d273d6f314e968848b9
2014-09-13 05:45:05 -04:00
Jeremy Long
c785b39eda added assertion to validate that the base flag is being processed
Former-commit-id: 0364e57af8f548d010f17f948492e9472433c675
2014-09-13 05:44:09 -04:00
Jeremy Long
8fab2f58da added the base property and skipped adding the vulnerability or identifier to the suppressed collection if this is a base suppression rule
Former-commit-id: a668d7d8b9345b6ad44bfff1ced4ab783a1f90d8
2014-09-13 05:43:16 -04:00
Jeremy Long
e44ee3bfe1 added parsing of the base flag
Former-commit-id: 02f533177846bcd4a98b31f851e91f438e1ddeaa
2014-09-13 05:42:01 -04:00
Jeremy Long
62065c9d28 corrected the removal of an identifier so that iterator.remove was correctly used
Former-commit-id: 252507772242cc7ff42ef9f310cfca3bec7cb075
2014-09-13 05:41:26 -04:00
Jeremy Long
c76275275f added the base=true flag to all base suppressions
Former-commit-id: ac77f3fc4ff80c182b7736554a1960e186e67d69
2014-09-13 05:40:37 -04:00
Jeremy Long
257f78879d added base attribute to suppression rules
Former-commit-id: bcadbd75b99471a56d604c2f158570305e9b4010
2014-09-13 05:40:06 -04:00
Jeremy Long
894263809c added base flag to one suppression entry
Former-commit-id: 7d6bbf36e5e35c2ee2fe8c901281996a34706036
2014-09-13 05:39:38 -04:00
Steve Springett
bc9458101c Merge remote-tracking branch 'origin/master'
Former-commit-id: 16fb5a44d47fb699282b6babd112848276cb6bab
2014-09-12 10:50:08 -05:00
Jeremy Long
c503935d6a updated to correctly close the ObjectOutputStream based on guidance from the CERT Java Secure Coding Standard
Former-commit-id: 1c7b929055f273d49b1203c117d7bb12162cfdb2
2014-09-12 06:36:00 -04:00
Jeremy Long
d4756c9eb8 updated base suppression list to include sandbox:sandbox - a php app
Former-commit-id: 087a4c5af2afd03a1d4703d2e1e5a1607a2e7ac9
2014-09-12 06:34:23 -04:00
Jeremy Long
0004767775 added fix for issue #147 to address springsource, non-core spring, jars being idenified as cpe://a:springsource:springframwork
Former-commit-id: 0a3182123be78a3f450cdef0bcc395907d27730a
2014-09-10 17:55:04 -04:00
Jeremy Long
74908642c7 added test dependency
Former-commit-id: fa4846dfa384639114f32ed3b7a0d91347b8dabf
2014-09-10 17:39:31 -04:00
Jeremy Long
aadfb71c98 fixed test case by removing a temporary test entry in DetermineCPE_full
Former-commit-id: 0f91c7b8e1d536c9d15176dc2d9a439da4e8ccdc
2014-09-10 17:37:54 -04:00
Jeremy Long
1244af649d updated to improve CPE matching so that if a broad match occured (cpe with no version number) we use the highest confidence version when generating the CPE identifier
Former-commit-id: 6e8c87a71522b1ca7cfa9d72ca419a792d1b17e7
2014-09-09 15:10:08 -04:00
Jeremy Long
7bd48cc811 updated version analysis to reduce false positives and increase accurate detection
Former-commit-id: 6097160434b7e98182738706790d82cdbd867175
2014-09-09 15:07:28 -04:00
Jeremy Long
8f3ce38418 re-ordered operations so that a new lucene index is no longer created on each call to calDetermineCPE_full
Former-commit-id: e2af1d893b47afe1ed36d1ab1e6840d47757b509
2014-09-07 08:28:44 -04:00
Jeremy Long
1b2d9b4245 fixed minor display bug
Former-commit-id: 65e1adcdc7677490907ee6eca68bf1174d355a3c
2014-09-07 07:20:45 -04:00
Jeremy Long
c6b2b34fde removed duplicative test of downloading XML
Former-commit-id: 97d1371609af2cc9583b0ac071a8606c93a34fbe
2014-09-07 06:59:50 -04:00
Jeremy Long
e58fc13fdb additional looping corrections in determineCPE() to break early if an identifier is found
Former-commit-id: 4ec4ffe598d9870a793da8980bb863633c1967d7
2014-09-06 19:09:38 -04:00
Jeremy Long
922d53d2e4 Increased the confidence on the pom artifact and groupid
Former-commit-id: b052b50353197e0f7cb419e6f618f2320da11183
2014-09-06 19:08:22 -04:00
Jeremy Long
fec53b3951 corrected looping in determineCPE()
Former-commit-id: 329f20687223f38273b2e23601b05fcea2b9122f
2014-09-06 06:37:12 -04:00
Jeremy Long
e72e2c6a02 corrected documention error with the reporting sets
Former-commit-id: ab503e5a710a69624a3216edea880e614b003ba8
2014-09-01 08:19:46 -04:00
Jeremy Long
08d001ee05 checkstyle corrections
Former-commit-id: ecc262c75890ef4c8760cb41e7948cb6decdf5d5
2014-09-01 08:13:53 -04:00
Jeremy Long
99d8a07f4a updated documentation as part of resolution for issue #144
Former-commit-id: f47171e52e22e75c582bed47c9d0e9df3945e148
2014-09-01 08:13:34 -04:00
Jeremy Long
eef565134b update to correct issue #79 - the internal report format is no longer supported
Former-commit-id: 4dc9a83008a75d97f3838aa1a41f1d93eb39f2de
2014-09-01 07:39:54 -04:00
Jeremy Long
9d78293437 fix for issue #128 - the application will no longer throw an exception on large files when generating the hash digest
Former-commit-id: aae811e5d10ca0ee5ac7316fa992b5c45e43d2be
2014-09-01 07:30:04 -04:00
Jeremy Long
fc0a556e5f checkstyle and findbugs corrections
Former-commit-id: 2bf90876b7c88bccb93135a0be43f01e49c3cd30
2014-08-30 15:51:24 -04:00
Jeremy Long
b6b070584f checkstyle corrections, added javadoc, etc.
Former-commit-id: 2b806cb8527a627d400644465bcf9f04d687d729
2014-08-30 15:19:52 -04:00
Jeremy Long
e13225eee6 initial version of aggreation completed for issue #19 - some cleanup still needs to happen before final release
Former-commit-id: 98c9af3004e2c725d0dca5d6847b65a4646c6a73
2014-08-30 07:50:27 -04:00
Jeremy Long
da20fb2922 added velocity-tools to base suppression as it should not be reported as struts
Former-commit-id: 4649d95a091def05ae249da42aa7d6f845b14d59
2014-08-30 07:48:02 -04:00
Jeremy Long
459c2beb12 noop
Former-commit-id: a51d953d0c60c39d845d69d66c87db8b904382c4
2014-08-29 05:41:31 -04:00
Jeremy Long
f1cc44dead removed the externalReport option
Former-commit-id: 4cc3ec2638140f8320eb8946d2154dae330786b0
2014-08-29 05:38:40 -04:00
Jeremy Long
d24cfdc382 resolved merge conflict
Former-commit-id: 4806c0c99bd35d64135ee22a12018e6a92c54059
2014-08-16 07:41:55 -04:00
Jeremy Long
ae4cc543f6 corrected outputFile name to correctly use the target directory from project.getBuild().getDirectory()
Former-commit-id: 7ef2ca45e502e945e7356f9c63845eb4e7b532fc
2014-08-16 07:30:34 -04:00
Jeremy Long
abdb3d17f9 added initial plumbing to support report aggregation per issue #19 - report aggregation is still not complete
Former-commit-id: df248d0c1a7f3628653717029f034a46afde742b
2014-08-16 07:29:35 -04:00
Jeremy Long
4095c5da38 made serializable
Former-commit-id: 27d8084ea981766791df05c5e9ef61dbe40ba32c
2014-08-16 07:27:28 -04:00
Jeremy Long
78fab728e4 added an additional generate method
Former-commit-id: 44b78b525da45918f3b4bc77b368f88e49361c95
2014-08-15 06:22:54 -04:00
Jeremy Long
52097a6867 initial version of the ReportAggregationMojo
Former-commit-id: e15575413d625c6b5c5f3d73f5a739e1890eec27
2014-08-15 06:02:04 -04:00
Jeremy Long
cb990b55b5 added the apache 2.0 license to the header
Former-commit-id: f7d5558f565abe9c3e1a04f79666137e4f67e017
2014-08-15 06:00:30 -04:00
Jeremy Long
5070fe303a added the configuration value mavenSettingsProxyId to inform users that if you have multiple proxies defined in settings.xml you can choose which one should be used
Former-commit-id: 20fa4a92d446fd30a882e07c37897907fb1638b1
2014-08-15 05:59:39 -04:00
Jeremy Long
b4405ebf3e minor changes to the TOC table - removed # of related dependencies and renamed CVE Impact to Highest Severity to clear up ambiguity
Former-commit-id: b8b14ab120d889057864eb6f93cadad9773b9171
2014-08-15 05:58:10 -04:00
Jeremy Long
d9e6bf5068 Merge pull request #145 from erik-wramner/fix-maven-proxy-bug
Modified Maven plugin to use proxy host as is, not as an URL. This works...

Former-commit-id: 53e28e6799ef13ca3d88ed00aaa1e0c3f24aa04b
2014-08-15 05:37:14 -04:00
erik-wramner
6822188f52 Modified Maven plugin to use proxy host as is, not as an URL. This works correctly for our proxy server with Maven 3.
Former-commit-id: 02e97e359b1c5d6d9f1dc9149c9fbed510d31559
2014-08-10 12:15:00 +02:00
Jeremy Long
15858d03ff moved reporting functions from the core maven plugin to a utility class
Former-commit-id: d63d2a7a5031038b9f86bbe94fc4a198374bd9f3
2014-08-08 14:44:26 -04:00
Jeremy Long
814a733258 moved reporting functions from the core maven plugin to a utility class
Former-commit-id: 0d8507b8534320189ea5f36d0fc1cac7d0843c0f
2014-08-08 14:43:00 -04:00
Jeremy Long
3ce85d8ca9 rework of report generation and added fix for proxy (patch for proxy was from Erik Wramner) to close issue #136
Former-commit-id: afc81123b31189618ade397b830bf421db2918f8
2014-08-08 14:42:23 -04:00
Jeremy Long
d3bff2f39d version 1.2.5-SNAPSHOT
Former-commit-id: 85ed1238022348f1e9496ffe3c95d4ff8e3d09c3
2014-08-05 18:55:30 -04:00
Jeremy Long
f2272730ac version 1.2.4
Former-commit-id: 4de7e508eb1885bb72e866960fa5402f72bf8e49
2014-08-05 18:45:36 -04:00
Jeremy Long
fe19c97d86 corrected link syntax
Former-commit-id: 01b9ea03864248a9c5427af6d7238c435c0a4fa7
2014-08-05 18:45:25 -04:00
Steve Springett
d49556bf3d Merge remote-tracking branch 'origin/master'
Former-commit-id: 1ed0b6e8621fb68a823b8127775fc5f86932cc00
2014-08-05 14:25:20 -05:00
Jeremy Long
56b447493e added additional error messages about the proxy if the download fails per issue #136
Former-commit-id: 7a5dcc58ab959a70b7e086a984f5d9289d749b99
2014-08-05 10:58:43 -04:00
Jeremy Long
e45b68eda7 fixed issue #140 - false positive is now suppressed
Former-commit-id: 4b584884e1eb5efa214b1af87d555e6866db917a
2014-08-05 10:44:33 -04:00
Jeremy Long
8df1ef5986 removed unused values for variables and fixed javadoc
Former-commit-id: 1fb0be5d88301c5a1043d88b93c052edcebe3c5c
2014-08-05 09:26:04 -04:00
Jeremy Long
dac34cda82 checkstyle corrections
Former-commit-id: a888649ce7d75b721e053d305a406ecddbdcdbc4
2014-08-05 09:25:08 -04:00
Jeremy Long
9925e30c8b removed useless parens
Former-commit-id: 00ddea8b437494cc32e47e3066a448015d95467b
2014-08-05 09:24:48 -04:00
Jeremy Long
dc5566b5ae updated the exclusion list for generated code
Former-commit-id: eeaccab472347cc5fcfe21552c7fc1e9ab8ea1de
2014-08-05 09:24:16 -04:00
Jeremy Long
8132ee651a added documentation for issue #139
Former-commit-id: 95fdcf4d95cbe50ba884be561fbec0e9977578a0
2014-08-05 09:23:47 -04:00
Jeremy Long
f49a134a3d updated sample report
Former-commit-id: 7f312fec5ffbd8daa609299efdc53b83e83e6bd6
2014-08-05 09:22:54 -04:00
Jeremy Long
bd955cda06 improved TOC per issue #138
Former-commit-id: 7cc7ccb9d0dd8257588438220bf61d78caa2bcec
2014-08-05 09:22:28 -04:00
Jeremy Long
c6dbc01912 ensured FileInputStream is correctly closed
Former-commit-id: 6e0362476f456e5af07e686fdccf04e600a97de8
2014-08-05 09:19:35 -04:00
Jeremy Long
fabe1aa940 checkstyle corrections
Former-commit-id: d23c5d17629f8484c1c07d328c9c1b74a678e062
2014-08-05 09:19:00 -04:00
Jeremy Long
ba5dbb94b8 removed fully qualified class name from jaxb instantiation
Former-commit-id: 15d5f9e2013daba62f7e32618958743e87e8ea79
2014-08-05 09:18:35 -04:00
Jeremy Long
6ccc053d7e added more documentation
Former-commit-id: 87a761ffe89d36fb2011d5a38d607c35178d70ec
2014-08-05 09:16:38 -04:00
Jeremy Long
cf21dfaa3a changed warning log message
Former-commit-id: 9a7fd59cd15e627ed103a6e797bc47518805276b
2014-08-04 08:05:31 -04:00
Jeremy Long
54ceb630de fixed project descriptions and corrected site deployment issues
Former-commit-id: 39373b0805b84b99c3e84dbad1c8a2301f277221
2014-08-04 06:24:00 -04:00
Jeremy Long
0a0c302cb2 re-orered the module listing
Former-commit-id: 1ec7ccbc98463c5b2af09c973a1bc83319630ec8
2014-08-04 06:22:11 -04:00
Jeremy Long
f6eef54566 added fix for issue #136
Former-commit-id: c259a419769b41e138d3cbb3811f1c24652601d5
2014-08-01 15:09:41 -04:00
Jeremy Long
a69804f84d updated documentation
Former-commit-id: e8b6c86e47cff66f72ffb53ccba4bef18479b43e
2014-08-01 14:31:19 -04:00
Jeremy Long
0b06b194b0 added XmlRootElement attribute
Former-commit-id: a3263e63c8c7b12c90ad388c8eda1ab09e43786c
2014-08-01 14:22:40 -04:00
Jeremy Long
73f6ce304c corrected jaxb newInstance
Former-commit-id: 32a1b759ad1e127784ae9bff902cca01c6faaad7
2014-08-01 14:21:55 -04:00
Jeremy Long
195818a432 minor changes to logger and added a catch for throwable
Former-commit-id: 0ca337442a3f60db9655c3527711ba16af3096a6
2014-08-01 06:02:22 -04:00
Jeremy Long
47c817de1c performance improvement for checksum calculations - using MappedByteBuffer
Former-commit-id: 5024926737f1abbae47da5e95615dd2f2bddbcc6
2014-07-20 07:54:54 -04:00
Jeremy Long
8b3894f213 removed version from maven usage
Former-commit-id: 234d0bc0e147cdb9ebf7d1c59e5ef53421589d42
2014-07-20 06:49:31 -04:00
Jeremy Long
a411252f07 Merge branch 'bkimminich-patch-1'
Former-commit-id: abe645b3693a6a387de9b36ffedf32382bd24f58
2014-07-20 06:39:13 -04:00
Jeremy Long
d7626aeb3f Merge branch 'patch-1' of github.com:bkimminich/DependencyCheck into bkimminich-patch-1
Former-commit-id: aa6a0fc0a9352a1a2d3d4a0dfceb428242b455fd
2014-07-20 06:38:58 -04:00
Jeremy Long
3565098650 converted abstract class to a final class with a private constructor
Former-commit-id: 582a421e69eac2bfc008ca8ee2fe88c7734c9a31
2014-07-20 06:36:33 -04:00
Jeremy Long
803fcf146b minor fix to test case
Former-commit-id: bf20319aed4f100d124cdeb7abeafe6598778891
2014-07-19 13:58:30 -04:00
Jeremy Long
d9d646c5fb fixed connection string property
Former-commit-id: 951cf212c80a52909cc2dd66e843b63b35991045
2014-07-19 13:57:36 -04:00
Jeremy Long
034a274b07 fixed copy paste error
Former-commit-id: 83c51cb5b43c635088025a2076121911af32a7ec
2014-07-19 13:57:15 -04:00
Jeremy Long
718d7af8bc updated to use the new getConnectionString implementation
Former-commit-id: c5bd68b3d2fb4c2470d6c50dc5f8f9f6036b9fce
2014-07-19 07:38:51 -04:00
Jeremy Long
860d3d9c8b made the ensureDBExists method perform a correct check rather then the previous hack
Former-commit-id: 5fae859fa7531761e78022eb2e8c4c41e6d5d150
2014-07-19 07:38:08 -04:00
Jeremy Long
f28b566992 added data.file_name and data.version
Former-commit-id: e692a13a216ec6808e3fd92397fd3c50854cfa56
2014-07-19 07:37:11 -04:00
Jeremy Long
1c261c7463 added more tests
Former-commit-id: 75a4e44d06838221b060c0569716e85e1c6fc996
2014-07-19 07:36:35 -04:00
Jeremy Long
226b2482b1 added data.file_name and data.version
Former-commit-id: 6f33c306170f96f344bb85aa7820cc94cd4d5eeb
2014-07-19 07:36:16 -04:00
Jeremy Long
ff346dc429 changed getConnectionString to allow a more dynamically constructed string based on more setting keys
Former-commit-id: 1fb18720ab1a1c6d947bc94366b8ee2ca9cb711e
2014-07-19 07:35:48 -04:00
Jeremy Long
2dcef25175 performance improvements for large files
Former-commit-id: 6a49a7066cb01c613b5c6f07c8497601a88e7f8d
2014-07-19 07:34:50 -04:00
Jeremy Long
46702bbb5c moved checkSumTest.file, checksum.java, and checksumTest.java to dependency-check-utils
Former-commit-id: 0c05e466b5fe071ca55552660d471431572c0558
2014-07-17 06:03:21 -04:00
Jeremy Long
5600c9bc69 removed commented out property
Former-commit-id: 2a07ced007c986d3ab127d8ff216f49c332f41c3
2014-07-17 06:01:59 -04:00
Jeremy Long
d7e46b1693 corrected the connection string in the test properties
Former-commit-id: 1c37d4bd4de49cddc34b92a27875e0a07eee600f
2014-07-17 06:00:59 -04:00
Jeremy Long
fe8c60ade1 added additional setting keys and methods getDataDirectory and getConnectionString
Former-commit-id: 5e8a55c498fa7ae5331ba4fbeb86cd68b9fd8eda
2014-07-17 06:00:06 -04:00
Jeremy Long
288892441f corrected javadoc
Former-commit-id: c0c7d8da486a08dfc3e9232b57166d4c496bb798
2014-07-17 05:59:10 -04:00
Jeremy Long
e1179a8e22 moved getConnectionString to the Settings class
Former-commit-id: d35df6d103505888ac4d87f964d8d615996ce614
2014-07-13 06:56:40 -04:00
Jeremy Long
4b06d0fd87 upgraded version on commons-compress to 1.8.1
Former-commit-id: 2dc8698035e18764e101b36b11faf9e5c7188c5b
2014-07-13 06:54:59 -04:00
Jeremy Long
464d91f45a fixed resource leaks found by coverity
Former-commit-id: 0e2d3b866853e2b906b9683e27602fd244298e55
2014-07-08 06:17:36 -04:00
Björn Kimminich
5cc7aa25cc Update README.md
- set version in POM snippet from 1.0.2 to 1.2.3
- set URL to Ant Task docs to http://jeremylong.github.io/DependencyCheck/dependency-check-ant/installation.html

Former-commit-id: 8a2176aee9948b5bfd0c1f08c6c7bb9fdadc45a1
2014-07-04 14:17:57 +02:00
Jeremy Long
20ec224070 updated version to 1.2.4-SNAPSHOT
Former-commit-id: 65d0e1ba5ed781e9f70ec7fd0c115a027e3bbc00
2014-06-28 08:14:49 -04:00
Jeremy Long
9cbcc29ddb added utils to the parent site
Former-commit-id: 2a80ad86f5ab94fb21131786d9dce3439269f8cb
2014-06-28 08:14:35 -04:00
Jeremy Long
0badbfc4a0 version 1.2.3
Former-commit-id: c355adf9813220c4b3dac3450e80a83a245209a6
2014-06-28 06:06:33 -04:00
Jeremy Long
e042148c62 Merge branch 'colezlaw-master'
Former-commit-id: 5654a0e5cd8b8524ac317a55a2af5a52408bc8ca
2014-06-26 20:33:45 -04:00
Jeremy Long
d8ba04ae7f Merge branch 'master' of github.com:colezlaw/DependencyCheck into colezlaw-master
Former-commit-id: 27bac793e5284df49c0804361c07d4ef559cb251
2014-06-26 20:33:35 -04:00
Jeremy Long
314d5fdad2 Merge branch 'colezlaw-suppression-fix'
Former-commit-id: 1e7d9df774347ea043fef8ef3f5d6ca4aebaa15a
2014-06-26 20:32:07 -04:00
Will Stranathan
5c874cafd1 Fixed suppression analyzer to load from input stream fixing failure
Former-commit-id: 4e6f8d7fddcf7ed26ad60b7aa8bc3a6b22ae19cc
2014-06-26 15:14:55 -04:00
Will Stranathan
8cafc14d09 Updated to 1.1 of GrokAssembly.exe to deal with exceptions
Former-commit-id: 8c1d6ad04e378f2a19e2fcdc9ebc1eab12be9aef
2014-06-24 10:16:53 -04:00
Jeremy Long
25ac5033fc snapshot version 1.2.3
Former-commit-id: 58f96e7ef71987a53626287f95b332f04b60a6f6
2014-06-22 21:33:58 -04:00
Steve Springett
b9003a2f02 Merge remote-tracking branch 'origin/master'
Conflicts:
	dependency-check-ant/src/main/java/org/owasp/dependencycheck/taskdefs/DependencyCheckTask.java
	dependency-check-ant/src/site/markdown/configuration.md
	dependency-check-cli/src/main/java/org/owasp/dependencycheck/App.java
	dependency-check-cli/src/main/java/org/owasp/dependencycheck/cli/CliParser.java
	dependency-check-cli/src/site/markdown/arguments.md
	dependency-check-core/src/main/java/org/owasp/dependencycheck/agent/DependencyCheckScanAgent.java
	dependency-check-core/src/main/java/org/owasp/dependencycheck/analyzer/AssemblyAnalyzer.java
	dependency-check-core/src/main/java/org/owasp/dependencycheck/data/nexus/NexusSearch.java
	dependency-check-core/src/main/resources/dependencycheck-resources.properties
	dependency-check-maven/src/main/java/org/owasp/dependencycheck/maven/DependencyCheckMojo.java
	dependency-check-maven/src/site/markdown/configuration.md
	dependency-check-utils/src/main/java/org/owasp/dependencycheck/utils/Downloader.java
	dependency-check-utils/src/main/java/org/owasp/dependencycheck/utils/Settings.java
	dependency-check-utils/src/main/java/org/owasp/dependencycheck/utils/URLConnectionFactory.java
	dependency-check-utils/src/test/java/org/owasp/dependencycheck/utils/DownloaderIntegrationTest.java
	src/test/resources/data.zip

Former-commit-id: 65443535a6c7cc240eb3999f60ea82044e9fff6a
2014-06-10 10:57:45 -05:00
Jeremy Long
6b303410d1 added a new initialize method that accepts a properties file path to load to make the class more versatile
Former-commit-id: b6bee9569b075380b656faf9d2f1bf1c9aae849a
2014-05-21 06:42:43 -04:00
Jeremy Long
8cae2f24b1 Moved some of the utility classes from core to a new utils module
Former-commit-id: 6c2ba353e41c6a43fef326896ea77ede300591ec
2014-05-21 06:29:46 -04:00
Jeremy Long
0a04d753ea renamed CallableDownloadTask to DownloadTask
Former-commit-id: b4f805b231d3706c63a718ad23bc9b28a08cbb5f
2014-05-20 21:08:15 -04:00
Jeremy Long
35402c7bd3 fixed test cases
Former-commit-id: d76e5ba0431fdfc80847e7adbff9f0216ee7a191
2014-05-17 08:04:20 -04:00
Jeremy Long
847a97f61c if maven identifier already exists we now update it with a hyperlink instead of adding a new one - the Jar analyzer may add a maven identifier based on the pom.xml
Former-commit-id: 00b8ca069e60a8fed72e767748380d0d6fa6908d
2014-05-17 08:04:03 -04:00
Jeremy Long
fac27a6120 cleaned up pom evidence collection and added a maven identifier if the GAV is available from the pom.xml
Former-commit-id: 83974c844dc91237ab3f174971f218e1678f47b4
2014-05-17 08:03:04 -04:00
Jeremy Long
2e24eda00d fixed false positives related to Apache POI and MS Office CPE/CVE per issue #126
Former-commit-id: 8cc26dc25ef613dd308388452c08a9f5852843ad
2014-05-14 19:17:47 -04:00
Jeremy Long
7a653abf22 Update JarAnalyze to resolve issue #127
Updated JarAnalyzer to resolve issue #127 - duplicate package and package name evidence in the report.

Former-commit-id: ed40398c0b00e5fd5065705772ad15afaf5c7e0c
2014-05-14 18:01:12 -04:00
Jeremy Long
ae09229107 updated version to 1.2.2-SNAPSHOT
Former-commit-id: affbbe1f04a1e3de600e7498faa4f11c0d6d93c1
2014-05-10 08:41:37 -04:00
Jeremy Long
be35f48bdd updated to release version 1.2.1
Former-commit-id: 1564da513f47b9256cb2e79918fcd2d6dd0091bb
2014-05-10 08:32:34 -04:00
Jeremy Long
846173844e updated sample report
Former-commit-id: 35d6cb454ad1c6440d60c4717f33cf1eed733c2b
2014-05-10 07:25:42 -04:00
Jeremy Long
59c28d8e51 fixed typo in log statement
Former-commit-id: 9109a644f1360571d83ff39d4ff5b05898c791ac
2014-05-10 07:23:18 -04:00
Jeremy Long
abdfa3ccf6 pmd correction to logger
Former-commit-id: 500aa687bfa3dd9c126898e79121425e5e7e2e9d
2014-05-10 07:16:50 -04:00
Jeremy Long
99ad6634c4 checkstyle corrections
Former-commit-id: f0470062a3123825041e4db04fa128398a35994d
2014-05-10 07:13:07 -04:00
Jeremy Long
84556fb055 updated version of presentation
Former-commit-id: 9660d3fb6b20e43c9b677f97f8756e2c341ae66d
2014-05-10 07:12:56 -04:00
Jeremy Long
26e14e0151 added additional test file
Former-commit-id: e3a9aee97727ad8e60fc1a2a7c9a8abd7dc71e88
2014-05-10 07:01:24 -04:00
Jeremy Long
3df2daa5cb updated to remove archive files from the list of dependencies - additionally, if a zip file appears to be a jar it will now make a copy of the zip and scan it as a jar
Former-commit-id: e3b30cc5eaee14aa4ee7626adf2411972b26376a
2014-05-10 07:00:43 -04:00
Jeremy Long
c55efddc81 patch to remove additional false positives due to SCM entries in the pom
Former-commit-id: 7f889606bf9ece29121a14167b01ad6f5b93df76
2014-05-10 06:59:34 -04:00
Jeremy Long
a59c8908f0 updated to use displayFileName field instead of FileName when writing information about dependencies
Former-commit-id: 1ee4a19dda8de0678329c6d43a759696b16d363c
2014-05-10 06:58:51 -04:00
Jeremy Long
a421c5f952 added displayFileName field to the dependency class
Former-commit-id: 0b4af6346a1bfd1034a3b65e766c11a42dfcdf65
2014-05-10 06:57:44 -04:00
Jeremy Long
37b0612d45 removed additional false positives as part of patch for issue #93 and #119
Former-commit-id: 1d9275cc6f466beaa18a362515be98bafe9608b3
2014-05-10 06:56:53 -04:00
Jeremy Long
07bc94f9f6 fixed spelling error
Former-commit-id: 0bc1ec7d8a265a37751c23aa00733a9f002e6231
2014-05-07 19:33:59 -04:00
Jeremy Long
82511880ac Merge pull request #122 from colezlaw/master
Fixed logging order of GrokAssembly for bad assemblies. Using resources ...

Former-commit-id: 78c484c7803b80bcb21b15351989805a627d38fd
2014-05-07 19:31:59 -04:00
Jeremy Long
2f5cc6a8a4 added checks before warning that a file could not be deleted
Former-commit-id: b98d25e875e7523288df2cb0fed0b4518e4b52f4
2014-05-07 19:31:21 -04:00
Jeremy Long
f9a0f5e7a1 fixed display bug when only one CPE exists for a given CVE
Former-commit-id: c1a96d619ce9bcbf78d91322d95168333a76fea9
2014-05-07 19:30:45 -04:00
Jeremy Long
47b083eaca fixed display bug when only one CPE exists for a given CVE
Former-commit-id: 970b24e3f4d3203f17dc1269cec4156c98479d3a
2014-05-07 19:29:52 -04:00
Jeremy Long
8fcf5ee760 fixed bug causing vulnerabilities to be missed
Former-commit-id: e625225c6be3be1b471fab48c6eda0a616febfb9
2014-05-07 07:05:37 -04:00
Jeremy Long
f2006206d3 moved duplicated code to a method
Former-commit-id: ad0575ad74b7b5b3f420e466ca9a79f0ee2a2d69
2014-05-07 07:03:38 -04:00
Jeremy Long
c32361a428 fixed off by one string truncation issue
Former-commit-id: deead918832638cf9c7aadec194dad38f976946b
2014-05-07 07:03:02 -04:00
Will Stranathan
ac83c2bc3c Fixed logging order of GrokAssembly for bad assemblies. Using resources for logging
Former-commit-id: f2f833e67e20468ded70394ab71b481708c63d2a
2014-05-03 19:12:39 -04:00
Jeremy Long
32808c16e7 updates to help resolve issue 119
Former-commit-id: 89dd3034c595b658693a3cde0dac7259403bcf14
2014-05-03 14:46:48 -04:00
Jeremy Long
e4e2433396 updated test case and related data
Former-commit-id: ef8350d1502f69dd7c677fd688e76855f7d9985a
2014-05-03 12:30:29 -04:00
Jeremy Long
8196b6e69e updated to begin fixes for issue #90 and #119
Former-commit-id: 36248efb48af1a7cfc174b8d23be673fe7ca93e8
2014-05-03 12:30:07 -04:00
Jeremy Long
8dd49b6156 added local copies of the NVD CVE data to speed up some of the test cases
Former-commit-id: 04f220ef62303f672afb10ba44fdb4c44af35a09
2014-05-03 11:02:23 -04:00
Jeremy Long
c4ab83a801 updated to use local copy of data files to speedup the test case
Former-commit-id: 896363f35802484057cfcb3cefe8b6cd1782a02c
2014-05-03 11:01:31 -04:00
Jeremy Long
2c51b7b835 removed duplicative test
Former-commit-id: 6b8ccf6c0e94827b165d6cabc935086905858675
2014-05-03 11:00:48 -04:00
Jeremy Long
bab49d04b7 added additional informational log statements
Former-commit-id: 25218345994ffef6506f38f8aa517abd78ceec2c
2014-05-03 11:00:21 -04:00
Jeremy Long
6963d66240 updated settings cleanup to prevent issue with the update process
Former-commit-id: deba93c236f7f441df73e44ec57a4fc52260f965
2014-05-03 10:59:47 -04:00
Jeremy Long
8cbf3ffc6b updated the URL for the NVD CVE external link
Former-commit-id: 7bb12ada0d54613f4067b96fb94a47e874384183
2014-05-03 10:58:41 -04:00
Jeremy Long
2a4693f6ed updated the URL for the NVD CVE external link
Former-commit-id: 506296925066d0ea1def5035b45dfb21302e9559
2014-05-03 10:58:16 -04:00
Jeremy Long
217256746c updated the URL for the NVD CVE external link
Former-commit-id: e44b70462275d0f0ab71c56b24d60dba8ea84a42
2014-05-03 10:57:44 -04:00
Jeremy Long
6c90225024 updated settings cleanup to prevent issue with the update process
Former-commit-id: eed7771b12afdf7e7bdb506dee5798062b326cab
2014-05-03 10:55:56 -04:00
Jeremy Long
92d8a894e3 updated settings cleanup to prevent issue with the update process
Former-commit-id: 7b290d8aacb8f78c1064fd210b1e100da5cb86b8
2014-05-03 10:55:15 -04:00
Jeremy Long
c89d619808 applied part of PR for issue #121 - classpath issue with some invocations of the ant client
Former-commit-id: 7c0a0531c753e2ccfb0bdb15a1b179697b9f8905
2014-05-03 09:54:11 -04:00
Jeremy Long
31dd4f6305 added additional dependencies for testing
Former-commit-id: 9d15401c471ff20d1bac1e46073c79fac435e335
2014-05-03 09:52:57 -04:00
Jeremy Long
ff9715ede7 patched for issue #120 - duplicate evidence listed in reports
Former-commit-id: 172fe4eff369938d904ed5af871e96c281cc2b04
2014-05-03 08:52:45 -04:00
Jeremy Long
ffd1e383c2 Merge branch 'bkimminich-master'
Former-commit-id: 5f2abec6e7aa3a88dcd9c6882b039d0d5d70b165
2014-04-30 19:23:23 -04:00
Jeremy Long
2cc4f8c2fe Merge branch 'master' of github.com:bkimminich/DependencyCheck into bkimminich-master
Former-commit-id: a514663f23bf03a247afd3e4edc54e32334a2249
2014-04-30 19:23:13 -04:00
Jeremy Long
6f513eb359 version 1.2.1-SNAPSHOT
Former-commit-id: d5b3c6acf6a66d2577385a24c76f7b2a47ec350d
2014-04-30 18:30:46 -04:00
Jeremy Long
b235a5bb49 fixed issue #118
Former-commit-id: 2c9775a966f153a1cd0de5690547f0392899b744
2014-04-30 18:13:04 -04:00
Jeremy Long
25f1912573 fixed issue #118
Former-commit-id: 7866ad2b3a62c0dfeff69172657e16efa18827ae
2014-04-30 18:10:56 -04:00
Björn Kimminich
d24d6f6b52 Update AbstractSuppressionAnalyzerTest.java
Former-commit-id: 717f9e605912ff42843a8b150db191eb4bb79c90
2014-04-29 14:37:52 +02:00
Björn Kimminich
afdb156c84 simplified exception testing
Former-commit-id: cf543a3ec397e593e7de2249820bd48159132413
2014-04-29 14:29:46 +02:00
Björn Kimminich
643d3600b8 added test case for classpath suppression file and missing file
Former-commit-id: a423b1289f39757645adf4dae0122bc4cee2d1b6
2014-04-29 11:48:07 +02:00
Jeremy Long
9c51bff55b version 1.2.0
Former-commit-id: 328c54a365a210bfe9e664f4ae292af4666cbf8e
2014-04-28 08:58:09 -04:00
Jeremy Long
81c91b3877 excluded HelpMojo from PMD
Former-commit-id: dbd8aa2995ca6f652cb2bef522a5e74d995e87a0
2014-04-28 08:20:11 -04:00
Jeremy Long
3d365eb258 checkstyle correction
Former-commit-id: aa79d696daa8e21ba2f3004916e97e213bf0fca1
2014-04-28 08:19:54 -04:00
Jeremy Long
6857f6d8f8 checkstyle corrections... javadoc, final variables, etc.
Former-commit-id: 6a37a968f805a218316d5acc60f2edc85ea68e2f
2014-04-27 17:16:49 -04:00
Jeremy Long
81bd9991bb moved checkstyle configuration to match pmd
Former-commit-id: 63681c165564341bfff2579ef6eb2f8cd502bb45
2014-04-27 09:31:16 -04:00
Jeremy Long
056fa9ded2 updated to reduce exception messages during build when mono isn't available
Former-commit-id: 734c3b41743c1ed60c6dbc737050b7add409206f
2014-04-27 09:18:50 -04:00
Jeremy Long
a3792c474b Merge branch 'master' of github.com:jeremylong/DependencyCheck
Former-commit-id: 34458ee1dd984113551fa25a1ccc309d86587a9e
2014-04-27 08:51:31 -04:00
Jeremy Long
ec233dbb46 Merge branch 'master' of github.com:bkimminich/DependencyCheck into bkimminich-master
Former-commit-id: 1fda0dd76d7a20dba2edf63595eabb10ba7ce0bd
2014-04-27 08:50:59 -04:00
Jeremy Long
d89cd789ac moved pmd rules to follow the maven directory structure
Former-commit-id: bfe648b8a48a85b677ffd665386d317eb249e289
2014-04-27 08:50:03 -04:00
Jeremy Long
69088e162d removed code duplication ensuring temporary directory exists
Former-commit-id: daa54e59b488a1d6646e652e124c9e7f62012f79
2014-04-27 08:42:02 -04:00
Steve Springett
ec53bd4125 Cleaning up Velocity. Minor change to Engine and ServiceLoaders to optionally use custom ClassLoader.
Former-commit-id: c0a96b36f4959a8b28b6b73e24ad884845140bd6
2014-04-26 01:25:56 -05:00
Björn Kimminich
35a264d21c organized imports
extracted exception handling


Former-commit-id: 2ec171b680d77c0db1dca9ec667e72040040eab9
2014-04-25 14:39:56 +02:00
Björn Kimminich
0372c2eccc attempt to locate suppressions in classpath when they cannot be found via URL or file path
Former-commit-id: 6ba46b24bd89465aef454ca87c20b783bc761eee
2014-04-25 14:33:15 +02:00
Jeremy Long
08c7ffc6d9 added new test case for the hint analyzer
Former-commit-id: 1c82a99d05a00d9b71e0cda8e9e9cf417576c6b0
2014-04-24 07:23:39 -04:00
Will Stranathan
e386f6ac20 Updated PMD configuration to work with all the projects.
Former-commit-id: f423663a453370b917292bdecb581ff2b06c896d
2014-04-22 20:50:06 -04:00
Jeremy Long
60ab893888 checkstyle corrections
Former-commit-id: 5397dc05e185c48b7fc8041c3b356655188eb3c1
2014-04-22 09:01:53 -04:00
Jeremy Long
f2d960c3eb removed unused variable and inner assignment
Former-commit-id: ca34c3a26716353dc7e7c619c18a4f7fad264b7f
2014-04-22 08:14:30 -04:00
Jeremy Long
fb88aeaeb9 checkstyle corrections
Former-commit-id: c64cd0ab69715dce4d0cb4671ff58844367e11a2
2014-04-22 08:10:54 -04:00
Jeremy Long
94561de719 converted long running tests to integration tests
Former-commit-id: b43f6ed56766f5edd28c2224886c6a544944f449
2014-04-21 21:46:54 -04:00
Jeremy Long
89ed18cea3 spelling corrections
Former-commit-id: f802ad882058ea1684458b8e85cde625e4907ef3
2014-04-21 21:01:10 -04:00
Jeremy Long
b996fa234b spelling corrections
Former-commit-id: 5a3702b980e5970565b0aeab93653353626befd1
2014-04-21 20:59:18 -04:00
Jeremy Long
f6cd5cb4b2 merged update from Will
Former-commit-id: 6c60ece52808b5feb312489a19fc6b4acdb7859d
2014-04-21 20:42:58 -04:00
Jeremy Long
6ac8caaf5f Merge branch 'master' of github.com:jeremylong/DependencyCheck
Former-commit-id: 25d67194a46eb3654415cd0dd91e67cd17befdb5
2014-04-21 20:31:48 -04:00
Jeremy Long
e5a4145e37 spelling corrections
Former-commit-id: f1589557d0f3aa8fc7e5efbc137b248580d72fae
2014-04-21 20:31:26 -04:00
Jeremy Long
2c8b408bfb spelling corrections
Former-commit-id: 65fbce0a7f47161c2cc5f9c5327ce5f18cc483c1
2014-04-21 20:21:53 -04:00
Steve Springett
58c5c04feb Removing Jenkins workaround for previous snapshot's race condition
Former-commit-id: f1cb67c38ef10426873f628c368695d165e28e91
2014-04-21 14:19:30 -05:00
Will Stranathan
b0d6070d28 Added PMD rule to find Loggers that weren't fields and corrected existing instances.
Former-commit-id: fac6dba1050e2c82a4ce090845c66bc284ce2966
2014-04-19 22:08:17 -04:00
Jeremy Long
3728594f73 checkstyle corrections
Former-commit-id: 8cf3b2001eef9cd73809cfc3036e4662e0912f9d
2014-04-19 12:49:57 -04:00
Jeremy Long
dc2f1eabb2 speed up test by disabling auto-update
Former-commit-id: c3fa8a4358bc3a40a3053fc1d83ec1bd1f25be48
2014-04-19 10:00:06 -04:00
Jeremy Long
eda08e7454 speed up test by disabling auto-update
Former-commit-id: acc20cbd55a13738097f8e4c142114f1928c0af6
2014-04-19 09:59:45 -04:00
Jeremy Long
1bf4b6daa9 updated test case to perform autoupdate
Former-commit-id: d33a170f6d0ad9c822556003445b68187dcd30ed
2014-04-19 09:59:09 -04:00
Jeremy Long
f757266282 updated settings initialization
Former-commit-id: 87d35b16ee7cf213ca317fd98470bc027aca9af1
2014-04-19 09:58:40 -04:00
Jeremy Long
0321823125 removed singleton pattern from service loaders
Former-commit-id: eb822f5f15ca7bd87f9b3bff39467f77b64f27b7
2014-04-19 09:58:16 -04:00
Jeremy Long
33d190afaa updated to initialize the settings object
Former-commit-id: c4b1d8c1cc26bd2f2c277e9d614adaecd1a00042
2014-04-19 08:59:04 -04:00
Jeremy Long
ff16c4f127 Merge branch 'master' of github.com:bkimminich/DependencyCheck into bkimminich-master
Former-commit-id: 380e108f1ca7960f5b973a523be4f5cf3ac5d989
2014-04-19 08:22:47 -04:00
Jeremy Long
134728438e added a mechanism to copy the global settings object to forked threads
Former-commit-id: 2d312bb77e2de128689165f09636ef6ccf0a3521
2014-04-19 08:21:59 -04:00
Jeremy Long
754bd68a87 updated to use BaseTest to initialize the Settings correctly
Former-commit-id: b116cf7a8d61d4e3f194108344564f6d4c20940b
2014-04-19 08:08:53 -04:00
Björn Kimminich
bd32eeeaa2 fixed documentation of suppressionFile parameter
Former-commit-id: 5260eb964cd7183adff13f3ef180233499452015
2014-04-17 11:17:17 +02:00
Björn Kimminich
1b9a3bd4bd extracted logger as field
Former-commit-id: e4d83411e9e2d529b0035748c52d9164e8837379
2014-04-16 16:35:40 +02:00
Jeremy Long
584d369b0b made the settings ThreadLocal to solve a threading issue
Former-commit-id: 5fdcb13ae7147bfb65748aadbedf49fdf1febabf
2014-04-16 08:19:35 -04:00
Jeremy Long
0ebe052752 initial base test class to support the new Settings implementation
Former-commit-id: 8b8190c064409248798eb0d1eab17b972ea5178d
2014-04-16 08:18:40 -04:00
Jeremy Long
535863bc52 added additional error handling
Former-commit-id: 2922b534e1f11f66c0d1bdff3136b560a467e3f1
2014-04-16 08:13:38 -04:00
Jeremy Long
dd925cd92b updated to support the new Settings implementation
Former-commit-id: 471a24d23377d74b88e0693d4e9632bfb28a8511
2014-04-16 08:12:36 -04:00
Jeremy Long
5529de3d95 updated to support the new Settings implementation
Former-commit-id: 455333dfde047ca2b92c80b60dbc905d7705cfb2
2014-04-16 08:12:16 -04:00
Jeremy Long
ce6b65adb8 updated to support the new Settings implementation
Former-commit-id: 530ce66039f4dfe4dd3db11790a9660f03cb873c
2014-04-16 08:11:56 -04:00
Jeremy Long
9897109332 updated to support the new Settings implementation
Former-commit-id: e9087cbd7b7f017f8395331d66f43108b2dc2f0a
2014-04-16 08:11:09 -04:00
Jeremy Long
cfc851a99b minor javadoc update
Former-commit-id: f17a1efc613d815c7ad76e4bc7985bc4cba1bba8
2014-04-16 08:10:50 -04:00
Jeremy Long
380178ccc8 removed un-needed methods
Former-commit-id: cd774ff66f89e34e489b7839809569ba1c47ba65
2014-04-16 08:10:24 -04:00
Jeremy Long
3227ddd9f9 updated to support the new Settings implementation
Former-commit-id: 21e0dd024fa968c090b1eb5731c185c305c9d29c
2014-04-16 08:09:47 -04:00
Jeremy Long
336be63237 updated to support the new Settings implementation
Former-commit-id: d0b45c8fdf2ecd50b39045e28fe27601abdf3360
2014-04-16 08:09:24 -04:00
Jeremy Long
37c9b9e1f5 removed unused methods
Former-commit-id: 31836f1ee4b37e137b4fd56539bde39eef23dc16
2014-04-16 08:08:54 -04:00
Jeremy Long
ebb3e02dcc removed unused methods
Former-commit-id: 832e1232386ca6df3cd37cf80a98246f0ccf45fa
2014-04-16 08:08:36 -04:00
Jeremy Long
352505c54f updated to support the new Settings implementation
Former-commit-id: 82c5da6e4b3d7d34e8da2db091a55835f8ce97dd
2014-04-16 08:07:52 -04:00
Jeremy Long
0c7998712e updated to support the new Settings implementation
Former-commit-id: 918bd36285d2b7339c69e3c3f64b327ec28d38ea
2014-04-16 08:07:32 -04:00
Jeremy Long
b9a20e7ac5 updated to support the new Settings implementation
Former-commit-id: d1d837e026bcff8be05501b6154f491f4f7669b4
2014-04-16 08:07:09 -04:00
Jeremy Long
7ab89b900c updated to support the new Settings implementation
Former-commit-id: 10625b4a050b79608d454677ff7fba04f1f735a0
2014-04-16 08:06:52 -04:00
Jeremy Long
9620956727 removed unused methods
Former-commit-id: 2cdae6c0c7fd6a09af79c5e37734bbf03097f5d9
2014-04-16 08:04:46 -04:00
Jeremy Long
9b85768b7e updated to support the new Settings implementation
Former-commit-id: e72bbcdcbe0a673e4b7d6a26aee9210f3a52ff24
2014-04-16 08:04:13 -04:00
Jeremy Long
5276e1863d updated to support the new Settings implementation
Former-commit-id: 91439ca3788a26e66d665cd3b8298a1dfc4a93f5
2014-04-16 08:03:55 -04:00
Jeremy Long
0fc1a30a2c updated to support the new Settings implementation
Former-commit-id: 33d1bebf147cb93649b774a46030581a3b8b6e69
2014-04-16 08:03:36 -04:00
Jeremy Long
8609b98b1c updated to support the new Settings implementation
Former-commit-id: 95a0da4c7f9ec9f506477bdd755b5660de05bd2f
2014-04-16 08:03:15 -04:00
Jeremy Long
c85514a17a updated to support the new Settings implementation
Former-commit-id: 16b747a5e88aafe600d35b67778a320dd8f81113
2014-04-16 08:02:50 -04:00
Jeremy Long
d00bef5546 updated to support the new Settings implementation
Former-commit-id: 89611b3261cb8bb4b2714027ee5efd74b2edeac2
2014-04-16 08:02:24 -04:00
Jeremy Long
b905f46f98 updated to support the new Settings implementation
Former-commit-id: ab47079a0426c72cd71e9332faf81593045b33f0
2014-04-16 08:02:05 -04:00
Jeremy Long
cdd4765d38 updated to support the new Settings implementation
Former-commit-id: ceae727c56f4f982692b6d48d9466756abc400e8
2014-04-16 08:01:45 -04:00
Jeremy Long
d62793f4ad updated to support the new Settings implementation
Former-commit-id: 4cb1a827fb87a56c8bd126a17448245239513523
2014-04-16 08:01:15 -04:00
Jeremy Long
d83d325a49 updated to support the new Settings implementation
Former-commit-id: 781f217da7507bbc13de6be59474d8ddda7fce2f
2014-04-16 08:00:55 -04:00
Jeremy Long
e5baf99814 updated to support the new Settings implementation
Former-commit-id: 5f75c0e202e3fb0aafc2f55db827cf727ca97843
2014-04-16 08:00:10 -04:00
Jeremy Long
b4aeab3501 updated to support the new Settings implementation
Former-commit-id: 68cba2d619cd31a7352d54cd3a3ff6b5c482ebd9
2014-04-16 07:59:13 -04:00
Jeremy Long
039bfd372d updated to support the new Settings implementation
Former-commit-id: d1469eeaea5cc3d776c2378f390ec20bd8a223b7
2014-04-16 07:58:50 -04:00
Jeremy Long
1a92de71d1 updated to support the new Settings implementation
Former-commit-id: 572af32243216c26ad1c0e7ed36a4d368cd42a12
2014-04-16 07:58:28 -04:00
Jeremy Long
d8279e11aa updated to support the new Settings implementation
Former-commit-id: 41cb4630f5cd777cc3c24da7e3c6aee18151501a
2014-04-16 07:57:11 -04:00
Jeremy Long
b1b8584641 removed unused methods
Former-commit-id: 93cac67323f6cd2205de672deb534fb4cabb0be7
2014-04-16 07:56:51 -04:00
Jeremy Long
11e75df1a9 updated to support the new Settings implementation
Former-commit-id: 22be859d3d8b9455e203da58ba5146f957a0f28b
2014-04-16 07:56:23 -04:00
Jeremy Long
25fc2bfbea updated to support the new Settings implementation
Former-commit-id: bbb7dae7e2e9969ff648e9bfa0ddb4ab23cf3cc9
2014-04-16 07:55:56 -04:00
Jeremy Long
a93c84ff64 updated documentation
Former-commit-id: d597a6f1c4f212a054f2fd74c81d8c4e98fbcf2a
2014-04-13 07:47:50 -04:00
Jeremy Long
986a4182d9 reordered operations
Former-commit-id: b6afe2d503fd80e591b0db50855e25852c9001e9
2014-04-13 07:45:54 -04:00
Jeremy Long
d38a8b109b Merge branch 'master' of github.com:jeremylong/DependencyCheck
Former-commit-id: 739b4d35b9cd96a634169d2de299ad842eeea25e
2014-04-12 05:33:02 -04:00
Jeremy Long
711d8c8c6b improved error handling
Former-commit-id: a95f11da123ca42e4abe3e4b2a98f8cc44fc34e5
2014-04-11 06:38:13 -04:00
Steve Springett
0d1d22aeff Added archive support for JAR, SAR, and APK file formats. Ticket #106
Former-commit-id: ec08dd184cc973e57b99e8b318c14c5b268395da
2014-04-10 23:39:52 -05:00
Jeremy Long
ac2231f0f3 updated connection string to use FILE_LOCK=SERIALIZED instead of AUTO_SERVER=TRUE
Former-commit-id: bf8d148e01da607545af39bcfeb19d00d20091c5
2014-04-09 06:40:25 -04:00
Jeremy Long
21344dacfc redirected standard error to hide expected [fatal] message from being displayed during tests
Former-commit-id: ecbc294640ca1e1a3c418af871dd71a31bbcccdb
2014-04-09 06:34:57 -04:00
Jeremy Long
ca22ba5bbc updated report to show suppressed vulnerabilities and identifiers per issue #66
Former-commit-id: b87d8df47ac115b1a9ad36fdc7d960e86ab6d2d9
2014-04-04 06:46:31 -04:00
Jeremy Long
fc64c34214 fixed formating in support of issue #66
Former-commit-id: bc8d195fb53a3c7e4041ea25f16aad7be1b2916d
2014-04-04 06:46:04 -04:00
Jeremy Long
c35bc2476d updated schema to 1.2 to support changes for issue #66
Former-commit-id: c102357c6beead34824d5f7053c7350b3d15130c
2014-04-04 06:45:35 -04:00
Jeremy Long
222826af95 added to simplify velocity templates
Former-commit-id: 2bb350d765993782f38d90d235bebb0e9e7d51a7
2014-04-02 06:54:25 -04:00
Jeremy Long
db28db0bc7 Merge branch 'master' of github.com:jeremylong/DependencyCheck
Former-commit-id: ed02b171d4a62eb4e22deea53dfcec07676a96d2
2014-04-02 06:52:59 -04:00
Jeremy Long
931f7d47ea simplified velocity report generation
Former-commit-id: 7c0f5bd492bce8a37c1633715d989970ee5b0d61
2014-04-02 06:52:26 -04:00
Jeremy Long
987ed1cefc coveritys copy paste analysis is awsome - identified a real bug that has been fixed
Former-commit-id: bb3b0cbdb32970534a5a17f351af8d13fb2d6838
2014-03-31 21:32:38 -04:00
Jeremy Long
3e9a77abfa updated test case to ensure suppressed vulnerabilities were tracked correctly per issue #66
Former-commit-id: 7bfbd0c0bb0cb1aa9bed756509d56690bdaee754
2014-03-30 06:31:52 -04:00
Jeremy Long
3879eb6b3a Updated to support the tracking of suppressed CPE/CVE per issue #66
Former-commit-id: 5f98715a8ffd45ac8d78ba7c103cbfb287cb1ddc
2014-03-30 06:26:50 -04:00
Jeremy Long
5e5a2040fc updated to ignore coverity directory
Former-commit-id: a55a69442555d83365a2c96e6d6dfd00d8311653
2014-03-30 06:25:56 -04:00
Steve Springett
eea44d7de2 Fix to prevent rules from being cached between Jenkins builds even if suppression file is not specified.
Former-commit-id: 747e4c585084807239ae2881944bd48a5908e143
2014-03-29 22:57:44 -05:00
Jeremy Long
3fcbf075fb updated commons-compress version
Former-commit-id: 44e8d9937c88c7eeced2d9be8ccdda73c257ba52
2014-03-29 08:56:04 -04:00
Jeremy Long
b2641494cc specifically set InputStreamReader to use UTF-8
Former-commit-id: 1eacd242e19d5ca7b5582c1c8733f0868621cc8a
2014-03-29 08:37:39 -04:00
Jeremy Long
c48a794aee updated to version 1.1.5-SNAPSHOT
Former-commit-id: ed43852f2d9459e5c0ec8c13d809a392fb9ef35c
2014-03-29 08:37:03 -04:00
Jeremy Long
e53906aea8 updated to version 1.1.5-SNAPSHOT
Former-commit-id: 2362311dfb8e1f35408df2446b7bf8e72ceb0289
2014-03-29 08:36:43 -04:00
Jeremy Long
05a4a1670f minor correction to unit tests
Former-commit-id: 20b80df37f0abb3c76d44e639c8d9c8c02f4ef71
2014-03-29 07:28:24 -04:00
Jeremy Long
4bd35852a5 version 1.1.4
Former-commit-id: 1f5787ebacba73ca5a582b05dd88f2628d29b1a8
2014-03-29 06:55:03 -04:00
Jeremy Long
be4d56f8d2 FindBugs corrections
Former-commit-id: 22dfeaeb1493fdf25e790018c5d8c1761e935153
2014-03-29 05:58:56 -04:00
Jeremy Long
dfbcd616f2 find bugs corrections
Former-commit-id: f1823dd579d03b4caefd94123f4c51a3d8fb3f6c
2014-03-29 05:54:53 -04:00
Jeremy Long
dc0106348d checkstyle corrections
Former-commit-id: d511bf999738c60e35cefb66cdde1f28be1fea3f
2014-03-29 05:34:46 -04:00
Jeremy Long
f2666d4a30 updated cli help to indicate wild cards can be used to limit scan to specific file extensions
Former-commit-id: 1c034ba00859bc3140ca750c35bd1fc7f7b6d38d
2014-03-29 05:26:07 -04:00
Jeremy Long
4220e58d26 checkstyle corrections
Former-commit-id: 4f20366676c43817c8f20200b47f6952c866a3a2
2014-03-29 05:23:49 -04:00
Jeremy Long
07de43981a updated documentation to support wild card file extensions
Former-commit-id: 3e23e19d55056e0b24d6a738892828686335339d
2014-03-29 05:23:34 -04:00
Jeremy Long
fa352c1a8f added back in scan methods that were removed by mistake
Former-commit-id: 043ae5b2fd012f06f107e1f46f50bc7157bba858
2014-03-28 05:28:17 -04:00
Jeremy Long
e5d582b30b updated delete file method
Former-commit-id: d7fcac28c99fe0a48aee6822ab288888181e5a51
2014-03-28 05:21:16 -04:00
Jeremy Long
8fb14ffdf3 added support for wildcard extensions in scan path for issue #95
Former-commit-id: 48b91add5bf6aa289dc03f1627046971dc0366e6
2014-03-28 05:03:37 -04:00
Jeremy Long
c16e85e7db fixed bug causing analyzer to hang reading from an empty error input steam
Former-commit-id: 1f4ed4fe5bb1900aff6ce2494e3f421312cd578f
2014-03-28 04:06:42 -04:00
Jeremy Long
25a72e3508 Merge branch 'master' of github.com:colezlaw/DependencyCheck into colezlaw-master
Former-commit-id: 5320c17bc9730b5bad2bb041d1125f54d06fc873
2014-03-28 02:40:26 -04:00
Will Stranathan
20411da67b Updated waitFor semantics
Former-commit-id: 78be989fdaa6d3e0674050941c901ad37b33c944
2014-03-27 17:34:45 -04:00
Jeremy Long
81bfdc69dd added initial version of legal disclaimer - it will need to be updated
Former-commit-id: 363c2aa5a92422ce31934b1025849ccd7a804cf7
2014-03-27 15:35:59 -04:00
Will Stranathan
5e2829fe49 Squashed commit of the following:
commit 1d1a06a5ae7ea4f6e3adbf5a4b8163eba50562a3
Author: Will Stranathan <will@thestranathans.com>
Date:   Wed Mar 26 22:59:15 2014 -0400

    Updated unit tests and logging

commit bb00174e62c9657809d6e5a9cde7c7308d905593
Author: Will Stranathan <will@thestranathans.com>
Date:   Wed Mar 26 22:20:28 2014 -0400

    Updated GrokAssembly to not fail if the vendor can't be gotten

commit 27f7c9366acca8abbff9c6e9fa9ce1a1329da887
Author: Will Stranathan <will@thestranathans.com>
Date:   Wed Mar 26 22:18:33 2014 -0400

    Updated unit test to not care about version number


Former-commit-id: 6329e3f54f2808c54dd998514f0881dc3a976281
2014-03-26 23:02:17 -04:00
Jeremy Long
2aba09f090 added another test jar
Former-commit-id: 3f34dd46826010467e71127e61c8b8692dc2e46d
2014-03-26 07:38:13 -04:00
Jeremy Long
38e27309fb updated engine to fix bug with archive analyzer prematurely deleting fiels
Former-commit-id: f123c77c3e111291d8e8064b31de2dacca3907fe
2014-03-26 07:33:52 -04:00
Jeremy Long
6b586684e6 updated documentation for PR #98
Former-commit-id: abdb430bba5b53d5dccbf946394863733c04c69f
2014-03-24 23:55:36 -04:00
Will Stranathan
773e280339 Switched default Nexus to SSL to fix 301 issues
Former-commit-id: 8a91f133e64ed6f74f7adcc2d239d36edb57d7e1
2014-03-24 19:59:13 -04:00
Jeremy Long
297a67cd00 applied PR from Steve to close issue #96 and issue #97
Former-commit-id: 7bc44a4778d78647c39390b5f39668d827c67995
2014-03-23 23:27:49 -04:00
Jeremy Long
ceb61ebe74 added configuration settings to the interfaces to support disabling of specific analyzers per issue #86
Former-commit-id: a13020f23231f9a9d80e3cfbfc2529198001f1fd
2014-03-23 23:08:03 -04:00
Jeremy Long
6c85e3502e various findbug, checkstyle, documentation fixes
Former-commit-id: 66fc0bbef000fc9e4210054f15ab973909fe919f
2014-03-23 23:07:27 -04:00
Jeremy Long
690192300f fixed bug where the analyzers were not being closed
Former-commit-id: 3ab4fa8484a65a2e3615549f4f778e63a3d36f4e
2014-03-23 23:06:14 -04:00
Jeremy Long
3ba963f474 added enabled properties in support of issue #86
Former-commit-id: 4d6205c4df71256ebf92a39c49a7ad042abf9f16
2014-03-23 23:05:41 -04:00
Jeremy Long
9b2cacc3a0 updated documentation
Former-commit-id: cb2c5c0fd7e0dfc33ce5a1b3cf75799c015c78df
2014-03-23 23:03:51 -04:00
Jeremy Long
315a616293 updated tests to fix issues with the analyzer disabling themselves
Former-commit-id: 48f1066590ba4b1e07943c089f5ad16e9cc4e746
2014-03-23 00:36:54 -04:00
Jeremy Long
3c56cd6738 added the ability to have a default value for getBoolean
Former-commit-id: 1c900a6f55f37c226a8d43df8dfc98913630838a
2014-03-23 00:36:10 -04:00
Jeremy Long
a48ac013e8 updated to allow turning off individual file type analyzers via configuration
Former-commit-id: 3f26c9e4540ed2d91d903db9c0f5abb50084ceb4
2014-03-23 00:33:00 -04:00
Jeremy Long
258602ce1a fixed teest case
Former-commit-id: 27616b92421179fd720763cfacaf70de297c372d
2014-03-17 20:42:43 -04:00
Jeremy Long
c85b547502 improved the abstract base class to support enabling/disabling each FileTypeAnalyzer
Former-commit-id: 9dd07ede35cdf2b5b4babb7d577f30d338c0af3c
2014-03-17 00:08:04 -04:00
Jeremy Long
d6266c36bf major revision to patch issue #86; file type analyzers will no longer initialize if no files were detected that they can process during the scan phase.
Former-commit-id: 6e7cb5893226f556359955295db2dc8116d4d480
2014-03-16 22:39:44 -04:00
Jeremy Long
fdd7f30e9a updated initialization of the analyzers to use less looping
Former-commit-id: eab3ca87bdf55a46a530e20a84b0948a3c93b9c6
2014-03-16 07:50:41 -04:00
Jeremy Long
3994ef3619 added a vulnerability suppression analyzer test case
Former-commit-id: d90596a3493f1fd557222fac0568955b5ab58b4f
2014-03-16 07:05:05 -04:00
Jeremy Long
633028a63f updated class name
Former-commit-id: 222aa7b23da96eb54517087b3d41190fed3c5724
2014-03-16 07:04:36 -04:00
Jeremy Long
013374e9db renamed class
Former-commit-id: a5b33cd29fb436a5cd95089fed73572cd82d19bd
2014-03-16 07:02:58 -04:00
Jeremy Long
4358b47e91 renamed class
Former-commit-id: 400624d6366ca83097508d0d65fcd2f5eff4047d
2014-03-16 07:02:34 -04:00
Jeremy Long
6decc1ce30 fixed a bug that caused the suppression file not to load
Former-commit-id: d90f00b1f051fa31c95e957786fd7215dbfdc913
2014-03-16 07:02:10 -04:00
Jeremy Long
8a3dba3064 updated the base class name to be more accurate
Former-commit-id: ea9a8e202c24abc7b17a45ce67862c1d93bc0e3e
2014-03-16 07:01:24 -04:00
Jeremy Long
27bcead1bc changed the logging level on the "entrance" log
Former-commit-id: f0219ea5cac2552ff0255096ba68e9f6c87b7e11
2014-03-16 07:00:44 -04:00
Jeremy Long
acb9c01776 improved manifest parsing to exclude additional entries per issue #88
Former-commit-id: b4cad8c8d0182c17770be2163e0565378de3ae9a
2014-03-16 04:49:09 -04:00
Jeremy Long
79fd23d51b updated so that the Filename was properely escaped in Javascript so that it shows up correctly in the report to fix issue #91
Former-commit-id: e2de967442f9504ede9402760c33a1b7501a3536
2014-03-16 04:13:43 -04:00
Jeremy Long
776614d211 minor update to the generated report names
Former-commit-id: 1ee6a44db3df3c060033470b026799cfa8bd744d
2014-03-15 07:48:19 -04:00
Jeremy Long
b03a498cd7 updated to resolve issue #87
Former-commit-id: 56338ff8aee45193cf387ff9d2d0087afd7febaf
2014-03-15 07:46:29 -04:00
Jeremy Long
b612926fb6 minor update to the generated report names
Former-commit-id: 347cefef415fa91f7cf59e1c167772ebfd3f3ce3
2014-03-15 07:42:55 -04:00
Jeremy Long
b67377f505 patch from davidkarlsen (PR #85) was applied to resolve issue #84
Former-commit-id: 0741248ece9a4df1b1a7595b74aef31c6f74652d
2014-03-12 23:40:42 -04:00
Jeremy Long
2033acbe2a updated logo
Former-commit-id: 5c6034247fb4fba8cbd6f9028a01b66d177378fb
2014-03-11 11:59:54 -04:00
Jeremy Long
e435cfc489 version 1.1.4-SNAPSHOT
Former-commit-id: b7ee0f15a5390df86a06b2e80d66aec6a5c88cb7
2014-03-11 11:52:57 -04:00
Jeremy Long
a3199a52af version 1.1.3
Former-commit-id: 8d19b8d203026e650047bf3af1b5738d5c6a595f
2014-03-11 11:49:32 -04:00
Jeremy Long
99be870ab9 created a new getTempFile() to FileUtils that does not create the file, it only generates the file name
Former-commit-id: c3efa45ead91601442903ff190d058810196150d
2014-03-10 21:25:53 -04:00
Jeremy Long
9b2ecb4701 minor checkstyle correctionn
Former-commit-id: 57438863b9635f339e1eacdd73913c5ed003348f
2014-03-10 14:53:06 -04:00
Jeremy Long
be7443a0a0 updated to ignore .LCKpom.xml~
Former-commit-id: dbbf41fb2d10206ef167f78d04de01e92c4d90ae
2014-03-10 11:25:40 -04:00
Jeremy Long
0de6557872 updated to delete newly created file prior to attempting to copy a new file into its location
Former-commit-id: f170e09f4290b746808e0400a106ea9d33b992d6
2014-03-10 10:36:03 -04:00
Jeremy Long
258e890056 minor updates for issue #58
Former-commit-id: ffb30eb654dfb71317c32a5553074f45e4024ab9
2014-03-09 12:40:42 -04:00
Jeremy Long
d84bbad79a initial version of test cases
Former-commit-id: 10edfd3544b2231aa5fd5edaeb474cc5d1f1a435
2014-03-09 12:39:36 -04:00
Will Stranathan
07e6477686 Fixed two discrepancies in the CLI options
1) Proxy port and Properties files were both using -p. Now the
properties file uses -P.
2) Nexus Proxy was defaulting to true, even if the properties said
false, so moved the check for its setting to happen after the properties
were merged and had it default to checking the properties file and
setting it to true if the properties didn't say.


Former-commit-id: 9dd50ca9af906a15143dae153b807700bb385054
2014-03-08 18:58:39 -05:00
Jeremy Long
acde161412 updated grokassembly version in the test case
Former-commit-id: 27e9b36f3b3e72cf68592bd8f5ac7ee83702e565
2014-03-08 06:36:31 -05:00
Jeremy Long
8d8f9c6d26 updated to resolve issue #58
Former-commit-id: 4cd1d528f33c8db05a7d0b67460311b1b56426cd
2014-03-08 06:28:36 -05:00
Jeremy Long
c7507d9743 corrected syntax error caused by copy paste
Former-commit-id: 32446494c36bf5ea4536b9825046783bb15d4f0f
2014-03-08 06:22:03 -05:00
Jeremy Long
ff970fde56 updated to correctly use the correctly configured temp directory
Former-commit-id: 407f3eb2c3ff887eaa6d7969517af75dda01878a
2014-03-08 06:21:08 -05:00
Jeremy Long
2c4a997c64 updated to correctly use the correctly configured temp directory
Former-commit-id: e4b08d63e8eee17f538a2e074dfdc394d446000b
2014-03-08 06:20:32 -05:00
Jeremy Long
5c787e0b69 updated to correctly use the correctly configured temp directory
Former-commit-id: 364d0362f9d9107bbee6e83f495b575b8d657372
2014-03-08 06:20:12 -05:00
Jeremy Long
41da8435cc added validation for pathToMono argument
Former-commit-id: 763f3960f4c83f45020d8b5144ea98518c797d10
2014-03-08 06:19:21 -05:00
Jeremy Long
84ecc4c664 added option to download a file without using the configured proxy
Former-commit-id: 7153a34a12a02a53bf715fe023e820afd42899d2
2014-03-08 06:18:44 -05:00
Jeremy Long
d18a36af22 added the path to mono as a configurable setting
Former-commit-id: 7909cab0f29a44168ccee166170e29882a461a42
2014-03-08 05:42:32 -05:00
Will Stranathan
b3e766aa50 Merge branch 'master' of github.com:/colezlaw/DependencyCheck
Former-commit-id: 256f7898af5f72762b6ef21bc1aa00fe8373a360
2014-03-05 21:52:56 -05:00
Will Stranathan
0cee54c51b Updated GrokAssembly to catch a couple of possible exceptions
Former-commit-id: 4c462a7b5abf98e7ee0898210c684cd68725e0d0
2014-03-05 21:52:19 -05:00
Will Stranathan
41e436a183 Updated GrokAssembly to catch a couple of possible exceptions
Former-commit-id: c0e10b5e201b6b04eecc58e2de215cd716336e8d
2014-03-04 13:18:04 -05:00
Will Stranathan
743fc19fa3 Merge remote-tracking branch 'upstream/master'
Former-commit-id: 84ffe19906b355e930c8f36659a05c636e5d0b20
2014-03-04 13:13:01 -05:00
Jeremy Long
76e8c66b1b updated version to 1.1.3-SNAPSHOT
Former-commit-id: 62657e41c409c474918d0c6ac1d1f505e072a682
2014-03-04 07:33:27 -05:00
Jeremy Long
4379ea63f0 corrected intellij idea link
Former-commit-id: be7f327b6641d0819a55f93c3aefe016deca557b
2014-03-03 19:54:46 -05:00
Jeremy Long
00ae54b4b2 version 1.1.2
Former-commit-id: 63c1f372e6d093b3d3fa08a0eab102d9422f78c4
2014-03-03 08:51:17 -05:00
Jeremy Long
3a7fd7d271 minor update to formating
Former-commit-id: 6bd182ef660034549b2be16b4a22574171351a8b
2014-03-03 07:37:33 -05:00
Jeremy Long
94a0c98bfe added more javadoc
Former-commit-id: 2befc7ec80f7ca2f8c7c25554b0b75e3e515eeb0
2014-03-03 07:32:43 -05:00
Jeremy Long
c2b2b2698d updated pre-flight to correctly skip the proxy if configured to do so
Former-commit-id: ee993ded2a19f2a7fbda3f93c8d53ece43c8b1d1
2014-03-03 07:12:58 -05:00
Jeremy Long
9bb630bae6 minor update to logging statement
Former-commit-id: bdf69f0747e0dbf4a368050df95b5650960420ad
2014-03-03 07:05:24 -05:00
Jeremy Long
c47b2f5b18 corrected spelling
Former-commit-id: c40c47a6b198953b9ae4b5685ee08da5fcd7c0a5
2014-03-03 07:02:59 -05:00
Jeremy Long
ecdc9a968d updated logging of properties
Former-commit-id: 6472713deca91c5492cd9895af0257338ed2d847
2014-03-03 07:01:19 -05:00
Jeremy Long
c041ff66e2 updated imports
Former-commit-id: 44995cd7c14577d508a97e6ecb70f7edbad29a3a
2014-03-03 06:36:25 -05:00
Jeremy Long
fe0e2d5c2d corrected long option name for nexus uses proxy argument
Former-commit-id: f8a8a902fb3fb9e3bdcaa875c7563078d798811f
2014-03-03 05:41:55 -05:00
Jeremy Long
2cf3bca8de updated documentation
Former-commit-id: 026a64cd80c9870830dd11a37dcdeae0c6274659
2014-03-02 19:23:04 -05:00
Jeremy Long
b2a817e17b minor checkstyle patch
Former-commit-id: d81d0e9418963d01964eb42aac21d10f1b756a3f
2014-03-02 19:17:08 -05:00
Jeremy Long
d1ca951ffa updated to address issue #74
Former-commit-id: d562b1785a7f9b32dff7cd84351eed96c775fdcf
2014-03-02 18:26:58 -05:00
Jeremy Long
b3932ae8c5 added configuration for whether or not the nexus analyzer should use the configured proxy
Former-commit-id: e604d6862b50d4177f6846111408fce64a3c09eb
2014-03-02 18:16:12 -05:00
Jeremy Long
35223d5737 checkstyle fix
Former-commit-id: 5c79f2c38a40c6f339f8383cccdc86c2aa5e3cf4
2014-03-02 12:27:26 -05:00
Jeremy Long
9d263f11e5 fixed JavaDoc @link missing close curly bracket
Former-commit-id: 632dd4de562a1036883103ce89df8f98ee5d8804
2014-03-02 12:26:56 -05:00
Jeremy Long
3f28b30e95 checkstyle fix
Former-commit-id: ec2da0e3c262923552a219c6be3deb6004b3f154
2014-03-02 12:26:17 -05:00
Jeremy Long
d797abdb1f removed unused argument from runScan
Former-commit-id: 024f830175f347ae45146c4e536ca23d58325838
2014-03-02 12:25:50 -05:00
Jeremy Long
3b3a940ee4 minor code formating change
Former-commit-id: 090e2a881a1977172bc16911c828cde86b417865
2014-03-01 16:09:14 -05:00
Jeremy Long
1b5b61b25e cleaned up code duplication
Former-commit-id: 27896a50114fcee9f2aaeb21915b91b4a198f328
2014-03-01 16:08:58 -05:00
Jeremy Long
00d29b88df Merge branch 'master' of github.com:colezlaw/DependencyCheck into colezlaw-master
Former-commit-id: f3badca9d690cbf388c593f4bea1594855da6d1e
2014-03-01 15:35:57 -05:00
Will Stranathan
ab9bc9da74 Merge remote-tracking branch 'upstream/master'
Former-commit-id: c3ccdb83e5ce2cd6fc7f242d3b28aee1a2038d5d
2014-03-01 15:26:53 -05:00
Jeremy Long
b79f7b7ab8 corrected db initialization sequence
Former-commit-id: c4f33cc7905d8c4d3c9d9c5fb30556533c962e47
2014-03-01 15:26:17 -05:00
Will Stranathan
9b34b5ca89 Fixed merge conflict
Former-commit-id: 4a4bfd553bd5b91c53e87f7e327beb0a605bc21f
2014-03-01 15:07:40 -05:00
Jeremy Long
b486788993 added logos
Former-commit-id: 544b6573d59c880bb01bae28ef3b114327b1cd84
2014-03-01 14:36:51 -05:00
Jeremy Long
563e9c51e1 added powered by for cloudbees and built using intellij
Former-commit-id: b140717614a6536639509a13440e6000f3a601f4
2014-03-01 14:36:33 -05:00
Jeremy Long
6ab5e3ed4f minor format change
Former-commit-id: e891f090096cb79642fdeb9fe920a3afc12b9293
2014-03-01 14:35:48 -05:00
Will Stranathan
43a6c81151 Merge branch 'master' of github.com:/colezlaw/DependencyCheck
Former-commit-id: 02418eccb8ef85084f8561cb3fd5b8ea04771c63
2014-03-01 07:24:35 -05:00
Will Stranathan
887a5d50a4 Added proper waitfor to the process. Need to add a watchdog to this
Former-commit-id: 51bea69bb73e379fa7aac776171110fa1f75b8d4
2014-03-01 07:24:12 -05:00
Will Stranathan
be68f8c3f7 Fixed JULI Logging (stupid fix imports)
Former-commit-id: 75036170c113718e2265dad4c2b436b1613e0da7
2014-03-01 07:24:12 -05:00
Will Stranathan
86a4923157 Fixed logging to JULI
Former-commit-id: ab31241151a610fa67bc8102bded86db2250a9fd
2014-03-01 07:24:12 -05:00
Will Stranathan
f80ff31412 Fixed JULI Logging (stupid fix imports)
Former-commit-id: ca5b3b5ad64defefccea4c445414595208205957
2014-03-01 07:16:38 -05:00
Will Stranathan
94acc82bf5 Fixed logging to JULI
Former-commit-id: 76cd085130357fc9187f0af43b9670370a261026
2014-03-01 07:13:00 -05:00
Jeremy Long
3c1a1fcca1 ensured output streams are closed
Former-commit-id: 0c9b622e46349690cf68a383be0ee6c8fd7c553d
2014-03-01 06:59:48 -05:00
Jeremy Long
b3d08e4cb8 refactored closing input streams
Former-commit-id: 04c8b13428a4c7a215058bf54d47c62374d6a946
2014-03-01 06:56:42 -05:00
Jeremy Long
ab766ce85b made a broad catch even broader
Former-commit-id: dc6cae0168ed3bca63141e846599e1b9d13ca616
2014-03-01 06:46:16 -05:00
Jeremy Long
bcb8245c61 made a broad catch even broader
Former-commit-id: 84bc747061ab345241c00c46e2efbd2493606590
2014-03-01 06:45:57 -05:00
Jeremy Long
c9e60d5c3a made a broad catch even broader
Former-commit-id: 6c1a0015c53bb5ee803de3d1b144d77ebecaa6c0
2014-03-01 06:45:32 -05:00
Jeremy Long
eb7c74eea7 checkstyle fixes
Former-commit-id: 8e7c96bf02360aa083ebdb518be60587e15d9192
2014-03-01 06:45:06 -05:00
Jeremy Long
40f5911ceb checkstyle fixes
Former-commit-id: f274d6f4fc1103f7cde5ab8bfbe73f3ee4163af9
2014-03-01 06:44:45 -05:00
Jeremy Long
2a8809adbb checkstyle corrections and Javadoc update
Former-commit-id: b1e73d2eeecba925baad44d36f84ab5c066961fc
2014-03-01 06:44:23 -05:00
Jeremy Long
39524c4064 made a broad catch even broader
Former-commit-id: 183a78f51b69ed5507e27003f5af06a83d3d363b
2014-03-01 06:44:01 -05:00
Jeremy Long
c1cc2d6350 made a broad catch even broader
Former-commit-id: 75551751dcfd126db43dabde20753cc0ce676cee
2014-03-01 06:43:42 -05:00
Jeremy Long
acb857f433 made a broad catch even broader
Former-commit-id: d96be233d3ebac1879ac8460903e105b6ad556f7
2014-03-01 06:43:23 -05:00
Jeremy Long
d343d92b17 made a broad catch even broader
Former-commit-id: 172c586e791458ca06ae9303a4dc4dadb2df6f33
2014-03-01 06:43:02 -05:00
Jeremy Long
43cb4716a9 checkstyle fixes
Former-commit-id: ba40bf3ee9abb796a0f21eca8124edc1d63f81c0
2014-03-01 06:42:44 -05:00
Jeremy Long
6222561431 made a broad catch even broader and some minor format changes
Former-commit-id: 09ed906bced54568d92d6c5ff78c83bb4ad39872
2014-03-01 06:42:18 -05:00
Jeremy Long
07b10e9e23 made a broad catch even broader and checkstyle corrections
Former-commit-id: 3bb21494d7658b8f65207b15e2663082dbd0354a
2014-03-01 06:41:40 -05:00
Jeremy Long
dffe8cef7a made a broad catch even broader
Former-commit-id: f18ef8330532059c35e3430b8c0f77c4d3bc6f63
2014-03-01 06:41:11 -05:00
Jeremy Long
bb26626fd5 made a broad catch even broader
Former-commit-id: ed75ee0071bc9d067db84f99063a1a160d0bbc74
2014-03-01 06:40:54 -05:00
Jeremy Long
2f207de1a0 made a broad catch even broader
Former-commit-id: 2d88c89317b069e035e4d4fc698c323a183994a8
2014-03-01 06:40:29 -05:00
Jeremy Long
a69419ed04 checkstyle fixes
Former-commit-id: 1b9b1edd2f29967a8701adef4d3461de1089ab5a
2014-03-01 06:40:07 -05:00
Jeremy Long
be7c1ba914 made a broad catch even broader
Former-commit-id: f38245a785b3b8073ed51ff6e526c71a5cd79ae2
2014-03-01 06:39:45 -05:00
Jeremy Long
461f6ad2c1 made a broad catch even broader
Former-commit-id: 99a762ea3306523bba77139fff6605902b2ed760
2014-03-01 06:39:20 -05:00
Jeremy Long
aff85cbfb8 minor update to the author JavaDoc
Former-commit-id: f3db304c7e14d6eff52c753bf687ccc245842432
2014-03-01 05:47:26 -05:00
Jeremy Long
c0ce4523fa minor formating change
Former-commit-id: 928f33f28756b3f3a856df4e8f1b6627d65a681b
2014-03-01 05:47:10 -05:00
Will Stranathan
65f8b3978d Added colezlaw to the developers list
Former-commit-id: 13623eee87aee8f78ced6716b45bfe7e2764111a
2014-02-28 13:14:54 -05:00
Jeremy Long
80ca3e114e updated deletion and logging of temporary files to resolve issue #73
Former-commit-id: 7acc91ef84a01b021c5d619602b8a0a7f656947a
2014-02-28 06:52:51 -05:00
Jeremy Long
330e803675 refactored the creation of the HttpUrlConnection objects to a factory
Former-commit-id: a4532bd8195b69cfe274d2dc58268db9010f5cdd
2014-02-28 06:25:08 -05:00
Jeremy Long
337e9ac3ef removed my previous "correction" for the if statement...
Former-commit-id: 1ff71f2853dd981a9d4d5c48906853425a9fc2b6
2014-02-28 06:03:26 -05:00
Jeremy Long
dfb78788f9 minor correction to an if statement that missed the explicit check against null
Former-commit-id: 4ec16d7207660799935f692ea761e03599115093
2014-02-28 05:52:49 -05:00
Will Stranathan
2dc560f583 Fixes issue 75
Changed getConnection to public and made one which makes using the proxy optional, even if configured

Added a preflight request and proxy logic


Former-commit-id: 3d1225ec0882dfc0efb043c5a70ba1c20639d8f7
2014-02-26 22:19:13 -05:00
Will Stranathan
7355400548 Merge remote-tracking branch 'upstream/master'
Former-commit-id: b066078bf0df0365d850ea71e2434a5376b9cd16
2014-02-26 20:45:30 -05:00
Jeremy Long
50b4630436 changed log level to hide extraction of Grok Assembly from users
Former-commit-id: dd94cf7d64ecff45da7b172dcd11d690debcda10
2014-02-23 08:45:04 -05:00
Jeremy Long
132d43f999 re-wrote the retrieval of the vendor product list to use a generic pair and completely encapsulate all sql objects in CveDB
Former-commit-id: f801fa86d08c5ba7c20d4c7067d4761d254006c9
2014-02-23 08:42:16 -05:00
Jeremy Long
0627f20f5e pmd corrections - unused exceptions
Former-commit-id: 338d8220bf6f8bf20d45599f1bc056f5ee103966
2014-02-23 07:45:43 -05:00
Jeremy Long
40f329512b checkstyle corrections
Former-commit-id: 8c116dc61d7bd5e5f18ee106fe82c663570eecf9
2014-02-23 07:42:56 -05:00
Jeremy Long
c196c08ada updated error messages
Former-commit-id: 88fdd713faf6c53e65540574c9d6140d57f3a7f9
2014-02-22 17:43:12 -05:00
Jeremy Long
8f1e0d57bf ensured engine.cleanup() is now being called
Former-commit-id: 89e6222d55cec95327a5a963fee739076ae7673f
2014-02-22 16:46:59 -05:00
Jeremy Long
c30c455a9f updated log levels when logging exceptions
Former-commit-id: 7686e0bb2ae8d6910d741869ed2aaa04c7a39213
2014-02-22 15:50:20 -05:00
Jeremy Long
cd0e8e1c6b updated so compilation/tests work on linux
Former-commit-id: 695390afcd3382af948152e2ece52c341f904b89
2014-02-22 15:30:50 -05:00
Jeremy Long
cbeb91f9a9 made initialize and cleanup synchronized so we can avoid un-needed duplicate initialization/cleanup
Former-commit-id: 49daed67275310f5949d589956c519c6270fd96f
2014-02-22 09:25:52 -05:00
Jeremy Long
a3830989ba re-structured the database connection factory
Former-commit-id: 5911d108096031506f15f78f758ee6f7b1b2b65f
2014-02-22 08:43:42 -05:00
Jeremy Long
86427e2042 added the AssemblyAnalylzer to the list of analyzer services
Former-commit-id: a9cdd5751609e05a2feaf2880d9669ca95737ad4
2014-02-19 19:41:24 -05:00
Jeremy Long
8f079de0aa added temporary hack to allow compilation on linux systems - H2 fails to load with AUTO_SERVER=true
Former-commit-id: 14fe96975ada5c5de340614f9fc489e827dd9844
2014-02-18 19:38:13 -05:00
Jeremy Long
651727c697 fix for issue #72
Former-commit-id: b455cad50aa9db54d14a9c2ccc1588451891fc13
2014-02-18 19:36:20 -05:00
Will Stranathan
5c55f4d4bb Ignore the test if we can't run GrokAssembly.exe
Former-commit-id: fb452ac566ea176186b23f94ab238318585cbd16
2014-02-15 15:58:44 -05:00
Jeremy Long
c8502d3b7b updates to resolve issue #71 - added configuration for cve urls to the ant task
Former-commit-id: b343c1c88845a66c3eb12f92e4ff9e468fd82363
2014-02-15 08:32:20 -05:00
Jeremy Long
22e3b9b544 updates to resolve issue #71 - added configuration for cve urls
Former-commit-id: 4074c6f54b8813166cbc24b8f51b2ab00a861f50
2014-02-15 07:50:00 -05:00
Jeremy Long
f16db8298b removed old cwe data file that is not used
Former-commit-id: 0ba5a30678105479c451ed208b54eb1fe0adfbf9
2014-02-14 22:21:28 -05:00
Jeremy Long
cf4a32b260 updated test case to build serialized hashmap for CWE version 2.5 for issue #68
Former-commit-id: 9f39e0eb71be6814ddf2f172a9f2f820b43dc1ef
2014-02-14 22:15:13 -05:00
Jeremy Long
b8d83c37d9 updated to CWE version 2.5 to close issue #68
Former-commit-id: 6644bd106156498a7ca97a43c6b55b084c924f1b
2014-02-14 22:14:33 -05:00
Jeremy Long
617f6bb8ef removed unused property
Former-commit-id: bfde978664333a2fd95175244aa477dde79b7874
2014-02-14 22:09:34 -05:00
Jeremy Long
0c9f2bf5d2 added additional logging to try and solve issue #49
Former-commit-id: d037f74eb5a9ddabfb6ce202d96870f2b7277c21
2014-02-14 08:20:26 -05:00
Jeremy Long
eb9afecd66 Merge branch 'master' of github.com:hgomez/DependencyCheck into hgomez-master
Former-commit-id: 5adc3fb455a6f15209642354a80812771ca0d441
2014-02-14 08:05:33 -05:00
Jeremy Long
2c1f2ae589 commented out unused properties
Former-commit-id: fbe2c12b8bcaa191284561906a1685493be6f563
2014-02-14 08:02:50 -05:00
Henri Gomez
9387b09a19 tipo
Former-commit-id: 995ba8bbdbab4f05148d9460f406837fd6218024
2014-02-14 12:16:17 +01:00
Henri Gomez
f17f04f00a Skipped Scope parametized
Former-commit-id: 562654d1679b4a6ad59fd5f93c3f1d2a75d8e32b
2014-02-14 12:14:06 +01:00
Jeremy Long
07f0192088 patch for issue #34 - hibernate3.jar no longer reports cpe:/a:jboss:jboss
Former-commit-id: 31cb24ff0052908bda1878057b5d9669e886e70b
2014-02-13 20:51:54 -05:00
Jeremy Long
0fd19f0de8 added hibernate3.jar to test resources to test and fix issue #34
Former-commit-id: c2a930c0e5f0d478698b7f91f5b6e0fa27901be1
2014-02-13 20:31:09 -05:00
Jeremy Long
e954fa6478 fixes for issue #63 and issue #65
Former-commit-id: 40e4da9fe17999748dd94ee91a1c9451576cab75
2014-02-13 20:20:19 -05:00
Jeremy Long
a0fdfc0f39 Merge branch 'master' of github.com:hgomez/DependencyCheck into hgomez-master
Former-commit-id: 18b064ea5b733ba4f7d42f59a4c69472be1d3389
2014-02-13 06:08:33 -05:00
Jeremy Long
57a4372b65 updated getParentLogger to compile under 1.6 for issue #62
Former-commit-id: 4e38bce6f17a87b663e9bcf98bfe727174b4397a
2014-02-11 09:18:41 -05:00
Henri Gomez
c11cb38269 Add support for extra extensions provided externally
Former-commit-id: c827feb563cde449090dade2b17bfa6709df37be
2014-02-11 14:05:26 +01:00
Henri Gomez
e4fd446946 No need to redefined Test Scope String
Former-commit-id: 84b8c35340e92ac42805ccb8411648bec4b1f09c
2014-02-11 12:54:26 +01:00
Henri Gomez
714d8ac3ba Artifact with scope Provided and Runtime should be excluded too
Former-commit-id: 018e2bc3ab950e6543f945377b6f492d504d2e0c
2014-02-11 12:51:59 +01:00
jeremylong
f09293e077 corrected link for issue #59
Former-commit-id: fd8e3c933f4d92118d1b8bb4569f101d7d19c74f
2014-02-10 19:53:17 -05:00
Jeremy Long
389e8bc325 added dependencies to a testAll profile for issue #34
Former-commit-id: 103f0e62cb0a1c4fb5ad49fed85ceb77b11455c0
2014-02-08 23:54:11 -05:00
Jeremy Long
367f763ce5 updated how the description is processsed from the manifest to fix issue #34 for wss4j-1.5.7.jar
Former-commit-id: 5787236ee3e5af407cf5654aeb2a4fe47ecc02c0
2014-02-08 23:53:47 -05:00
Jeremy Long
3febed82f1 added build-id to specific items in the manifest to patch dependencies like batli-util.jar in issue #34
Former-commit-id: 1dfd295cc9c9fa18ab2d271c2a51f4acd98f6421
2014-02-08 22:37:11 -05:00
Jeremy Long
8a6371fe68 applied patch for m-core CPE per issue #34 - xstreamcore
Former-commit-id: f99b098bdbc1eb43ea885d479f59e0cf998c3e92
2014-02-08 22:35:24 -05:00
Jeremy Long
93937feb13 noop
Former-commit-id: 1905d3ed2c839433282bb5a10f0ecc558e2cca39
2014-02-08 22:05:08 -05:00
Jeremy Long
21e62d8597 removed analysisExceptions from the dependency object, instead we are logging the exception for issue #46
Former-commit-id: 08ea1be2a9c1b3de7ddb3ffcb7ae988e81a53a17
2014-02-08 12:35:53 -05:00
Jeremy Long
88e8019858 removed analysisExceptions for issue #46
Former-commit-id: 9132fc031523d3b132ce23b3c3fc1ce50cb74f1b
2014-02-08 12:24:25 -05:00
Jeremy Long
cbe562a204 update to make failure more verbose for issue #57
Former-commit-id: d7ca87612e07098bedaf853e13f4baf8af4e32eb
2014-02-08 12:09:58 -05:00
Jeremy Long
4dc40389a3 updated cobertura version and configuration
Former-commit-id: 9321952919d27087e50493a3d22b66d9e4e98939
2014-02-08 11:57:52 -05:00
Jeremy Long
0552f10c38 moved exceptions to their own package to avoid clutter in the org.owasp.dependencycheck.analyzer package
Former-commit-id: 999c32643e83ca67bc32651373a1d8eb56f74344
2014-02-02 07:13:53 -05:00
Will Stranathan
c9ac7401e8 Refactored the test run of GrokAssembly to avoid double-closing
Former-commit-id: 8279c075543071cdebf9c1433b6e0b1b0366ed59
2014-02-01 09:33:47 -05:00
Jeremy Long
60625b9978 Changed from using the ConditionalIgnoreRule to using junit's core assumeFalse
Former-commit-id: caf69b8721d749595459b18f92a75d3a0964e7fa
2014-02-01 09:11:52 -05:00
Jeremy Long
b4b53cfa4c updated test case using an invalid mono path so that it does not run on Windows
Former-commit-id: d6a822f2ce18d9f163839d5d1108cbac06a04516
2014-02-01 08:49:00 -05:00
Jeremy Long
f1e1d67f4e added conditional ignore for JUnit tests
Former-commit-id: 786a9bf2b0886c05fef79eadb39af312fabff893
2014-02-01 08:48:14 -05:00
Jeremy Long
982641752f explicitly closed the FileOutputStream after writting the assembly
Former-commit-id: 075cb26447cd678c7583e7273cfafc54e568b110
2014-02-01 08:20:24 -05:00
Jeremy Long
ba66cbbc95 Merge branch 'grokassembly-work' of https://github.com/colezlaw/DependencyCheck
Former-commit-id: 92ab9fac4710a9bcd79c7274f4046af3b60eb0e6
2014-02-01 08:10:22 -05:00
Will Stranathan
750d13a300 Fixed merge conflicts
Former-commit-id: d02a369299de3102bd900d12f8f1c196760297c2
2014-01-31 21:52:08 -05:00
Will Stranathan
3c69a87fc2 Adding the AssemblyAnalyzer to analyze .NET assemblies
Changed the author on a few files

Added GrokAssembly.exe for grokking assemblies

First revision of the assembly analyzer

Added ability to configure where mono is located


Former-commit-id: a5da71bc9103331d67994bab9e102315f26641e4
2014-01-31 21:44:28 -05:00
Jeremy Long
dbaddab07b updated to use markdown syntax rather then HTML (fixing vm/md interaction)
Former-commit-id: bf026d07068e01f05f8385e6b6eae4c90c612500
2014-01-31 06:15:37 -05:00
Jeremy Long
1d58811680 updated version to 1.1.2-SNAPSHOT
Former-commit-id: cf04ee675be56ea7990299ca58e4dcaeb0db01e9
2014-01-31 05:38:29 -05:00
Jeremy Long
4d78fe9ca4 version 1.1.1
Former-commit-id: 7e101d5bb64d73a33de423c8ac2b0bd8dc1f1c58
2014-01-30 06:23:34 -05:00
Jeremy Long
56d3082696 test cases for javascript analyzer
Former-commit-id: 35f727643d61b382a32ca7727b1e11b2993a2b43
2014-01-29 20:07:48 -05:00
Jeremy Long
8f573aba2f removed test case for issue #51 - need more information as I cannot get the exception to be thrown
Former-commit-id: 9cc6533837ee499ecedec872d548a6904520ca2a
2014-01-29 06:14:30 -05:00
Jeremy Long
96633360d0 disabled nexus analyzer for ArchiveAnalyzer tests
Former-commit-id: 24680f001da27228bdce1982e8829e0c396c32a9
2014-01-29 05:58:19 -05:00
Jeremy Long
8ae7935cee updated compareTo test to use cpe:/a:yahoo:toolbar:3.1.0.20130813024103 to test the fix for issue #53
Former-commit-id: 6dfb55599122507df4503af7ad8c62d4f8a10cf3
2014-01-29 05:55:28 -05:00
Jeremy Long
68e860baad Converted integer.compareTo to long.compareTo and added a fall back of string compareTo to fix issue #53
Former-commit-id: 7921056eea0467199e7b81dbdabb3fe8cd4fa0aa
2014-01-29 05:45:53 -05:00
Jeremy Long
38ead3133f patched issue #52 - corrected the @parameter for the connectionString field
Former-commit-id: bdd6225f8241211d7a95243b8904e1ed981ab0e8
2014-01-28 19:48:35 -05:00
Will Stranathan
553d1f85c4 First revision of the assembly analyzer
Former-commit-id: f42b163a91f8e0d80bb94b8976d98d5bc4537d4a
2014-01-28 19:23:13 -05:00
Will Stranathan
d9a985ff38 Added GrokAssembly.exe for grokking assemblies
Former-commit-id: a5731df40aaea0b93234f9654e680c8514d4eff3
2014-01-28 19:21:54 -05:00
Will Stranathan
d3a2d2b248 Changed the author on a few files
Former-commit-id: a582d3c248ff2bf886e591dd0900b85d251f0499
2014-01-28 17:10:48 -05:00
Jeremy Long
575b8e5f62 test data for JavaScript Analyzer
Former-commit-id: 74e81d8a232c0f08528ccf1d3b7e682ab68351a8
2014-01-28 05:25:54 -05:00
Jeremy Long
37ff924c74 added getActualFile() to return a file reference
Former-commit-id: 8345595a53974056e692888cda5fb37adb159fd5
2014-01-28 05:24:54 -05:00
Jeremy Long
7ccbc4c77c Merge branch 'nuspec' of https://github.com/colezlaw/DependencyCheck into colezlaw-nuspec
Former-commit-id: 75cf8bb16a7e96614eadbe9215e426d31d624c61
2014-01-27 06:12:15 -05:00
Jeremy Long
27b7a60a8d Merge branch 'master' of github.com:jeremylong/DependencyCheck
Former-commit-id: a00b3326187f58300caeb2c4ed3e3f0ff5019bd1
2014-01-27 06:11:14 -05:00
Jeremy Long
dca731ffb8 updated version to 1.1.1-SNAPSHOT
Former-commit-id: 44a7c9e701bb0b77f44b66bc907e5ef0e2872d34
2014-01-27 06:10:04 -05:00
Will Stranathan
0d56de99a7 Converted to XPath instead of SAX
Former-commit-id: 347fab1b558d21c861bebc90e83f5906b025d6c5
2014-01-26 22:11:11 -05:00
Steve Springett
ac5e11d327 Update index.md
Former-commit-id: 0e9eae696ece692884605364b54dd274bf336280
2014-01-26 16:04:50 -06:00
Steve Springett
9d315b0ff9 Update index.md
Former-commit-id: 545194f3b7f5c4eac87ba9efbc572ee227207b3c
2014-01-26 16:04:26 -06:00
Steve Springett
038fe84498 Update README.md
Synched file with version on jenkins-ci

Former-commit-id: 75226b362d729ba057087ab112cf0a5f63f17355
2014-01-26 16:03:11 -06:00
Jeremy Long
4fd59f2a19 fixed bug in markdown velocity combo - velocity comments are the same as section headers (##) in markdown
Former-commit-id: 7c212d61702ede1aa46ca06a7cf4db1ef7858b73
2014-01-26 11:07:42 -05:00
Jeremy Long
f77c3bfdf7 updated license to apache 2.0
Former-commit-id: 5fb30c8b2ef1ac701a25b125c0af2b3b1c5366a9
2014-01-26 10:49:43 -05:00
Jeremy Long
dc7d941316 version 1.1.0
Former-commit-id: eb10444fba445f89d8d788ecea4afd45e5ae48c5
2014-01-26 10:39:18 -05:00
Jeremy Long
433cc1e32c updated error messages
Former-commit-id: 2b1c5e7560f30d1aaf2215bdc8997961a637d083
2014-01-26 09:02:08 -05:00
Jeremy Long
c066a03683 upated site documentation with new configuration options
Former-commit-id: 45cf2c9c581c0eef2ef0fd6ba4d70b7b01191019
2014-01-26 07:04:53 -05:00
Jeremy Long
562a8036bc updated site documentation with new command line arguments
Former-commit-id: 8a71639e0513a46249bdfa63fe6f7c991dd09c12
2014-01-26 07:04:25 -05:00
Jeremy Long
53ac703f09 updated site documentation with new configuration options
Former-commit-id: 9d5b228f694707daf07a3b5da95f92d7d4044f23
2014-01-26 07:04:01 -05:00
Jeremy Long
a2891d97d0 reduced number of years of NVD CVE data are downloaded during integration tests
Former-commit-id: c6a0dc095982d432b10e6bdb053b7845e433bd14
2014-01-26 07:03:17 -05:00
Jeremy Long
2bd5169f20 corrected test case
Former-commit-id: 9b678d7c08b3b579bc4b906a42cbf5a2a91bc56b
2014-01-26 07:01:23 -05:00
Jeremy Long
b3fd6d8c92 fixed checkstyle complaints
Former-commit-id: f70d63d6d79672ff7dbab2a632a4416b8ebf9932
2014-01-25 16:03:15 -05:00
Jeremy Long
cea281b1d3 removed unused local variable
Former-commit-id: e8f50ee25c4c3eb847bf8cf3193658e910f7642e
2014-01-25 16:00:28 -05:00
Will Stranathan
e85b2a8961 Updated javadocs
Former-commit-id: 95ccb83a8808430031e13045026447a7ec88634f
2014-01-25 11:27:28 -05:00
Jeremy Long
77b879d6bb changed nested ifs to avoid checkstyle complaint
Former-commit-id: ed48131125733c56cf48a817425abdb2ca117ef6
2014-01-25 11:06:45 -05:00
Jeremy Long
9de3ae5cf2 made variable final - checkstyle
Former-commit-id: 1834255b8a05b21e2b55777f183be09d47a50b0f
2014-01-25 11:06:09 -05:00
Jeremy Long
b3a0dc3506 commented out dead/useless code
Former-commit-id: 65569e27e22cab96c8f223a732aca2a4d841e71e
2014-01-25 11:05:46 -05:00
Jeremy Long
383731da4d made variable final - checkstyle
Former-commit-id: c2a162bfe81e865645bb61f591850b4b6074ed1c
2014-01-25 11:05:17 -05:00
Jeremy Long
67abb42652 made variable final - checkstyle
Former-commit-id: 5a892d6090e5d577ee836580f0c84c69de25c3cb
2014-01-25 11:04:49 -05:00
Jeremy Long
edcc24bc12 checkstyle correction (line length)
Former-commit-id: a714f369e530b0511fe56f8d145ee664529632b9
2014-01-25 11:04:20 -05:00
Jeremy Long
a6836cab15 updated javadoc - checkstyle
Former-commit-id: a22973e158a4dfcc99e97d020e003811a4192bd1
2014-01-25 11:03:28 -05:00
Jeremy Long
8f985737b0 fixed casing on variable - checkstyle
Former-commit-id: 5ca2786ba5a1c42e670f0d352a92f7789b1ddc60
2014-01-25 11:03:09 -05:00
Jeremy Long
6e2f102177 updated header to check for maven instead of core
Former-commit-id: ea773975d79bf4669a359cbd7d9f2d4bb86dc690
2014-01-25 11:02:27 -05:00
Jeremy Long
46a768339a updated header to check for cli instead of core
Former-commit-id: b35670d2c988440aa9c89075a59d04be16e6b083
2014-01-25 11:02:10 -05:00
Jeremy Long
f1dbbd62e9 updated header to check for ant intead of core
Former-commit-id: cb6514a027e839a4f42cecb6e3f0c1b5cdbd0403
2014-01-25 11:01:55 -05:00
Jeremy Long
8bb94889e0 updated test to use updated constructor
Former-commit-id: 8437442dec0c400bc5adeb391dd8a7b58f0b981b
2014-01-25 07:05:00 -05:00
Jeremy Long
da38e4e00c minor changes to comply with checkstyle
Former-commit-id: d4c2b3c4903fafae577a018191d061fe8c079894
2014-01-25 07:02:29 -05:00
Jeremy Long
d8e8156b1c minor changes to comply with checkstyle
Former-commit-id: a6bbfb32f741ec60a9c45c89c8a70f4260622484
2014-01-25 07:02:19 -05:00
Jeremy Long
77a1b18673 minor changes to comply with checkstyle
Former-commit-id: fd4cf6e784b842c6f07e9d971b9ce3b4c7b5732b
2014-01-25 07:02:08 -05:00
Jeremy Long
9abd51f318 removed deprecated constructor
Former-commit-id: 1df959763cbe32fe7a820c59ed3280770ab98be0
2014-01-25 07:01:46 -05:00
Jeremy Long
c7d51a29ac minor variable name change to comply with checkstyle
Former-commit-id: 4ad1e6d6ce2d9bc52ff4af7a281139ccb5068e2c
2014-01-25 06:57:18 -05:00
Jeremy Long
ac453ef32a minor checkstyle corrections
Former-commit-id: 642c6226ad3c4e88816357023a771fbec02fc2b3
2014-01-25 06:54:32 -05:00
Jeremy Long
db25493c04 javadoc corrections
Former-commit-id: 7dead0cee614e4f1e8f8b04fd8852d06710c0615
2014-01-25 06:46:40 -05:00
Jeremy Long
8d4b4d3cd9 removed test code
Former-commit-id: 50f96d8656dce9caf40a2f139046de96700aa8b5
2014-01-25 06:43:21 -05:00
Jeremy Long
b05f13d82b added javadoc comments and corrected a typo in pom.xml file names
Former-commit-id: a066b9343c8895ad2ee7b7b419fdb0d6dd0d8cfe
2014-01-25 06:42:45 -05:00
Jeremy Long
438622d450 checkstyle correction and removed the deprecated constructor
Former-commit-id: 02e0f7555ce43b2b5b161ba0536182f72a9561b2
2014-01-25 06:42:03 -05:00
Jeremy Long
4f79efedc9 moved the "data" option to the advanced options
Former-commit-id: 968ebcef8a9b57fc94e0c9ddaf212c24aa474441
2014-01-25 06:14:21 -05:00
Jeremy Long
845fa89d0f updated CLI arguments for issue #48 and issue #33
Former-commit-id: 58e6b9042814d9c76c51b7f0b88b6ec7ef50b938
2014-01-25 06:09:59 -05:00
Jeremy Long
29768576c8 updated CLI to have advanced options, including setting an external DB Connection String for issue #33, in support of issue #48
Former-commit-id: 09e0ee85e07aa4fc2ecf1c04cb46621b173d09b3
2014-01-25 06:09:24 -05:00
Jeremy Long
4e659d799d updated configuration for issue #48
Former-commit-id: 216f09b8e720d692bb5f6b64989d911e51ebc8f9
2014-01-24 19:04:20 -05:00
Jeremy Long
10596bcb54 updated configuration for issue #48
Former-commit-id: 3c1b2802c76761dc206d889edb122cc61eb01a18
2014-01-24 19:04:03 -05:00
Jeremy Long
5ac6f4f7b3 added nexus configuration options
Former-commit-id: a886b4099635bc272b6a51dff687b584870bcc45
2014-01-24 18:51:20 -05:00
Jeremy Long
957bb46e5c added nexus configuration options
Former-commit-id: 1d96659cf64c10cf92c9db1b5be4a50685e79eae
2014-01-24 18:51:07 -05:00
Jeremy Long
1042a537c1 added nexus configuration options
Former-commit-id: a1c80659cd5c8879665504a016d772b95f117c4e
2014-01-24 18:50:54 -05:00
Jeremy Long
2159b4b691 added nexus configuration options
Former-commit-id: b99c1ee21ecd564e5da591a53651768d8206a507
2014-01-24 18:50:32 -05:00
Jeremy Long
ce48e07e18 Merge branch 'master' of https://github.com/colezlaw/DependencyCheck into colezlaw-master
Former-commit-id: 9b311277bde8fc8e0d9c8ff10c8b2f2a6abf5c84
2014-01-24 17:35:54 -05:00
Will Stranathan
48dded02c6 Added the NuspecAnalyzer to the list of analyzers
Former-commit-id: 615a6216cb3b484cac1dca4cc6b06f80389c2e7a
2014-01-24 07:11:18 -05:00
Will Stranathan
b7d77042bf Initial checkin of an analyzer which gets info from .nuspec files
Former-commit-id: efc3b60b2ebf372c6bf1697b87cbfd0b9422b07f
2014-01-24 07:10:53 -05:00
Will Stranathan
b4ea2569e3 Added nupkg to the list of supported ZIP-like extensions
Former-commit-id: 3f58b7c314f7e5a837da878602c44b19721995a1
2014-01-24 07:09:45 -05:00
Jeremy Long
42a9f864eb bug fixes for issue #49
Former-commit-id: a5c7236f6d1663dc3004161d6e9e1d68a7bc6f06
2014-01-23 21:25:59 -05:00
Jeremy Long
22e6de19c4 added additional verbose logging
Former-commit-id: 6b0323e92e2bed5d584ce49afb90c1c5ea684ded
2014-01-23 21:02:49 -05:00
Jeremy Long
572a65d661 added the DRIVER_NAME to default to org.h2.Driver
Former-commit-id: 2d9462d8e1b6b01dc53044962463d103234e1d38
2014-01-23 21:02:10 -05:00
Will Stranathan
108ecb7e12 Merge remote-tracking branch 'upstream/master'
Former-commit-id: 707e6e699e0a0a51bd4d808a0fab777684e70d32
2014-01-23 20:42:42 -05:00
Steve Springett
9c87d61528 Junit fix for non-Windows platforms
Former-commit-id: 77a32fe556cffd6625636f2c4033c82c3450595e
2014-01-22 16:43:08 -06:00
Will Stranathan
dd903dd7e5 Change confidence on filename version when it's just a simple integer
Former-commit-id: b22d85dfcec9beb854b9bbf5160d89f1c2f66512
2014-01-22 12:08:06 -05:00
jeremylong
ae13cb2513 updated the description
Former-commit-id: e03aceb652df78cda5ef03e2790306627eba35d4
2014-01-22 09:54:57 -05:00
Jeremy Long
40f47ccd4e updated to remove exception details per issue #46
Former-commit-id: 2482c797c7cc0100271488a42c17833c4f0e2f95
2014-01-22 07:43:08 -05:00
Jeremy Long
c344cd2a2b Updated logging
Former-commit-id: fd93345867b29dde392dbb888b2a2d4e072e91ff
2014-01-21 06:58:05 -05:00
Jeremy Long
7601af24f0 updated to fix issue #44
Former-commit-id: 9245e70ef4ecf4e78362a0824a1557685c6cddb7
2014-01-20 19:44:08 -05:00
Jeremy Long
0197eb0d08 noop
Former-commit-id: 335aebcb825923cc50de38d6bb38ee699dcb47b7
2014-01-20 17:39:04 -05:00
Jeremy Long
a248967ae8 added support for uber jars; pom.xml files are extracted and added as their own dependencies
Former-commit-id: 6acf8955c413f0b4d2d2c54886309dda3fc3d429
2014-01-20 17:38:47 -05:00
Jeremy Long
a4beb58b54 included pom.xml files in suppression analysis as the Jar analyzer may add these as part of fix for issue #11
Former-commit-id: 5bb2205d7f2dd1e7b6decf3a29110b6135bbb367
2014-01-20 17:37:43 -05:00
Jeremy Long
922cc942a4 added test cases for the false positive analyzer
Former-commit-id: dcd6d0ab1bfc6a8eed26d87c1636304ffbeba996
2014-01-20 17:36:48 -05:00
Jeremy Long
f11b086381 added uber jar for testing issue #11
Former-commit-id: 105d3e369ab781c0181ba1a0770c48003d354146
2014-01-20 13:21:45 -05:00
Jeremy Long
e5eab69f65 updated db schema version to 2.9
Former-commit-id: 88a4e319a10e69987f71ff0900918b51dd9a76e8
2014-01-20 13:17:47 -05:00
Jeremy Long
961884ef12 updated db schema version to 2.9
Former-commit-id: 5f25b92cc794e6b51a5887b17dad7a9cb4b4cc03
2014-01-20 13:17:40 -05:00
Jeremy Long
5dbbf643a4 ensured subdirectories are built while extracting tar files - issue #43
Former-commit-id: 0335a6232c15c044a627ac0d23c37ad6fd8a9d07
2014-01-20 12:48:47 -05:00
Jeremy Long
f937458c25 updated test case for tar file from issue #43
Former-commit-id: 9f8d207ab9c6f9f5dfc9c458d9c75351cc2c8c10
2014-01-20 12:47:54 -05:00
Jeremy Long
c617e62a16 added new test tar file for issue #43
Former-commit-id: f6e14b3f7d69e793cdb8316d62366f33ea82e097
2014-01-20 12:47:28 -05:00
Jeremy Long
343c886d54 minor formating changes and implemented fix for issue #20
Former-commit-id: 850375750c1c75d218a715eb64bdb1f51e15a12b
2014-01-20 08:21:59 -05:00
Jeremy Long
824d85b2a0 added a new field to keep track of the vulnerable software that caused the match - part of the patch for issue 20
Former-commit-id: a5fa6313b9ecfb2d67ba4da25a2f5e863b184b51
2014-01-20 08:21:12 -05:00
Jeremy Long
0289fc5ce2 improved performance and made a change to support fixing issue #20
Former-commit-id: 4f7f9692a2bec9c2b6cc31aab7c9e175a8649b7f
2014-01-20 08:20:21 -05:00
Jeremy Long
914a886bfe added javancss-maven-plugin
Former-commit-id: 6ed186ccdb29da4ed77c19823c4a066dcbaf3a87
2014-01-19 15:09:27 -05:00
Jeremy Long
f65c30e975 minor update
Former-commit-id: ba9c6b41a789c53f5b5eb049c6f1fd2528045dea
2014-01-19 10:26:03 -05:00
Jeremy Long
48ac0049aa added maven identifier to related dependencies
Former-commit-id: 232ebb6afe8e9c5c07482c642e1ab9dee9b26e81
2014-01-19 09:40:16 -05:00
Jeremy Long
fea1117eae enabled nexus analyzer in dev
Former-commit-id: 99b5a5ce20c1c26bb0eba41c68d296a8cb37a0b1
2014-01-19 09:39:49 -05:00
Jeremy Long
ace1a060db updated ignores during Jekyll site testing
Former-commit-id: ae244ade9664cb739e38a562628d8bb5d8603d1e
2014-01-18 16:57:05 -05:00
Jeremy Long
be6ad9c5e3 add sample report and project presentation to the site
Former-commit-id: 630dd66ea56b103694e287e04827ef7a404f85a2
2014-01-18 16:14:53 -05:00
Jeremy Long
b2d51a2a9b Added Project Presentation to site (pdf)
Former-commit-id: d97c02a3f1f51054fce71aa42b357fdbc4c1b727
2014-01-18 16:14:24 -05:00
Jeremy Long
74411d8656 Added Project Presentation to site (pptx)
Former-commit-id: 0b155a1a69525031118a0316cd53707e0bc9b8bc
2014-01-18 16:14:13 -05:00
Jeremy Long
332392b7ba Added sample report to site
Former-commit-id: 83a931b4cbdb541d1aa76ced0d0a0d620fa16be6
2014-01-18 16:13:39 -05:00
Jeremy Long
e441414854 Updated so that only CPE Identifiers are used when "bundeling" dependencies
Former-commit-id: 165356d02b944a5e636cf07dbf05534eda9e2b6d
2014-01-18 09:06:20 -05:00
Jeremy Long
4b1d79e7f7 updated verbose logging
Former-commit-id: 218f2e64933482f04bd9ab00d5d6095060671a38
2014-01-18 08:09:27 -05:00
Jeremy Long
d7889e27e5 reorganized things, overall improvements to the report
Former-commit-id: 23f136574eb7c8c2abec432450f310bfb2bdf1b1
2014-01-17 22:51:13 -05:00
Jeremy Long
e65a68ce78 corrected position of the suppression modal dialog box to prevent scrolling
Former-commit-id: e7b5194a406d15b3871ad480da7a1b9d894e3868
2014-01-17 21:36:25 -05:00
Jeremy Long
990f6d3730 removed unused concurrency package
Former-commit-id: c2162dd0f9144400b464535ac4104c98cf6f1da6
2014-01-17 21:23:38 -05:00
Jeremy Long
84a62b3707 added additional info logging
Former-commit-id: bd2d360dd28f900430666b99d01ee9d0deb8b7c7
2014-01-17 21:23:11 -05:00
Jeremy Long
e18789b8d3 added identifier confidence for issue #35
Former-commit-id: 9ce9761fa4cd842e6141973bf33e229bea208982
2014-01-17 21:05:08 -05:00
Jeremy Long
cb7be0e460 made identifier type required and identifier confidence optional
Former-commit-id: 16255779baed3d2e9ba2bb6013b355f7d42a7bd3
2014-01-17 20:40:08 -05:00
Jeremy Long
df825d0109 added identifier confidence to schema for issue #35
Former-commit-id: d6778b57ce1dde2cda67844160e0461a7cf143cc
2014-01-17 20:36:36 -05:00
Jeremy Long
ce4baecb4b added Identifier confidence for issue #35, added @Override annotations, and updated javadoc a bit
Former-commit-id: b4374d55a0e5cb0bfbf424d9465e1376eec198fa
2014-01-17 20:33:41 -05:00
Jeremy Long
48907517e9 added an additional addIdentfier to support identifier confidence for issue #35
Former-commit-id: c36f85a13598ac9683db078c93ac495bf629f443
2014-01-17 20:32:30 -05:00
Jeremy Long
dde1d96058 set identifier confidence on CPE entries
Former-commit-id: 1b50168ed2d1ae4f426cc703cb099c514b80d9e9
2014-01-17 20:22:57 -05:00
Jeremy Long
b2f688a032 added Identifier confidence for issue #35
Former-commit-id: d5203193264c25d3a24b83cd63779fd2e4b42b36
2014-01-17 20:22:19 -05:00
Jeremy Long
b4664f85f0 moved the Confidence enumeration out of the Evidence object
Former-commit-id: 77f937f2b17201b2764259ef6089f848fe8f3c8b
2014-01-17 20:11:06 -05:00
Jeremy Long
2725d32c33 moved the Confidence enumeration out of the Evidence object
Former-commit-id: b7948c1c6a542d1777347974983abc00c78a6102
2014-01-17 20:10:45 -05:00
Jeremy Long
c9f80db3c6 added test cases for DependencyBudnlingAnalyzer
Former-commit-id: bcfbca8c27a30f12e9bf59d4a44e37a5e19f8965
2014-01-17 19:43:45 -05:00
Jeremy Long
cb53ddf8a8 updated to fix issue #31
Former-commit-id: 569d1aee14d0f51a990e0cc059dce5aa500f10b2
2014-01-17 19:43:01 -05:00
Jeremy Long
fdca41a71b ensured test properties files are filtered
Former-commit-id: 2705516b382e224d33313f519fa2849728876ddd
2014-01-17 19:41:43 -05:00
Jeremy Long
d59ceee0f7 minor javadoc update
Former-commit-id: 3243cc9392e479932731721fd8cf3dc8e14f0f0f
2014-01-17 17:45:37 -05:00
Jeremy Long
38b08835c2 fixed Steve's role
Former-commit-id: 44b9c77d049b14dabd9f0db58c428c9632044dfd
2014-01-17 17:41:57 -05:00
Jeremy Long
dbbdb1bcbe updated to add scan information
Former-commit-id: b73ea598f34cbdbaf6d8f97ada6624875232f1da
2014-01-17 14:56:39 -05:00
Jeremy Long
b408e5d0d3 removed BOM
Former-commit-id: 05f2159cd22c4ebe78f97f88044c74502534cdb6
2014-01-17 14:20:43 -05:00
Jeremy Long
30f00508f5 updated mojo to support report generation for issue #32
Former-commit-id: f3c4cfb9e7a6add6ec9d2e69a11a60bab3f4055e
2014-01-17 14:14:39 -05:00
Jeremy Long
75bb6aa966 updated cli to support report generation for issue #32
Former-commit-id: b75c45cfec5c9f294dc410258cd0beebb2acf512
2014-01-17 14:14:22 -05:00
Jeremy Long
eff206fb2b updated task to support report generation for issue #32
Former-commit-id: de760da2ca783d4ccb0e15da776c6fa97a333ff7
2014-01-17 14:14:02 -05:00
Jeremy Long
98da419c96 updated schema for issue #32
Former-commit-id: 126eab3735ac4151b3c6b72bec4ce0f648926054
2014-01-17 14:10:07 -05:00
Jeremy Long
efe226045d added additional info to XML for issue #32
Former-commit-id: 7a107dd9388610098fff40a5e4b85eeea49d3078
2014-01-17 14:09:21 -05:00
Jeremy Long
35ba1532f4 updated schema version
Former-commit-id: dd27b18b117d53fd4bc4dfcfe901d6225b7b70c9
2014-01-17 13:48:00 -05:00
Jeremy Long
476d732a3c updated schema version
Former-commit-id: 2edb2d6e694e4fcf9ee20cb17d06c7a0fb6fa950
2014-01-17 13:46:59 -05:00
Jeremy Long
21efc0c4a5 added version number to the report context
Former-commit-id: e1cb7b7e6949ed017bc12addf8ac553a0473aa51
2014-01-17 13:15:14 -05:00
Jeremy Long
c20c6665fd updated data
Former-commit-id: 1f006fb71e6de02aaba1904a01dcbd9d3906d7fb
2014-01-17 10:36:37 -05:00
Jeremy Long
cd497bfe9b added tests for new methods
Former-commit-id: e571160a322b68d4dfb18ecc2dc4c774b8403665
2014-01-17 10:09:37 -05:00
Jeremy Long
25c42bee6d updated test case to use new constructor
Former-commit-id: cc6a62c0b1477ac2d5e4586448751e7a3ed9ecce
2014-01-17 10:09:07 -05:00
Jeremy Long
6d639385da add a new constructor to accept a DatabaseProperties argument and deprecated the old constructor
Former-commit-id: 4f31406b23b7f96efb1f731bca2f12b281b77747
2014-01-17 10:08:28 -05:00
Jeremy Long
fd1c0efedf modified property names and added additional methods to retrieve the entire properties collection
Former-commit-id: 9957024434b375842f1d3dde8e75aba1516ae4ab
2014-01-17 10:07:38 -05:00
Jeremy Long
5d2010aa73 attempt one at fixing class loader issues with H2 for the jenkins plugin
Former-commit-id: 125265069c0aedb7aa2a70a4a588b77e5fe4cb35
2014-01-16 18:56:35 -05:00
Jeremy Long
d9333b2e93 added missing license, notice, and readme files
Former-commit-id: ff43678b50b3f0027ad6070b978156900200fcde
2014-01-16 18:34:31 -05:00
Jeremy Long
3034306fcc updated license to Apache 2.0
Former-commit-id: 9ab1a3f1216ab9a1a3a23a198557bc9dcc1af540
2014-01-16 18:34:02 -05:00
Jeremy Long
0c7bae6fd7 updated license to apache 2.0
Former-commit-id: 15ae4bc58338bbc4da6ba4a98f19f276add8a76c
2014-01-16 17:48:00 -05:00
Jeremy Long
855233f498 1.1.0-snapshot
Former-commit-id: 3c429668398de620c842dff0b1b634fbf23950e8
2014-01-16 17:23:30 -05:00
Jeremy Long
6b859a0478 release 1.0.8
Former-commit-id: bb0c02daab6157c1a22573dc59db3f2aa577b027
2014-01-16 08:00:54 -05:00
Jeremy Long
2f37b658f1 added additional logging statements
Former-commit-id: 84188e3a832acbe4d9678c73c9571011c5554518
2014-01-15 20:45:55 -05:00
Jeremy Long
3bd952e5c5 added information on suppressing false positives to the site
Former-commit-id: 84c0f3175c7a749bc2d5fe05d7b4e4d23a518fab
2014-01-15 20:43:09 -05:00
Jeremy Long
ae58c1fa99 added tests for MySQL External DB
Former-commit-id: 25a9773428d52aa95df940ab1c21cd363a361f99
2014-01-15 16:13:08 -05:00
Jeremy Long
dfb411cb6a added autocommit=on to H2 connection string
Former-commit-id: 2ce63e1d44ecf5ab69f0f98003383f6a6b7b311e
2014-01-15 13:18:32 -05:00
Jeremy Long
449e3f5cc6 added autocommit=on to H2 connection string
Former-commit-id: 86c6de5504bc411e3a6fb636181954d7e15ca47f
2014-01-15 13:16:05 -05:00
Jeremy Long
1b1fe17fca added autocommit=on to H2 connection string
Former-commit-id: 0dcc8a704178ba5087a876914a0088464ceb60b9
2014-01-15 13:15:50 -05:00
Jeremy Long
f3c457745e removed calls to commit as autocommit is on
Former-commit-id: a4efaa350b1b9581e8ce1fc67dc62249bf18abdc
2014-01-15 13:15:08 -05:00
Jeremy Long
26f2e2b223 Updated plugin versions
Former-commit-id: 11044cb9a3a93991c0dd8e074fa913ac0deabb37
2014-01-14 06:11:42 -05:00
Jeremy Long
fcdd399eea javadoc correction
Former-commit-id: 1b55c65bd4f05027bb9b4ddc677d7d95fc0defb5
2014-01-14 05:59:52 -05:00
Will Stranathan
c1d16782ab Actually added the analyzer
Former-commit-id: 28faa40bf1f1a55b663c2c7ca6cfa6109939839c
2014-01-13 14:18:49 -05:00
Will Stranathan
860434a1d5 Added files I missed during the last change
Former-commit-id: 2f6f9cdb93c3a3f055694447b8a5d5bfbe440708
2014-01-13 14:16:41 -05:00
Will Stranathan
38b493ee9d Checkin of the NexusAnalyzer and its tests
Former-commit-id: 1cfa6bb8a7018de5d1151530bcff3c20d9c7b9ac
2014-01-13 10:22:40 -05:00
Will Stranathan
19dc560d56 Added vim swap files to .gitignore
Former-commit-id: b5c3d472b200965bd772b5744ef53ff74f366ad8
2014-01-13 10:11:51 -05:00
Jeremy Long
bb10214db0 added DriverShim to resolve class loader issues with the DriverManager
Former-commit-id: 88fe523018dc9c6d7df7f39ed1e21e8803d3fb06
2014-01-13 06:55:47 -05:00
Jeremy Long
6a871c51a1 improved test case so that the driver is retrieved to ensure the DriverManager registered the driver correctly
Former-commit-id: 181f883e673c34120628a850e844fb11a7fa961b
2014-01-13 06:55:27 -05:00
Jeremy Long
d7ff3050c2 implemented one test to connect to a MySQL DB Server
Former-commit-id: 546c46da018c892f37d205ad0dbe1b19a389ab7f
2014-01-13 06:54:22 -05:00
Jeremy Long
8e0a0379d5 Added DriverShim to get around issue with loading drivers via URLClassLoader
Former-commit-id: c45fe3e1846d051f90a81deaa33104222e8dae7e
2014-01-13 06:53:39 -05:00
Jeremy Long
b7ceb90e61 noop
Former-commit-id: 6dbfc3dad128908a988d8cce3ffadace5523108d
2014-01-13 06:52:55 -05:00
Jeremy Long
c1935c83f6 externalized properties for testing mysql db connections
Former-commit-id: c75cae83b677a8d87670cc7580525e390ce9b1ed
2014-01-13 06:51:40 -05:00
Jeremy Long
62f08a2105 updated build plugin versions
Former-commit-id: 6274e03316662eeb639159ace71dd93688831755
2014-01-12 08:31:37 -05:00
Jeremy Long
38d7f6e671 updated author tag
Former-commit-id: 1a0ccff0a65e8af86741fa01c2cfd5382e8bec54
2014-01-12 08:27:52 -05:00
Jeremy Long
3c2c99c236 initial [empty] version
Former-commit-id: b4eca7805e1c88f64ff4811c02bd3f0c4c10c9d2
2014-01-12 08:19:53 -05:00
Jeremy Long
7694402ae4 updated to support MySQL test cases
Former-commit-id: a96b3700b1230130d43e65277884fc49ac301666
2014-01-12 08:18:18 -05:00
Jeremy Long
7ed1d13221 fixed typos
Former-commit-id: 417db699c81a6b9144b6f5dd8e99ab52805e0257
2014-01-12 07:35:03 -05:00
Jeremy Long
47e89e35b2 fixed spelling errors
Former-commit-id: 2a362ac0f1d7ab9e026a1f9a42fa2b775df9f4cf
2014-01-11 19:55:21 -05:00
Jeremy Long
3633759295 various IntelliJ analysis recommendations
Former-commit-id: 9b81bd3d14046ddfe71da5794b29326aaf6c6ac5
2014-01-11 16:04:43 -05:00
Jeremy Long
98bdb0479b added database connection properties
Former-commit-id: 57e25ebc7c936bd1a99d3f60f32faeb72bc5f157
2014-01-11 13:19:33 -05:00
Jeremy Long
1e40df227d removed file
Former-commit-id: 9b459e06b23b233984a5b633eb7faed3a8b91c26
2014-01-11 12:45:29 -05:00
Jeremy Long
caf0a709b8 updated data version
Former-commit-id: 33d6c6329ac42ea47d46f7eae5d8cb7a8b85a376
2014-01-11 12:45:03 -05:00
Jeremy Long
daef951e59 removed sonatype parent
Former-commit-id: f969cfb576b167729283668d4aa47e0d0e419d06
2014-01-11 12:44:33 -05:00
Jeremy Long
73eab87dd9 removed one test as method was removed
Former-commit-id: fee24a17a2e1878aefc294c253e46b5bf41c40ec
2014-01-11 12:43:44 -05:00
Jeremy Long
1a2720649b removed unused imports
Former-commit-id: eb17f686be6f9d68255ce5db5f0d8efd5422409d
2014-01-11 12:43:11 -05:00
Jeremy Long
1083cdb743 added new properties for database connections
Former-commit-id: 9e96b0ce823cb40ac9c35d3e8aeeb7a23712bee5
2014-01-11 12:42:50 -05:00
Jeremy Long
06eb8f9c10 added new property keys for database connection properties
Former-commit-id: aa963014785ed1f49b0c53afa9481a0e46d196d2
2014-01-11 12:41:58 -05:00
Jeremy Long
31af15d267 updated package info
Former-commit-id: 725b6e993da523367edfa3995729fee4e342e037
2014-01-11 12:41:30 -05:00
Jeremy Long
12938df375 removed un-needed import after moving classes around
Former-commit-id: dec54243019a67fc52a3aea906ab1201e4aa5352
2014-01-11 12:41:03 -05:00
Jeremy Long
24d8dbcf64 removed unused properties field
Former-commit-id: 9877606326236bb2bda9048a5ac927cae7c3e0cd
2014-01-11 12:40:37 -05:00
Jeremy Long
2b7585357f removed un-needed import after moving classes around
Former-commit-id: 369c59274503eb50e1a8a27f702fa1d7a4d5967f
2014-01-11 12:40:11 -05:00
Jeremy Long
5b659966c8 removed the ability to delete and recreate the schema
Former-commit-id: a663d48bf74761504a9c8c23b128b00a32a814d0
2014-01-11 12:39:34 -05:00
Jeremy Long
2834d6cac7 removed the ability to delete and recreate the schema
Former-commit-id: 0a02cf0892613904dcdf1eecef3391b396a82ef3
2014-01-11 12:39:01 -05:00
Jeremy Long
65dd4c873f initial implementation
Former-commit-id: 8c14c36a6a7e192bdc5c1b07accc2f7c611a3369
2014-01-11 12:38:26 -05:00
Jeremy Long
8c834e634b initial version of exception
Former-commit-id: 97bbfda58ed595935cb387140d8b39bd0ec66642
2014-01-11 12:37:56 -05:00
Jeremy Long
f92430d092 removed un-neede property value update
Former-commit-id: c9ccb79104de208cf9673b258ed739d9b78562dc
2014-01-11 12:37:28 -05:00
Jeremy Long
b110e944c3 updated to utilize the ConnectionFactory
Former-commit-id: d368fb9ecad44059fe6d6e1f56912336e17912d2
2014-01-11 12:36:58 -05:00
Jeremy Long
77eb5b5147 initial implementation
Former-commit-id: 55b94aa6e58aad2b73c433b29fdf2133ae1f8334
2014-01-11 12:36:17 -05:00
Jeremy Long
1fabdb9e2d added additional verbose logging
Former-commit-id: e754c12ca2e11d6ca3c338aca801aafa00542847
2014-01-11 12:35:44 -05:00
Jeremy Long
e8682ac058 updated to conform with new api (less exceptions caught)
Former-commit-id: ad29d60598be7dd0c44e332a65d68756cadbe3e2
2014-01-11 12:35:07 -05:00
Jeremy Long
08603ad905 initial version of tests
Former-commit-id: 80e7ccbc84eccc132454cefdcc5703504637b37c
2014-01-11 12:34:24 -05:00
Jeremy Long
224b867737 added MySQL Initialization script
Former-commit-id: a7a13d60769a794a9c4859c0df86d4576381c738
2014-01-11 12:33:57 -05:00
Jeremy Long
0eb4ac5bcc added mysql connector
Former-commit-id: 08fe6940e2122a78f21a2ebaf00670d73d865c58
2014-01-11 12:33:29 -05:00
Jeremy Long
876ca5927d updated year regex
Former-commit-id: 39555650722a92053167a8716f1f0eea70f0205c
2014-01-11 12:31:41 -05:00
Jeremy Long
98b4509014 updated to make SQL statements more cross platform
Former-commit-id: 5cf3f06366bfd0b2d474891266efea9459aec26a
2014-01-10 06:16:32 -05:00
Jeremy Long
c0013a0ba5 fixed bug 40 - version evidence is not showing up in the final reports
Former-commit-id: 1d39898252ca5738587947edd6ea977fbc571d55
2014-01-08 05:23:18 -05:00
Jeremy Long
cc915e39c5 Fixed typo in logging
Former-commit-id: a98d83ab10a6d81c81e4a919bb0992e1bfa56934
2014-01-05 07:14:59 -05:00
Jeremy Long
b569ad4ef5 Initial version
Former-commit-id: 649d9e94e9e9c771a4efdace79ec8ddca0cc1af4
2014-01-05 07:13:50 -05:00
Jeremy Long
6ab5388075 updated logging
Former-commit-id: 7594ca0adc6256389b918a96ff0a875a582a0cc3
2014-01-05 07:12:55 -05:00
Jeremy Long
ded3079390 updated package-info
Former-commit-id: cbacf975eae9951165dffdda5ffe0066589d8268
2014-01-04 09:17:02 -05:00
Jeremy Long
44fe358766 moved several classes
Former-commit-id: e15d111bab0061c89ef5d8cea518350fa901667e
2014-01-04 09:08:22 -05:00
Jeremy Long
cee4b089c6 moved several classes
Former-commit-id: 57cde1f76269c17d354e38db8ba25a5ab669e2c8
2014-01-04 09:01:04 -05:00
Jeremy Long
ba8bd4f95c moved several classes
Former-commit-id: f2de931c7c093818a97149b0cefc22d7b3b9717f
2014-01-04 08:56:09 -05:00
Jeremy Long
c602072e5b updated JavaDoc
Former-commit-id: ce55cd1de24523e421a30b64bfdb906c50b65597
2014-01-04 08:54:36 -05:00
Jeremy Long
76061c84aa renamed and moved classes
Former-commit-id: f2b2f2314e05260f58dba3e36a5886dba24e23f8
2014-01-04 08:47:25 -05:00
Jeremy Long
cd01d3e923 Moved DBUtils to the utils package
Former-commit-id: fc35a259abae520958501d46ba9fef81510fa4aa
2014-01-04 08:40:23 -05:00
Jeremy Long
ff23e7aba7 removed code that had been previously commented out
Former-commit-id: d66771c5b8a673cb1b9b0e31a43361f50efbe610
2014-01-03 15:15:52 -05:00
Jeremy Long
e61fb6f206 findbugs/checkstyle patches
Former-commit-id: b00c0681a799cea260a2aa6de6aa210709199589
2014-01-03 14:56:18 -05:00
Jeremy Long
a6cab8fddc checkstyle patches
Former-commit-id: b20c0046dc72928e3b3e51588846d628bdef63ed
2014-01-03 14:39:09 -05:00
Jeremy Long
ec16d9abfc checkstyle patches
Former-commit-id: 68937bbf5b92b8168b2eeae6ced056ec4deafb72
2014-01-03 14:30:12 -05:00
Jeremy Long
b5c67a47d1 moved files to a new package
Former-commit-id: f728311ae4b5c9184f4c50074fc23a85c0938d43
2014-01-03 14:29:35 -05:00
Jeremy Long
a4c1e3b0bc minor changes to make this a utility class (final, private constructor)
Former-commit-id: 7366e29f0973477901d0531b1fe8792d25da7875
2014-01-03 14:29:12 -05:00
Jeremy Long
b160d58d1b updated to use DBUtils rather then the, now removed, parent class
Former-commit-id: 51875eb55aa3cd4bccbbc345883ce67c17c72dce
2014-01-03 14:28:30 -05:00
Jeremy Long
b6a4dfb424 converted to BaseDB to DBUtils
Former-commit-id: 4710ba824597c979d3ad12c8500873e0087e71c9
2014-01-03 14:27:43 -05:00
Jeremy Long
5837718cf4 removed unused import
Former-commit-id: 4f419ce943ec5c44ced47d46d24a5aaeb8b23a75
2014-01-03 14:21:21 -05:00
Jeremy Long
962e579434 removed unused imports
Former-commit-id: d46a183eab52cc3d604dc92e58186ebb89b7a329
2014-01-03 14:20:54 -05:00
Jeremy Long
63a249ecb0 moved to new package
Former-commit-id: 1093fc5eb2cf0b7c864e96ecf65bbc3fffada113
2014-01-03 14:20:12 -05:00
Jeremy Long
3f40ca65f5 renamed files
Former-commit-id: 1b831a983e163cd81beb823f6ea8dc963c67ea47
2014-01-03 14:06:49 -05:00
Jeremy Long
57668fc618 updated test data
Former-commit-id: 21f21a35108f1691cb8525ed332afcb4ddc95289
2014-01-03 14:06:31 -05:00
Jeremy Long
e82d14c973 removed unused properties
Former-commit-id: ad9849ad0021325f51cc1b6d1368240e3b71bf47
2014-01-03 14:06:14 -05:00
Jeremy Long
8e9aa23c3c fixed tests based on changes to APIs and available settings
Former-commit-id: 7de614dd6d13861316e7dd95295f11d2854529f5
2014-01-03 14:05:47 -05:00
Jeremy Long
4687c7dcda removed test for deleteExistingData (which was also removed from the class being tested)
Former-commit-id: b806b2a0f2e106347be7482443938709b3c8d976
2014-01-03 14:05:01 -05:00
Jeremy Long
5d857c731f fixed tests to work with the new method for accessing the DB properties
Former-commit-id: 3d4ff665b7e66c0e0e66bd5a3e32fa4c99f28aed
2014-01-03 14:04:11 -05:00
Jeremy Long
eaec1205a1 removed unused import
Former-commit-id: 9deb195c2862ca8d6ea71d4aed6230df47152a5b
2014-01-03 14:03:25 -05:00
Jeremy Long
e3d03c3d78 removed unused property
Former-commit-id: 12e18baec70983b254d53507186a3a5b954c751d
2014-01-03 14:03:05 -05:00
Jeremy Long
927fb013ff updated getDataFile() so that it no longer checks for a base data directory as the subdirectories have been removed
Former-commit-id: 77ae2cb573211de12015606ade9482ca7f0c3d2d
2014-01-03 14:02:36 -05:00
Jeremy Long
4deb14ccfb removed unused function deleteExistingData
Former-commit-id: 5102fe9756b1f5470ca2b4f21dcf0f7d86bedeb2
2014-01-03 14:01:26 -05:00
Jeremy Long
e04dba610b Moved meta data about the NVD CVE into a database table rather then an external properties file
Former-commit-id: ccef3663d13f8176b3e4f06bd5b9db4c23b207d5
2014-01-03 14:00:39 -05:00
Jeremy Long
99a5dfee31 Moved properties to the table in the DB rather then an external file and moved several methods from the parent class into this class
Former-commit-id: 5b9e629509ce26840892053eef19cc1ffccca623
2014-01-03 13:59:39 -05:00
Jeremy Long
66842fca8e Moved most functions to CveDB.java; slowly converting the class to a pure DB utility rather then a base class
Former-commit-id: 7b1a18596000b3506798d521801a6bb1eace32da
2014-01-03 13:40:25 -05:00
Jeremy Long
a47280f47b moved properties to DB, minor change to API to support this
Former-commit-id: ffbf3e53a75fc633d9bf8c74c40ea41154a2f4c4
2014-01-03 09:02:08 -05:00
Jeremy Long
2808ca139c fixed logging issue
Former-commit-id: 63fc2fa2786e06ea759cb47ca552346b6d95f25d
2014-01-03 09:00:35 -05:00
Jeremy Long
d87467aa88 corrected logging problem
Former-commit-id: 68bad221b1352b6cfe271f5089ea0f70197dc84c
2014-01-03 09:00:11 -05:00
Jeremy Long
382aad5119 moved properties to database along with lots of other minor changes
Former-commit-id: eac66862685ab61200fec1607fb654ffc41e12fa
2014-01-03 08:59:40 -05:00
Jeremy Long
93f94b65f1 Changed from deleting existing physical files to recreating the table structure when data was too old
Former-commit-id: 5ef2a1a496c75accfdc185910d1a49677fe82e42
2014-01-03 08:58:39 -05:00
Jeremy Long
bc66d4b0e7 Updated as properties moved to the DB
Former-commit-id: 5b9f503949b4a7d4a03e313bf60ff756d7c18b2d
2014-01-03 08:57:27 -05:00
Jeremy Long
ff044c831f fixed logging issue
Former-commit-id: 4c17e4db31e2315978b13b6bbd8901de04cb9cec
2014-01-03 08:56:11 -05:00
Jeremy Long
cb85292f99 improved error handling and logging
Former-commit-id: d0052afd68fc4e90b915473b1a0cc6b53763dc49
2014-01-03 08:55:29 -05:00
Jeremy Long
7c7722e8fc Fixed logging issue
Former-commit-id: 695fd31acb7c0bbf99365c244855daf2520055cf
2014-01-03 08:54:40 -05:00
Jeremy Long
78cc6764bf renamed settings to properties in the schema
Former-commit-id: f383ea9d8355b8c038f9b0028161db54aeb09d75
2013-12-21 08:15:20 -05:00
Jeremy Long
0b540d6406 updated schema version to 2.8
Former-commit-id: 11acb51c0dc9c6b9772519b0a4695a6bed9374f0
2013-12-21 08:14:29 -05:00
Jeremy Long
f1e0b7a94f made error handling more robust so analysis should stop when something goes wrong with a signle jar
Former-commit-id: f873948c981239f37fb0083b34906be31c0e9ca1
2013-12-21 07:46:47 -05:00
Jeremy Long
611635a9a2 improved error handling/reporting
Former-commit-id: a876ed631f9d6c69abd6d57c20cdd81d9d9bbdbb
2013-12-20 05:36:04 -05:00
Jeremy Long
26c30b013b updated documentation to demonstrate a very basic configuration
Former-commit-id: 52683780d58dabc58758e90468429c1bc596bb7e
2013-12-14 13:19:57 -05:00
Jeremy Long
899f5231b5 removed batch mode property test cases
Former-commit-id: 476f48ad416b9df6f475368a3b9e7af83cf30810
2013-12-07 13:34:30 -05:00
Jeremy Long
0cfeee18c9 removed unused imports
Former-commit-id: 2b84240d9648fcb3b447d3128dc9de054989dde5
2013-12-07 13:32:57 -05:00
Jeremy Long
3e44835687 removed batch update properties
Former-commit-id: eb0a70d541c1b694812f93b7e4271fe5f3d27928
2013-12-07 13:30:55 -05:00
Jeremy Long
d5ac67071f added some JavaDoc comments
Former-commit-id: 8ae8744c4f59f1f2e8a932485b969575b533fc42
2013-12-07 13:29:28 -05:00
Jeremy Long
6aee9ce92e added some JavaDoc comments
Former-commit-id: e42795dd9f92bcff7109832bacac540e9f589859
2013-12-07 13:29:05 -05:00
Jeremy Long
6a268bfb68 Changed order to prevent blocking, CallableDownloadTasks automatically submit the results to the process executor queue now
Former-commit-id: a6671690125a13045e93e40a95c033b8f99cf391
2013-12-07 13:25:34 -05:00
Jeremy Long
63848e815f Changed order to prevent blocking, CallableDownloadTasks automatically submit the results to the process executor queue now
Former-commit-id: 1d15e48e0485817c4fad1fb7e117e03fd21d43ce
2013-12-07 12:04:08 -05:00
Jeremy Long
6640df18ac added a warning to the build output if CVEs are identified
Former-commit-id: e45640edbdb30efaa9b15374a2d89850a61a01d3
2013-12-07 10:09:07 -05:00
Jeremy Long
b9436c0cab 1.0.8 snapshot
Former-commit-id: fde0982f64637014703bc2d82b1e90820c739a39
2013-12-03 05:53:39 -05:00
Jeremy Long
c730f7931f version 1.0.7
Former-commit-id: b21b74c1246d48394e51f628512aaa9bc3e9f3a4
2013-12-03 05:38:31 -05:00
Jeremy Long
ef6035b5be improved multi-threaded processing and renamed things for clarity
Former-commit-id: 5ae87f85859bb2b473a49ac6fa17035b26167fe0
2013-12-02 21:49:55 -05:00
Jeremy Long
8502c0f048 checkstyle corrections
Former-commit-id: c18cb3046e295e5369fbe9ac78fc689167f9a1d3
2013-12-02 21:37:22 -05:00
Jeremy Long
acc4d5201a updated to throttle downloads and improve performance
Former-commit-id: cfb82a51204834d132bdf3eecfca2088979e9c26
2013-12-02 20:06:50 -05:00
Jeremy Long
8248f31b20 limited the number of downloads that can happen at one time
Former-commit-id: b8e90fd953626d6cb4a07996a59fbae7b05917eb
2013-12-02 09:10:12 -05:00
Jeremy Long
39c1624d42 fixed bug allowing more then a single vulnerability to be removed
Former-commit-id: aa2e87885e7a3ddc4947a81c3c3e104630630e23
2013-12-02 09:09:16 -05:00
Jeremy Long
7eb82f2e84 Updated to remove batch update and to remove the abstract class used to enable batch mode
Former-commit-id: 2f33644d1a50a425c6ae5e1ca671156e4cdadf8e
2013-12-02 05:43:54 -05:00
Jeremy Long
df0d0d820a version 1.0.7-SNAPSHOT
Former-commit-id: fe4abc03628f5e904cb33dc4deeadc0259d2db4f
2013-12-01 10:01:27 -05:00
Jeremy Long
e0c0d8bc04 Version 1.0.6
Former-commit-id: 84313712abb800f19859840292a48cd0c16d9342
2013-12-01 09:53:02 -05:00
Jeremy Long
97619d8ba1 added ability to copy suppression data from HTML report
Former-commit-id: 5429dc4a2738b5ea021cc33cf3d1efc68615f99f
2013-12-01 07:46:29 -05:00
Jeremy Long
80df96fd0d fixed the loading of the suppression schema for validation during parsing
Former-commit-id: 12b91a55dbfed4c9305888408b285ddf93ab9e84
2013-11-30 19:17:03 -05:00
Jeremy Long
579e76430d ensured resources are properely closed in finally block
Former-commit-id: d77e0085fc383a607ba8c55cacef60c8b9a9736c
2013-11-30 18:41:36 -05:00
Jeremy Long
36dd7269e2 Updated to support suppression file configuration
Former-commit-id: 77c9cfcc307a682dc3786957b88e24afe9f7e33e
2013-11-30 18:17:58 -05:00
Jeremy Long
6596cb014f Updated to highlight the help and command line arguments
Former-commit-id: 85b13cf94e984c7ca8a88860da2c19c3c0bc16a3
2013-11-30 18:13:11 -05:00
Jeremy Long
62ac63fd77 updated to support suppression file configuration
Former-commit-id: 7bffaef4bf07310c100ae570e44cbbc2fec9a12f
2013-11-30 18:12:43 -05:00
Jeremy Long
e6e8d96f12 Updated to delete refused CVE entries
Former-commit-id: b16207fa8dfa294a256402e12b278433293106d2
2013-11-30 17:23:23 -05:00
Jeremy Long
f80464ea31 updated to use UTF-8
Former-commit-id: 61fc6d7e5feeedbc74988b5a57639c3e298d01de
2013-11-30 17:23:00 -05:00
Jeremy Long
75b0c6f7a3 checkstyle fixes
Former-commit-id: ae5823ce9c01c4b36e6339fb57c39a47275d56dd
2013-11-30 10:00:22 -05:00
Jeremy Long
f95ce8c7b5 added support for suppression rules, initial version
Former-commit-id: c58bea577282155661b4c6e1991178ea07e7eb98
2013-11-30 08:56:44 -05:00
Jeremy Long
c991a3ccfd removed
Former-commit-id: f7ebd94d66bf90f4178b2bbe8d14e16bbaf7f7a2
2013-11-30 08:55:45 -05:00
Jeremy Long
a1d612b1f6 added new services
Former-commit-id: 8e4875fcca4241a57881429791d419e2256ff408
2013-11-30 08:54:39 -05:00
Jeremy Long
d3cbd20c5e added new suppression schema
Former-commit-id: b519078a17700369646b686ce570cca74e71ea7a
2013-11-30 08:54:08 -05:00
Jeremy Long
cff4f29ba4 added new package
Former-commit-id: 966169962b5ef6f51366048aa7734f41ac162e8a
2013-11-30 08:53:46 -05:00
Jeremy Long
dc08363360 added new exception
Former-commit-id: 6e6e82a1bb9b69cacabfabcdfa110a1d4a63e0d6
2013-11-30 08:52:49 -05:00
Jeremy Long
a2aa8d9336 added test data
Former-commit-id: bdca1bcf6a146577abab09d415ab65183bac3322
2013-11-30 08:52:15 -05:00
Jeremy Long
ab2bfa951c updated getFile to return null if property is not defined
Former-commit-id: 3dbd8d356cc509619fe8caa9539a4d01906aa3f9
2013-11-29 07:45:41 -05:00
Jeremy Long
e871d37044 renamged getFile to getDataFle (settings class)
Former-commit-id: 8b632f78685d0a66bc061bcefd46de4b56d45347
2013-11-28 06:22:50 -05:00
Jeremy Long
e32ee71bea renamged getFile to getDataFle (settings class)
Former-commit-id: 16a7e7f6e27026faade75351b34e54ebdc977f8c
2013-11-28 06:22:02 -05:00
Jeremy Long
3bc8823e54 renamged getFile to getDataFle (settings class)
Former-commit-id: 940c970878ca7236892e30f74eab37f5eacae4e6
2013-11-28 06:20:52 -05:00
Jeremy Long
a4b9dfaf1c renamged getFile to getDataFle (settings class)
Former-commit-id: 79f2655e3c4f5d53bdb076ea6907baec03701dba
2013-11-28 06:20:05 -05:00
Jeremy Long
c7c85ac676 renamed getFile to getDataFile and added a no frills getFile function
Former-commit-id: 73c2b4d2f5c153bd49873b153e4bbd31ea8b66f8
2013-11-26 05:35:40 -05:00
Jeremy Long
1af445a390 added key for suppression file
Former-commit-id: f4f13fb2319d5a8851d46b35a87b8d08f90b00d8
2013-11-25 19:34:49 -05:00
Jeremy Long
4236a2e6f7 updated schema
Former-commit-id: 8a78c1f646d48aa61d46f62e36bfdf34f8818a1e
2013-11-25 19:34:07 -05:00
Jeremy Long
47e58942f8 checkstyle corrections
Former-commit-id: 2a13933e132d41db6143e214d51efaa3ca20a765
2013-11-23 22:38:55 -05:00
Jeremy Long
f854ed50d6 initial generated version
Former-commit-id: 6d97f9f7a43a2d9f8bb605c38b087f1e95e34462
2013-11-23 22:07:11 -05:00
Jeremy Long
2933a173a2 initial version
Former-commit-id: 11e93c9a8f356483ead2b5c5ba0264fdde5a1f94
2013-11-23 22:06:27 -05:00
Jeremy Long
39c45cd329 initial version
Former-commit-id: 8f31fa2e59679aa1c070e8e03458f58797f947d6
2013-11-23 22:00:07 -05:00
Jeremy Long
93e6473828 removed call to BatchUpdateTask
Former-commit-id: 134c6ac5eec282b142febd1341ccdb9936219eb7
2013-11-23 21:59:11 -05:00
Jeremy Long
2cf96bef52 deprecated batch update
Former-commit-id: bf654a174500c4727ec1d0b66368cf06fdabee54
2013-11-23 21:58:18 -05:00
Jeremy Long
3850ef4355 split out core DB functions into a base class to support storing settings in the database
Former-commit-id: 0c9d507e2e9e229691965aca09ef9f6c9e7e0965
2013-11-19 21:05:12 -05:00
Jeremy Long
d29f989c22 added drop table if exists settings
Former-commit-id: 5ea0128271f3a7e2985eadd330bfa02c4db21dc3
2013-11-19 21:04:16 -05:00
Jeremy Long
0e31d503d0 removed unused code
Former-commit-id: 1f6158daa812a15baf0d88ee689b49681e67aeed
2013-11-17 22:44:33 -05:00
Jeremy Long
8c2d552238 fixed imports
Former-commit-id: 9a2c867a83a67bf727381d9c717846993ae56fe7
2013-11-17 22:44:24 -05:00
Jeremy Long
1b6cb61f8a fixed logging statement
Former-commit-id: d2f20844c229d73321b3832d9dec22f4e7a55e5b
2013-11-17 22:44:03 -05:00
Jeremy Long
b6e0fa9085 removed references to CPE data directory as this has been moved to a RAMDisk directory
Former-commit-id: 678eab78293357e3e89566917e73f9b5d3313ab5
2013-11-17 22:40:51 -05:00
Jeremy Long
1f983d502e introduced property for max thread size
Former-commit-id: 5d48fbedf4b71be52fb1c6eefe3e7b02aa4d5082
2013-11-17 22:37:30 -05:00
Jeremy Long
13637be1aa introduced property for max thread size
Former-commit-id: e349329de9a98335ccfc4c8216993a1a6693c447
2013-11-17 22:36:41 -05:00
Jeremy Long
8f22740e07 updated to make downloading of the NVD CVE a multi-threaded operations
Former-commit-id: 28e7467020db617007e89018d2d9fed8de335181
2013-11-17 22:30:31 -05:00
Jeremy Long
03d5cc7521 initial version of Callable Download Task - used to make the downloads multi-threaded
Former-commit-id: f3f7e880e1fabece990d2ed14bd459a3ffe8c955
2013-11-17 22:29:53 -05:00
Jeremy Long
c9f9e2b97d updated data
Former-commit-id: 74473ad6f21f47c06264819a4733ba67de2996b7
2013-11-17 20:50:31 -05:00
Jeremy Long
8ca4ede403 removed un-needed test
Former-commit-id: 175840ea9fda4a65db61c73d36fdd33c167d7380
2013-11-17 20:50:07 -05:00
Jeremy Long
b50be86615 updated lucene version number
Former-commit-id: cf381ccd9365fa184a94e5a3c860f7c3b180a32a
2013-11-17 15:21:38 -05:00
Jeremy Long
fe1a8f4425 updated functionality and incremented database schema version
Former-commit-id: 64184f1362e5725c2e9c5d228850b547981e0c75
2013-11-17 15:20:53 -05:00
Jeremy Long
dd472c1322 new exception type added
Former-commit-id: ac3650af279b14e5a32add2f6894ad60177fd243
2013-11-17 15:20:01 -05:00
Jeremy Long
a636adec10 initial version of cpe memory index
Former-commit-id: 5f0d1bb0110361f99a60ad4476c43c1ad1c244bf
2013-11-17 15:19:26 -05:00
Jeremy Long
e3960445ae updated version of lucene
Former-commit-id: db3174428fcb3e789426bec5c9776f3a4b3f4bc8
2013-11-17 15:18:55 -05:00
Jeremy Long
c631b7cd8a updated the version of lucene used
Former-commit-id: adc5e1361c68abf997b0cef401441bf62a169c56
2013-11-17 15:18:26 -05:00
Jeremy Long
bb2bf12808 updated to use the CpeMemoryIndex
Former-commit-id: 7cd46e9de48661a1ee9c213889cf3a9d51f1517e
2013-11-17 15:17:56 -05:00
Jeremy Long
db95dfe208 updated ensureDataExists()
Former-commit-id: 2ceaa062391abd1a5e74aa5b0cb13de1d7c896e1
2013-11-17 15:17:21 -05:00
Jeremy Long
86d052e51e updated lucene version
Former-commit-id: 3611f6887deda4c14caf5fc9ea0c9c8b7762bf0c
2013-11-17 14:56:58 -05:00
Jeremy Long
fb55b9db17 added constant Version so on the next upgrade this only needs to be updated in one location
Former-commit-id: 172abf4686300b258b93026e404276fbf46f7dd0
2013-11-17 08:08:59 -05:00
Jeremy Long
ad3ad81c1e added constructor for DatabaseException(ex)
Former-commit-id: 178a4f2ea8d71c148892ab95dc480e88b1186105
2013-11-17 08:08:01 -05:00
Jeremy Long
dccb84ded8 updated javadoc
Former-commit-id: 03c6ba2d0d9cc03f3b9efd6fdb9a8d4972ac4f5d
2013-11-17 08:00:32 -05:00
Jeremy Long
510c693871 updated javadoc
Former-commit-id: 7ee24e9da15877c3138380c92c29c20757bb78fa
2013-11-17 07:59:23 -05:00
Jeremy Long
8696df12ac added the ability to retrieve the entire list of vendor/product combinations
Former-commit-id: c15c6727f00a18c58590b9a1d6cea4767ca12c5f
2013-11-16 23:19:52 -05:00
Jeremy Long
d56e0b0eba no-op
Former-commit-id: 0c024f815e7a766b99473f40086f2cfeb4f97aa8
2013-11-16 23:05:59 -05:00
Jeremy Long
29d77b2f2c no-op
Former-commit-id: 3388d8fab9ab7c35b26b4e374349bf3008aa84c0
2013-11-16 23:05:46 -05:00
Jeremy Long
4e131cd059 removed CPE from database updates
Former-commit-id: d2054cf9b9b4a28fba11ebb5c9ed565263bc4ef8
2013-11-16 23:05:23 -05:00
Jeremy Long
4c1f3948a3 version 1.0.6-SNAPSHOT
Former-commit-id: c8eb084b1b9de6b8bfa5432b1db33f417dd47572
2013-11-16 13:48:51 -05:00
Jeremy Long
c40ff67704 version 1.0.5
Former-commit-id: bc5f1fb33d118b811bc8ee15808d8ee320475766
2013-11-16 13:42:19 -05:00
Jeremy Long
af6ac8bd4f updated import list to remove .* imports
Former-commit-id: a73e57c0b4d3194dcbd44071f99dbf6d568bd26e
2013-11-16 13:18:11 -05:00
Jeremy Long
70211a8407 added javadoc comments
Former-commit-id: ad59c4d7e8c5b7f1e010fc53ce9425851da286e4
2013-11-16 13:17:34 -05:00
Jeremy Long
4d6b83425b minor checkstyle fix
Former-commit-id: e9f54697859f68f2bf067c4bb0ec9738ba8c2579
2013-11-16 13:12:05 -05:00
Jeremy Long
985396aaf9 suppressed null warnings
Former-commit-id: 6e249fd024f1674242f2660f56ffa96edccfe80f
2013-11-16 13:09:33 -05:00
Jeremy Long
d86c14d3a6 fixed bug in verbose logging
Former-commit-id: bfa66668d3e7b98b651814824562962bb2af4ec6
2013-11-16 13:04:05 -05:00
Jeremy Long
3bdb3a6b87 fixed string format newline character
Former-commit-id: fee94cf75cdbfe5e52f840514e150a9fa6cef510
2013-11-16 13:03:46 -05:00
Jeremy Long
8dac57d4cf added information about configuring the verbose log file
Former-commit-id: 90e9c7ea24698d8a1a8b5c52828b7bc64dda8b4e
2013-11-16 09:26:22 -05:00
Jeremy Long
a91e7b9ed0 added the ability to retrieve the number of documents in the index
Former-commit-id: 9a430f2a1805669d3ef2450d98ca7c2b6ed12ee3
2013-11-16 09:18:02 -05:00
Jeremy Long
220b2c9a2a Updated error reporting if data does not exist
Former-commit-id: 72db8d8232a2f70c2fc46af095e531b913d1ca38
2013-11-16 09:17:13 -05:00
Jeremy Long
06bc8ed4a4 Updated error reporting if data does not exist
Former-commit-id: b09181a3429f713f084e905e608431f437e60e60
2013-11-16 09:16:35 -05:00
Jeremy Long
648863d21b updated configuration settings
Former-commit-id: 3b84fd1eb72ccb772ec1ee6f808876fc235eb9ca
2013-11-08 19:15:44 -05:00
Jeremy Long
3232e60467 Merge branch 'master' of https://github.com/jeremylong/DependencyCheck
Former-commit-id: baaa780bc99e81b6ae0eacdb7736898d86cd906a
2013-11-02 07:19:49 -04:00
Jeremy Long
da81ea4e57 updated base class of test case to ensure data exists for analysis
Former-commit-id: 4abb5c7c2898a637b7cac759a2156f401a02d2d4
2013-11-02 07:18:26 -04:00
Jeremy Long
42baec7c72 added support for tar and gz files
Former-commit-id: 7027891fc6ed7959a7eca4f635b6a58ddc91bf05
2013-11-02 07:02:02 -04:00
Jeremy Long
1accdfe2e6 added new exception type
Former-commit-id: 06f91e8f71d943993b8a6c557350dc29c682f175
2013-11-02 06:49:17 -04:00
Jeremy Long
f625653b30 added license file for commons-compress
Former-commit-id: b112f7151061bd5f54f6b7c7276e30662bded64a
2013-10-27 14:29:18 -04:00
Jeremy Long
2682187fa3 updated test cases
Former-commit-id: b828cccfbc3ddbdb72fa1eacfbd7d500e7fa70be
2013-10-27 14:28:47 -04:00
Jeremy Long
090f3fafa9 added additional test files
Former-commit-id: 21dc900da9b472efc9f80bc0466bbbf4d4802c8c
2013-10-27 14:28:26 -04:00
Steve Springett
de81ed0c61 Merge remote-tracking branch 'origin/master'
Former-commit-id: ae263584f1cbbddfbc9dde165e2c3ed440454f19
2013-10-27 12:42:41 -05:00
Steve Springett
49465888b2 Adding support for proxy authentication to core, cli, ant and maven.
Former-commit-id: 1461b13a3fd8c0ca309e56afb67148fc8de31e63
2013-10-27 12:42:27 -05:00
Jeremy Long
1555185d60 added additional verbose logging capabilities
Former-commit-id: 8ea1b36130c5dbc86641768de929e1b0f3e928c6
2013-10-27 09:13:21 -04:00
Jeremy Long
e5235bd714 added false positive checks for axis vs axis2
Former-commit-id: 69bcb7c2921fe3713c3ad548cd2ceb101b3c0ce2
2013-10-26 17:21:14 -04:00
Jeremy Long
1b4fe6135f attempted to fix minor bug of files not being extracted due to a failure when calling mkdirs()
Former-commit-id: 2ca6840f3198adb11df764bf11a96c23885f3217
2013-10-26 17:19:55 -04:00
Jeremy Long
9481b29d6b incremented version to 1.0.5-SNAPSHOT
Former-commit-id: 9ab1791c78c5bb7331c598c60bec0e39d6ba650e
2013-10-21 21:28:04 -04:00
Jeremy Long
20115e6557 version 1.0.4
Former-commit-id: 0b789dd5afd9cceafc7cce1d651c8ebd376cd79a
2013-10-21 21:16:20 -04:00
Jeremy Long
ee47136fb4 initial version
Former-commit-id: 4fb4c44bee8cfab4ff9ab5ee1aeee3945aca2532
2013-10-20 21:29:12 -04:00
Jeremy Long
83dece68fc moved logging initializatoin to utility class
Former-commit-id: c7979aaa8018355b65788b6b31827910ffe2fd35
2013-10-20 21:28:45 -04:00
Jeremy Long
fce7083e28 updated to make tests go faster. Only downloading recent CVE data files
Former-commit-id: 610b6b6854835017e040d0f43e139c7607e78918
2013-10-20 21:28:00 -04:00
Jeremy Long
5268375153 added anoter mergeProperties to take a File object instead of a String path
Former-commit-id: 97598e74ab61752ab42793bd233e3010321fb86a
2013-10-20 21:27:18 -04:00
Jeremy Long
3598f59123 updated initialize to not ignore errors generaged when creating directories
Former-commit-id: eafcc5c7c7e5e2cad4ec1a2639b1aa95215227d6
2013-10-20 21:26:18 -04:00
Jeremy Long
557f491a7e minor update to logged message
Former-commit-id: d00002337ca34c75d1c193473fbe69af4145d7cc
2013-10-20 21:25:25 -04:00
Jeremy Long
5aa876da72 minor change to FileHandler.pattern
Former-commit-id: 3a792f63ffbae182a7687c9eabfe70191172ebd9
2013-10-20 21:24:42 -04:00
Jeremy Long
7e7a66595b added cli argument to enable verbose logging
Former-commit-id: 261ad7be19eb3058d5bc9521a5c462c2d2ed5f44
2013-10-20 21:23:59 -04:00
Jeremy Long
c429bdf139 moved logger setup to utility class
Former-commit-id: e2c1e20f3538423ccd7428b11bd347873e5713d1
2013-10-20 21:23:13 -04:00
Jeremy Long
22d22f3afa moved logger setup to utlity class
Former-commit-id: 645b08fa4695a3504049d6b3a55cc4fa213b30a7
2013-10-20 21:22:34 -04:00
Jeremy Long
f5845908b9 improved logging
Former-commit-id: 889e0938642ecc754b02ad14a8ddaf457c955425
2013-10-15 21:03:10 -04:00
Jeremy Long
138ce1c69a fixed npe
Former-commit-id: 235ae4ebeea96e9b261ef5d578324b2d60e927bc
2013-10-15 20:34:34 -04:00
Jeremy Long
8366ec5831 version 1.0.4-SNAPSHOT
Former-commit-id: 13eb567ad735cb24b9d1f963daf70545fd2a63fb
2013-10-14 14:05:15 -04:00
Jeremy Long
383f0a7f43 version 1.0.3
Former-commit-id: 76e31ea08acce6b13245f0b63c6fa825b2c69020
2013-10-14 13:45:43 -04:00
Jeremy Long
22e5a5cafd Merge branch 'master' of https://github.com/jeremylong/DependencyCheck
Former-commit-id: 232fd9692b90f77e6cc445f2baddbeb29d38dcde
2013-10-13 14:06:46 -04:00
Jeremy Long
8d6255aa55 updated data
Former-commit-id: 538c82b995c6da81df0fd389aa179f8c81fd6dd9
2013-10-13 14:06:14 -04:00
Jeremy Long
8fd6f7add9 added ftp:ftp as a false positive for Java projects
Former-commit-id: dbc2c6dc2d2d2b439f0e148f5c8ad17fe6ee4a11
2013-10-13 14:03:52 -04:00
Jeremy Long
623c2cb9f1 fixed bug 24 - short package names are no longer added as evvidence
Former-commit-id: cab8910b3aba41a8b7205491ef1e669b25ec87a9
2013-10-13 13:19:56 -04:00
Jeremy Long
259e87442d changed logging level to info
Former-commit-id: 27816e1cd3ccdcf57e0e741ca1b82eee85b293b6
2013-10-13 13:18:42 -04:00
Jeremy Long
8655e025a2 changed logging level to info
Former-commit-id: 529bd317072f4a2f2df37038ab24e0254c0f20b0
2013-10-13 13:18:29 -04:00
Jeremy Long
aba2a9f504 changed saveEntry to a private method
Former-commit-id: 25cc3dc1b825772c0ad56b0f5e66ff94fa6c215a
2013-10-10 18:20:59 -04:00
Jeremy Long
9aa76bd088 removed unused variables (pmd)
Former-commit-id: 7386857733fb5ba4b3c860a0ded9573b6d840261
2013-10-09 09:22:18 -04:00
Jeremy Long
10faef62fa checkstyle corrections
Former-commit-id: 784b14351589b8d4184e931a2b9bf680af2a7283
2013-10-08 20:59:30 -04:00
Jeremy Long
6b291a5ce5 refactoring update tasks
Former-commit-id: bf5280fd1e2e47b3958a75c32af444be9535dc05
2013-10-08 15:19:22 -04:00
Jeremy Long
164f1dcfd4 checkstyle correction
Former-commit-id: 7cbdead3fe54729dd17b77d0688fce0b6b3ad938
2013-10-08 15:18:32 -04:00
Jeremy Long
b7d6d027d3 checkstyle correction
Former-commit-id: 7768a0eeb08bc06bff07e94e1a4da34370adda16
2013-10-08 15:17:52 -04:00
Jeremy Long
c4869f1917 checkstyle correction
Former-commit-id: c74fc3538a9fa0d41dfe04873a535b3f622721aa
2013-10-08 15:17:03 -04:00
Jeremy Long
79c31b5f54 Improved update process, including initial lock support
Former-commit-id: d6fc00406765f4680d900eb0474fed9ade727a0a
2013-10-08 10:58:29 -04:00
Jeremy Long
89e99219d7 removed call to system.out
Former-commit-id: a0cdcc8b975657c06606c9a2467a4c732fee82e5
2013-10-08 10:48:35 -04:00
Jeremy Long
a9b6c68ce3 added the creation of the DataStoreMetaInfo in the constructor
Former-commit-id: 4ca8a0a8ad66aeb15dc410baa20d60dce88c1ecd
2013-10-05 07:42:08 -04:00
Jeremy Long
0563077fb9 fixed bug with delete on exit deleting updated files
Former-commit-id: d26151e944f5af674c256a37694c1e5eaed4b8cc
2013-10-05 07:40:39 -04:00
Jeremy Long
e2f174e92e added additional null checks
Former-commit-id: 74979677f056de15cdcb1322dfd6c0fcd4ceb9a3
2013-10-03 09:01:59 -04:00
Jeremy Long
861bdb47ed implemented necassary test case
Former-commit-id: d1115558dc86f88372ee815300c688f719934f18
2013-09-27 18:30:22 -04:00
Steve Springett
9f9e2d12c4 Fixed minor issue with xsd so the xml report would validate. Added unit test for xml report generation. Adding DependencyCheck.xsd to jar.
Former-commit-id: 5dc93c191f001e92b92a1eb1b02e10e33719ca08
2013-09-23 17:51:22 -05:00
Jeremy Long
03f504cadc seperated functionality to make the update procedure easier to understand
Former-commit-id: a39a0cc6adfd5e3856df3700b698e1ea5e7969a9
2013-09-22 21:52:31 -04:00
Jeremy Long
182c7e827b added additional checks for false positives (apache maven and cvs:cvs)
Former-commit-id: 3a5d19ebd8d432883b5edd7ae552c47f6a16ca68
2013-09-17 10:42:54 -04:00
Jeremy Long
61e0cfc979 added additional test dependencies
Former-commit-id: 65174625469145c3959250d0ffa397666876a2f1
2013-09-17 10:42:23 -04:00
Jeremy Long
3ea3f01394 updated data
Former-commit-id: 4234203ea0c0d3b6262f9f7955ffedb2904ee705
2013-09-17 10:41:43 -04:00
Jeremy Long
fc5b8ca1e5 changed html encoding to xml encoding
Former-commit-id: 33b719b306ee10da411dea91705b03cfcec73261
2013-09-14 10:20:40 -04:00
Jeremy Long
5d67b2f9dc corrected a typo in the report
Former-commit-id: 24c2b1787cc76e1d051091f4527a7e2162a4875a
2013-09-14 10:20:15 -04:00
Jeremy Long
bcf4fd9e93 updated integration test to generate all reports
Former-commit-id: b1878b71606b1ae3c2c8e247c874cc5b989f5b2e
2013-09-14 10:19:38 -04:00
Jeremy Long
5b5faad553 changed https links to http for github pages
Former-commit-id: 1278d25c892a04f25fc3537c6f9b8bb74b81f94f
2013-09-09 10:25:22 -04:00
Jeremy Long
5299261d18 updated links to bintray
Former-commit-id: 2fd6d382fbe06baa882e5e75e9a1e33cfa92f317
2013-09-09 10:09:20 -04:00
Jeremy Long
f852851886 updated info
Former-commit-id: f636fb4794c853d9e9e961a099c13bc6bce02b76
2013-09-09 10:02:53 -04:00
Jeremy Long
20a4d9adb8 updated info
Former-commit-id: f99e1ce85f822b4dbdc28591016d1c66940d7612
2013-09-09 10:01:00 -04:00
Jeremy Long
13997cd282 updated logic to make specification-version lower quality evidence
Former-commit-id: 7f29adc8590243ac6a8719a391318fa3818e27eb
2013-09-05 21:34:33 -04:00
Jeremy Long
965429296b updated version to 1.0.3-SNAPSHOT
Former-commit-id: bfe7bc1f483ce3d5cabfb33d7180696d177a1e8f
2013-09-03 21:47:53 -04:00
Jeremy Long
d9750ce4dc Updated to version 1.0.2
Former-commit-id: 7151b290e4e333f2fbc273d5d04cb82d8f71184e
2013-09-03 21:13:01 -04:00
Jeremy Long
d0fb41e582 fixed git merge problem
Former-commit-id: b1d18d5ce568d266837ddf06174b15d7462b8fcd
2013-09-02 16:19:47 -04:00
Jeremy Long
f7a83d5a60 fixed merge issues
Former-commit-id: fe669abc52c1cbcdec9de8bc1693cea12d9abe0c
2013-09-02 15:54:35 -04:00
Jeremy Long
fc52462df4 resolved merge conflicts
Former-commit-id: d0ce45a374336184101179b73b6019fb1240b9b3
2013-09-02 15:42:24 -04:00
Jeremy Long
119804794f updated site information
Former-commit-id: c4c0356cac5adb52285b14db4a6b7651f9ce7b76
2013-09-02 14:34:46 -04:00
Jeremy Long
f23bd0b268 fixed base test case to ensure data exists for other tests
Former-commit-id: f5c7b0a2c5d87fce004c050744b18ed4baf1d306
2013-09-02 13:03:00 -04:00
Jeremy Long
d6f61b4faf updated site
Former-commit-id: ef0b47bbbef1b3d68d6005a08ac9e25c233756b9
2013-09-02 13:02:35 -04:00
Jeremy Long
4e4b7a1c39 ensured the properties file was closed after being read
Former-commit-id: bee36a9892968a5455508e2275fdb1787e04c1c2
2013-09-02 12:48:17 -04:00
Jeremy Long
376bfb6799 updated site information
Former-commit-id: 9c60f1219a84ad5e58beb0f055a628e951c8d924
2013-09-02 12:44:24 -04:00
Jeremy Long
12bdba9a9c updated site information
Former-commit-id: 032930907c01ad54b0d03004ad7b5e73b541c397
2013-09-02 12:42:44 -04:00
Jeremy Long
33fa1e1350 updated documentation
Former-commit-id: d8912348f3b80e1d03f66b3c57a9d6b84a94be92
2013-09-01 15:35:53 -04:00
Jeremy Long
94e1a4f793 minor checkstyle updates
Former-commit-id: dc9c50f0627222169eceb94a44b8b4b4fa1af267
2013-09-01 15:11:49 -04:00
Jeremy Long
2603d960b7 moved test data.zip to parent so it can be used by other projects
Former-commit-id: 6de6b6231df68d64837a03c4204e58cfc74a54f3
2013-09-01 12:22:08 -04:00
Jeremy Long
b8433c4ea7 moved test data.zip to parent so it can be used by other projects
Former-commit-id: 5d0e82fcaf170af7086de306abc9eb2ed488bc79
2013-09-01 12:21:56 -04:00
Jeremy Long
fc30aeea61 updated Settigns to get the temp directory
Former-commit-id: d9a1e89ce829ab06e5aa1cd454184966d1e4b115
2013-09-01 07:46:43 -04:00
Jeremy Long
01d6e1f14d updated tests to utilize temp directory
Former-commit-id: 984f69e2528d37586a2d7d981d17671e17e7ca0d
2013-09-01 07:27:13 -04:00
Jeremy Long
3b4a65deaa updated to work with the new zip file and folder structure
Former-commit-id: 4ab18e5d93a71124aaf57d1d0b6945c7516e4463
2013-08-31 07:35:20 -04:00
Jeremy Long
2ec5ec78a9 removed unused imports
Former-commit-id: fee44850bba2b1af19989bc14aef99a38e725185
2013-08-31 07:04:17 -04:00
Jeremy Long
6b416b8494 added a test case to test batch update without a modified url
Former-commit-id: 5d10d888c927f86a76f983011cab47d4c2725333
2013-08-31 06:48:59 -04:00
Jeremy Long
eac470e081 updates to batch update mode to allow batch updates without a modified URL
Former-commit-id: 5e8ff7c0d9c880f2421f020f2891a6f7a794570a
2013-08-31 06:48:10 -04:00
Jeremy Long
34ce50b7b5 removed duplicate code by adding a public getPropertiesFile method to obtain the File
Former-commit-id: cd3c7fdad8907eb28704e1e8342dfe41e08d9da3
2013-08-31 06:46:26 -04:00
Jeremy Long
6d85e7cdf7 added test case for removeProperty
Former-commit-id: 7ae029f35b6f1aadd20abac560ae62d377b5557d
2013-08-29 17:01:47 -04:00
Jeremy Long
23a47a6f63 added ability to remove a property (for test cases)
Former-commit-id: b2388ddb516b2f5b32f54398c11fc0c00990c9c8
2013-08-29 16:56:00 -04:00
Jeremy Long
d2bfcc6f0e fixed broken test case
Former-commit-id: b4f434d0d19a24938b2e795d1773c551fba70474
2013-08-29 16:50:21 -04:00
Jeremy Long
7495392aa2 fixed bug due caused by moving properties from cve to data directory
Former-commit-id: 508894a061b40bb80fb294835021e3ba8f34037b
2013-08-29 16:49:09 -04:00
Jeremy Long
c4ddf84ba8 removed duplicate test case
Former-commit-id: 8fd1309deb179486d6042a2b5119caca70437b19
2013-08-29 16:41:41 -04:00
Jeremy Long
aad6c28e4d fixed broken test case
Former-commit-id: 84d34cf826fc4eda8fa72592d9f3f959e9bf4cea
2013-08-29 16:38:08 -04:00
Jeremy Long
2bd03dada4 code reorganization, moved files around to better seperate functionality
Former-commit-id: da6b75d818d67b0c1c695860504aacc00991effa
2013-08-29 06:42:16 -04:00
Jeremy Long
5fab16ad06 temporarily commented out broken tests
Former-commit-id: 1ce099712487d7f1a3e13f3444fe2493181c08cf
2013-08-29 06:41:03 -04:00
Jeremy Long
6a4d1ed44d temporarily commented out broken tests
Former-commit-id: e05b064c6b076bb218b500b7a0feb26044f43d7a
2013-08-29 06:40:37 -04:00
Jeremy Long
db22159a89 added to externalize the meta info about the data used
Former-commit-id: 1fb0bf0594245fc7095c085faf18a000bf76d7f8
2013-08-29 06:15:20 -04:00
Jeremy Long
029e0e5044 updated test for getFile to return the DATA_DIRECTORY
Former-commit-id: f16d34a12416999c28597261b409c997ebc0c3ad
2013-08-29 06:14:25 -04:00
Jeremy Long
3f1ee0b1b8 new test data
Former-commit-id: 7b2bc59faf30d9bdc700bd4f2f5073de738c2b48
2013-08-29 06:13:20 -04:00
Jeremy Long
8009794cca Updated to externalize the data properties file
Former-commit-id: 729b2181f3cfcb7aa2862c1874b8aaacb154d46b
2013-08-29 06:12:55 -04:00
Jeremy Long
12ce96d802 updated getFile to correctly get the main data directory
Former-commit-id: 4c175b6c218c264c8255614858545224c0c597f7
2013-08-28 06:15:24 -04:00
Jeremy Long
53bd62b236 updated data
Former-commit-id: 4fd690df0f94e241f01ce49708117e45932175f3
2013-08-24 20:16:32 -04:00
Jeremy Long
cd7362c654 updated how initial test data is updated
Former-commit-id: dd94b61a39efdd619c23beddf25f683dc1fe5791
2013-08-24 20:00:09 -04:00
Jeremy Long
788b5633cb minor update to test class
Former-commit-id: c4e38c8f5f3ed154216aad0b023176c74e5fa4a4
2013-08-24 19:59:31 -04:00
Jeremy Long
46d106e6e2 updated how initial test data is updated
Former-commit-id: c63f49d89c63446c9ed73800e8cdd17f0a977986
2013-08-24 19:58:54 -04:00
Jeremy Long
8ffb91022e minor update of annotations
Former-commit-id: b29855c5afc64d91c2931aef5debb410b5f457c8
2013-08-24 19:57:55 -04:00
Jeremy Long
57c09d1772 updated how initial test data is updated
Former-commit-id: 7fac5faf5a82bedc6f323f85cee2cd47c984fb74
2013-08-24 19:57:14 -04:00
Jeremy Long
0731ed2c7a updated database schema version so the fix to the lucene index is enforced on clients
Former-commit-id: b743deca9949b67ce5e94c52fff6125e65bf340b
2013-08-24 19:56:13 -04:00
Jeremy Long
19ecb67f2d updates as the CPEAnalyzer was moved
Former-commit-id: d3c21f1c0187a94e56aeff55fd0874273cc65faf
2013-08-24 17:02:27 -04:00
Jeremy Long
d16123c276 updates to ensure backward compatability with 1.6
Former-commit-id: b98e3caf316ea880b6c0adb25f62338e8d16f40e
2013-08-24 17:01:39 -04:00
Jeremy Long
f90b168fdd commiting deletions and no-ops
Former-commit-id: 920f16fc7fb20d5536c62e1ccc180fa248f76802
2013-08-24 16:23:57 -04:00
Jeremy Long
09f416efdf modified CPE Index to seperate writer/reader in prep for adding locking
Former-commit-id: baa48c8e70b36b9b14591d581bc1180b6d30d686
2013-08-24 16:21:32 -04:00
Jeremy Long
05f40f3451 updated javadoc
Former-commit-id: 21268a3107bf50b84d02f8ed68dd567bba7d6de9
2013-08-18 05:55:31 -04:00
Jeremy Long
d81206fe2e Added an implementation of a spin lock that can be used to lock a directory.
Former-commit-id: 121a3d5d026f524698762b377c3582fbc9303bf2
2013-08-18 05:54:11 -04:00
Jeremy Long
f166ef9313 made non-vulnerable jars hidden by default
Former-commit-id: 61cd10a3844a73ac8ee2aadabfe5f1b51998033d
2013-08-16 14:49:48 -04:00
Jeremy Long
14704f9b4d updated jar plugin
Former-commit-id: cd78c43734a1a92c30800eae51c398e328ee4849
2013-08-16 14:49:23 -04:00
Jeremy Long
8381daeeb7 Merge pull request #13 from eoftedal/master
Styling and toggling on HTML-report

Former-commit-id: 99ac0d70c3f94f8245e94e62eca6863faa687898
2013-08-16 11:22:13 -07:00
Jeremy Long
164ed75af2 corrected minor issue with path to zipped test data
Former-commit-id: 44feb56bedd15a651e371a3506142b751961086e
2013-08-16 14:13:12 -04:00
Jeremy Long
1f7c64e279 corrected minor issue with path to zipped test data
Former-commit-id: 9d4d5d6aa5d56028a8fcb871498f20a7cf2febc9
2013-08-16 14:13:01 -04:00
Jeremy Long
a76bf03bc9 updated the scanned test dependencies
Former-commit-id: eac650187d8e8872ff1550148f1a26d640096444
2013-08-16 12:48:54 -04:00
Jeremy Long
e50d7f7b95 increased the ignore list for parts of the domain that will not be used as evidence
Former-commit-id: 1f7d410c1d8c6b9548412b151763fda6e7323d7d
2013-08-16 12:48:22 -04:00
Jeremy Long
45b1327c58 added WAR files so that they will be analyzed
Former-commit-id: 2aa266d40d5d3c1b3511db642e8b23331abf4b29
2013-08-16 12:47:30 -04:00
Jeremy Long
fe60421731 updated dependencies for test cases
Former-commit-id: 8ca0be6ef84b6db1baf3e8b05142fbd86bae97a7
2013-08-16 12:46:41 -04:00
Jeremy Long
0404fe9044 changed dependency references used during test
Former-commit-id: 64f18029835d6739034eaa9e44e9a974145d2aaf
2013-08-16 12:06:13 -04:00
Jeremy Long
8cf6c59ec7 removed from test resource to a test dependency
Former-commit-id: 44dab7bb5eed97a2fc48859136725ce62f0f6d1a
2013-08-16 11:18:50 -04:00
Jeremy Long
7b817ff866 minor update to remove lib from scanned directory during test
Former-commit-id: 7284871eb641a85f1f4d70c74b98e01c55b962b2
2013-08-16 11:18:31 -04:00
Jeremy Long
f087f70a2c updated dependencies that are only scanned during tests to be provided/optional and copied them to test-classes
Former-commit-id: f7c7f5c0e258cc333931ed0980a04dce4cce36b3
2013-08-16 11:17:44 -04:00
Jeremy Long
b05752f430 added hazelcase-2.5.jar to the test cases
Former-commit-id: d048612ddd8c5ffe6d2b587a817aae274b728b98
2013-08-16 07:15:56 -04:00
Jeremy Long
c4cde366e8 fixed bug with short words at the end of a CPE were being ignored in verifyEntry. Also, added a min score of 0.08 for documents retrieved from lucene in order to prune bad matches earlier
Former-commit-id: b1720b2fba627507c601dc1e5b08a5b540095271
2013-08-16 07:15:10 -04:00
Jeremy Long
33249fad21 added "lib" directory to engine integration test so that new dependencies to test can be added to the pom in the test scope
Former-commit-id: 7e8b95db4698e6505170fce016124910512b4f3a
2013-08-16 07:13:07 -04:00
Jeremy Long
f0dd28d4db updated test class path
Former-commit-id: c29fa3df038932ffa9f3356327c7706133081137
2013-08-16 07:12:01 -04:00
Jeremy Long
c0e35aa9fa set version to 1.0.2-SNAPSHOT
Former-commit-id: 68029d97497bb2c7adb05869f3d4a2f4891eeb62
2013-08-14 20:11:52 -04:00
Jeremy Long
1fd633a23b upgraded to use apache commons compress instead of core java zip api to accomodate UTF-8
Former-commit-id: 9a681b87ad8f53a909939360733f04b1e552f481
2013-08-14 20:06:26 -04:00
Erlend Oftedal
9a65e26e71 Styling and toggling on HTML-report
Former-commit-id: bfb745138b5bfbf1206135bd1d53ca463b46fcf0
2013-08-13 16:08:25 +02:00
Jeremy Long
f22cabc32a update
Former-commit-id: d4fcc81fca0f0070352b9a6c9b8e79704819e146
2013-08-07 22:49:56 -04:00
Jeremy Long
b97d57f00b updated information and added links to gh-pages
Former-commit-id: dc36d56de5d6bd7bc82680cd263ead8ceeea139b
2013-08-07 22:47:30 -04:00
Jeremy Long
5db3544683 removed gpg signing
Former-commit-id: 9782dddf82265be0f675f5e5f9f9849bfcc5b3ae
2013-08-07 22:42:32 -04:00
Jeremy Long
96eee95596 updated readme
Former-commit-id: 4cf254d41b78f8e9b232d6b40ab866fee05deac6
2013-08-07 22:41:29 -04:00
Jeremy Long
ffb3243bb6 reverting back to v1.0.1
Former-commit-id: 1000c0503272c412520a2b7f63c2f90dbcae9b5b
2013-08-07 22:37:35 -04:00
Jeremy Long
09f07902ef updated batch update functionality
Former-commit-id: f62347bd25b61f048f18fb8cb23b8de7c053659e
2013-08-06 19:34:11 -04:00
Jeremy Long
43583bbc2e updated tests
Former-commit-id: f290ba61239a0a5beee9522e036100753ddef2f7
2013-08-06 19:33:37 -04:00
Jeremy Long
2ebc713cbb added new test data in zip archive
Former-commit-id: 941e6cff1ecd034d3450f81fd986c3c245cb42e1
2013-08-06 19:32:37 -04:00
Jeremy Long
65ecc0f3bb removed
Former-commit-id: 312a48623f9b1d9ecd9950a2a8d719ad28ce82f9
2013-08-06 19:31:45 -04:00
Jeremy Long
ebabc1117e added additional tests
Former-commit-id: b377007cf39b3f828fb336e336804b7db56ff923
2013-08-04 14:48:21 -04:00
Jeremy Long
672e59e657 commiting initial (and likely broken) version including batch updates - commiting as I need tests done with more OSes
Former-commit-id: 38f07a64633e0762623cdb5a00478a5bafd159b3
2013-08-04 14:47:54 -04:00
Jeremy Long
882e11f558 attempting fix for Windows file:/// URI
Former-commit-id: 38a26b41aa2ebed8e043ec4dd5a0096a353b650d
2013-08-04 14:44:53 -04:00
Jeremy Long
1cd5acb972 updated fetchFile test to remove un-needed argument
Former-commit-id: fab441c8cb525226f8e246e258e6705ed7167bbf
2013-08-04 10:48:10 -04:00
Jeremy Long
464a6efd28 removed some un-needed functions relating to downloading files
Former-commit-id: 95735c796df1ae95be5273c66722a5cbfbc81c36
2013-08-04 10:46:06 -04:00
Jeremy Long
18c3c1f475 added new exception
Former-commit-id: 919a3a7beaf09c6bd98c48c94d7712f51cd7624a
2013-08-04 10:34:20 -04:00
Jeremy Long
52de46aeb3 moved unzip functionality to FileUtils
Former-commit-id: 3f791cb94b5ec94d17118d25cb08598c1769edda
2013-08-04 10:33:28 -04:00
Jeremy Long
b80d088254 added a file.delete that will delete the file on JVM exit if the original delete fails
Former-commit-id: 6007a325a0796b8ad881df6c8f3568fe131a764b
2013-08-04 10:32:53 -04:00
Jeremy Long
7d0d85aeb7 removed unused properties and added BATCH_UPDATE_URL
Former-commit-id: ef80d9a274071342026a619b88183bfca4988074
2013-08-03 12:12:59 -04:00
Jeremy Long
d19ef8322e removed unused property in test case
Former-commit-id: 608279aaf7e507621454065a9f62f25883c61002
2013-08-03 12:11:46 -04:00
Jeremy Long
840b4d7619 updated comments
Former-commit-id: 93c3f238c44a604e25ac8706f0efbc70d6158c9b
2013-08-03 12:10:50 -04:00
Jeremy Long
e4a36545d7 updated getLastModified() to support the file:// protocol
Former-commit-id: e23b72db0070c2ecf22a725cc936451440ad530f
2013-08-03 12:09:44 -04:00
Jeremy Long
31fbc7389b made getDataDirectory static
Former-commit-id: b347a95eb968ae49fb7a904c4a8ed5d7a00e85dd
2013-08-03 12:07:05 -04:00
Jeremy Long
19ec936d38 added application name and version properties
Former-commit-id: d99340e153b1548b9483b346a3aa488462f5689e
2013-08-03 12:06:24 -04:00
Jeremy Long
939c67d41c added application name and version properties
Former-commit-id: fe8db80a771f7a45875136295412a3becaed3b0d
2013-08-03 12:05:54 -04:00
Jeremy Long
9614e4f115 added version to data directory path
Former-commit-id: f5ca8a7c4ef98c5e7b72c410691b069c6221c9e1
2013-08-02 23:41:21 -04:00
Jeremy Long
c48150a792 updated installation download urls
Former-commit-id: f496586d54e157764d32ee81d0f8a60d3c377523
2013-08-01 11:56:15 -04:00
Jeremy Long
60687502d1 version 1.0.2-SNAPSHOT
Former-commit-id: e3dfa2662b85df65a91ab016c512ef0fb9dcfd0e
2013-08-01 11:50:37 -04:00
Jeremy Long
2fab58759e version 1.0.1
Former-commit-id: c8cb49627593ccb3ad9033222341c04af3feb2f9
2013-08-01 11:09:07 -04:00
Jeremy Long
a42c586bb2 fixed issue with data directory and made a few other minor changes
Former-commit-id: 46f89f4deb6b0b55f34ee61c61424f87bf0334d8
2013-08-01 10:57:44 -04:00
Jeremy Long
a6b76b3494 Updated installation instructions
Former-commit-id: 3a8ea34b6e4a3eb3b2877d30b3c211290f758c0b
2013-08-01 10:57:13 -04:00
Jeremy Long
a6eaf7fc84 [maven-release-plugin] prepare for next development iteration
Former-commit-id: b55c872dbc13979238a795d1eb2ebb7539522860
2013-07-31 15:25:50 -04:00
Jeremy Long
97ba9b42eb [maven-release-plugin] prepare release dependency-check-1.0.0
Former-commit-id: 6119beae5eca578e8c0f1847a4a5d1b4de1353d7
2013-07-31 15:25:26 -04:00
Jeremy Long
e0a71f0373 snapshot 1.0.0
Former-commit-id: 2a24202dc7e55e11d975b79f7972ca6f792d991d
2013-07-31 15:10:15 -04:00
Jeremy Long
b8875d7f1c [maven-release-plugin] prepare for next development iteration
Former-commit-id: c8259bf06880587c957e31bd65b2aae8aad0e594
2013-07-31 14:41:20 -04:00
Jeremy Long
67dfd9a942 [maven-release-plugin] prepare release dependency-check-1.0.0
Former-commit-id: 793202c9cad55877dd574b109b17aee7158021e8
2013-07-31 11:21:09 -04:00
Jeremy Long
db46b03d0c releasing updates from private repo
Former-commit-id: 745279b1fbbfe1e331adbf52ca4ccd9e75a18178
2013-07-31 10:21:31 -04:00
Jeremy Long
5672c86905 removed todo comment
Former-commit-id: fc33e187defbec9a57ef66aca2ab0486b14d9d55
2013-06-25 22:35:34 -04:00
Jeremy Long
d5406270a5 improved exception handling
Former-commit-id: bd0f78d44a0079181f9a7b461c0599a4f57db01b
2013-06-25 22:31:59 -04:00
Jeremy Long
0b3f5e408b moved jaxb generated code
Former-commit-id: 1847d2987af92aea9f72d83165600dacbfd54510
2013-06-25 22:19:40 -04:00
Jeremy Long
2ce432ac77 moved jaxb generated code
Former-commit-id: cf1b87989c9bea724a852d2293e11255cdf2ffcf
2013-06-25 22:18:58 -04:00
Jeremy Long
6cb26b3fbb added extra jar to analyze test to correct http false positives
Former-commit-id: 584f7924b1a50de4cf358d7880dbca6646161d98
2013-06-23 22:42:40 -04:00
Jeremy Long
a9b5949191 added correction to deal with http urls causing false positives
Former-commit-id: 8fc7b6ec7754d83eca030968e851a13ef0b2b6ff
2013-06-23 22:40:58 -04:00
Jeremy Long
6016370515 Added methods to test strings for urls and to extract important portions of the url
Former-commit-id: be5878b61d1ce226a4d802b431cfa6c0d32252d1
2013-06-23 22:38:45 -04:00
Jeremy Long
f3c026f278 few minor updates
Former-commit-id: 2b41a7ee44fde511a47bb76f7c366db123eb2528
2013-06-23 22:37:27 -04:00
Jeremy Long
8f218bd6d6 added common-validator to help solve the url problem
Former-commit-id: c926c675c51d0e22f2552a1d1822bb16d25501c7
2013-06-23 22:34:12 -04:00
Jeremy Long
59fd89bf68 extracted common parts of the tokenizing filters to create the AbstractTokenizingFilter
Former-commit-id: 5ecb6ad7f16de5d9a22789b4cfbbf38c40a8fb35
2013-06-23 22:33:07 -04:00
Jeremy Long
d27a6235f0 added the AbstractTokenizingFilter
Former-commit-id: 043e4f9940c341dc05529c08d154f523735756d3
2013-06-23 22:30:47 -04:00
Jeremy Long
c23febbcf0 added UrlTokenizingFilter
Former-commit-id: 6868a5b16e8d44f8761028278b6c292f98f53a7b
2013-06-23 22:29:54 -04:00
Jeremy Long
81e85a4d0d added UrlTokenizingFilter
Former-commit-id: 23c7e8caa1e554141b1f02adae6469d94ed29f8e
2013-06-23 22:27:50 -04:00
Jeremy Long
44ba1bc85b fixed the addEvidenceWithoutduplicateTerms - but allowed the same term to be added multiple times
Former-commit-id: 415bde97d05cb6c7dc221d2671f37156a17a7003
2013-06-23 22:26:37 -04:00
Jeremy Long
6244fe5a93 added suppertsExtension method to determine if any analyzer supports a specified extension
Former-commit-id: b889407df86d1611fee3e09039a7f0113f3167a2
2013-06-19 23:28:08 -04:00
Jeremy Long
973335db56 updated to version 0.3.2.5-SNAPSHOT
Former-commit-id: 8d0d2f1ed56c85a6291e4ad0723133d9afd0527e
2013-06-17 20:44:05 -04:00
Jeremy Long
4b2c4f88d3 updated to version 0.3.2.4
Former-commit-id: e8184de2ff4248eba5996cb8024fd804d273ae7f
2013-06-17 20:42:07 -04:00
Jeremy Long
bbd2ca0d68 updated logging
Former-commit-id: 940e4d2a7aba51931b1024c7426ba31bc686cc16
2013-06-17 20:40:29 -04:00
Jeremy Long
a82c225841 added message about BH Arsenal
Former-commit-id: f793bc5197eb7483774e8c9f3f5325e77e41b090
2013-06-17 20:25:40 -04:00
Jeremy Long
f9a6852aaa checkstyle correction
Former-commit-id: 63e61948becf22440bab7c34ccb304205bc60174
2013-06-16 07:43:54 -04:00
Jeremy Long
fad704b692 updated logging
Former-commit-id: b305a66140786ce59f547a7fce4a211e092a883d
2013-06-16 07:24:34 -04:00
Jeremy Long
e362632477 updated logging
Former-commit-id: 665f57b1a1aca0ab8b2ee5a370ef17089d00c813
2013-06-16 06:36:14 -04:00
Jeremy Long
4558b49c1b updated logging
Former-commit-id: 4d6b0268527200b6472c2068c2e835ae003a9f44
2013-06-15 23:42:45 -04:00
Jeremy Long
4357d8788a fixed null pointer exception
Former-commit-id: a4ec4a993db877914ba7742e4c1eb04d8cb76a0c
2013-06-15 22:40:11 -04:00
Jeremy Long
78b7c24c15 minor updates - still no implementation though
Former-commit-id: 02bcef8ced0cbca52f79d4f4e02aa388a5aab60c
2013-06-11 06:23:05 -04:00
Jeremy Long
127e9e9f74 updated javadoc
Former-commit-id: 0ec1e86a1aad644b242d0c2add4a1f91787c9bf3
2013-06-11 06:20:00 -04:00
Jeremy Long
1951ae1cce fixed compilation issue due to changes in other classes
Former-commit-id: 1f34406810b81131a2fab354b92a96295c3911cd
2013-06-11 06:05:07 -04:00
Jeremy Long
79e2fd4b52 added a temp directory property
Former-commit-id: 4eef30988909b1ba51ee4556fe3f1d3b93189278
2013-06-11 06:03:52 -04:00
Jeremy Long
2265a2c43d added a getInt with a default value
Former-commit-id: 4447f876376b8f2919bca5d784749205d9a01055
2013-06-11 06:03:13 -04:00
Jeremy Long
1e7e543ab0 minor update to support new analyzer
Former-commit-id: c30cd9fee16331a50b33792b0cfc3d48e33fb5b3
2013-06-11 06:00:09 -04:00
Jeremy Long
9671a73bd6 added netbeans configuration files too
Former-commit-id: 9cb38b18c5b87a88c01b16b9a81414d8524897ca
2013-06-11 05:58:06 -04:00
Jeremy Long
5bbee94d68 added throws clause to initialize and close as specified by the interface
Former-commit-id: 4a081a980f370513f54c23e6a6d2c2c41c0ff200
2013-06-07 22:24:01 -04:00
Jeremy Long
9d7122d69c re-arranged code and improved documentation (some)
Former-commit-id: 7e52b2625f3cf4f30c6d250c00104fe7742e11f2
2013-06-07 22:04:35 -04:00
Jeremy Long
6b1270a4f9 made snapshot
Former-commit-id: fc59277b3a8d29c0b19f4c89129fa137bb440290
2013-06-07 22:00:36 -04:00
Jeremy Long
3c8de2be3f v0.3.2.3
Former-commit-id: 50b7db9ccbac552ebd06dd85045b3da0c1414f07
2013-06-07 15:53:03 -04:00
Jeremy Long
5afb5f0e83 v0.3.2.3
Former-commit-id: 5e838c7e8f7facd79cbfb0f63dac3d4a39034e38
2013-06-07 15:52:24 -04:00
Jeremy Long
7f42d0df40 to revert
Former-commit-id: 02de6f9d928f3d18cd4b23fdff26aac4c9c99d74
2013-06-07 15:51:20 -04:00
Jeremy Long
0df54c9021 next snapshot
Former-commit-id: eb08242da149b71a8c552d0d1ea7d589397c8104
2013-06-07 15:47:33 -04:00
Jeremy Long
41bc33f4ba removed deprecated code
Former-commit-id: 73b72b8f5aba62876655bd6912365da378d3e804
2013-06-07 15:46:30 -04:00
Jeremy Long
dcc883fa27 v0.3.2.3
Former-commit-id: ff715cd36a4c2340b563bf8df720ee90f33a095b
2013-06-07 15:46:17 -04:00
Jeremy Long
492c5d01bf checkstyle fix
Former-commit-id: a2537f620af11103ebefa0f94afc60b35cc82be5
2013-06-07 15:46:02 -04:00
Jeremy Long
49eaca1290 checkstyle fix
Former-commit-id: 6115652bf743e0fbb3d54fb294426de97496c6b7
2013-06-07 15:45:32 -04:00
Jeremy Long
ce43b586ad added vulnerable library count
Former-commit-id: 2913ff54090a0527bf34c0740898644e4b82efde
2013-06-07 15:44:15 -04:00
Jeremy Long
ae49cd6a26 added a new vulnerability report
Former-commit-id: 58c096683a2a382100352262dfd13b511a696447
2013-06-07 15:20:38 -04:00
Jeremy Long
6ad3897af8 added Stupid Table Plugin
Former-commit-id: 110e79a21c6e1f61d503ab1fa9331f76b5da13b2
2013-06-07 15:20:23 -04:00
Jeremy Long
53ddb067ea version 0.3.2.3-SNAPSHOT
Former-commit-id: 043e562ba47635a3a25e8724fb36f246ecd97cf2
2013-06-05 00:07:59 -04:00
Jeremy Long
a9762170bc version 0.3.2.2
Former-commit-id: 98ef7905c06f8489c0e685fa8992d0f08985340e
2013-06-05 00:06:09 -04:00
Jeremy Long
4d91403fd2 checkstyle fix
Former-commit-id: 885c335fc8fd4b8eea0e074c919f02c3cc26e32c
2013-06-05 00:05:46 -04:00
Jeremy Long
e1cd4a63d0 checkstle fixes
Former-commit-id: 473ff93fdc20125b97459a8e0cb51fd115b410e3
2013-06-04 23:47:22 -04:00
Jeremy Long
18f3874dab checkstyle fixes
Former-commit-id: fecdd752a18a9ea349fcba0ac9a6b5e76abeccde
2013-06-04 23:40:37 -04:00
Jeremy Long
6efcee500d updated javadoc
Former-commit-id: 686cdfb01938f14c5856300f3a7965c1aa22da6e
2013-06-04 23:40:11 -04:00
Jeremy Long
8c0532f363 updated javadoc
Former-commit-id: 43e1db973c4e4d9f36eb7fd18da76f5a0226fabf
2013-06-04 23:40:02 -04:00
Jeremy Long
fdb0d07ab8 fixed bug where dependencies would get bundled even if they were different versions
Former-commit-id: 23eb0cb89d4372611d552e3691727ac8477b245c
2013-06-04 23:27:14 -04:00
Jeremy Long
58e30649a3 added equals and hashCode
Former-commit-id: e7091b8f28f1a24d761729fe213b6208fe2ee03b
2013-06-04 23:06:02 -04:00
Jeremy Long
85feef3a60 added filter to add the correct Maven namespace to the POM if it is missing
Former-commit-id: a330eb5ade23e02e8ba450750f4051fd8844df39
2013-06-04 22:54:28 -04:00
Jeremy Long
fccd913a8a added filter to add the correct Maven namespace to the POM if it is missing
Former-commit-id: e8e3901878beacc0837e7b0578c810b2283727f0
2013-06-04 22:54:09 -04:00
Jeremy Long
dd119edafe minor bug fix
Former-commit-id: 0f0d101a22e904db91348dd40a40780d9bcb85ad
2013-06-04 05:09:04 -04:00
Jeremy Long
f6633fb16c checkstyle fixes (javadoc, final variables, etc)
Former-commit-id: f1ee986631ba810cea2ca2101948c11c03c0d62c
2013-06-03 20:23:23 -04:00
Jeremy Long
d243bf4f48 added attribute to ignore a findbugs style error
Former-commit-id: e675e7d62a96807f686f8a3a992b97be13b7e0dd
2013-06-03 20:17:07 -04:00
Jeremy Long
92d306f777 findbugs fixes
Former-commit-id: 390c00542b8ee16746118126bd9d6b7f4f98b546
2013-06-03 20:07:39 -04:00
Jeremy Long
0ea29b3d7c add jsoup to help convert the HTML, specified within nodes in the POM, into text.
Former-commit-id: d32fbfe3e1d9a26f053773d7b9566acead1acc1c
2013-06-02 21:45:49 -04:00
Jeremy Long
c8e6e8eb32 added code to remove additional false positives
Former-commit-id: dfe20849d2c7d4674331f44af3a82112a99b993c
2013-06-02 21:44:20 -04:00
Jeremy Long
a6aae6292e added initial version filter - only supporting struts1/2 right now
Former-commit-id: aa432c189c55d9ed66cf86d48041dd69dd43ab86
2013-05-31 22:57:04 -04:00
Jeremy Long
e33100b075 added another manifest entry to ignore
Former-commit-id: d8329c24f05a157cb94c8a9effbde52af31bfd76
2013-05-31 22:32:56 -04:00
Jeremy Long
84a229d286 added another manifest entry to ignore
Former-commit-id: 026080b556ab2a1736f137f87b7bf5c43cfecf6e
2013-05-31 21:52:36 -04:00
Jeremy Long
ab32c42487 fixed javadoc typo
Former-commit-id: d6d2c1998c8a8c933608351fd2b301b94480236f
2013-05-31 21:24:33 -04:00
Jeremy Long
0dc3744859 fixed javadoc typo
Former-commit-id: c631903f6567a3889722c9f19597651117c1d83d
2013-05-31 21:24:06 -04:00
Jeremy Long
d22eab4155 reduced complexity around determining if the jar contains classes
Former-commit-id: 3d31a3cbebcf0bebec17ee5f8c9a060f60458db8
2013-05-31 20:48:33 -04:00
Jeremy Long
ea9bfec3c9 removed a reported exception for javadoc or sources jar files for not having a manifest
Former-commit-id: bebbf0a2ef45f8d035a8420e036c6ac034a89760
2013-05-31 20:41:23 -04:00
Jeremy Long
02b43a5d66 minor update to text
Former-commit-id: 3d7ed5dfd4bef89e002d5bb3e49dc581a4863529
2013-05-27 22:22:44 -04:00
Jeremy Long
e0fc7952f4 v0.3.2.1-SNAPSHOT
Former-commit-id: 08cae57ef475f148c4d9754ab3414a41bfece536
2013-05-27 22:18:20 -04:00
Jeremy Long
66ec2c5d27 0.3.2.0
Former-commit-id: 9e3ef33d93a6d7d5e65cac75adf97cd3dc81f69e
2013-05-27 22:14:27 -04:00
Jeremy Long
f5a78402a6 testing
Former-commit-id: 13fe0b65c1061084d1716db13c18d19ed1797fce
2013-05-27 22:12:25 -04:00
Jeremy Long
29bfd7325d reset username and blank password
Former-commit-id: eb9ffb878d8f5c943bb5651ee9c2c18d9af7243f
2013-05-27 21:32:05 -04:00
Jeremy Long
318962c01f updated H2 version
Former-commit-id: 34b9d13b96c8891525c505dfbe0a41bed3422bb7
2013-05-27 20:47:13 -04:00
Jeremy Long
8ca49fafa1 added compile time support for findbugs suppress warning annotation
Former-commit-id: 189e2b7c84b49413c141810ac7efca31910eb7e1
2013-05-27 20:02:54 -04:00
Jeremy Long
656e783894 updated javadoc
Former-commit-id: c0ae715bd4042302ae97dd7834764629559d691c
2013-05-27 20:01:47 -04:00
Jeremy Long
18c6d60a85 updated javadoc
Former-commit-id: 7b5aaeab99df80b48414e880f05583f851c772d2
2013-05-27 20:01:16 -04:00
Jeremy Long
b202121c21 added findbugs suppression for a non-issue and made a few checkstyle corrections
Former-commit-id: 60a3757ce97ec7cccc07b66ef4541db3e2c2bdac
2013-05-27 20:00:46 -04:00
Jeremy Long
ea3672dd08 added findbugs suppress warning for a false positive
Former-commit-id: 439a2c5f6bf957535779f702532d1edb609330e5
2013-05-27 19:59:16 -04:00
Jeremy Long
88037af7ef collapsed nested if statements
Former-commit-id: 7e70e8a399042c413e86a772b6345fc6e52df235
2013-05-27 19:58:26 -04:00
Jeremy Long
4bda5b619d added supresswarnings for findbugs false positive
Former-commit-id: 6fd172530338f4fc22777eab7a36465be7d12119
2013-05-27 19:56:19 -04:00
Jeremy Long
a0645ea30f updated javadoc
Former-commit-id: 2af65f75bb0d0b28c33a9945ee27cf83912128ff
2013-05-27 19:55:13 -04:00
Jeremy Long
a3e4adb0af checkstyle fixes
Former-commit-id: 4585dce6788c08f6e63a0bb34572874f7eb02877
2013-05-27 19:54:41 -04:00
Jeremy Long
e18aedfabf reduced size to make tests fasters
Former-commit-id: 9d29ec809fe43f21d89f77e1200d92af1a103bd6
2013-05-27 19:53:14 -04:00
Jeremy Long
44529a78d2 updated javadoc and copyright
Former-commit-id: bd41e8c200b3a5386cb3c07bb2b398700d70ff16
2013-05-27 09:14:56 -04:00
Jeremy Long
bb9025364b Merge branch 'master' of https://github.com/jeremylong/DependencyCheck
Former-commit-id: 401adb5d528324f9af19745068868924c808d02b
2013-05-27 09:07:18 -04:00
Steve Springett
7c78283b46 Adding more control over data directory path
Former-commit-id: 926b9f3d2ed0a19a28a3d23a64bada70b5da22a6
2013-05-27 00:10:08 -07:00
Jeremy Long
f7d6ca5c11 Applied patch from Steve to change the loading of the H2 db
Former-commit-id: 46d4bd628f0d7ecfaffc7881f8bc47bee6c55a5f
2013-05-25 10:56:41 -04:00
Steve Springett
172a341b40 Adding more control over data directory path
Former-commit-id: af198db00ee4d1330ff0d4105f319c739c80bb8b
2013-05-24 23:53:24 -07:00
Steve Springett
09aef67808 Fixed Velocity logging issues in server environment.
Former-commit-id: 663447c35a74d17d2c2af4b62f4591924d6387a5
2013-05-24 16:00:10 -07:00
Steve Springett
a400312d3a Forcing the class loading of the H2 JDBC driver.
Former-commit-id: 97c59fc760efc9e8aa8df081759889f921d4822b
2013-05-22 01:11:02 -07:00
Jeremy Long
1b01b35b03 made outDir final
Former-commit-id: 0a1354925aac773035aa15b04912c30c585ed243
2013-05-20 22:54:35 -04:00
Jeremy Long
2d0acaa8ae various updates recommended by intelliJ
Former-commit-id: b3b3e4accfbf29d8df38eeb39a469881348ee26f
2013-05-20 22:50:21 -04:00
Jeremy Long
a31a73320b various updates recommended by intelliJ
Former-commit-id: 298ccc5ba67197542c729911b5b2222363833530
2013-05-20 22:17:19 -04:00
Jeremy Long
75da352806 version 0.3.1.1-snapshot
Former-commit-id: ce6e012112b05f79439b18612cea8a0131faa7b5
2013-05-20 17:04:03 -04:00
Jeremy Long
61b0c9b1c1 version 0.3.1.1
Former-commit-id: d44728ba689897645f7d18f3ee562e82355b1c9c
2013-05-20 17:01:02 -04:00
Jeremy Long
2185fe0f4c fixed typo that prevented some information from being displayed
Former-commit-id: 59c9c97fb478d52782afad114a0257fc045e3090
2013-05-20 17:00:21 -04:00
Jeremy Long
4ee0977aa1 corrected file path of related dependencies
Former-commit-id: 9a24e7e36474e387ac29021ed17bb38c1df5fccf
2013-05-19 08:29:00 -04:00
Jeremy Long
1ba44771bb bug fix, report generation failed if target directory didn't exist
Former-commit-id: bce38747178da61a08d726d32da575f4026dd26d
2013-05-18 10:23:57 -04:00
Jeremy Long
9966eec1df updated exception logging message
Former-commit-id: 206fd2354786aa53db3024b94a7ac4120c28f900
2013-05-18 09:00:34 -04:00
Jeremy Long
dd444f5f76 PMD fix
Former-commit-id: 18f1bac263b4bda33a58f11e1b35fd7602c462f1
2013-05-18 08:49:08 -04:00
Jeremy Long
a0a6089057 checkstyle fix
Former-commit-id: 67cdcf9f745f7220d02b84ac5e918ef65e324b30
2013-05-18 08:45:58 -04:00
Jeremy Long
4be72fc989 updated global Settings and moved connectionTimeout, proxyUrl, and proxyPort from system properties to normal command line properties
Former-commit-id: 0e7e552768dd43e9d0cb40052589a34d0738df37
2013-05-18 08:45:16 -04:00
Jeremy Long
033cbf696a updated autor email address to my owasp address
Former-commit-id: f6c6715b3fc1461afd543fb8d89b81fea1a8bbed
2013-05-17 23:57:59 -04:00
Jeremy Long
805bc85ea9 added equals and hashcode methods
Former-commit-id: 8c6e8bae17d2fcea4b52d46cda218922749cd9cf
2013-05-17 22:39:28 -04:00
Jeremy Long
0d057d500e v0.3.1.0-snapshot
Former-commit-id: 912467cad5ada2d445d96d2312b83ec76b5b6cff
2013-05-17 22:26:22 -04:00
Jeremy Long
7462500e20 v0.3.1.0
Former-commit-id: d1ea402f6bf49f88c06b17865be30ead766b6fd8
2013-05-17 22:24:24 -04:00
Jeremy Long
3e06a4a7c5 fixed logging bug
Former-commit-id: 8aa994957fcbf55ecd7c05964768bff901d64547
2013-05-13 12:11:22 -04:00
Jeremy Long
e0684ab086 Checkstyle fix
Former-commit-id: 4adf3d0e81f213bc324fc646abe8280385e81429
2013-05-13 11:54:50 -04:00
Jeremy Long
e7be883e2e Improved logging on failed updates
Former-commit-id: edfd14af594e7692e238a69b4fd2090361efddd5
2013-05-13 11:54:25 -04:00
Jeremy Long
8fe80a4507 Improved logging on failed updates
Former-commit-id: 61f2ba2acd867043f92904f1e1f038a25355f155
2013-05-13 11:52:54 -04:00
Jeremy Long
68084c4567 minor update to prepareLogger
Former-commit-id: f982fb266ee46fbe37334ef246c59fc861a2a523
2013-05-13 11:41:55 -04:00
Jeremy Long
9c27545f5f source formating update
Former-commit-id: 02681646cb18f9dbe7a4744af77128fc62865220
2013-05-13 11:09:39 -04:00
Jeremy Long
6da8af7680 updated title
Former-commit-id: cb455d4c1f34008e67f391644620f60367602798
2013-05-12 07:00:58 -04:00
Jeremy Long
1b7ce93623 file header update
Former-commit-id: 0a13aa9960848b5a97dcba0e51a89145e012ebc8
2013-05-10 06:34:45 -04:00
Jeremy Long
5f6480527e minor bug fix
Former-commit-id: c1417cb0cd8d0a65838feaa5b33c85e73e56a3e2
2013-05-10 06:29:08 -04:00
Jeremy Long
4d7b4ce877 checkstyle fix
Former-commit-id: f8a632d0d1f2c7c3b6b7e2553cda738b725f14d7
2013-05-10 06:05:59 -04:00
Jeremy Long
fd61f7d363 updated file header
Former-commit-id: 8d3dcd110d96d93d2f267e77d303e076be71db5c
2013-05-10 06:04:28 -04:00
Jeremy Long
47cc3d7358 checkstyle fixes
Former-commit-id: 213d1375060723f9bded7680cf07ad0f790cd71c
2013-05-10 06:03:00 -04:00
Jeremy Long
d180618634 updated file header comment
Former-commit-id: ef8657a90b398f59cc0693f0a094292609fdd9ef
2013-05-10 05:52:44 -04:00
Jeremy Long
b2b96426d7 minor correction
Former-commit-id: 436e1ffb049bce43cf0dce2f881b9b61744085b4
2013-05-10 05:33:57 -04:00
Jeremy Long
5796d4b969 Fixed bug when analyzing maven repositories - related JARs would not get bundled
Former-commit-id: 8b5386ba522277a0fa8c982e8e5bd55277edc258
2013-05-09 23:03:03 -04:00
Jeremy Long
37957613df bug fixes
Former-commit-id: 4c1161542509a2e2e9b78be119a230e1d8cf4cfc
2013-05-09 22:34:47 -04:00
Jeremy Long
cb82f02eb4 spelling fixes
Former-commit-id: d118f6474726c5cb39c246789830c4626a2bba7a
2013-05-09 19:49:25 -04:00
Jeremy Long
3feccefee8 improved pom analysis
Former-commit-id: 8da3f802dbf2c3d8cd63d07a1a0a5d984074f007
2013-05-03 20:23:42 -04:00
Jeremy Long
910b1dca85 minor update to references where the actual licenses are for the 3rd party components
Former-commit-id: a7f85046bbf88b3c1abc99481f3ff7bbff39f670
2013-04-24 20:03:02 -04:00
Jeremy Long
d71c6f055b changed logging level when logging update exceptions
Former-commit-id: 4608aad994437e1ebffff2dbb2d97dafdf138ab5
2013-04-23 21:35:23 -04:00
Jeremy Long
536f373b91 checkstyle/pmd/findbugs fixes
Former-commit-id: ed64aebbc7c5f25978b8e4b6391a6d7fc08749be
2013-04-23 20:22:51 -04:00
Jeremy Long
6987845228 added commons-lang dependency
Former-commit-id: 2078cb15e694c9c0122a27cc188522a9771980a9
2013-04-23 07:10:31 -04:00
Jeremy Long
2edd2bf763 added FileUtilsTest
Former-commit-id: ca4a9781c134e4f01a64d4bf59489103d34d1f70
2013-04-23 07:09:56 -04:00
Jeremy Long
2605761d76 bug fixes
Former-commit-id: 29c74c9ac0bad912e90b6adb888fbeae10180835
2013-04-23 07:09:18 -04:00
Jeremy Long
391d261ca1 added removal off spurious CPE entries
Former-commit-id: c91ac1b042f691daa3312d9c2fcfd5e49cbea3d2
2013-04-23 07:08:29 -04:00
Jeremy Long
6a7531f1e6 added pre finding and post finding phases
Former-commit-id: 006203fe9c4ca27bed29601af6fd35f276ce5366
2013-04-23 07:07:19 -04:00
Jeremy Long
fb294e8bea added tests for DependencyVersionUtil
Former-commit-id: fcbc3b4f9d619be77d78d011926751d528cb1eb1
2013-04-23 07:06:30 -04:00
Jeremy Long
a1046488c3 added better version analysis for dependency bundling
Former-commit-id: c32d49d50c87a0c3b87da777af524d413cc7c7f3
2013-04-23 07:05:42 -04:00
Jeremy Long
8cef56265c bug fixed regarding whether or not to include packages as evidence
Former-commit-id: 24c6a76d8088cf951db9765a9c618057e2fe5ec9
2013-04-23 07:03:57 -04:00
Jeremy Long
ec30851247 added axis and axis2 for testing
Former-commit-id: d0f114a142bb8d115caacaeb25d09497cd3420ba
2013-04-23 07:02:48 -04:00
Jeremy Long
7420c12b89 fixed bug in removing sources and javadoc JARs from analysis
Former-commit-id: 1386148a368a193ce70f1fae8784215d62706ee9
2013-04-21 05:18:50 -04:00
Jeremy Long
895c770c24 added code to filter out sources.jar and javadoc.jar if no class files are contained
Former-commit-id: ff77b49af31258a12433f8a78d13a6cbf36d11c1
2013-04-20 15:43:12 -04:00
Jeremy Long
606070f449 started snapshot
Former-commit-id: f4551455036cf1050f0fcf7e3ca74f2796989403
2013-04-20 15:42:21 -04:00
Jeremy Long
ec41493d91 fixed line break issues
Former-commit-id: 2018eb293b9a79cc892e37994ba1efac7b179600
2013-04-20 15:03:32 -04:00
Jeremy Long
d551093199 fixed line break issues
Former-commit-id: 0fc9f2954c5368e9300039e70ef63dd0f0bbfe1e
2013-04-20 15:02:38 -04:00
Jeremy Long
f7f8b2da62 fixed line breaks in the usage
Former-commit-id: 556823a8af6e13cc7a18c248d3e51946b46d3d28
2013-04-20 15:00:58 -04:00
Jeremy Long
1378b630a6 release 0.3.0.0
Former-commit-id: 65d4221afe3637a4d5cca28b7f9e158e936bd919
2013-04-20 14:55:28 -04:00
Jeremy Long
9726d86ab0 minor bug fix
Former-commit-id: ecf116ac73e7d6a0abd4cfe2952551deaddaf148
2013-04-20 14:48:58 -04:00
Jeremy Long
c9364e7b94 added a schema for the dependency-check XML report
Former-commit-id: a1ddac261454dd46e4d875c0de451db943db3674
2013-04-20 14:41:08 -04:00
Jeremy Long
1e6780a2e3 minor updates
Former-commit-id: 688d326e5d15ecc45ac8c7f5a7c53dfaf2615fac
2013-04-20 13:36:44 -04:00
Jeremy Long
72855d4d7a removed un-necassary functionality from all analyzers and the base engine
Former-commit-id: e6b97601ff24ced2a2016d03b35869d083b947db
2013-04-20 13:12:16 -04:00
Jeremy Long
c0359da930 added related dependencies
Former-commit-id: ae645b937c26ab850194cfe70b1b64f40f7eb62c
2013-04-20 13:11:31 -04:00
Jeremy Long
b4f39b0bfc Correctly implemented this analyzer (hopefully)
Former-commit-id: 0fb69a26a8c1da952894ec410f8ef0e4e40d1914
2013-04-20 13:11:01 -04:00
Jeremy Long
d7af145f3b checkstyle/PMD updates
Former-commit-id: d970e6d49ba78a1e563b4ab5598c242d4dbca80e
2013-04-20 11:49:59 -04:00
Jeremy Long
b078d8477e added test case for VulnerableSoftware
Former-commit-id: 935832719235e07a4c7f1fe0c989cae3864b5ce9
2013-04-20 07:18:27 -04:00
Jeremy Long
02b64e1a4b correct and issue with the comparable interface (invalid sort order)
Former-commit-id: 2d819f088d098560c678912e9dfffb2f8cca8f06
2013-04-20 07:18:05 -04:00
Jeremy Long
f444825e42 minor bug fix
Former-commit-id: 7feaa7f3595ba0d198aff445fdb377b86a76e4fd
2013-04-20 06:28:40 -04:00
Jeremy Long
9fa62ef388 added vulnerable software to the report
Former-commit-id: 97658f4c2776c47b41d74db3be180c871dbcf243
2013-04-20 06:16:43 -04:00
Jeremy Long
e73ad07836 added a link to the NVD
Former-commit-id: 6686314a88f3a2f0aa93de2c753a0962cb902a07
2013-04-20 06:03:37 -04:00
Jeremy Long
a680e79686 added license information
Former-commit-id: d5eccd06a7bd8829487616bf000250bf00e56bec
2013-04-20 06:00:36 -04:00
Jeremy Long
728c05262c updated license information
Former-commit-id: ab4882e7a44896c670295dd56e12b25bc568c7cc
2013-04-20 06:00:02 -04:00
Jeremy Long
23e08c1ca1 updated output format to accept 'ALL' to generated both HTML and XML reports
Former-commit-id: 002943f373d5541d0ede54d00beb9c155eb454c0
2013-04-19 18:52:02 -04:00
Jeremy Long
198d73acfa Updates to abstract analyzer and subclasses - removed duplicate code
Former-commit-id: e0acf33d81dcf5e2d6383345927287dbe918d03c
2013-04-19 18:46:01 -04:00
Jeremy Long
71e210b66c Updated to accomadate removing dependencies (used by the DependencyBundlingAnalyzer)
Former-commit-id: c5f530bce2d82e30795d327c8da03b66bce7785b
2013-04-19 18:45:40 -04:00
Jeremy Long
2f31c53fd4 Updating Dependency Bundler to group related dependencies
Former-commit-id: f9d971b134dc75847b45c1bb3b0bc2fce37e5c1a
2013-04-19 18:44:25 -04:00
Jeremy Long
9f661535e0 Updating Dependency Bundler to group related dependencies
Former-commit-id: 4d2d05f0ba2fc3890de7fba8f6ff0a7b6a858f4b
2013-04-19 18:43:31 -04:00
Jeremy Long
5b0d4bf8e6 Adding Dependency Bundling to collapse multiple related dependencies into a single reportable instance
Former-commit-id: 17a6af2954e8b6da6ecd0b97895372624945d138
2013-04-18 17:58:47 -04:00
Jeremy Long
a639264149 checkstyle fix
Former-commit-id: e99149f776739afa17c930f0e9666c53f92a0296
2013-04-18 07:02:05 -04:00
Jeremy Long
91ab257eb6 PMD fixes
Former-commit-id: f34bcaff389cbfbcaa2e6b2244be3fbe16d01b52
2013-04-18 07:00:33 -04:00
Jeremy Long
e24a62d621 checkstyle fixes
Former-commit-id: 2bd6f330836c7dab07e5968ef845b4d48ede4abe
2013-04-18 06:54:36 -04:00
Jeremy Long
ec9f4b2b61 minor update to the description
Former-commit-id: c0af5d3511ac7ccb11d36193793baa9f2b2a2cb3
2013-04-18 06:54:24 -04:00
Jeremy Long
b66c7da4b3 bug fixes
Former-commit-id: 488d8b3e2b3db0bab3bc84091bac1b758336a3e6
2013-04-18 06:46:03 -04:00
Jeremy Long
6544cc98d5 minor update
Former-commit-id: 69b26d4f5a82c312242fa088306cf3c3628c4796
2013-04-18 06:45:41 -04:00
Jeremy Long
2dbef9e1fa added sorting for References via Comparable interface
Former-commit-id: bd93d1f376ab5869b3a9718a6017f2c311c83bb3
2013-04-18 06:29:08 -04:00
Jeremy Long
a924e81adb minor bug fix with sorted set
Former-commit-id: a53c5c220bb460b378583aa73c01ec2dfa81a196
2013-04-18 06:25:12 -04:00
Jeremy Long
1ded1b603e added vulnerable software
Former-commit-id: dd4b3a9e06bb33e4f895565bec4588a8b38f6f5d
2013-04-18 06:24:40 -04:00
Jeremy Long
a3012a29c2 updated to use SortedSet instead of Set in a couple of places
Former-commit-id: ae1d42bbf2ccb5994cb793872ff228c8ca9fbd86
2013-04-18 05:50:17 -04:00
Jeremy Long
8fcd800aff implemented the Comparable interface
Former-commit-id: 23c9ecf90a0392e2398376e63c78134de6d2de9e
2013-04-18 05:43:13 -04:00
Jeremy Long
4d414ea082 implemented the Comparable interface
Former-commit-id: 2be5ef6e2d0d9570186273fb6b8fc42e372ff251
2013-04-18 05:42:25 -04:00
Jeremy Long
d5b2380bc2 checkstyle patches
Former-commit-id: d06ea48208fa0b3d35b9a8d21b3b7b8e8172aaa6
2013-04-11 23:18:28 -04:00
Jeremy Long
d2853fafa9 updated to release a snapshot
Former-commit-id: 2fb68d59dac83f3f27c601b66d33448bd101faea
2013-04-11 23:01:18 -04:00
Jeremy Long
0e5a207c44 added functionality to remove some false positives
Former-commit-id: 4de4e94c96a3e65454f7626bee604b9286bd9a9b
2013-04-11 22:59:46 -04:00
Jeremy Long
d7744537ae Implemented the Comparable interface
Former-commit-id: 07d5fd34d76c296cfc2c1f049b285bbd9b05189a
2013-04-11 06:05:58 -04:00
Jeremy Long
9e79e9efb6 added counts for imported quantities
Former-commit-id: 39e4c4029ac3cf6ea76e2ac35370692e1fb1caea
2013-04-09 06:56:09 -04:00
Jeremy Long
a04338d184 added counts for imported quantities
Former-commit-id: 17673e8771d4314fc48bcf63f95a8992e6cbe17e
2013-04-09 06:55:43 -04:00
Jeremy Long
772b0ca2b0 checkstyle updates
Former-commit-id: e18a6c9a01cf3fdbbdd87446bb25b77e3e455c0f
2013-03-30 22:11:04 -04:00
Jeremy Long
13eb2b75d5 checkstyle corrections
Former-commit-id: eb05a880382ec71f00df8bb7f9b25aa98ceeb182
2013-03-28 22:44:11 -04:00
Jeremy Long
c800440e44 removed old file
Former-commit-id: 5490212a8587339f653f6b21ac1856b28835c40c
2013-03-28 21:51:07 -04:00
Jeremy Long
05f822380c updated dependencies and plugins
Former-commit-id: 9b528552fbc01c195250b1d2e2609296f31a8187
2013-03-28 21:50:28 -04:00
Jeremy Long
7896c81e98 added ignores for Eclipse project files
Former-commit-id: cc744fa73f6fc36650bd9ececf198f1c4cb353c3
2013-03-27 07:22:47 -04:00
Jeremy Long
ea50569b2a version 0.2.6.1
Former-commit-id: d249ee7a38c7443c030b1db4042cf92a34f7a8f8
2013-03-16 16:56:34 -04:00
Jeremy Long
7bce07aa0e checkstyle fixes
Former-commit-id: 31ff9324a8acd201002e4843deb5a2cfb08f2d88
2013-03-16 16:53:41 -04:00
Jeremy Long
5ef02290dd added package name scanning back in if no other data was found
Former-commit-id: e83c18cd1cd5f08ffb85cd91f0df2a8fe6382a81
2013-03-10 08:18:25 -04:00
Jeremy Long
34d5ba7d35 Added 'deep scan' argument/property to indicate more evidence should be collected even if it increases false positives
Former-commit-id: cc2c489f8187eb459301a132ff63a2ebe4289e01
2013-03-08 17:33:01 -05:00
Jeremy Long
55004e7832 fixed bug
Former-commit-id: 94c67d4289b5766c3d184cddfc8231efec645764
2013-03-08 17:32:16 -05:00
Jeremy Long
4945446171 bug fix regarding duplicate terms being added to the lucene query
Former-commit-id: d12f68cfe986918f1be438fdb8d4281bcf1dd441
2013-03-03 09:50:12 -05:00
Jeremy Long
0e2d2408ca bug fixes
Former-commit-id: 2bbdb3407b26b6d10a65abc81643d4b8ede3d74c
2013-03-03 09:47:54 -05:00
Jeremy Long
8b8707c36e change in namespace as this is now an OWASP project
Former-commit-id: 162fbfc156a284f1597d230f65eaf29dc0f3e0fb
2013-03-03 08:57:38 -05:00
Jeremy Long
3bd9caf113 completed version 1 of XML report
Former-commit-id: 5768da52f398b124f79e25f40ba2bcd5a0931666
2013-02-22 21:47:41 -05:00
Jeremy Long
f713a83abf added XML Report Template
Former-commit-id: c9ca7e19d955d0d112749bb550b3880f80e6b9b7
2013-02-21 02:33:11 -05:00
Jeremy Long
b0e0f8c8bf converted README.txt to MarkDown
Former-commit-id: 34e7f81a6946c77b5bb4d2076b9a179a6d76b0df
2013-02-20 07:27:06 -05:00
Jeremy Long
c8623fd3a2 updated
Former-commit-id: 17bdf87061690071911d7e45d74d136dd46ba9cd
2013-02-20 07:25:28 -05:00
Jeremy Long
c6aad2c2d4 updated
Former-commit-id: b78334f9a2cab81bd1a899a9552d0c231fd78e0b
2013-02-20 07:23:28 -05:00
Jeremy Long
7ede87753b updated
Former-commit-id: b1e2063d8a9257c5d951f38457daa2bfb6a8af55
2013-02-20 07:22:30 -05:00
Jeremy Long
59bed5a0fa converted README.txt to MarkDown
Former-commit-id: 702563b2fd101576431e646ccab39388ef038a4d
2013-02-20 07:19:56 -05:00
Jeremy Long
e59377d9a3 spelling fixes
Former-commit-id: 8d53d845ec1212370aec6f58bec97cd94ef9b20d
2013-02-19 21:40:42 -05:00
Jeremy Long
6274cfce4b cleanup and spelling fixes
Former-commit-id: 9c44ae88606f12728bc424d566ef11194c5c399b
2013-02-19 21:35:24 -05:00
Jeremy Long
9d624702f6 add ignore for IntelliJ files
Former-commit-id: 06c627dce1fcd6cdb8c48a707555590248e7a798
2013-02-19 20:25:00 -05:00
Jeremy Long
f9d8ff3f74 spelling errors corrected
Former-commit-id: 1173c3632cdbcdafc111062e5c343b3a49bb7398
2013-02-17 07:46:10 -05:00
Jeremy Long
6c837f0639 Patches from Steve Springett for XML report format
Former-commit-id: 711371d19c3b79cc6411adef59d992cc16d5bf57
2013-02-17 07:27:01 -05:00
Jeremy Long
03c9ce3589 updated failing test
Former-commit-id: 12be2627cab271c3a15e484681965fcb0f4480e0
2013-02-13 21:38:03 -05:00
Jeremy Long
1ac7cdacb0 updated notice
Former-commit-id: 8f74cc2b80dbbebfa57cd3e8fff8dc33e0cc046c
2013-02-03 08:20:47 -05:00
Jeremy Long
ba93be1814 [maven-release-plugin] prepare release dependency-check-0.2.6.0
Former-commit-id: 3e72fb031177b1aac466a3c30be88a839667aef9
2013-02-02 17:12:48 -05:00
Jeremy Long
1404bbab9f updated
Former-commit-id: 080d367023ff85e259e725a8d1f754040a2e92aa
2013-02-02 16:59:55 -05:00
Jeremy Long
a5f8ed6378 updated version
Former-commit-id: 847e8e79ebf18fbacdd77ea6593433ec63e6c85f
2013-02-02 16:50:29 -05:00
Jeremy Long
1b59212003 updated usage
Former-commit-id: ab5472c4c3d89916c20741e84c29203e24a37f4c
2013-02-02 16:49:11 -05:00
Jeremy Long
4142901dc6 bug fixes and additions
Former-commit-id: 6ac1a641dce3b4826aadf886ec45364fd9b6ea5a
2013-02-02 16:44:46 -05:00
Jeremy Long
4ba9431e6f bug fixes and additions
Former-commit-id: e0d87c47ba547a14cdb67721e807776ec426b1ec
2013-02-02 16:44:06 -05:00
Jeremy Long
5da83517a8 added CWE Names
Former-commit-id: 60803fba6071a09ae03a18410c103a587f5fd61d
2013-01-14 22:14:45 -05:00
Jeremy Long
a7e95c2a4d minor update
Former-commit-id: 79b44ce9a813e9b20c0915c5a5aac368d0643219
2013-01-13 17:05:19 -05:00
Jeremy Long
ae7fbbb04f added CWE
Former-commit-id: ce1b558996087cf4b95ca485de236f9bed477d2b
2013-01-13 17:01:46 -05:00
Jeremy Long
cc18ef9aa8 fixed analysis phase
Former-commit-id: 45112eb83551a22f380c676e9fd2bc9e9d73afa8
2013-01-13 16:53:28 -05:00
Jeremy Long
4202e8a7ba Added CVSS Scores
Former-commit-id: 2c670c2e08def9095a8526b6a9cf64664cc1c89e
2013-01-13 16:48:27 -05:00
Jeremy Long
882ff8a325 version 0.2.5.1
Former-commit-id: a9d02a59a7f91fb02a4a920e74d6fb25aa0cd4b8
2013-01-09 22:51:06 -05:00
Jeremy Long
1b29957731 additional spring jar files for testing
Former-commit-id: 4de847b3212e2c54a70df4bb3533a2849e58b644
2013-01-09 22:50:11 -05:00
Jeremy Long
5702543bc5 fixed analyzer method signature, added SpringCleaningAnalyzer, and removed ArchiveAnalyzer interface
Former-commit-id: 9060cd5d69d499b808e16d1171ac3cd3b077548d
2013-01-09 22:49:41 -05:00
Jeremy Long
c810f0647a added 2013 NVD CVE file
Former-commit-id: 77350c8956596ba2da1401bb2c82d2a412563e59
2013-01-08 15:40:58 -05:00
Jeremy Long
d366b67bee added mailing list
Former-commit-id: 6ddd9f7d38893237b33052921bb5008af627fb4a
2013-01-06 12:38:56 -05:00
Jeremy Long
85286b3cf9 version 0.2.5.0
Former-commit-id: 68aa4287866052e89fd4bb4164341ae7914a57e0
2013-01-06 12:13:08 -05:00
Jeremy Long
ae4b5464c7 bug fixes/replaced CVE datastore (lucene->H2)
Former-commit-id: 58386fc80bd3a9dca8bc486c56037efa91b1b81e
2013-01-06 12:04:27 -05:00
Jeremy Long
dec2536e3e updated file header
Former-commit-id: 49307eadff2fde3fe6dd211606f414f3c1d872d2
2012-12-30 17:37:21 -05:00
Jeremy Long
30ea512dcc added equals and hashCode
Former-commit-id: 9a7aa87fdaff6395dd6c65d406aa054d925c0d6e
2012-12-30 16:50:19 -05:00
Jeremy Long
f6cdf34b25 format fix
Former-commit-id: dd0aeaa7dd3efb39e02e81892512ab1c45ba8149
2012-12-30 16:49:51 -05:00
Jeremy Long
99818d038b fixed commons-io reference
Former-commit-id: 6504b636a8b233e776d1577590b6bc36103f9d4a
2012-12-30 16:48:05 -05:00
Jeremy Long
c35ce8e195 added db4o as project-local repo
Former-commit-id: b5f672db3db5bf09930b414b3ebcc5ecc0707c7a
2012-12-30 15:58:11 -05:00
Jeremy Long
2ae856b0dd added vulnerable software
Former-commit-id: 77aced7512a8e1b7f7cba8653c7724472064003c
2012-12-30 15:57:34 -05:00
Jeremy Long
e592598990 minor update
Former-commit-id: 315b35c7098d506c3636544eb5d456a35e6c7ef1
2012-12-30 15:56:29 -05:00
Jeremy Long
07af34fbd0 minor update
Former-commit-id: 71400fe6b401169bdcec13aecededea0e7ece7a0
2012-12-30 15:56:21 -05:00
Jeremy Long
0b3e313260 adding vulnerable software
Former-commit-id: 8ce12bbab5ad294a3565f3f13e72611e3345168d
2012-12-30 09:46:21 -05:00
Jeremy Long
21947de4e0 formating update
Former-commit-id: 930cd5460070e28da8913860f727d83b318cc5b4
2012-12-30 09:31:49 -05:00
Jeremy Long
3cdd0baabb minor bug fixes
Former-commit-id: a605c8a5f8dbf18186cdfc6e4460956702100339
2012-12-30 09:30:12 -05:00
Jeremy Long
f851e62330 removed deprecated functionality
Former-commit-id: 56f9dba3e11d33a9e735465938d7c9b8997193a1
2012-12-30 09:09:23 -05:00
Jeremy Long
bea19ad8ce Update NVD CVE timestamp checking
Former-commit-id: a0b977d3b3066ff369967c4b6abad2a8d2ca0eeb
2012-12-30 08:53:14 -05:00
Jeremy Long
f5b48f5390 added Vulnerability class
Former-commit-id: 3ea88eb3c608f4eac7058c415b9e3d4eae045bae
2012-12-29 10:16:34 -05:00
Jeremy Long
cc712b86d5 updated to v0.2.4.0
Former-commit-id: 1e8ec2b1b85d5aa8ecb975c5b0cbecbf50f33141
2012-12-29 08:31:09 -05:00
Jeremy Long
0cf6cfc2b0 updates and bug fixes for CPE data
Former-commit-id: 83635e150d5030b81a6b56d55115bb4ca19089f9
2012-12-29 08:28:23 -05:00
Jeremy Long
6f19360da5 updated test data
Former-commit-id: e9c938ba4ab6d766eefde8670f2516a216341285
2012-12-22 06:44:32 -05:00
Jeremy Long
f216b4716f version 0.2.3.2
Former-commit-id: 9e85ddb155da34e54b0a2d57c79a77c2066c0326
2012-12-22 06:16:46 -05:00
Jeremy Long
3bf638f7c6 added find bugs and fixed some bugs
Former-commit-id: 4448947c0e718bdef87d241008043e76c001feea
2012-12-22 06:15:39 -05:00
Jeremy Long
5ec9a24c99 continued removal of cpe.xml - it is incomplete for our purpose
Former-commit-id: 1e1a61f92edfd8ba27530fd53fa0d21bf7862ea4
2012-12-22 04:30:26 -05:00
Jeremy Long
23caa1d0b5 bug fixes
Former-commit-id: 266897e8a32735a77f1b3e7aa1e0842e0fc69b65
2012-12-20 21:39:02 -05:00
Jeremy Long
36ecf7c7fd upgrade to lucene 4.0
Former-commit-id: 97ae6c47d6498fea873202dae257a2dfab0b683f
2012-12-16 21:26:30 -05:00
Jeremy Long
0027e75a45 bug fixes
Former-commit-id: a415f5e84dbe7c887a20a8acd18403655c82f9be
2012-12-02 22:22:25 -05:00
Jeremy Long
4cd759bfa6 fixed reported bug
Former-commit-id: a60403eea234dd78663314c9405c6629d60fa5ae
2012-11-20 20:11:08 -05:00
Jeremy Long
0f2752220a Cleaned up reporting
Former-commit-id: 87f2ddb1f8e9d764cf641d86bed23cbec4b509d7
2012-11-17 07:57:55 -05:00
Jeremy Long
ce1ed46851 v0.2.3
Former-commit-id: cb65976e03e63f296f2eefc5d8ef2c7462abc7ee
2012-11-12 14:50:04 -05:00
Jeremy Long
aa795ee7eb updated to use directory of jar instead of working directory to store data
Former-commit-id: 93b0784cd0f38445c0550737b2377618f4ebee1e
2012-11-12 14:48:39 -05:00
Jeremy Long
5c83671739 general updates
Former-commit-id: 9ad33356df25672ff4e9c91e8c1d456450069402
2012-11-12 13:36:44 -05:00
Jeremy Long
3fb9390040 location of data files is no longer the working directory, rather the location of the JAR file itself
Former-commit-id: b3f83447f9422618d6db60d49488830381787110
2012-11-12 12:19:39 -05:00
Jeremy Long
965687186c updated to v0.2.2
Former-commit-id: 68e8e536a18fb8e42943ca90e0fa10427815089e
2012-11-12 10:54:38 -05:00
Jeremy Long
83742437d6 Added support to parse pom.xml contained within a JAR
Former-commit-id: 2074209494ac958b83d49b3d9918b4badae0d17c
2012-11-12 10:53:27 -05:00
Jeremy Long
a37e53769c release v0.2.1
Former-commit-id: 9dc7ec7489e3b6f76141e342f985cb558a063c32
2012-10-30 21:27:52 -04:00
Jeremy Long
084a389a02 changed logging levels
Former-commit-id: 710e6386b39675c1672a5c2d81c62862349fac78
2012-10-30 21:21:12 -04:00
Jeremy Long
7971c42814 performance enhancement for nvd cve import.
Former-commit-id: 5a40d5798c804c4632e6ed2dd04d6d7c9e0f51b8
2012-10-30 21:13:47 -04:00
Jeremy Long
c694461abc updated data
Former-commit-id: eac04a6cce2a24bcc53db0802cd4cd2c092264e8
2012-10-30 00:39:06 -04:00
147 changed files with 23768 additions and 13906 deletions

3
.gitignore vendored
View File

@@ -7,6 +7,9 @@
# Eclipse project files
.classpath
.project
.settings
maven-eclipse.xml
.externalToolBuilders
# Netbeans configuration
nb-configuration.xml
/target/

View File

@@ -40,7 +40,6 @@ The plugin can be configured using the following:
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>1.0.2</version>
<executions>
<execution>
<goals>
@@ -59,7 +58,7 @@ The plugin can be configured using the following:
### Ant Task
For instructions on the use of the Ant Task, please see the [dependency-check-ant github page](http://jeremylong.github.io/DependencyCheck/dependency-check-maven/installation.html).
For instructions on the use of the Ant Task, please see the [dependency-check-ant github page](http://jeremylong.github.io/DependencyCheck/dependency-check-ant/installation.html).
Development Usage
-------------
@@ -106,4 +105,4 @@ Dependency-Check makes use of several other open source libraries. Please see th
[wiki]: https://github.com/jeremylong/DependencyCheck/wiki
[subscribe]: mailto:dependency-check+subscribe@googlegroups.com
[post]: mailto:dependency-check@googlegroups.com
[notices]: https://github.com/jeremylong/DependencyCheck/blob/master/NOTICES.txt
[notices]: https://github.com/jeremylong/DependencyCheck/blob/master/NOTICES.txt

View File

@@ -15,20 +15,19 @@ limitations under the License.
Copyright (c) 2013 - Jeremy Long. All Rights Reserved.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-parent</artifactId>
<version>1.2.2</version>
<version>1.2.7</version>
</parent>
<artifactId>dependency-check-ant</artifactId>
<packaging>jar</packaging>
<name>Dependency-Check Ant Task</name>
<description>Dependency-check is a utility that attempts to detect publicly disclosed vulnerabilities contained within project dependencies. It does this by determining if there is a Common Platform Enumeration (CPE) identifier for a given dependency. If found, it will generate a report linking to the associated CVE entries.</description>
<description>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.</description>
<!-- begin copy from http://minds.coremedia.com/2012/09/11/problem-solved-deploy-multi-module-maven-project-site-as-github-pages/ -->
<distributionManagement>
<site>
@@ -324,6 +323,9 @@ Copyright (c) 2013 - Jeremy Long. All Rights Reserved.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<bottom>Copyright© 2012-14 Jeremy Long. All Rights Reserved.</bottom>
</configuration>
<reportSets>
<reportSet>
<id>default</id>

View File

@@ -46,17 +46,17 @@ Note, that specific analyzers will automatically disable themselves if no file
types that they support are detected - so specifically disabling them may not
be needed.
Property | Description | Default Value
------------------------|------------------------------------|------------------
archiveAnalyzerEnabled | Sets whether the Archive Analyzer will be used. | true
Property | Description | Default Value
------------------------|---------------------------------------------------------------------------|------------------
archiveAnalyzerEnabled | Sets whether the Archive Analyzer will be used. | true
zipExtensions | A comma-separated list of additional file extensions to be treated like a ZIP file, the contents will be extracted and analyzed. | &nbsp;
jarAnalyzer | Sets whether Jar Analyzer will be used. | true
nexusAnalyzerEnabled | Sets whether Nexus Analyzer will be used. | true
nexusUrl | Defines the Nexus URL. | https://repository.sonatype.org/service/local/
jarAnalyzer | Sets whether Jar Analyzer will be used. | true
nexusAnalyzerEnabled | Sets whether Nexus Analyzer will be used. | true
nexusUrl | Defines the Nexus Pro URL. 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
pathToMono | The path to Mono for .NET assembly analysis on non-windows systems | &nbsp;
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
pathToMono | The path to Mono for .NET assembly analysis on non-windows systems. | &nbsp;
Advanced Configuration
====================

View File

@@ -3,7 +3,20 @@ Installation
Download dependency-check-ant from [bintray here](http://dl.bintray.com/jeremy-long/owasp/dependency-check-ant-${project.version}.jar).
To install dependency-check-ant place the dependency-check-ant-${project.version}.jar into
the lib directory of your Ant instalation directory. Once installed you can add
the taskdef to you build.xml and add the task to a new or existing target.
the taskdef to you build.xml and add the task to a new or existing target:
```xml
<taskdef name="dependency-check" classname="org.owasp.dependencycheck.taskdefs.DependencyCheckTask"/>
```
If you do not want to install dependency-check-ant into your ant's lib directory when you define the task def you
must add the classpath to the taskdef:
```xml
<taskdef name="dependency-check" classname="org.owasp.dependencycheck.taskdefs.DependencyCheckTask">
<classpath path="[path]/[to]/dependency-check-ant-${project.version}.jar"/>
</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

View File

@@ -1,11 +1,19 @@
Usage
====================
First, add the dependency-check-ant taskdef to your build.xml:
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"/>
```
Or
```xml
<taskdef name="dependency-check" classname="org.owasp.dependencycheck.taskdefs.DependencyCheckTask">
<classpath path="[path]/[to]/dependency-check-ant-${project.version}.jar"/>
</taskdef>
```
Next, add the task to a target of your choosing:
```xml

View File

@@ -15,20 +15,19 @@ limitations under the License.
Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-parent</artifactId>
<version>1.2.2</version>
<version>1.2.7</version>
</parent>
<artifactId>dependency-check-cli</artifactId>
<packaging>jar</packaging>
<name>Dependency-Check Command Line</name>
<description>Dependency-Check-Maven is a Maven Plugin that attempts to detect publicly disclosed vulnerabilities contained within project dependencies. It does this by determining if there is a Common Platform Enumeration (CPE) identifier for a given dependency. If found, it will generate a report linking to the associated CVE entries.</description>
<description>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.</description>
<!-- begin copy from http://minds.coremedia.com/2012/09/11/problem-solved-deploy-multi-module-maven-project-site-as-github-pages/ -->
<distributionManagement>
<site>
@@ -174,6 +173,9 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<bottom>Copyright© 2012-14 Jeremy Long. All Rights Reserved.</bottom>
</configuration>
<reportSets>
<reportSet>
<id>default</id>
@@ -284,12 +286,12 @@ Copyright (c) 2012 - Jeremy Long. All Rights Reserved.
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>appassembler-maven-plugin</artifactId>
<version>1.7</version>
<version>1.8.1</version>
<configuration>
<programs>
<program>
<mainClass>org.owasp.dependencycheck.App</mainClass>
<name>dependency-check</name>
<id>dependency-check</id>
</program>
</programs>
<assembleDirectory>${project.build.directory}/release</assembleDirectory>

View File

@@ -2,10 +2,8 @@
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
http://maven.apache.org/xsd/assembly-1.1.2.xsd
"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2
http://maven.apache.org/xsd/assembly-1.1.2.xsd"
>
<id>release</id>
<formats>

View File

@@ -21,15 +21,19 @@ import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.commons.cli.ParseException;
import org.owasp.dependencycheck.cli.CliParser;
import org.owasp.dependencycheck.data.nvdcve.CveDB;
import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
import org.owasp.dependencycheck.data.nvdcve.DatabaseProperties;
import org.owasp.dependencycheck.dependency.Dependency;
import org.owasp.dependencycheck.org.apache.tools.ant.DirectoryScanner;
import org.owasp.dependencycheck.reporting.ReportGenerator;
import org.owasp.dependencycheck.utils.LogUtils;
import org.owasp.dependencycheck.utils.Settings;
@@ -93,7 +97,11 @@ public class App {
cli.printVersionInfo();
} else if (cli.isRunScan()) {
populateSettings(cli);
runScan(cli.getReportDirectory(), cli.getReportFormat(), cli.getApplicationName(), cli.getScanFiles());
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");
}
} else {
cli.printHelp();
}
@@ -106,18 +114,71 @@ public class App {
* @param outputFormat the output format of the report
* @param applicationName the application name for the report
* @param files the files/directories to scan
* @param excludes the patterns for files/directories to exclude
*
* @throws InvalidScanPathException thrown if the path to scan starts with "//"
*/
private void runScan(String reportDirectory, String outputFormat, String applicationName, String[] files) {
Engine scanner = null;
private void runScan(String reportDirectory, String outputFormat, String applicationName, String[] files,
String[] excludes) throws InvalidScanPathException {
Engine engine = null;
try {
scanner = new Engine();
for (String file : files) {
scanner.scan(file);
engine = new Engine();
List<String> antStylePaths = new ArrayList<String>();
if (excludes == null || excludes.length == 0) {
for (String file : files) {
if (file.contains("*") || file.contains("?")) {
antStylePaths.add(file);
} else {
engine.scan(file);
}
}
} else {
antStylePaths = Arrays.asList(files);
}
scanner.analyzeDependencies();
final List<Dependency> dependencies = scanner.getDependencies();
final Set<File> paths = new HashSet<File>();
for (String file : antStylePaths) {
final DirectoryScanner scanner = new DirectoryScanner();
String include = file.replace('\\', '/');
File baseDir;
if (include.startsWith("//")) {
throw new InvalidScanPathException("Unable to scan paths specified by //");
} else if (include.startsWith("./")) {
baseDir = new File(".");
include = include.substring(2);
} else if (include.startsWith("/")) {
baseDir = new File("/");
include = include.substring(1);
} else if (include.contains("/")) {
final int pos = include.indexOf('/');
final String tmp = include.substring(0, pos);
if (tmp.contains("*") || tmp.contains("?")) {
baseDir = new File(".");
} else {
baseDir = new File(tmp);
include = include.substring(pos + 1);
}
} else { //no path info - must just be a file in the working directory
baseDir = new File(".");
}
scanner.setBasedir(baseDir);
scanner.setIncludes(include);
if (excludes != null && excludes.length > 0) {
scanner.addExcludes(excludes);
}
scanner.scan();
if (scanner.getIncludedFilesCount() > 0) {
for (String s : scanner.getIncludedFiles()) {
final File f = new File(baseDir, s);
paths.add(f);
}
}
}
engine.scan(paths);
engine.analyzeDependencies();
final List<Dependency> dependencies = engine.getDependencies();
DatabaseProperties prop = null;
CveDB cve = null;
try {
@@ -131,7 +192,7 @@ public class App {
cve.close();
}
}
final ReportGenerator report = new ReportGenerator(applicationName, dependencies, scanner.getAnalyzers(), prop);
final ReportGenerator report = new ReportGenerator(applicationName, dependencies, engine.getAnalyzers(), prop);
try {
report.generateReports(reportDirectory, outputFormat);
} catch (IOException ex) {
@@ -145,8 +206,8 @@ public class App {
LOGGER.log(Level.SEVERE, "Unable to connect to the dependency-check database; analysis has stopped");
LOGGER.log(Level.FINE, "", ex);
} finally {
if (scanner != null) {
scanner.cleanup();
if (engine != null) {
engine.cleanup();
}
}
}

View File

@@ -15,7 +15,7 @@
*
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
*/
package org.owasp.dependencycheck.cli;
package org.owasp.dependencycheck;
import java.io.File;
import java.io.FileNotFoundException;
@@ -134,14 +134,36 @@ public final class CliParser {
* @throws FileNotFoundException is thrown if the path being validated does not exist.
*/
private void validatePathExists(String path, String argumentName) throws FileNotFoundException {
if (!path.contains("*.")) {
final File f = new File(path);
if (!f.exists()) {
isValid = false;
final String msg = String.format("Invalid '%s' argument: '%s'", argumentName, path);
throw new FileNotFoundException(msg);
if (path == null) {
isValid = false;
final String msg = String.format("Invalid '%s' argument: null", argumentName);
throw new FileNotFoundException(msg);
} else if (!path.contains("*") && !path.contains("?")) {
File f = new File(path);
if ("o".equals(argumentName.substring(0, 1).toLowerCase()) && !"ALL".equals(this.getReportFormat().toUpperCase())) {
final String checkPath = path.toLowerCase();
if (checkPath.endsWith(".html") || checkPath.endsWith(".xml") || checkPath.endsWith(".htm")) {
if (f.getParentFile() == null) {
f = new File(".", path);
}
if (!f.getParentFile().isDirectory()) {
isValid = false;
final String msg = String.format("Invalid '%s' argument: '%s'", argumentName, path);
throw new FileNotFoundException(msg);
}
}
} else {
if (!f.exists()) {
isValid = false;
final String msg = String.format("Invalid '%s' argument: '%s'", argumentName, path);
throw new FileNotFoundException(msg);
}
}
} // else { // TODO add a validation for *.zip extensions rather then relying on the engine to validate it.
} else if (path.startsWith("//") || path.startsWith("\\\\")) {
isValid = false;
final String msg = String.format("Invalid '%s' argument: '%s'%nUnable to scan paths that start with '//'.", argumentName, path);
throw new FileNotFoundException(msg);
}
}
/**
@@ -151,7 +173,6 @@ public final class CliParser {
*/
@SuppressWarnings("static-access")
private Options createCommandLineOptions() {
final Options options = new Options();
addStandardOptions(options);
addAdvancedOptions(options);
@@ -184,16 +205,22 @@ public final class CliParser {
.create(ARGUMENT.APP_NAME_SHORT);
final Option path = OptionBuilder.withArgName("path").hasArg().withLongOpt(ARGUMENT.SCAN)
.withDescription("The path to scan - this option can be specified multiple times. To limit the scan"
+ " to specific file types *.[ext] can be added to the end of the path.")
.withDescription("The path to scan - this option can be specified multiple times. Ant style"
+ " paths are supported (e.g. path/**/*.jar).")
.create(ARGUMENT.SCAN_SHORT);
final Option excludes = OptionBuilder.withArgName("pattern").hasArg().withLongOpt(ARGUMENT.EXCLUDE)
.withDescription("Specify and exclusion pattern. This option can be specified multiple times"
+ " and it accepts Ant style excludsions.")
.create();
final Option props = OptionBuilder.withArgName("file").hasArg().withLongOpt(ARGUMENT.PROP)
.withDescription("A property file to load.")
.create(ARGUMENT.PROP_SHORT);
final Option out = OptionBuilder.withArgName("folder").hasArg().withLongOpt(ARGUMENT.OUT)
.withDescription("The folder to write reports to. This defaults to the current directory.")
final Option out = OptionBuilder.withArgName("path").hasArg().withLongOpt(ARGUMENT.OUT)
.withDescription("The folder to write reports to. This defaults to the current directory. "
+ "It is possible to set this to a specific file name if the format argument is not set to ALL.")
.create(ARGUMENT.OUT_SHORT);
final Option outputFormat = OptionBuilder.withArgName("format").hasArg().withLongOpt(ARGUMENT.OUTPUT_FORMAT)
@@ -212,7 +239,11 @@ public final class CliParser {
final OptionGroup og = new OptionGroup();
og.addOption(path);
final OptionGroup exog = new OptionGroup();
exog.addOption(excludes);
options.addOptionGroup(og)
.addOptionGroup(exog)
.addOption(out)
.addOption(outputFormat)
.addOption(appName)
@@ -297,7 +328,7 @@ public final class CliParser {
.create();
final Option nexusUrl = OptionBuilder.withArgName("url").hasArg().withLongOpt(ARGUMENT.NEXUS_URL)
.withDescription("The url to the Nexus Server.")
.withDescription("The url to the Nexus Pro Server. If not set the Nexus Analyzer will be disabled.")
.create();
final Option nexusUsesProxy = OptionBuilder.withArgName("true/false").hasArg().withLongOpt(ARGUMENT.NEXUS_USES_PROXY)
@@ -479,7 +510,6 @@ public final class CliParser {
options,
"",
true);
}
/**
@@ -491,6 +521,15 @@ public final class CliParser {
return line.getOptionValues(ARGUMENT.SCAN);
}
/**
* Retrieves the list of excluded file patterns specified by the 'exclude' argument.
*
* @return the excluded file patterns
*/
public String[] getExcludeList() {
return line.getOptionValues(ARGUMENT.EXCLUDE);
}
/**
* Returns the directory to write the reports to specified on the command line.
*
@@ -628,8 +667,8 @@ public final class CliParser {
*/
public void printVersionInfo() {
final String version = String.format("%s version %s",
Settings.getString("application.name", "DependencyCheck"),
Settings.getString("application.version", "Unknown"));
Settings.getString(Settings.KEYS.APPLICATION_VAME, "dependency-check"),
Settings.getString(Settings.KEYS.APPLICATION_VERSION, "Unknown"));
System.out.println(version);
}
@@ -877,5 +916,9 @@ public final class CliParser {
* The CLI argument name for setting extra extensions.
*/
public static final String ADDITIONAL_ZIP_EXTENSIONS = "zipExtensions";
/**
* Exclude path argument.
*/
public static final String EXCLUDE = "exclude";
}
}

View File

@@ -0,0 +1,61 @@
/*
* This file is part of dependency-check-cli.
*
* 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) 2014 Jeremy Long. All Rights Reserved.
*/
package org.owasp.dependencycheck;
/**
* Thrown if an invalid path is encountered.
*
* @author Jeremy Long <jeremy.long@owasp.org>
*/
class InvalidScanPathException extends Exception {
/**
* Creates a new InvalidScanPathException.
*/
public InvalidScanPathException() {
super();
}
/**
* Creates a new InvalidScanPathException.
*
* @param msg a message for the exception
*/
public InvalidScanPathException(String msg) {
super(msg);
}
/**
* Creates a new InvalidScanPathException.
*
* @param ex the cause of the exception
*/
public InvalidScanPathException(Throwable ex) {
super(ex);
}
/**
* Creates a new InvalidScanPathException.
*
* @param msg a message for the exception
* @param ex the cause of the exception
*/
public InvalidScanPathException(String msg, Throwable ex) {
super(msg, ex);
}
}

View File

@@ -1,12 +0,0 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.cli</title>
* </head>
* <body>
* Includes utility classes such as the CLI Parser,
* </body>
* </html>
*/
package org.owasp.dependencycheck.cli;

View File

@@ -6,8 +6,9 @@ The following table lists the command line arguments:
Short | Argument&nbsp;Name&nbsp;&nbsp; | Parameter | Description | Requirement
-------|-----------------------|-----------------|-------------|------------
\-a | \-\-app | \<name\> | The name of the application being scanned. This is a required argument. | Required
\-s | \-\-scan | \<path\> | The path to scan \- this option can be specified multiple times. It is also possible to specify specific file types that should be scanned by supplying a scan path of '[path]/[to]/[scan]/*.zip'. The wild card can only be used to denote any file-name with a specific extension. | Required
\-o | \-\-out | \<folder\> | The folder to write reports to. This defaults to the current directory. | Optional
\-s | \-\-scan | \<path\> | The path to scan \- this option can be specified multiple times. It is also possible to specify Ant style paths (e.g. directory/**/*.jar). | Required
| \-\-exclude | \<pattern\> | The path patterns to exclude from the scan \- this option can be specified multiple times. This accepts Ant style path patterns (e.g. **/exclude/**) . | Optional
\-o | \-\-out | \<path\> | The folder to write reports to. This defaults to the current directory. If the format is not set to ALL one could specify a specific file name. | Optional
\-f | \-\-format | \<format\> | The output format to write to (XML, HTML, VULN, ALL). The default is HTML. | Required
\-l | \-\-log | \<file\> | The file path to write verbose logging information. | Optional
\-n | \-\-noupdate | | Disables the automatic updating of the CPE data. | Optional
@@ -18,26 +19,25 @@ Short | Argument&nbsp;Name&nbsp;&nbsp; | Parameter | Description | Requir
Advanced Options
================
Short | Argument&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Parameter | Description | Default&nbsp;Value
-------|-----------------------|-----------------|-------------|---------------
| \-\-disableArchive | | Sets whether the Archive Analyzer will be used. | false
Short | Argument&nbsp;Name&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; | Parameter | Description | Default&nbsp;Value
-------|-----------------------|-----------------|-----------------------------------------------------------------------------|---------------
| \-\-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 Jar Analyzer will be used. | false
| \-\-disableNexus | | Sets whether Nexus Analyzer will be used. | false
| \-\-disableNexus | | Disable the Nexus Analyzer. | &nbsp;
| \-\-nexus | \<url\> | The url to the Nexus Server. | https://repository.sonatype.org/service/local/
| \-\-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;
| \-\-disableJar | | Sets whether Jar Analyzer will be used. | false
| \-\-disableNexus | | Sets whether Nexus Analyzer will be used. | 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;
| \-\-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

@@ -15,8 +15,9 @@
*
* Copyright (c) 2012 Jeremy Long. All Rights Reserved.
*/
package org.owasp.dependencycheck.cli;
package org.owasp.dependencycheck;
import org.owasp.dependencycheck.CliParser;
import java.io.ByteArrayOutputStream;
import java.io.File;
import java.io.FileNotFoundException;

View File

@@ -20,13 +20,14 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<parent>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-parent</artifactId>
<version>1.2.2</version>
<version>1.2.7</version>
</parent>
<artifactId>dependency-check-core</artifactId>
<packaging>jar</packaging>
<name>Dependency-Check Core</name>
<description>dependency-check-core is the engine and reporting tool used to identify and report if there are any known, publicly disclosed vulnerabilities in the scanned project's dependencies. The engine extracts meta-data from the dependencies and uses this to do fuzzy key-word matching against the Common Platfrom Enumeration (CPE), if any CPE identifiers are found the associated Common Vulnerability and Exposure (CVE) entries are added to the generated report.</description>
<!-- begin copy from http://minds.coremedia.com/2012/09/11/problem-solved-deploy-multi-module-maven-project-site-as-github-pages/ -->
<distributionManagement>
<site>
@@ -271,6 +272,9 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<bottom>Copyright© 2012-14 Jeremy Long. All Rights Reserved.</bottom>
</configuration>
<reportSets>
<reportSet>
<id>default</id>
@@ -396,6 +400,7 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<version>3.1</version>
<configuration>
<showDeprecation>false</showDeprecation>
<compilerArgument>-Xlint:unchecked</compilerArgument>
<source>1.6</source>
<target>1.6</target>
</configuration>
@@ -414,6 +419,12 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<version>4.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jmockit</groupId>
<artifactId>jmockit</artifactId>
<version>1.12</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.code.findbugs</groupId>
<artifactId>annotations</artifactId>
@@ -428,7 +439,7 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<dependency>
<groupId>org.apache.commons</groupId>
<artifactId>commons-compress</artifactId>
<version>1.8</version>
<version>1.8.1</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
@@ -460,50 +471,6 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<artifactId>velocity</artifactId>
<version>1.7</version>
</dependency>
<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity-tools</artifactId>
<version>2.0</version>
<!-- very limited use of the velocity-tools, not all of the dependencies are needed-->
<exclusions>
<exclusion>
<groupId>commons-chain</groupId>
<artifactId>commons-chain</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
<exclusion>
<groupId>commons-validator</groupId>
<artifactId>commons-validator</artifactId>
</exclusion>
<exclusion>
<groupId>dom4j</groupId>
<artifactId>dom4j</artifactId>
</exclusion>
<exclusion>
<groupId>sslext</groupId>
<artifactId>sslext</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.struts</groupId>
<artifactId>struts-core</artifactId>
</exclusion>
<exclusion>
<groupId>antlr</groupId>
<artifactId>antlr</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.struts</groupId>
<artifactId>struts-taglib</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.struts</groupId>
<artifactId>struts-tiles</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
@@ -617,6 +584,13 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.retry</groupId>
<artifactId>spring-retry</artifactId>
<version>1.1.0.RELEASE</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
</dependencies>
<profiles>
<profile>
@@ -733,6 +707,28 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.glassfish.jersey.core</groupId>
<artifactId>jersey-client</artifactId>
<version>2.12</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.sun.jersey</groupId>
<artifactId>jersey-client</artifactId>
<version>1.11.1</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
<dependency>
<groupId>com.sun.faces</groupId>
<artifactId>jsf-impl</artifactId>
<version>2.2.8-02</version>
<scope>provided</scope>
<optional>true</optional>
</dependency>
</dependencies>
</profile>
</profiles>

View File

@@ -31,8 +31,6 @@ import org.owasp.dependencycheck.analyzer.Analyzer;
import org.owasp.dependencycheck.analyzer.AnalyzerService;
import org.owasp.dependencycheck.analyzer.FileTypeAnalyzer;
import org.owasp.dependencycheck.analyzer.exception.AnalysisException;
import org.owasp.dependencycheck.data.cpe.CpeMemoryIndex;
import org.owasp.dependencycheck.data.cpe.IndexException;
import org.owasp.dependencycheck.data.nvdcve.ConnectionFactory;
import org.owasp.dependencycheck.data.nvdcve.CveDB;
import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
@@ -57,19 +55,21 @@ public class Engine {
/**
* The list of dependencies.
*/
private List<Dependency> dependencies;
private List<Dependency> dependencies = new ArrayList<Dependency>();
/**
* A Map of analyzers grouped by Analysis phase.
*/
private final EnumMap<AnalysisPhase, List<Analyzer>> analyzers;
private EnumMap<AnalysisPhase, List<Analyzer>> analyzers = new EnumMap<AnalysisPhase, List<Analyzer>>(AnalysisPhase.class);
/**
* A Map of analyzers grouped by Analysis phase.
*/
private final Set<FileTypeAnalyzer> fileTypeAnalyzers;
private Set<FileTypeAnalyzer> fileTypeAnalyzers = new HashSet<FileTypeAnalyzer>();
/**
* The ClassLoader to use when dynamically loading Analyzer and Update services.
*/
private ClassLoader serviceClassLoader;
private ClassLoader serviceClassLoader = Thread.currentThread().getContextClassLoader();
/**
* The Logger for use throughout the class.
*/
@@ -81,32 +81,27 @@ public class Engine {
* @throws DatabaseException thrown if there is an error connecting to the database
*/
public Engine() throws DatabaseException {
this(Thread.currentThread().getContextClassLoader());
initializeEngine();
}
/**
* Creates a new Engine.
*
* @param serviceClassLoader a reference the class loader being used
* @throws DatabaseException thrown if there is an error connecting to the database
*/
public Engine(ClassLoader serviceClassLoader) throws DatabaseException {
this.serviceClassLoader = serviceClassLoader;
initializeEngine();
}
/**
* Creates a new Engine using the specified classloader to dynamically load Analyzer and Update services.
*
* @param serviceClassLoader the ClassLoader to use when dynamically loading Analyzer and Update services
* @throws DatabaseException thrown if there is an error connecting to the database
*/
public Engine(ClassLoader serviceClassLoader) throws DatabaseException {
this.dependencies = new ArrayList<Dependency>();
this.analyzers = new EnumMap<AnalysisPhase, List<Analyzer>>(AnalysisPhase.class);
this.fileTypeAnalyzers = new HashSet<FileTypeAnalyzer>();
this.serviceClassLoader = serviceClassLoader;
protected final void initializeEngine() throws DatabaseException {
ConnectionFactory.initialize();
boolean autoUpdate = true;
try {
autoUpdate = Settings.getBoolean(Settings.KEYS.AUTO_UPDATE);
} catch (InvalidSettingException ex) {
LOGGER.log(Level.FINE, "Invalid setting for auto-update; using true.");
}
if (autoUpdate) {
doUpdates();
}
loadAnalyzers();
}
@@ -121,7 +116,9 @@ public class Engine {
* Loads the analyzers specified in the configuration file (or system properties).
*/
private void loadAnalyzers() {
if (analyzers.size() > 0) {
return;
}
for (AnalysisPhase phase : AnalysisPhase.values()) {
analyzers.put(phase, new ArrayList<Analyzer>());
}
@@ -158,157 +155,193 @@ public class Engine {
public void setDependencies(List<Dependency> dependencies) {
this.dependencies = dependencies;
//for (Dependency dependency: dependencies) {
// dependencies.add(dependency);
//}
}
/**
* 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.
*
* @since v0.3.2.5
* @param paths an array of paths to files or directories to be analyzed
* @return the list of dependencies scanned
*
* @param paths an array of paths to files or directories to be analyzed.
* @since v0.3.2.5
*/
public void scan(String[] paths) {
public List<Dependency> scan(String[] paths) {
final List<Dependency> deps = new ArrayList<Dependency>();
for (String path : paths) {
final File file = new File(path);
scan(file);
final List<Dependency> d = scan(file);
if (d != null) {
deps.addAll(d);
}
}
return deps;
}
/**
* 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.
* @param path the path to a file or directory to be analyzed
* @return the list of dependencies scanned
*/
public void scan(String path) {
if (path.matches("^.*[\\/]\\*\\.[^\\/:*|?<>\"]+$")) {
final String[] parts = path.split("\\*\\.");
final String[] ext = new String[]{parts[parts.length - 1]};
final File dir = new File(path.substring(0, path.length() - ext[0].length() - 2));
if (dir.isDirectory()) {
final List<File> files = (List<File>) org.apache.commons.io.FileUtils.listFiles(dir, ext, true);
scan(files);
} else {
final String msg = String.format("Invalid file path provided to scan '%s'", path);
LOGGER.log(Level.SEVERE, msg);
}
} else {
final File file = new File(path);
scan(file);
}
public List<Dependency> scan(String path) {
final File file = new File(path);
return scan(file);
}
/**
* 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.
*
* @since v0.3.2.5
*
* @param files an array of paths to files or directories to be analyzed.
* @return the list of dependencies
*
* @since v0.3.2.5
*/
public void scan(File[] files) {
public List<Dependency> scan(File[] files) {
final List<Dependency> deps = new ArrayList<Dependency>();
for (File file : files) {
scan(file);
final List<Dependency> d = scan(file);
if (d != null) {
deps.addAll(d);
}
}
return deps;
}
/**
* 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.
*
* @since v0.3.2.5
* @param files a set of paths to files or directories to be analyzed
* @return the list of dependencies scanned
*
* @param files a set of paths to files or directories to be analyzed.
* @since v0.3.2.5
*/
public void scan(Set<File> files) {
public List<Dependency> scan(Set<File> files) {
final List<Dependency> deps = new ArrayList<Dependency>();
for (File file : files) {
scan(file);
final List<Dependency> d = scan(file);
if (d != null) {
deps.addAll(d);
}
}
return deps;
}
/**
* 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.
*
* @since v0.3.2.5
* @param files a set of paths to files or directories to be analyzed
* @return the list of dependencies scanned
*
* @param files a set of paths to files or directories to be analyzed.
* @since v0.3.2.5
*/
public void scan(List<File> files) {
public List<Dependency> scan(List<File> files) {
final List<Dependency> deps = new ArrayList<Dependency>();
for (File file : files) {
scan(file);
final List<Dependency> d = scan(file);
if (d != null) {
deps.addAll(d);
}
}
return deps;
}
/**
* 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
*
* @since v0.3.2.4
*
* @param file the path to a file or directory to be analyzed.
*/
public void scan(File file) {
public List<Dependency> scan(File file) {
if (file.exists()) {
if (file.isDirectory()) {
scanDirectory(file);
return scanDirectory(file);
} else {
scanFile(file);
final Dependency d = scanFile(file);
if (d != null) {
final List<Dependency> deps = new ArrayList<Dependency>();
deps.add(d);
return deps;
}
}
}
return null;
}
/**
* Recursively scans files and directories. Any dependencies identified are added to the dependency collection.
*
* @param dir the directory to scan.
* @param dir the directory to scan
* @return the list of Dependency objects scanned
*/
protected void scanDirectory(File dir) {
protected List<Dependency> scanDirectory(File dir) {
final File[] files = dir.listFiles();
final List<Dependency> deps = new ArrayList<Dependency>();
if (files != null) {
for (File f : files) {
if (f.isDirectory()) {
scanDirectory(f);
final List<Dependency> d = scanDirectory(f);
if (d != null) {
deps.addAll(d);
}
} else {
scanFile(f);
final Dependency d = scanFile(f);
deps.add(d);
}
}
}
return deps;
}
/**
* Scans a specified file. If a dependency is identified it is added to the dependency collection.
*
* @param file The file to scan.
* @param file The file to scan
* @return the scanned dependency
*/
protected void scanFile(File file) {
protected Dependency scanFile(File file) {
if (!file.isFile()) {
final String msg = String.format("Path passed to scanFile(File) is not a file: %s. Skipping the file.", file.toString());
LOGGER.log(Level.FINE, msg);
return;
return null;
}
final String fileName = file.getName();
final String extension = FileUtils.getFileExtension(fileName);
Dependency dependency = null;
if (extension != null) {
if (supportsExtension(extension)) {
final Dependency dependency = new Dependency(file);
dependency = new Dependency(file);
dependencies.add(dependency);
}
} else {
final String msg = String.format("No file extension found on file '%s'. The file was not analyzed.",
file.toString());
final String msg = String.format("No file extension found on file '%s'. The file was not analyzed.", file.toString());
LOGGER.log(Level.FINEST, msg);
}
return dependency;
}
/**
* Runs the analyzers against all of the dependencies.
*/
public void analyzeDependencies() {
boolean autoUpdate = true;
try {
autoUpdate = Settings.getBoolean(Settings.KEYS.AUTO_UPDATE);
} catch (InvalidSettingException ex) {
LOGGER.log(Level.FINE, "Invalid setting for auto-update; using true.");
}
if (autoUpdate) {
doUpdates();
}
//need to ensure that data exists
try {
ensureDataExists();
@@ -337,7 +370,7 @@ public class Engine {
final List<Analyzer> analyzerList = analyzers.get(phase);
for (Analyzer a : analyzerList) {
initializeAnalyzer(a);
a = initializeAnalyzer(a);
/* need to create a copy of the collection because some of the
* analyzers may modify it. This prevents ConcurrentModificationExceptions.
@@ -392,8 +425,9 @@ public class Engine {
* Initializes the given analyzer.
*
* @param analyzer the analyzer to initialize
* @return the initialized analyzer
*/
private void initializeAnalyzer(Analyzer analyzer) {
protected Analyzer initializeAnalyzer(Analyzer analyzer) {
try {
final String msg = String.format("Initializing %s", analyzer.getName());
LOGGER.log(Level.FINE, msg);
@@ -408,6 +442,7 @@ public class Engine {
LOGGER.log(Level.FINEST, null, ex1);
}
}
return analyzer;
}
/**
@@ -415,7 +450,7 @@ public class Engine {
*
* @param analyzer the analyzer to close
*/
private void closeAnalyzer(Analyzer analyzer) {
protected void closeAnalyzer(Analyzer analyzer) {
final String msg = String.format("Closing Analyzer '%s'", analyzer.getName());
LOGGER.log(Level.FINE, msg);
try {
@@ -429,6 +464,7 @@ public class Engine {
* Cycles through the cached web data sources and calls update on all of them.
*/
private void doUpdates() {
LOGGER.info("Checking for updates");
final UpdateService service = new UpdateService(serviceClassLoader);
final Iterator<CachedWebDataSource> iterator = service.getDataSources();
while (iterator.hasNext()) {
@@ -438,10 +474,10 @@ public class Engine {
} catch (UpdateException ex) {
LOGGER.log(Level.WARNING,
"Unable to update Cached Web DataSource, using local data instead. Results may not include recent vulnerabilities.");
LOGGER.log(Level.FINE,
String.format("Unable to update details for %s", source.getClass().getName()), ex);
LOGGER.log(Level.FINE, String.format("Unable to update details for %s", source.getClass().getName()), ex);
}
}
LOGGER.info("Check for updates complete");
}
/**
@@ -484,22 +520,16 @@ public class Engine {
* @throws DatabaseException thrown if there is an exception opening the database
*/
private void ensureDataExists() throws NoDataException, DatabaseException {
final CpeMemoryIndex cpe = CpeMemoryIndex.getInstance();
final CveDB cve = new CveDB();
try {
cve.open();
cpe.open(cve);
} catch (IndexException ex) {
throw new NoDataException(ex.getMessage(), ex);
if (!cve.dataExists()) {
throw new NoDataException("No documents exist");
}
} catch (DatabaseException ex) {
throw new NoDataException(ex.getMessage(), ex);
} finally {
cve.close();
}
if (cpe.numDocs() <= 0) {
cpe.close();
throw new NoDataException("No documents exist");
}
}
}

View File

@@ -440,6 +440,52 @@ public class DependencyCheckScanAgent {
this.showSummary = showSummary;
}
/**
* Whether or not the Maven Central analyzer is enabled.
*/
private boolean centralAnalyzerEnabled = true;
/**
* Get the value of centralAnalyzerEnabled.
*
* @return the value of centralAnalyzerEnabled
*/
public boolean isCentralAnalyzerEnabled() {
return centralAnalyzerEnabled;
}
/**
* Set the value of centralAnalyzerEnabled.
*
* @param centralAnalyzerEnabled new value of centralAnalyzerEnabled
*/
public void setCentralAnalyzerEnabled(boolean centralAnalyzerEnabled) {
this.centralAnalyzerEnabled = centralAnalyzerEnabled;
}
/**
* The URL of Maven Central.
*/
private String centralUrl;
/**
* Get the value of centralUrl.
*
* @return the value of centralUrl
*/
public String getCentralUrl() {
return centralUrl;
}
/**
* Set the value of centralUrl.
*
* @param centralUrl new value of centralUrl
*/
public void setCentralUrl(String centralUrl) {
this.centralUrl = centralUrl;
}
/**
* Whether or not the nexus analyzer is enabled.
*/
@@ -849,6 +895,10 @@ public class DependencyCheckScanAgent {
if (suppressionFile != null && !suppressionFile.isEmpty()) {
Settings.setString(Settings.KEYS.SUPPRESSION_FILE, suppressionFile);
}
Settings.setBoolean(Settings.KEYS.ANALYZER_CENTRAL_ENABLED, centralAnalyzerEnabled);
if (centralUrl != null && !centralUrl.isEmpty()) {
Settings.setString(Settings.KEYS.ANALYZER_CENTRAL_URL, centralUrl);
}
Settings.setBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED, nexusAnalyzerEnabled);
if (nexusUrl != null && !nexusUrl.isEmpty()) {
Settings.setString(Settings.KEYS.ANALYZER_NEXUS_URL, nexusUrl);

View File

@@ -100,9 +100,8 @@ public abstract class AbstractSuppressionAnalyzer extends AbstractAnalyzer {
private void loadSuppressionData() throws SuppressionParseException {
final SuppressionParser parser = new SuppressionParser();
File file = null;
file = new File(this.getClass().getClassLoader().getResource("dependencycheck-base-suppression.xml").getPath());
try {
rules = parser.parseSuppressionRules(file);
rules = parser.parseSuppressionRules(this.getClass().getClassLoader().getResourceAsStream("dependencycheck-base-suppression.xml"));
} catch (SuppressionParseException ex) {
LOGGER.log(Level.FINE, "Unable to parse the base suppression data file", ex);
}

View File

@@ -110,7 +110,7 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
static {
final String additionalZipExt = Settings.getString(Settings.KEYS.ADDITIONAL_ZIP_EXTENSIONS);
if (additionalZipExt != null) {
final HashSet ext = new HashSet<String>(Arrays.asList(additionalZipExt));
final HashSet<String> ext = new HashSet<String>(Arrays.asList(additionalZipExt));
ZIPPABLES.addAll(ext);
}
EXTENSIONS.addAll(ZIPPABLES);
@@ -186,7 +186,7 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
if (tempFileLocation != null && tempFileLocation.exists()) {
LOGGER.log(Level.FINE, "Attempting to delete temporary files");
final boolean success = FileUtils.delete(tempFileLocation);
if (!success && tempFileLocation != null & tempFileLocation.exists()) {
if (!success && tempFileLocation != null && tempFileLocation.exists() && tempFileLocation.list().length > 0) {
LOGGER.log(Level.WARNING, "Failed to delete some temporary files, see the log for more details");
}
}
@@ -221,9 +221,8 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
final String displayPath = String.format("%s%s",
dependency.getFilePath(),
d.getActualFilePath().substring(tmpDir.getAbsolutePath().length()));
final String displayName = String.format("%s%s%s",
final String displayName = String.format("%s: %s",
dependency.getFileName(),
File.separator,
d.getFileName());
d.setFilePath(displayPath);
d.setFileName(displayName);
@@ -242,7 +241,7 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
final File tdir = getNextTempDirectory();
final String fileName = dependency.getFileName();
LOGGER.info(String.format("The zip file '%s' appears to be a JAR file, making a deep copy and analyzing it as a JAR.", fileName));
LOGGER.info(String.format("The zip file '%s' appears to be a JAR file, making a copy and analyzing it as a JAR.", fileName));
final File tmpLoc = new File(tdir, fileName.substring(0, fileName.length() - 3) + "jar");
try {
@@ -339,7 +338,7 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
try {
fis.close();
} catch (IOException ex) {
LOGGER.log(Level.FINEST, null, ex);
LOGGER.log(Level.FINE, null, ex);
}
}
}
@@ -368,8 +367,10 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
final File file = new File(destination, entry.getName());
final String ext = FileUtils.getFileExtension(file.getName());
if (engine.supportsExtension(ext)) {
final String extracting = String.format("Extracting '%s'", file.getPath());
LOGGER.fine(extracting);
BufferedOutputStream bos = null;
FileOutputStream fos;
FileOutputStream fos = null;
try {
final File parent = file.getParentFile();
if (!parent.isDirectory()) {
@@ -402,6 +403,13 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
LOGGER.log(Level.FINEST, null, ex);
}
}
if (fos != null) {
try {
fos.close();
} catch (IOException ex) {
LOGGER.log(Level.FINEST, null, ex);
}
}
}
}
}
@@ -429,6 +437,8 @@ public class ArchiveAnalyzer extends AbstractFileTypeAnalyzer {
* @throws ArchiveExtractionException thrown if there is an exception decompressing the file
*/
private void decompressFile(CompressorInputStream inputStream, File outputFile) throws ArchiveExtractionException {
final String msg = String.format("Decompressing '%s'", outputFile.getPath());
LOGGER.fine(msg);
FileOutputStream out = null;
try {
out = new FileOutputStream(outputFile);

View File

@@ -120,9 +120,11 @@ public class AssemblyAnalyzer extends AbstractFileTypeAnalyzer {
// Try evacuating the error stream
rdr = new BufferedReader(new InputStreamReader(proc.getErrorStream(), "UTF-8"));
String line = null;
// CHECKSTYLE:OFF
while (rdr.ready() && (line = rdr.readLine()) != null) {
LOGGER.log(Level.WARNING, "analyzer.AssemblyAnalyzer.grokassembly.stderr", line);
}
// CHECKSTYLE:ON
int rc = 0;
doc = builder.parse(proc.getInputStream());
@@ -233,9 +235,11 @@ public class AssemblyAnalyzer extends AbstractFileTypeAnalyzer {
final Process p = pb.start();
// Try evacuating the error stream
rdr = new BufferedReader(new InputStreamReader(p.getErrorStream(), "UTF-8"));
// CHECKSTYLE:OFF
while (rdr.ready() && rdr.readLine() != null) {
// We expect this to complain
}
// CHECKSTYLE:ON
final Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(p.getInputStream());
final XPath xpath = XPathFactory.newInstance().newXPath();
final String error = xpath.evaluate("/assembly/error", doc);

View File

@@ -170,29 +170,10 @@ public class CPEAnalyzer implements Analyzer {
* @throws ParseException is thrown when the Lucene query cannot be parsed.
*/
protected void determineCPE(Dependency dependency) throws CorruptIndexException, IOException, ParseException {
Confidence confidence = Confidence.HIGHEST;
String vendors = addEvidenceWithoutDuplicateTerms("", dependency.getVendorEvidence(), confidence);
String products = addEvidenceWithoutDuplicateTerms("", dependency.getProductEvidence(), confidence);
/* bug fix for #40 - version evidence is not showing up as "used" in the reports if there is no
* CPE identified. As such, we are "using" the evidence and ignoring the results. */
addEvidenceWithoutDuplicateTerms("", dependency.getVersionEvidence(), confidence);
int ctr = 0;
do {
if (!vendors.isEmpty() && !products.isEmpty()) {
final List<IndexEntry> entries = searchCPE(vendors, products, dependency.getProductEvidence().getWeighting(),
dependency.getVendorEvidence().getWeighting());
for (IndexEntry e : entries) {
if (verifyEntry(e, dependency)) {
final String vendor = e.getVendor();
final String product = e.getProduct();
determineIdentifiers(dependency, vendor, product);
}
}
}
confidence = reduceConfidence(confidence);
//TODO test dojo-war against this. we shold get dojo-toolkit:dojo-toolkit AND dojo-toolkit:toolkit
String vendors = "";
String products = "";
for (Confidence confidence : Confidence.values()) {
if (dependency.getVendorEvidence().contains(confidence)) {
vendors = addEvidenceWithoutDuplicateTerms(vendors, dependency.getVendorEvidence(), confidence);
}
@@ -201,10 +182,28 @@ public class CPEAnalyzer implements Analyzer {
}
/* bug fix for #40 - version evidence is not showing up as "used" in the reports if there is no
* CPE identified. As such, we are "using" the evidence and ignoring the results. */
if (dependency.getVersionEvidence().contains(confidence)) {
addEvidenceWithoutDuplicateTerms("", dependency.getVersionEvidence(), confidence);
// if (dependency.getVersionEvidence().contains(confidence)) {
// addEvidenceWithoutDuplicateTerms("", dependency.getVersionEvidence(), confidence);
// }
if (!vendors.isEmpty() && !products.isEmpty()) {
final List<IndexEntry> entries = searchCPE(vendors, products, dependency.getProductEvidence().getWeighting(),
dependency.getVendorEvidence().getWeighting());
if (entries == null) {
continue;
}
boolean identifierAdded = false;
for (IndexEntry e : entries) {
if (verifyEntry(e, dependency)) {
final String vendor = e.getVendor();
final String product = e.getProduct();
identifierAdded |= determineIdentifiers(dependency, vendor, product, confidence);
}
}
if (identifierAdded) {
break;
}
}
} while ((++ctr) < 4);
}
}
/**
@@ -239,22 +238,6 @@ public class CPEAnalyzer implements Analyzer {
return sb.toString().trim();
}
/**
* Reduces the given confidence by one level. This returns LOW if the confidence passed in is not HIGH.
*
* @param c the confidence to reduce.
* @return One less then the confidence passed in.
*/
private Confidence reduceConfidence(final Confidence c) {
if (c == Confidence.HIGHEST) {
return Confidence.HIGH;
} else if (c == Confidence.HIGH) {
return Confidence.MEDIUM;
} else {
return Confidence.LOW;
}
}
/**
* <p>
* Searches the Lucene CPE index to identify possible CPE entries associated with the supplied vendor, product, and
@@ -269,27 +252,24 @@ public class CPEAnalyzer implements Analyzer {
* @param vendorWeightings a list of strings to use to add weighting factors to the vendor field
* @param productWeightings Adds a list of strings that will be used to add weighting factors to the product search
* @return a list of possible CPE values
* @throws CorruptIndexException when the Lucene index is corrupt
* @throws IOException when the Lucene index is not found
* @throws ParseException when the generated query is not valid
*/
protected List<IndexEntry> searchCPE(String vendor, String product,
Set<String> vendorWeightings, Set<String> productWeightings)
throws CorruptIndexException, IOException, ParseException {
Set<String> vendorWeightings, Set<String> productWeightings) {
final ArrayList<IndexEntry> ret = new ArrayList<IndexEntry>(MAX_QUERY_RESULTS);
final String searchString = buildSearch(vendor, product, vendorWeightings, productWeightings);
if (searchString == null) {
return ret;
}
final TopDocs docs = cpe.search(searchString, MAX_QUERY_RESULTS);
for (ScoreDoc d : docs.scoreDocs) {
if (d.score >= 0.08) {
final Document doc = cpe.getDocument(d.doc);
final IndexEntry entry = new IndexEntry();
entry.setVendor(doc.get(Fields.VENDOR));
entry.setProduct(doc.get(Fields.PRODUCT));
try {
final TopDocs docs = cpe.search(searchString, MAX_QUERY_RESULTS);
for (ScoreDoc d : docs.scoreDocs) {
if (d.score >= 0.08) {
final Document doc = cpe.getDocument(d.doc);
final IndexEntry entry = new IndexEntry();
entry.setVendor(doc.get(Fields.VENDOR));
entry.setProduct(doc.get(Fields.PRODUCT));
// if (d.score < 0.08) {
// System.out.print(entry.getVendor());
// System.out.print(":");
@@ -297,13 +277,23 @@ public class CPEAnalyzer implements Analyzer {
// System.out.print(":");
// System.out.println(d.score);
// }
entry.setSearchScore(d.score);
if (!ret.contains(entry)) {
ret.add(entry);
entry.setSearchScore(d.score);
if (!ret.contains(entry)) {
ret.add(entry);
}
}
}
return ret;
} catch (ParseException ex) {
final String msg = String.format("Unable to parse: %s", searchString);
LOGGER.log(Level.WARNING, "An error occured querying the CPE data. See the log for more details.");
LOGGER.log(Level.INFO, msg, ex);
} catch (IOException ex) {
final String msg = String.format("IO Error with search string: %s", searchString);
LOGGER.log(Level.WARNING, "An error occured reading CPE data. See the log for more details.");
LOGGER.log(Level.INFO, msg, ex);
}
return ret;
return null;
}
/**
@@ -508,14 +498,21 @@ public class CPEAnalyzer implements Analyzer {
* @param dependency the Dependency being analyzed
* @param vendor the vendor for the CPE being analyzed
* @param product the product for the CPE being analyzed
* @param currentConfidence the current confidence being used during analysis
* @return <code>true</code> if an identifier was added to the dependency; otherwise <code>false</code>
* @throws UnsupportedEncodingException is thrown if UTF-8 is not supported
*/
private void determineIdentifiers(Dependency dependency, String vendor, String product) throws UnsupportedEncodingException {
protected boolean determineIdentifiers(Dependency dependency, String vendor, String product,
Confidence currentConfidence) throws UnsupportedEncodingException {
final Set<VulnerableSoftware> cpes = cve.getCPEs(vendor, product);
DependencyVersion bestGuess = new DependencyVersion("-");
Confidence bestGuessConf = null;
boolean hasBroadMatch = false;
final List<IdentifierMatch> collected = new ArrayList<IdentifierMatch>();
for (Confidence conf : Confidence.values()) {
// if (conf.compareTo(currentConfidence) > 0) {
// break;
// }
for (Evidence evidence : dependency.getVersionEvidence().iterator(conf)) {
final DependencyVersion evVer = DependencyVersionUtil.parseVersion(evidence.getValue());
if (evVer == null) {
@@ -528,9 +525,12 @@ public class CPEAnalyzer implements Analyzer {
} else {
dbVer = DependencyVersionUtil.parseVersion(vs.getVersion());
}
if (dbVer == null //special case, no version specified - everything is vulnerable
|| evVer.equals(dbVer)) { //yeah! exact match
if (dbVer == null) { //special case, no version specified - everything is vulnerable
hasBroadMatch = true;
final String url = String.format(NVD_SEARCH_URL, URLEncoder.encode(vs.getName(), "UTF-8"));
final IdentifierMatch match = new IdentifierMatch("cpe", vs.getName(), url, IdentifierConfidence.BROAD_MATCH, conf);
collected.add(match);
} else if (evVer.equals(dbVer)) { //yeah! exact match
final String url = String.format(NVD_SEARCH_URL, URLEncoder.encode(vs.getName(), "UTF-8"));
final IdentifierMatch match = new IdentifierMatch("cpe", vs.getName(), url, IdentifierConfidence.EXACT_MATCH, conf);
collected.add(match);
@@ -556,7 +556,11 @@ public class CPEAnalyzer implements Analyzer {
}
}
final String cpeName = String.format("cpe:/a:%s:%s:%s", vendor, product, bestGuess.toString());
final String url = null;
String url = null;
if (hasBroadMatch) { //if we have a broad match we can add the URL to the best guess.
final String cpeUrlName = String.format("cpe:/a:%s:%s", vendor, product);
url = String.format(NVD_SEARCH_URL, URLEncoder.encode(cpeUrlName, "UTF-8"));
}
if (bestGuessConf == null) {
bestGuessConf = Confidence.LOW;
}
@@ -566,6 +570,7 @@ public class CPEAnalyzer implements Analyzer {
Collections.sort(collected);
final IdentifierConfidence bestIdentifierQuality = collected.get(0).getConfidence();
final Confidence bestEvidenceQuality = collected.get(0).getEvidenceConfidence();
boolean identifierAdded = false;
for (IdentifierMatch m : collected) {
if (bestIdentifierQuality.equals(m.getConfidence())
&& bestEvidenceQuality.equals(m.getEvidenceConfidence())) {
@@ -576,8 +581,10 @@ public class CPEAnalyzer implements Analyzer {
i.setConfidence(bestEvidenceQuality);
}
dependency.addIdentifier(i);
identifierAdded = true;
}
}
return identifierAdded;
}
/**
@@ -592,7 +599,12 @@ public class CPEAnalyzer implements Analyzer {
/**
* A best guess for the CPE.
*/
BEST_GUESS
BEST_GUESS,
/**
* The entire vendor/product group must be added (without a guess at version) because there is a CVE with a VS
* that only specifies vendor/product.
*/
BROAD_MATCH
}
/**

View File

@@ -0,0 +1,201 @@
/*
* 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) 2014 Jeremy Long. All Rights Reserved.
*/
package org.owasp.dependencycheck.analyzer;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.URL;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.owasp.dependencycheck.Engine;
import org.owasp.dependencycheck.analyzer.exception.AnalysisException;
import org.owasp.dependencycheck.data.central.CentralSearch;
import org.owasp.dependencycheck.data.nexus.MavenArtifact;
import org.owasp.dependencycheck.dependency.Confidence;
import org.owasp.dependencycheck.dependency.Dependency;
import org.owasp.dependencycheck.utils.InvalidSettingException;
import org.owasp.dependencycheck.utils.Settings;
/**
* Analyzer which will attempt to locate a dependency, and the GAV information, by querying Central for the dependency's
* SHA-1 digest.
*
* @author colezlaw
*/
public class CentralAnalyzer extends AbstractFileTypeAnalyzer {
/**
* The logger.
*/
private static final Logger LOGGER = Logger.getLogger(CentralAnalyzer.class.getName());
/**
* The name of the analyzer.
*/
private static final String ANALYZER_NAME = "Central Analyzer";
/**
* The phase in which this analyzer runs.
*/
private static final AnalysisPhase ANALYSIS_PHASE = AnalysisPhase.INFORMATION_COLLECTION;
/**
* The types of files on which this will work.
*/
private static final Set<String> SUPPORTED_EXTENSIONS = newHashSet("jar");
/**
* The analyzer should be disabled if there are errors, so this is a flag to determine if such an error has
* occurred.
*/
private boolean errorFlag = false;
/**
* The searcher itself.
*/
private CentralSearch searcher;
/**
* Field indicating if the analyzer is enabled.
*/
private final boolean enabled = checkEnabled();
/**
* Determine whether to enable this analyzer or not.
*
* @return whether the analyzer should be enabled
*/
@Override
public boolean isEnabled() {
return enabled;
}
/**
* Determines if this analyzer is enabled.
*
* @return <code>true</code> if the analyzer is enabled; otherwise <code>false</code>
*/
private boolean checkEnabled() {
boolean retval = false;
try {
if (Settings.getBoolean(Settings.KEYS.ANALYZER_CENTRAL_ENABLED)) {
if (!Settings.getBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED)
|| NexusAnalyzer.DEFAULT_URL.equals(Settings.getString(Settings.KEYS.ANALYZER_NEXUS_URL))) {
LOGGER.fine("Enabling the Central analyzer");
retval = true;
} else {
LOGGER.info("Nexus analyzer is enabled, disabling the Central Analyzer");
}
} else {
LOGGER.info("Central analyzer disabled");
}
} catch (InvalidSettingException ise) {
LOGGER.warning("Invalid setting. Disabling the Central analyzer");
}
return retval;
}
/**
* Initializes the analyzer once before any analysis is performed.
*
* @throws Exception if there's an error during initialization
*/
@Override
public void initializeFileTypeAnalyzer() throws Exception {
LOGGER.fine("Initializing Central analyzer");
LOGGER.fine(String.format("Central analyzer enabled: %s", isEnabled()));
if (isEnabled()) {
final String searchUrl = Settings.getString(Settings.KEYS.ANALYZER_CENTRAL_URL);
LOGGER.fine(String.format("Central Analyzer URL: %s", searchUrl));
searcher = new CentralSearch(new URL(searchUrl));
}
}
/**
* Returns the analyzer's name.
*
* @return the name of the analyzer
*/
@Override
public String getName() {
return ANALYZER_NAME;
}
/**
* Returns the key used in the properties file to to reference the analyzer's enabled property.
*
* @return the analyzer's enabled property setting key.
*/
@Override
protected String getAnalyzerEnabledSettingKey() {
return Settings.KEYS.ANALYZER_CENTRAL_ENABLED;
}
/**
* Returns the analysis phase under which the analyzer runs.
*
* @return the phase under which the analyzer runs
*/
@Override
public AnalysisPhase getAnalysisPhase() {
return ANALYSIS_PHASE;
}
/**
* Returns the extensions for which this Analyzer runs.
*
* @return the extensions for which this Analyzer runs
*/
@Override
public Set<String> getSupportedExtensions() {
return SUPPORTED_EXTENSIONS;
}
/**
* Performs the analysis.
*
* @param dependency the dependency to analyze
* @param engine the engine
* @throws AnalysisException when there's an exception during analysis
*/
@Override
public void analyzeFileType(Dependency dependency, Engine engine) throws AnalysisException {
if (errorFlag || !isEnabled()) {
return;
}
try {
final List<MavenArtifact> mas = searcher.searchSha1(dependency.getSha1sum());
final Confidence confidence = mas.size() > 1 ? Confidence.HIGH : Confidence.HIGHEST;
for (MavenArtifact ma : mas) {
LOGGER.fine(String.format("Central analyzer found artifact (%s) for dependency (%s)", ma.toString(), dependency.getFileName()));
dependency.addAsEvidence("central", ma, confidence);
}
} catch (IllegalArgumentException iae) {
LOGGER.info(String.format("invalid sha1-hash on %s", dependency.getFileName()));
} catch (FileNotFoundException fnfe) {
LOGGER.fine(String.format("Artifact not found in repository: '%s", dependency.getFileName()));
} catch (IOException ioe) {
LOGGER.log(Level.FINE, "Could not connect to Central search", ioe);
errorFlag = true;
}
}
}

View File

@@ -55,7 +55,7 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
/**
* A pattern for obtaining the first part of a filename.
*/
private static final Pattern STARTING_TEXT_PATTERN = Pattern.compile("^[a-zA-Z]*");
private static final Pattern STARTING_TEXT_PATTERN = Pattern.compile("^[a-zA-Z0-9]*");
/**
* a flag indicating if this analyzer has run. This analyzer only runs once.
*/
@@ -107,21 +107,25 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
//for (Dependency nextDependency : engine.getDependencies()) {
while (mainIterator.hasNext()) {
final Dependency dependency = mainIterator.next();
if (mainIterator.hasNext()) {
if (mainIterator.hasNext() && !dependenciesToRemove.contains(dependency)) {
final ListIterator<Dependency> subIterator = engine.getDependencies().listIterator(mainIterator.nextIndex());
while (subIterator.hasNext()) {
final Dependency nextDependency = subIterator.next();
if (hashesMatch(dependency, nextDependency)) {
if (isCore(dependency, nextDependency)) {
if (firstPathIsShortest(dependency.getFilePath(), nextDependency.getFilePath())) {
mergeDependencies(dependency, nextDependency, dependenciesToRemove);
} else {
mergeDependencies(nextDependency, dependency, dependenciesToRemove);
break; //since we merged into the next dependency - skip forward to the next in mainIterator
}
} else if (isShadedJar(dependency, nextDependency)) {
if (dependency.getFileName().toLowerCase().endsWith("pom.xml")) {
dependenciesToRemove.add(dependency);
mergeDependencies(nextDependency, dependency, dependenciesToRemove);
nextDependency.getRelatedDependencies().remove(dependency);
break;
} else {
dependenciesToRemove.add(nextDependency);
mergeDependencies(dependency, nextDependency, dependenciesToRemove);
nextDependency.getRelatedDependencies().remove(nextDependency);
}
} else if (cpeIdentifiersMatch(dependency, nextDependency)
&& hasSameBasePath(dependency, nextDependency)
@@ -131,6 +135,7 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
mergeDependencies(dependency, nextDependency, dependenciesToRemove);
} else {
mergeDependencies(nextDependency, dependency, dependenciesToRemove);
break; //since we merged into the next dependency - skip forward to the next in mainIterator
}
}
}
@@ -138,9 +143,7 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
}
//removing dependencies here as ensuring correctness and avoiding ConcurrentUpdateExceptions
// was difficult because of the inner iterator.
for (Dependency d : dependenciesToRemove) {
engine.getDependencies().remove(d);
}
engine.getDependencies().removeAll(dependenciesToRemove);
}
}
@@ -201,26 +204,24 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
|| dependency2 == null || dependency2.getFileName() == null) {
return false;
}
String fileName1 = dependency1.getFileName();
String fileName2 = dependency2.getFileName();
//update to deal with archive analyzer, the starting name maybe the same
// as this is incorrectly looking at the starting path
final File one = new File(fileName1);
final File two = new File(fileName2);
final String oneParent = one.getParent();
final String twoParent = two.getParent();
if (oneParent != null) {
if (oneParent.equals(twoParent)) {
fileName1 = one.getName();
fileName2 = two.getName();
} else {
return false;
}
} else if (twoParent != null) {
return false;
}
final String fileName1 = dependency1.getActualFile().getName();
final String fileName2 = dependency2.getActualFile().getName();
// //REMOVED because this is attempting to duplicate what is in the hasSameBasePath function.
// final File one = new File(fileName1);
// final File two = new File(fileName2);
// final String oneParent = one.getParent();
// final String twoParent = two.getParent();
// if (oneParent != null) {
// if (oneParent.equals(twoParent)) {
// fileName1 = one.getName();
// fileName2 = two.getName();
// } else {
// return false;
// }
// } else if (twoParent != null) {
// return false;
// }
//version check
final DependencyVersion version1 = DependencyVersionUtil.parseVersion(fileName1);
final DependencyVersion version2 = DependencyVersionUtil.parseVersion(fileName2);
@@ -267,9 +268,11 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
}
if (cpeCount1 > 0 && cpeCount1 == cpeCount2) {
for (Identifier i : dependency1.getIdentifiers()) {
matches |= dependency2.getIdentifiers().contains(i);
if (!matches) {
break;
if ("cpe".equals(i.getType())) {
matches |= dependency2.getIdentifiers().contains(i);
if (!matches) {
break;
}
}
}
}
@@ -338,6 +341,10 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
|| !rightName.contains("core") && leftName.contains("core")
|| !rightName.contains("kernel") && leftName.contains("kernel")) {
returnVal = true;
// } else if (leftName.matches(".*struts2\\-core.*") && rightName.matches(".*xwork\\-core.*")) {
// returnVal = true;
// } else if (rightName.matches(".*struts2\\-core.*") && leftName.matches(".*xwork\\-core.*")) {
// returnVal = false;
} else {
/*
* considered splitting the names up and comparing the components,
@@ -390,4 +397,43 @@ public class DependencyBundlingAnalyzer extends AbstractAnalyzer implements Anal
}
return false;
}
/**
* Determines which path is shortest; if path lengths are equal then we use compareTo of the string method to
* determine if the first path is smaller.
*
* @param left the first path to compare
* @param right the second path to compare
* @return <code>true</code> if the leftPath is the shortest; otherwise <code>false</code>
*/
protected boolean firstPathIsShortest(String left, String right) {
final String leftPath = left.replace('\\', '/');
final String rightPath = right.replace('\\', '/');
final int leftCount = countChar(leftPath, '/');
final int rightCount = countChar(rightPath, '/');
if (leftCount == rightCount) {
return leftPath.compareTo(rightPath) <= 0;
} else {
return leftCount < rightCount;
}
}
/**
* Counts the number of times the character is present in the string.
*
* @param string the string to count the characters in
* @param c the character to count
* @return the number of times the character is present in the string
*/
private int countChar(String string, char c) {
int count = 0;
final int max = string.length();
for (int i = 0; i < max; i++) {
if (c == string.charAt(i)) {
count++;
}
}
return count;
}
}

View File

@@ -86,12 +86,46 @@ public class FalsePositiveAnalyzer extends AbstractAnalyzer {
public void analyze(Dependency dependency, Engine engine) throws AnalysisException {
removeJreEntries(dependency);
removeBadMatches(dependency);
removeBadSpringMatches(dependency);
removeWrongVersionMatches(dependency);
removeSpuriousCPE(dependency);
removeDuplicativeEntriesFromJar(dependency, engine);
addFalseNegativeCPEs(dependency);
}
/**
* Removes inaccurate matches on springframework CPEs.
*
* @param dependency the dependency to test for and remove known inaccurate CPE matches
*/
private void removeBadSpringMatches(Dependency dependency) {
String mustContain = null;
for (Identifier i : dependency.getIdentifiers()) {
if ("maven".contains(i.getType())) {
if (i.getValue() != null && i.getValue().startsWith("org.springframework.")) {
final int endPoint = i.getValue().indexOf(":", 19);
if (endPoint >= 0) {
mustContain = i.getValue().substring(19, endPoint).toLowerCase();
break;
}
}
}
}
if (mustContain != null) {
final Iterator<Identifier> itr = dependency.getIdentifiers().iterator();
while (itr.hasNext()) {
final Identifier i = itr.next();
if ("cpe".contains(i.getType())
&& i.getValue() != null
&& i.getValue().startsWith("cpe:/a:springsource:")
&& !i.getValue().toLowerCase().contains(mustContain)) {
itr.remove();
//dependency.getIdentifiers().remove(i);
}
}
}
}
/**
* <p>
* Intended to remove spurious CPE entries. By spurious we mean duplicate, less specific CPE entries.</p>

View File

@@ -73,7 +73,7 @@ public class FileNameAnalyzer extends AbstractAnalyzer implements Analyzer {
public void analyze(Dependency dependency, Engine engine) throws AnalysisException {
//strip any path information that may get added by ArchiveAnalyzer, etc.
final File f = new File(dependency.getFileName());
final File f = dependency.getActualFile();
String fileName = f.getName();
//remove file extension

View File

@@ -169,7 +169,8 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
*/
public JarAnalyzer() {
try {
final JAXBContext jaxbContext = JAXBContext.newInstance("org.owasp.dependencycheck.jaxb.pom.generated");
//final JAXBContext jaxbContext = JAXBContext.newInstance("org.owasp.dependencycheck.jaxb.pom.generated");
final JAXBContext jaxbContext = JAXBContext.newInstance(Model.class);
pomUnmarshaller = jaxbContext.createUnmarshaller();
} catch (JAXBException ex) { //guess we will just have a null pointer exception later...
LOGGER.log(Level.SEVERE, "Unable to load parser. See the log for more details.");
@@ -292,13 +293,27 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
LOGGER.log(Level.FINE, msg, ex);
return false;
}
File externalPom = null;
if (pomEntries.isEmpty()) {
return false;
if (dependency.getActualFilePath().matches(".*\\.m2.repository\\b.*")) {
String pomPath = dependency.getActualFilePath();
pomPath = pomPath.substring(0, pomPath.lastIndexOf('.')) + ".pom";
externalPom = new File(pomPath);
if (externalPom.isFile()) {
pomEntries.add(pomPath);
} else {
return false;
}
} else {
return false;
}
}
for (String path : pomEntries) {
Properties pomProperties = null;
try {
pomProperties = retrievePomProperties(path, jar);
if (externalPom == null) {
pomProperties = retrievePomProperties(path, jar);
}
} catch (IOException ex) {
LOGGER.log(Level.FINEST, "ignore this, failed reading a non-existent pom.properties", ex);
}
@@ -312,11 +327,11 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
final String displayPath = String.format("%s%s%s",
dependency.getFilePath(),
File.separator,
path); //.replaceAll("[\\/]", File.separator));
path);
final String displayName = String.format("%s%s%s",
dependency.getFileName(),
File.separator,
path); //.replaceAll("[\\/]", File.separator));
path);
newDependency.setFileName(displayName);
newDependency.setFilePath(displayPath);
@@ -324,7 +339,11 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
engine.getDependencies().add(newDependency);
Collections.sort(engine.getDependencies());
} else {
pom = retrievePom(path, jar);
if (externalPom == null) {
pom = retrievePom(path, jar);
} else {
pom = retrievePom(externalPom);
}
foundSomething |= setPomEvidence(dependency, pom, pomProperties, classes);
}
} catch (AnalysisException ex) {
@@ -344,16 +363,25 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
* @return a Properties object or null if no pom.properties was found
* @throws IOException thrown if there is an exception reading the pom.properties
*/
@edu.umd.cs.findbugs.annotations.SuppressWarnings(value = "OS_OPEN_STREAM",
justification = "The reader is closed by closing the zipEntry")
private Properties retrievePomProperties(String path, final JarFile jar) throws IOException {
Properties pomProperties = null;
final String propPath = path.substring(0, path.length() - 7) + "pom.properies";
final ZipEntry propEntry = jar.getEntry(propPath);
if (propEntry != null) {
final Reader reader = new InputStreamReader(jar.getInputStream(propEntry), "UTF-8");
pomProperties = new Properties();
pomProperties.load(reader);
Reader reader = null;
try {
reader = new InputStreamReader(jar.getInputStream(propEntry), "UTF-8");
pomProperties = new Properties();
pomProperties.load(reader);
} finally {
if (reader != null) {
try {
reader.close();
} catch (IOException ex) {
LOGGER.log(Level.FINEST, "close error", ex);
}
}
}
}
return pomProperties;
}
@@ -513,6 +541,41 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
return model;
}
/**
* Reads in the specified POM and converts it to a Model.
*
* @param file the pom.xml file
* @return returns a
* @throws AnalysisException is thrown if there is an exception extracting or parsing the POM
* {@link org.owasp.dependencycheck.jaxb.pom.generated.Model} object
*/
private Model retrievePom(File file) throws AnalysisException {
Model model = null;
try {
final FileInputStream stream = new FileInputStream(file);
final InputStreamReader reader = new InputStreamReader(stream, "UTF-8");
final InputSource xml = new InputSource(reader);
final SAXSource source = new SAXSource(xml);
model = readPom(source);
} catch (SecurityException ex) {
final String msg = String.format("Unable to parse pom '%s'; invalid signature", file.getPath());
LOGGER.log(Level.WARNING, msg);
LOGGER.log(Level.FINE, null, ex);
throw new AnalysisException(ex);
} catch (IOException ex) {
final String msg = String.format("Unable to parse pom '%s'(IO Exception)", file.getPath());
LOGGER.log(Level.WARNING, msg);
LOGGER.log(Level.FINE, "", ex);
throw new AnalysisException(ex);
} catch (Throwable ex) {
final String msg = String.format("Unexpected error during parsing of the pom '%s'", file.getPath());
LOGGER.log(Level.WARNING, msg);
LOGGER.log(Level.FINE, "", ex);
throw new AnalysisException(ex);
}
return model;
}
/**
* Retrieves the specified POM from a jar file and converts it to a Model.
*
@@ -573,11 +636,8 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
final String originalGroupID = groupid;
if (groupid != null && !groupid.isEmpty()) {
if (groupid.startsWith("org.") || groupid.startsWith("com.")) {
groupid = groupid.substring(4);
}
foundSomething = true;
dependency.getVendorEvidence().addEvidence("pom", "groupid", groupid, Confidence.HIGH);
dependency.getVendorEvidence().addEvidence("pom", "groupid", groupid, Confidence.HIGHEST);
dependency.getProductEvidence().addEvidence("pom", "groupid", groupid, Confidence.LOW);
addMatchingValues(classes, groupid, dependency.getVendorEvidence());
addMatchingValues(classes, groupid, dependency.getProductEvidence());
@@ -606,7 +666,7 @@ public class JarAnalyzer extends AbstractFileTypeAnalyzer {
artifactid = artifactid.substring(4);
}
foundSomething = true;
dependency.getProductEvidence().addEvidence("pom", "artifactid", artifactid, Confidence.HIGH);
dependency.getProductEvidence().addEvidence("pom", "artifactid", artifactid, Confidence.HIGHEST);
dependency.getVendorEvidence().addEvidence("pom", "artifactid", artifactid, Confidence.LOW);
addMatchingValues(classes, artifactid, dependency.getVendorEvidence());
addMatchingValues(classes, artifactid, dependency.getProductEvidence());

View File

@@ -30,7 +30,7 @@ import org.owasp.dependencycheck.data.nexus.MavenArtifact;
import org.owasp.dependencycheck.data.nexus.NexusSearch;
import org.owasp.dependencycheck.dependency.Confidence;
import org.owasp.dependencycheck.dependency.Dependency;
import org.owasp.dependencycheck.dependency.Identifier;
import org.owasp.dependencycheck.utils.InvalidSettingException;
import org.owasp.dependencycheck.utils.Settings;
/**
@@ -49,6 +49,11 @@ import org.owasp.dependencycheck.utils.Settings;
*/
public class NexusAnalyzer extends AbstractFileTypeAnalyzer {
/**
* The default URL - this will be used by the CentralAnalyzer to determine whether to enable this.
*/
public static final String DEFAULT_URL = "https://repository.sonatype.org/service/local/";
/**
* The logger.
*/
@@ -74,6 +79,47 @@ public class NexusAnalyzer extends AbstractFileTypeAnalyzer {
*/
private NexusSearch searcher;
/**
* Field indicating if the analyzer is enabled.
*/
private final boolean enabled = checkEnabled();
/**
* Determines if this analyzer is enabled
*
* @return <code>true</code> if the analyzer is enabled; otherwise <code>false</code>
*/
private boolean checkEnabled() {
/* Enable this analyzer ONLY if the Nexus URL has been set to something
other than the default one (if it's the default one, we'll use the
central one) and it's enabled by the user.
*/
boolean retval = false;
try {
if ((!DEFAULT_URL.equals(Settings.getString(Settings.KEYS.ANALYZER_NEXUS_URL)))
&& Settings.getBoolean(Settings.KEYS.ANALYZER_NEXUS_ENABLED)) {
LOGGER.info("Enabling Nexus analyzer");
retval = true;
} else {
LOGGER.fine("Nexus analyzer disabled, using Central instead");
}
} catch (InvalidSettingException ise) {
LOGGER.warning("Invalid setting. Disabling Nexus analyzer");
}
return retval;
}
/**
* Determine whether to enable this analyzer or not.
*
* @return whether the analyzer should be enabled
*/
@Override
public boolean isEnabled() {
return enabled;
}
/**
* Initializes the analyzer once before any analysis is performed.
*
@@ -150,31 +196,12 @@ public class NexusAnalyzer extends AbstractFileTypeAnalyzer {
*/
@Override
public void analyzeFileType(Dependency dependency, Engine engine) throws AnalysisException {
if (!isEnabled()) {
return;
}
try {
final MavenArtifact ma = searcher.searchSha1(dependency.getSha1sum());
if (ma.getGroupId() != null && !"".equals(ma.getGroupId())) {
dependency.getVendorEvidence().addEvidence("nexus", "groupid", ma.getGroupId(), Confidence.HIGH);
}
if (ma.getArtifactId() != null && !"".equals(ma.getArtifactId())) {
dependency.getProductEvidence().addEvidence("nexus", "artifactid", ma.getArtifactId(), Confidence.HIGH);
}
if (ma.getVersion() != null && !"".equals(ma.getVersion())) {
dependency.getVersionEvidence().addEvidence("nexus", "version", ma.getVersion(), Confidence.HIGH);
}
if (ma.getArtifactUrl() != null && !"".equals(ma.getArtifactUrl())) {
boolean found = false;
for (Identifier i : dependency.getIdentifiers()) {
if ("maven".equals(i.getType()) && i.getValue().equals(ma.toString())) {
found = true;
i.setConfidence(Confidence.HIGHEST);
i.setUrl(ma.getArtifactUrl());
break;
}
}
if (!found) {
dependency.addIdentifier("maven", ma.toString(), ma.getArtifactUrl(), Confidence.HIGHEST);
}
}
dependency.addAsEvidence("nexus", ma, Confidence.HIGH);
} catch (IllegalArgumentException iae) {
//dependency.addAnalysisException(new AnalysisException("Invalid SHA-1"));
LOGGER.info(String.format("invalid sha-1 hash on %s", dependency.getFileName()));

View File

@@ -0,0 +1,151 @@
/*
* 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) 2014 Jeremy Long. All Rights Reserved.
*/
package org.owasp.dependencycheck.data.central;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.ArrayList;
import java.util.List;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory;
import javax.xml.xpath.XPath;
import javax.xml.xpath.XPathConstants;
import javax.xml.xpath.XPathFactory;
import org.owasp.dependencycheck.data.nexus.MavenArtifact;
import org.owasp.dependencycheck.utils.Settings;
import org.owasp.dependencycheck.utils.URLConnectionFactory;
import org.w3c.dom.Document;
import org.w3c.dom.NodeList;
/**
* Class of methods to search Maven Central via Central.
*
* @author colezlaw
*/
public class CentralSearch {
/**
* The URL for the Central service
*/
private final URL rootURL;
/**
* Whether to use the Proxy when making requests
*/
private boolean useProxy;
/**
* Used for logging.
*/
private static final Logger LOGGER = Logger.getLogger(CentralSearch.class.getName());
/**
* Creates a NexusSearch for the given repository URL.
*
* @param rootURL the URL of the repository on which searches should execute. Only parameters are added to this (so
* it should end in /select)
*/
public CentralSearch(URL rootURL) {
this.rootURL = rootURL;
if (null != Settings.getString(Settings.KEYS.PROXY_SERVER)) {
useProxy = true;
LOGGER.fine("Using proxy");
} else {
useProxy = false;
LOGGER.fine("Not using proxy");
}
}
/**
* Searches the configured Central URL for the given sha1 hash. If the artifact is found, a
* <code>MavenArtifact</code> is populated with the GAV.
*
* @param sha1 the SHA-1 hash string for which to search
* @return the populated Maven GAV.
* @throws IOException if it's unable to connect to the specified repository or if the specified artifact is not
* found.
*/
public List<MavenArtifact> searchSha1(String sha1) throws IOException {
if (null == sha1 || !sha1.matches("^[0-9A-Fa-f]{40}$")) {
throw new IllegalArgumentException("Invalid SHA1 format");
}
final URL url = new URL(rootURL + String.format("?q=1:\"%s\"&wt=xml", sha1));
LOGGER.fine(String.format("Searching Central url %s", url.toString()));
// 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);
conn.setDoOutput(true);
// JSON would be more elegant, but there's not currently a dependency
// on JSON, so don't want to add one just for this
conn.addRequestProperty("Accept", "application/xml");
conn.connect();
if (conn.getResponseCode() == 200) {
boolean missing = false;
try {
final DocumentBuilder builder = DocumentBuilderFactory
.newInstance().newDocumentBuilder();
final Document doc = builder.parse(conn.getInputStream());
final XPath xpath = XPathFactory.newInstance().newXPath();
final String numFound = xpath.evaluate("/response/result/@numFound", doc);
if ("0".equals(numFound)) {
missing = true;
} else {
final ArrayList<MavenArtifact> result = new ArrayList<MavenArtifact>();
final NodeList docs = (NodeList) xpath.evaluate("/response/result/doc", doc, XPathConstants.NODESET);
for (int i = 0; i < docs.getLength(); i++) {
final String g = xpath.evaluate("./str[@name='g']", docs.item(i));
LOGGER.finest(String.format("GroupId: %s", g));
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));
LOGGER.finest(String.format("Version: %s", v));
result.add(new MavenArtifact(g, a, v, url.toString()));
}
return result;
}
} catch (Throwable e) {
// Anything else is jacked up XML stuff that we really can't recover
// from well
throw new IOException(e.getMessage(), e);
}
if (missing) {
throw new FileNotFoundException("Artifact not found in Central");
}
} else {
final String msg = String.format("Could not connect to Central received response code: %d %s",
conn.getResponseCode(), conn.getResponseMessage());
LOGGER.fine(msg);
throw new IOException(msg);
}
return null;
}
}

View File

@@ -0,0 +1,14 @@
/**
* <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>
*/
package org.owasp.dependencycheck.data.central;

View File

@@ -54,6 +54,7 @@ import org.owasp.dependencycheck.utils.Pair;
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public final class CpeMemoryIndex {
/**
* The logger.
*/
@@ -160,7 +161,7 @@ public final class CpeMemoryIndex {
*/
@SuppressWarnings("unchecked")
private Analyzer createSearchingAnalyzer() {
final Map fieldAnalyzers = new HashMap();
final Map<String, Analyzer> fieldAnalyzers = new HashMap<String, Analyzer>();
fieldAnalyzers.put(Fields.DOCUMENT_KEY, new KeywordAnalyzer());
productSearchFieldAnalyzer = new SearchFieldAnalyzer(LuceneUtils.CURRENT_VERSION);
vendorSearchFieldAnalyzer = new SearchFieldAnalyzer(LuceneUtils.CURRENT_VERSION);

View File

@@ -22,7 +22,7 @@ package org.owasp.dependencycheck.data.cpe;
*
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public abstract class Fields {
public final class Fields {
/**
* The key for the name document id.
@@ -36,7 +36,10 @@ public abstract class Fields {
* The key for the product field.
*/
public static final String PRODUCT = "product";
/**
* The key for the version field.
* Private constructor as this is more of an enumeration rather then a full class.
*/
private Fields() {
}
}

View File

@@ -29,10 +29,12 @@ import java.util.logging.Logger;
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public final class CweDB {
/**
* The Logger.
*/
private static final Logger LOGGER = Logger.getLogger(CweDB.class.getName());
/**
* Empty private constructor as this is a utility class.
*/
@@ -55,7 +57,9 @@ public final class CweDB {
final String filePath = "data/cwe.hashmap.serialized";
final InputStream input = CweDB.class.getClassLoader().getResourceAsStream(filePath);
oin = new ObjectInputStream(input);
return (HashMap<String, String>) oin.readObject();
@SuppressWarnings("unchecked")
final HashMap<String, String> ret = (HashMap<String, String>) oin.readObject();
return ret;
} catch (ClassNotFoundException ex) {
LOGGER.log(Level.WARNING, "Unable to load CWE data. This should not be an issue.");
LOGGER.log(Level.FINE, null, ex);

View File

@@ -42,6 +42,7 @@ import org.owasp.dependencycheck.utils.Settings;
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public final class ConnectionFactory {
/**
* The Logger.
*/
@@ -49,7 +50,7 @@ public final class ConnectionFactory {
/**
* The version of the current DB Schema.
*/
public static final String DB_SCHEMA_VERSION = "2.9";
public static final String DB_SCHEMA_VERSION = Settings.getString(Settings.KEYS.DB_VERSION);
/**
* Resource location for SQL file used to create the database schema.
*/
@@ -111,7 +112,10 @@ public final class ConnectionFactory {
//yes, yes - hard-coded password - only if there isn't one in the properties file.
password = Settings.getString(Settings.KEYS.DB_PASSWORD, "DC-Pass1337!");
try {
connectionString = getConnectionString();
connectionString = Settings.getConnectionString(
Settings.KEYS.DB_CONNECTION_STRING,
Settings.KEYS.DB_FILE_NAME,
Settings.KEYS.DB_VERSION);
} catch (IOException ex) {
LOGGER.log(Level.FINE,
"Unable to retrieve the database connection string", ex);
@@ -120,7 +124,7 @@ public final class ConnectionFactory {
boolean shouldCreateSchema = false;
try {
if (connectionString.startsWith("jdbc:h2:file:")) { //H2
shouldCreateSchema = !dbSchemaExists();
shouldCreateSchema = !h2DataFileExists();
LOGGER.log(Level.FINE, "Need to create DB Structure: {0}", shouldCreateSchema);
}
} catch (IOException ioex) {
@@ -217,51 +221,17 @@ public final class ConnectionFactory {
return conn;
}
/**
* Returns the configured connection string. If using the embedded H2 database this function will also ensure the
* data directory exists and if not create it.
*
* @return the connection string
* @throws IOException thrown the data directory cannot be created
*/
private static String getConnectionString() throws IOException {
final String connStr = Settings.getString(Settings.KEYS.DB_CONNECTION_STRING, "jdbc:h2:file:%s;AUTO_SERVER=TRUE");
if (connStr.contains("%s")) {
final String directory = getDataDirectory().getCanonicalPath();
final File dataFile = new File(directory, "cve." + DB_SCHEMA_VERSION);
LOGGER.log(Level.FINE, String.format("File path for H2 file: '%s'", dataFile.toString()));
return String.format(connStr, dataFile.getAbsolutePath());
}
return connStr;
}
/**
* Retrieves the directory that the JAR file exists in so that we can ensure we always use a common data directory
* for the embedded H2 database. This is public solely for some unit tests; otherwise this should be private.
*
* @return the data directory to store data files
* @throws IOException is thrown if an IOException occurs of course...
*/
public static File getDataDirectory() throws IOException {
final File path = Settings.getDataFile(Settings.KEYS.DATA_DIRECTORY);
if (!path.exists()) {
if (!path.mkdirs()) {
throw new IOException("Unable to create NVD CVE Data directory");
}
}
return path;
}
/**
* Determines if the H2 database file exists. If it does not exist then the data structure will need to be created.
*
* @return true if the H2 database file does not exist; otherwise false
* @throws IOException thrown if the data directory does not exist and cannot be created
*/
private static boolean dbSchemaExists() throws IOException {
final File dir = getDataDirectory();
final String name = String.format("cve.%s.h2.db", DB_SCHEMA_VERSION);
final File file = new File(dir, name);
private static boolean h2DataFileExists() throws IOException {
final File dir = Settings.getDataDirectory();
final String name = Settings.getString(Settings.KEYS.DB_FILE_NAME);
final String fileName = String.format(name, DB_SCHEMA_VERSION);
final File file = new File(dir, fileName);
return file.exists();
}

View File

@@ -17,6 +17,7 @@
*/
package org.owasp.dependencycheck.data.nvdcve;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.sql.Connection;
import java.sql.PreparedStatement;
@@ -39,6 +40,7 @@ import org.owasp.dependencycheck.utils.DBUtils;
import org.owasp.dependencycheck.utils.DependencyVersion;
import org.owasp.dependencycheck.utils.DependencyVersionUtil;
import org.owasp.dependencycheck.utils.Pair;
import org.owasp.dependencycheck.utils.Settings;
/**
* The database holding information about the NVD CVE data.
@@ -87,7 +89,9 @@ public class CveDB {
* @throws DatabaseException thrown if there is an error opening the database connection
*/
public final void open() throws DatabaseException {
conn = ConnectionFactory.getConnection();
if (!isOpen()) {
conn = ConnectionFactory.getConnection();
}
}
/**
@@ -306,14 +310,14 @@ public class CveDB {
* @throws DatabaseException thrown when there is an error retrieving the data from the DB
*/
public Set<Pair<String, String>> getVendorProductList() throws DatabaseException {
final HashSet data = new HashSet<Pair<String, String>>();
final Set<Pair<String, String>> data = new HashSet<Pair<String, String>>();
ResultSet rs = null;
PreparedStatement ps = null;
try {
ps = getConnection().prepareStatement(SELECT_VENDOR_PRODUCT_LIST);
rs = ps.executeQuery();
while (rs.next()) {
data.add(new Pair(rs.getString(1), rs.getString(2)));
data.add(new Pair<String, String>(rs.getString(1), rs.getString(2)));
}
} catch (SQLException ex) {
final String msg = "An unexpected SQL Exception occurred; please see the verbose log for more details.";
@@ -700,6 +704,43 @@ public class CveDB {
}
}
/**
* Checks to see if data exists so that analysis can be performed.
*
* @return <code>true</code> if data exists; otherwise <code>false</code>
*/
public boolean dataExists() {
Statement cs = null;
ResultSet rs = null;
try {
cs = conn.createStatement();
rs = cs.executeQuery("SELECT COUNT(*) records FROM cpeEntry");
if (rs.next()) {
if (rs.getInt(1) > 0) {
return true;
}
}
} catch (SQLException ex) {
String dd;
try {
dd = Settings.getDataDirectory().getAbsolutePath();
} catch (IOException ex1) {
dd = Settings.getString(Settings.KEYS.DATA_DIRECTORY);
}
final String msg = String.format("Unable to access the local database.%n%nEnsure that '%s' is a writable directory. "
+ "If the problem persist try deleting the files in '%s' and running %s again. If the problem continues, please "
+ "create a log file (see documentation at http://jeremylong.github.io/DependencyCheck/) and open a ticket at "
+ "https://github.com/jeremylong/DependencyCheck/issues and include the log file.%n%n",
dd, dd, Settings.getString(Settings.KEYS.APPLICATION_VAME));
LOGGER.log(Level.SEVERE, msg);
LOGGER.log(Level.FINE, "", ex);
} finally {
DBUtils.closeResultSet(rs);
DBUtils.closeStatement(cs);
}
return false;
}
/**
* It is possible that orphaned rows may be generated during database updates. This should be called after all
* updates have been completed to ensure orphan entries are removed.
@@ -731,7 +772,7 @@ public class CveDB {
* @param previous a flag indicating if previous versions of the product are vulnerable
* @return true if the identified version is affected, otherwise false
*/
private boolean isAffected(String vendor, String product, DependencyVersion identifiedVersion, String cpeId, String previous) {
protected boolean isAffected(String vendor, String product, DependencyVersion identifiedVersion, String cpeId, String previous) {
boolean affected = false;
final boolean isStruts = "apache".equals(vendor) && "struts".equals(product);
final DependencyVersion v = parseDependencyVersion(cpeId);

View File

@@ -91,7 +91,7 @@ public class DatabaseProperties {
}
/**
* Writes a properties file containing the last updated date to the VULNERABLE_CPE directory.
* Saves the last updated information to the properties file.
*
* @param updatedValue the updated NVD CVE entry
* @throws UpdateException is thrown if there is an update exception
@@ -100,8 +100,19 @@ public class DatabaseProperties {
if (updatedValue == null) {
return;
}
properties.put(LAST_UPDATED_BASE + updatedValue.getId(), String.valueOf(updatedValue.getTimestamp()));
cveDB.saveProperty(LAST_UPDATED_BASE + updatedValue.getId(), String.valueOf(updatedValue.getTimestamp()));
save(LAST_UPDATED_BASE + updatedValue.getId(), String.valueOf(updatedValue.getTimestamp()));
}
/**
* Saves the key value pair to the properties store.
*
* @param key the property key
* @param value the property value
* @throws UpdateException is thrown if there is an update exception
*/
public void save(String key, String value) throws UpdateException {
properties.put(key, value);
cveDB.saveProperty(key, value);
}
/**
@@ -142,8 +153,8 @@ public class DatabaseProperties {
*
* @return a map of the database meta data
*/
public Map getMetaData() {
final TreeMap map = new TreeMap();
public Map<String, String> getMetaData() {
final TreeMap<String, String> map = new TreeMap<String, String>();
for (Entry<Object, Object> entry : properties.entrySet()) {
final String key = (String) entry.getKey();
if (!"version".equals(key)) {
@@ -156,10 +167,10 @@ public class DatabaseProperties {
map.put(key, formatted);
} catch (Throwable ex) { //deliberately being broad in this catch clause
LOGGER.log(Level.FINE, "Unable to parse timestamp from DB", ex);
map.put(key, entry.getValue());
map.put(key, (String) entry.getValue());
}
} else {
map.put(key, entry.getValue());
map.put(key, (String) entry.getValue());
}
}
}

View File

@@ -0,0 +1,214 @@
/*
* 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) 2014 Jeremy Long. All Rights Reserved.
*/
package org.owasp.dependencycheck.data.update;
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.util.Date;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.commons.io.IOUtils;
import org.owasp.dependencycheck.data.nvdcve.CveDB;
import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
import org.owasp.dependencycheck.data.nvdcve.DatabaseProperties;
import org.owasp.dependencycheck.data.update.exception.UpdateException;
import org.owasp.dependencycheck.utils.DateUtil;
import org.owasp.dependencycheck.utils.DependencyVersion;
import org.owasp.dependencycheck.utils.Settings;
import org.owasp.dependencycheck.utils.URLConnectionFactory;
import org.owasp.dependencycheck.utils.URLConnectionFailureException;
/**
*
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public class EngineVersionCheck implements CachedWebDataSource {
/**
* Static logger.
*/
private static final Logger LOGGER = Logger.getLogger(EngineVersionCheck.class.getName());
/**
* The property key indicating when the last version check occurred.
*/
public static final String ENGINE_VERSION_CHECKED_ON = "VersionCheckOn";
/**
* The property key indicating when the last version check occurred.
*/
public static final String CURRENT_ENGINE_RELEASE = "CurrentEngineRelease";
/**
* Reference to the Cve Database.
*/
private CveDB cveDB = null;
/**
* The version retrieved from the database properties or web to check against.
*/
private String updateToVersion;
/**
* Getter for updateToVersion - only used for testing. Represents the version retrieved from the database.
*
* @return the version to test
*/
protected String getUpdateToVersion() {
return updateToVersion;
}
/**
* Setter for updateToVersion - only used for testing. Represents the version retrieved from the database.
*
* @param version the version to test
*/
protected void setUpdateToVersion(String version) {
updateToVersion = version;
}
@Override
public void update() throws UpdateException {
try {
openDatabase();
LOGGER.fine("Begin Engine Version Check");
final DatabaseProperties properties = cveDB.getDatabaseProperties();
final long lastChecked = Long.parseLong(properties.getProperty(ENGINE_VERSION_CHECKED_ON, "0"));
final long now = (new Date()).getTime();
updateToVersion = properties.getProperty(CURRENT_ENGINE_RELEASE, "");
final String currentVersion = Settings.getString(Settings.KEYS.APPLICATION_VERSION, "0.0.0");
LOGGER.fine("Last checked: " + lastChecked);
LOGGER.fine("Now: " + now);
LOGGER.fine("Current version: " + currentVersion);
final boolean updateNeeded = shouldUpdate(lastChecked, now, properties, currentVersion);
if (updateNeeded) {
final String msg = String.format("A new version of dependency-check is available. Consider updating to version %s.",
updateToVersion);
LOGGER.warning(msg);
}
} catch (DatabaseException ex) {
LOGGER.log(Level.FINE, "Database Exception opening databases to retrieve properties", ex);
throw new UpdateException("Error occured updating database properties.");
} finally {
closeDatabase();
}
}
/**
* Determines if a new version of the dependency-check engine has been released.
*
* @param lastChecked the epoch time of the last version check
* @param now the current epoch time
* @param properties the database properties object
* @param currentVersion the current version of dependency-check
* @return <code>true</code> if a newer version of the database has been released; otherwise <code>false</code>
* @throws UpdateException thrown if there is an error connecting to the github documentation site or accessing the
* local database.
*/
protected boolean shouldUpdate(final long lastChecked, final long now, final DatabaseProperties properties,
String currentVersion) throws UpdateException {
//check every 30 days if we know there is an update, otherwise check every 7 days
int checkRange = 30;
if (updateToVersion.isEmpty()) {
checkRange = 7;
}
if (!DateUtil.withinDateRange(lastChecked, now, checkRange)) {
LOGGER.fine("Checking web for new version.");
final String currentRelease = getCurrentReleaseVersion();
if (currentRelease != null) {
final DependencyVersion v = new DependencyVersion(currentRelease);
if (v.getVersionParts() != null && v.getVersionParts().size() >= 3) {
updateToVersion = v.toString();
if (!currentRelease.equals(updateToVersion)) {
properties.save(CURRENT_ENGINE_RELEASE, updateToVersion);
} else {
properties.save(CURRENT_ENGINE_RELEASE, "");
}
properties.save(ENGINE_VERSION_CHECKED_ON, Long.toString(now));
}
}
LOGGER.log(Level.FINE, "Current Release: {0}", updateToVersion);
}
final DependencyVersion running = new DependencyVersion(currentVersion);
final DependencyVersion released = new DependencyVersion(updateToVersion);
if (running.compareTo(released) < 0) {
LOGGER.fine("Upgrade recommended");
return true;
}
LOGGER.fine("Upgrade not needed");
return false;
}
/**
* Opens the CVE and CPE data stores.
*
* @throws DatabaseException thrown if a data store cannot be opened
*/
protected final void openDatabase() throws DatabaseException {
if (cveDB != null) {
return;
}
cveDB = new CveDB();
cveDB.open();
}
/**
* Closes the CVE and CPE data stores.
*/
protected void closeDatabase() {
if (cveDB != null) {
try {
cveDB.close();
} catch (Throwable ignore) {
LOGGER.log(Level.FINEST, "Error closing the cveDB", ignore);
}
}
}
/**
* Retrieves the current released version number from the github documentation site.
*
* @return the current released version number
*/
protected String getCurrentReleaseVersion() {
HttpURLConnection conn = null;
try {
final String str = Settings.getString(Settings.KEYS.ENGINE_VERSION_CHECK_URL, "http://jeremylong.github.io/DependencyCheck/current.txt");
final URL url = new URL(str);
conn = URLConnectionFactory.createHttpURLConnection(url);
conn.connect();
if (conn.getResponseCode() != 200) {
return null;
}
final String releaseVersion = IOUtils.toString(conn.getInputStream(), "UTF-8");
if (releaseVersion != null) {
return releaseVersion.trim();
}
} catch (MalformedURLException ex) {
LOGGER.log(Level.FINE, "unable to retrieve current release version of dependency-check", ex);
} catch (URLConnectionFailureException ex) {
LOGGER.log(Level.FINE, "unable to retrieve current release version of dependency-check", ex);
} catch (IOException ex) {
LOGGER.log(Level.FINE, "unable to retrieve current release version of dependency-check", ex);
} finally {
if (conn != null) {
conn.disconnect();
}
}
return null;
}
}

View File

@@ -22,6 +22,7 @@ import java.util.logging.Level;
import java.util.logging.Logger;
import org.owasp.dependencycheck.data.update.exception.UpdateException;
import org.owasp.dependencycheck.utils.DownloadFailedException;
import org.owasp.dependencycheck.utils.Settings;
/**
* Class responsible for updating the NVD CVE and CPE data stores.
@@ -54,7 +55,11 @@ public class NvdCveUpdater implements CachedWebDataSource {
LOGGER.log(Level.FINE, null, ex);
} catch (DownloadFailedException ex) {
LOGGER.log(Level.WARNING,
"Unable to download the NVD CVE data, unable to update the data to use the most current data.");
"Unable to download the NVD CVE data; the results may not include the most recent CPE/CVEs from the NVD.");
if (Settings.getString(Settings.KEYS.PROXY_SERVER) == null) {
LOGGER.log(Level.INFO,
"If you are behind a proxy you may need to configure dependency-check to use the proxy.");
}
LOGGER.log(Level.FINE, null, ex);
}
}

View File

@@ -36,6 +36,7 @@ import org.owasp.dependencycheck.data.update.exception.InvalidDataException;
import org.owasp.dependencycheck.data.update.exception.UpdateException;
import org.owasp.dependencycheck.data.update.task.DownloadTask;
import org.owasp.dependencycheck.data.update.task.ProcessTask;
import org.owasp.dependencycheck.utils.DateUtil;
import org.owasp.dependencycheck.utils.DownloadFailedException;
import org.owasp.dependencycheck.utils.InvalidSettingException;
import org.owasp.dependencycheck.utils.Settings;
@@ -220,7 +221,7 @@ public class StandardUpdate {
final int days = Settings.getInt(Settings.KEYS.CVE_MODIFIED_VALID_FOR_DAYS, 7);
if (lastUpdated == updates.getTimeStamp(MODIFIED)) {
updates.clear(); //we don't need to update anything.
} else if (withinRange(lastUpdated, now.getTime(), days)) {
} else if (DateUtil.withinDateRange(lastUpdated, now.getTime(), days)) {
for (NvdCveInfo entry : updates) {
if (MODIFIED.equals(entry.getId())) {
entry.setNeedsUpdate(true);
@@ -317,19 +318,4 @@ public class StandardUpdate {
throw new UpdateException("Error updating the CPE/CVE data, please see the log file for more details.");
}
}
/**
* Determines if the epoch date is within the range specified of the compareTo epoch time. This takes the
* (compareTo-date)/1000/60/60/24 to get the number of days. If the calculated days is less then the range the date
* is considered valid.
*
* @param date the date to be checked.
* @param compareTo the date to compare to.
* @param range the range in days to be considered valid.
* @return whether or not the date is within the range.
*/
protected boolean withinRange(long date, long compareTo, int range) {
final double differenceInDays = (compareTo - date) / 1000.0 / 60.0 / 60.0 / 24.0;
return differenceInDays < range;
}
}

View File

@@ -18,6 +18,9 @@
package org.owasp.dependencycheck.data.update.task;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;
import java.net.URL;
import java.util.concurrent.Callable;
@@ -25,6 +28,8 @@ import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import java.util.logging.Level;
import java.util.logging.Logger;
import java.util.zip.GZIPInputStream;
import org.apache.commons.io.FileUtils;
import org.owasp.dependencycheck.data.nvdcve.CveDB;
import org.owasp.dependencycheck.data.update.NvdCveInfo;
import org.owasp.dependencycheck.data.update.exception.UpdateException;
@@ -188,13 +193,25 @@ public class DownloadTask implements Callable<Future<ProcessTask>> {
} catch (DownloadFailedException ex) {
msg = String.format("Download Failed for NVD CVE - %s%nSome CVEs may not be reported.", nvdCveInfo.getId());
LOGGER.log(Level.WARNING, msg);
if (Settings.getString(Settings.KEYS.PROXY_SERVER) == null) {
LOGGER.log(Level.INFO,
"If you are behind a proxy you may need to configure dependency-check to use the proxy.");
}
LOGGER.log(Level.FINE, null, ex);
return null;
}
if (url1.toExternalForm().endsWith(".xml.gz")) {
extractGzip(first);
}
if (url2.toExternalForm().endsWith(".xml.gz")) {
extractGzip(second);
}
msg = String.format("Download Complete for NVD CVE - %s", nvdCveInfo.getId());
LOGGER.log(Level.INFO, msg);
if (this.processorService == null) {
return null;
}
final ProcessTask task = new ProcessTask(cveDB, this, settings);
return this.processorService.submit(task);
@@ -233,4 +250,56 @@ public class DownloadTask implements Callable<Future<ProcessTask>> {
}
}
}
/**
* Extracts the file contained in a gzip archive. The extracted file is placed in the exact same path as the file
* specified.
*
* @param file the archive file
* @throws FileNotFoundException thrown if the file does not exist
* @throws IOException thrown if there is an error extracting the file.
*/
private void extractGzip(File file) throws FileNotFoundException, IOException {
final String originalPath = file.getPath();
File gzip = new File(originalPath + ".gz");
if (gzip.isFile() && !gzip.delete()) {
gzip.deleteOnExit();
}
if (!file.renameTo(gzip)) {
throw new IOException("Unable to rename '" + file.getPath() + "'");
}
final File newfile = new File(originalPath);
final byte[] buffer = new byte[4096];
GZIPInputStream cin = null;
FileOutputStream out = null;
try {
cin = new GZIPInputStream(new FileInputStream(gzip));
out = new FileOutputStream(newfile);
int len;
while ((len = cin.read(buffer)) > 0) {
out.write(buffer, 0, len);
}
} finally {
if (cin != null) {
try {
cin.close();
} catch (IOException ex) {
LOGGER.log(Level.FINEST, "ignore", ex);
}
}
if (out != null) {
try {
out.close();
} catch (IOException ex) {
LOGGER.log(Level.FINEST, "ignore", ex);
}
}
if (gzip.isFile()) {
FileUtils.deleteQuietly(gzip);
}
}
}
}

View File

@@ -19,12 +19,14 @@ package org.owasp.dependencycheck.dependency;
import java.io.File;
import java.io.IOException;
import java.io.Serializable;
import java.security.NoSuchAlgorithmException;
import java.util.Set;
import java.util.SortedSet;
import java.util.TreeSet;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.owasp.dependencycheck.data.nexus.MavenArtifact;
import org.owasp.dependencycheck.utils.Checksum;
import org.owasp.dependencycheck.utils.FileUtils;
@@ -35,7 +37,7 @@ import org.owasp.dependencycheck.utils.FileUtils;
*
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public class Dependency implements Comparable<Dependency> {
public class Dependency implements Serializable, Comparable<Dependency> {
/**
* The logger.
@@ -315,6 +317,41 @@ public class Dependency implements Comparable<Dependency> {
this.identifiers.add(i);
}
/**
* Adds the maven artifact as evidence.
*
* @param source The source of the evidence
* @param mavenArtifact The maven artifact
* @param confidence The confidence level of this evidence
*/
public void addAsEvidence(String source, MavenArtifact mavenArtifact, Confidence confidence) {
if (mavenArtifact.getGroupId() != null && !mavenArtifact.getGroupId().isEmpty()) {
this.getVendorEvidence().addEvidence(source, "groupid", mavenArtifact.getGroupId(), confidence);
}
if (mavenArtifact.getArtifactId() != null && !mavenArtifact.getArtifactId().isEmpty()) {
this.getProductEvidence().addEvidence(source, "artifactid", mavenArtifact.getArtifactId(), confidence);
}
if (mavenArtifact.getVersion() != null && !mavenArtifact.getVersion().isEmpty()) {
this.getVersionEvidence().addEvidence(source, "version", mavenArtifact.getVersion(), confidence);
}
if (mavenArtifact.getArtifactUrl() != null && !mavenArtifact.getArtifactUrl().isEmpty()) {
boolean found = false;
for (Identifier i : this.getIdentifiers()) {
if ("maven".equals(i.getType()) && i.getValue().equals(mavenArtifact.toString())) {
found = true;
i.setConfidence(Confidence.HIGHEST);
i.setUrl(mavenArtifact.getArtifactUrl());
LOGGER.fine(String.format("Already found identifier %s. Confidence set to highest", i.getValue()));
break;
}
}
if (!found) {
LOGGER.fine(String.format("Adding new maven identifier %s", mavenArtifact.toString()));
this.addIdentifier("maven", mavenArtifact.toString(), mavenArtifact.getArtifactUrl(), Confidence.HIGHEST);
}
}
}
/**
* Adds an entry to the list of detected Identifiers for the dependency file.
*
@@ -323,6 +360,7 @@ public class Dependency implements Comparable<Dependency> {
public void addIdentifier(Identifier identifier) {
this.identifiers.add(identifier);
}
/**
* A set of identifiers that have been suppressed.
*/
@@ -440,6 +478,7 @@ public class Dependency implements Comparable<Dependency> {
public EvidenceCollection getVersionEvidence() {
return this.versionEvidence;
}
/**
* The description of the JAR file.
*/
@@ -462,6 +501,7 @@ public class Dependency implements Comparable<Dependency> {
public void setDescription(String description) {
this.description = description;
}
/**
* The license that this dependency uses.
*/
@@ -484,6 +524,7 @@ public class Dependency implements Comparable<Dependency> {
public void setLicense(String license) {
this.license = license;
}
/**
* A list of vulnerabilities for this dependency.
*/
@@ -539,6 +580,7 @@ public class Dependency implements Comparable<Dependency> {
public void addVulnerability(Vulnerability vulnerability) {
this.vulnerabilities.add(vulnerability);
}
/**
* A collection of related dependencies.
*/
@@ -578,7 +620,7 @@ public class Dependency implements Comparable<Dependency> {
* @return an integer representing the natural ordering
*/
public int compareTo(Dependency o) {
return this.getFileName().compareToIgnoreCase(o.getFileName());
return this.getFilePath().compareToIgnoreCase(o.getFilePath());
}
/**

View File

@@ -17,12 +17,14 @@
*/
package org.owasp.dependencycheck.dependency;
import java.io.Serializable;
/**
* Evidence is a piece of information about a Dependency.
*
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public class Evidence implements Comparable<Evidence> {
public class Evidence implements Serializable, Comparable<Evidence> {
/**
* Creates a new Evidence object.

View File

@@ -17,6 +17,7 @@
*/
package org.owasp.dependencycheck.dependency;
import java.io.Serializable;
import java.net.MalformedURLException;
import java.util.HashSet;
import java.util.Iterator;
@@ -36,7 +37,7 @@ import org.owasp.dependencycheck.utils.UrlStringUtils;
*
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public class EvidenceCollection implements Iterable<Evidence> {
public class EvidenceCollection implements Serializable, Iterable<Evidence> {
/**
* The logger.

View File

@@ -17,11 +17,22 @@
*/
package org.owasp.dependencycheck.dependency;
import java.io.Serializable;
/**
*
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public class Identifier implements Comparable<Identifier> {
public class Identifier implements Serializable, Comparable<Identifier> {
/**
* Default constructor. Should only be used for automatic class
* creation as is the case with many XML parsers (for the parsing
* of the Dependency-Check XML report). For all other use-cases,
* please use the non-default constructors.
*/
public Identifier() {
}
/**
* Constructs a new Identifier with the specified data.

View File

@@ -48,7 +48,7 @@ public class ScanAgentException extends IOException {
}
/**
* Creates a new NoDataException.
* Creates a new ScanAgentException.
*
* @param ex the cause of the exception.
*/

View File

@@ -113,7 +113,7 @@ public class ReportGenerator {
context.put("scanDate", scanDate);
context.put("scanDateXML", scanDateXML);
context.put("enc", enc);
context.put("version", Settings.getString("application.version", "Unknown"));
context.put("version", Settings.getString(Settings.KEYS.APPLICATION_VERSION, "Unknown"));
}
/**
@@ -137,6 +137,26 @@ public class ReportGenerator {
return new VelocityContext();
}
/**
* Generates the Dependency Reports for the identified dependencies.
*
* @param outputStream the OutputStream to send the generated report to
* @param format the format the report should be written in
* @throws IOException is thrown when the template file does not exist
* @throws Exception is thrown if there is an error writing out the reports.
*/
public void generateReports(OutputStream outputStream, Format format) throws IOException, Exception {
if (format == Format.XML || format == Format.ALL) {
generateReport("XmlReport", outputStream);
}
if (format == Format.HTML || format == Format.ALL) {
generateReport("HtmlReport", outputStream);
}
if (format == Format.VULN || format == Format.ALL) {
generateReport("VulnerabilityReport", outputStream);
}
}
/**
* Generates the Dependency Reports for the identified dependencies.
*
@@ -167,15 +187,28 @@ public class ReportGenerator {
*/
public void generateReports(String outputDir, String outputFormat) throws IOException, Exception {
final String format = outputFormat.toUpperCase();
final String pathToCheck = outputDir.toLowerCase();
if (format.matches("^(XML|HTML|VULN|ALL)$")) {
if ("XML".equalsIgnoreCase(format)) {
generateReports(outputDir, Format.XML);
if (pathToCheck.endsWith(".xml")) {
generateReport("XmlReport", outputDir);
} else {
generateReports(outputDir, Format.XML);
}
}
if ("HTML".equalsIgnoreCase(format)) {
generateReports(outputDir, Format.HTML);
if (pathToCheck.endsWith(".html") || pathToCheck.endsWith(".htm")) {
generateReport("HtmlReport", outputDir);
} else {
generateReports(outputDir, Format.HTML);
}
}
if ("VULN".equalsIgnoreCase(format)) {
generateReports(outputDir, Format.VULN);
if (pathToCheck.endsWith(".html") || pathToCheck.endsWith(".htm")) {
generateReport("VulnReport", outputDir);
} else {
generateReports(outputDir, Format.VULN);
}
}
if ("ALL".equalsIgnoreCase(format)) {
generateReports(outputDir, Format.ALL);
@@ -189,11 +222,11 @@ public class ReportGenerator {
* template file.
*
* @param templateName the name of the template to load.
* @param outFileName the filename and path to write the report to.
* @param outputStream the OutputStream to write the report to.
* @throws IOException is thrown when the template file does not exist.
* @throws Exception is thrown when an exception occurs.
*/
protected void generateReport(String templateName, String outFileName) throws IOException, Exception {
protected void generateReport(String templateName, OutputStream outputStream) throws IOException, Exception {
InputStream input = null;
String templatePath = null;
final File f = new File(templateName);
@@ -216,18 +249,8 @@ public class ReportGenerator {
final InputStreamReader reader = new InputStreamReader(input, "UTF-8");
OutputStreamWriter writer = null;
OutputStream outputStream = null;
try {
final File outDir = new File(outFileName).getParentFile();
if (!outDir.exists()) {
final boolean created = outDir.mkdirs();
if (!created) {
throw new Exception("Unable to create directory '" + outDir.getAbsolutePath() + "'.");
}
}
outputStream = new FileOutputStream(outFileName);
writer = new OutputStreamWriter(outputStream, "UTF-8");
if (!engine.evaluate(context, writer, templatePath, reader)) {
@@ -256,4 +279,41 @@ public class ReportGenerator {
}
}
}
/**
* Generates a report from a given Velocity Template. The template name provided can be the name of a template
* contained in the jar file, such as 'XmlReport' or 'HtmlReport', or the template name can be the path to a
* template file.
*
* @param templateName the name of the template to load.
* @param outFileName the filename and path to write the report to.
* @throws IOException is thrown when the template file does not exist.
* @throws Exception is thrown when an exception occurs.
*/
protected void generateReport(String templateName, String outFileName) throws Exception {
File outFile = new File(outFileName);
if (outFile.getParentFile() == null) {
outFile = new File(".", outFileName);
}
if (!outFile.getParentFile().exists()) {
final boolean created = outFile.getParentFile().mkdirs();
if (!created) {
throw new Exception("Unable to create directory '" + outFile.getParentFile().getAbsolutePath() + "'.");
}
}
OutputStream outputSteam = null;
try {
outputSteam = new FileOutputStream(outFile);
generateReport(templateName, outputSteam);
} finally {
if (outputSteam != null) {
try {
outputSteam.close();
} catch (IOException ex) {
LOGGER.log(Level.FINEST, "ignore", ex);
}
}
}
}
}

View File

@@ -103,6 +103,12 @@ public class SuppressionHandler extends DefaultHandler {
currentText = new StringBuffer();
if (SUPPRESS.equals(qName)) {
rule = new SuppressionRule();
final String base = currentAttributes.getValue("base");
if (base != null) {
rule.setBase(Boolean.parseBoolean(base));
} else {
rule.setBase(false);
}
}
}

View File

@@ -26,11 +26,6 @@ import java.io.IOException;
*/
public class SuppressionParseException extends IOException {
/**
* The serial version UID.
*/
private static final long serialVersionUID = 1L;
/**
* Creates a new SuppressionParseException.
*/
@@ -50,7 +45,7 @@ public class SuppressionParseException extends IOException {
/**
* Creates a new SuppressionParseException.
*
* @param ex the cause of the download failure.
* @param ex the cause of the parse exception
*/
public SuppressionParseException(Throwable ex) {
super(ex);
@@ -60,7 +55,7 @@ public class SuppressionParseException extends IOException {
* Creates a new SuppressionParseException.
*
* @param msg a message for the exception.
* @param ex the cause of the download failure.
* @param ex the cause of the parse exception
*/
public SuppressionParseException(String msg, Throwable ex) {
super(msg, ex);

View File

@@ -66,10 +66,35 @@ public class SuppressionParser {
* @throws SuppressionParseException thrown if the xml file cannot be parsed
*/
public List<SuppressionRule> parseSuppressionRules(File file) throws SuppressionParseException {
FileInputStream fis = null;
try {
fis = new FileInputStream(file);
return parseSuppressionRules(fis);
} catch (IOException ex) {
LOGGER.log(Level.FINE, null, ex);
throw new SuppressionParseException(ex);
} finally {
if (fis != null) {
try {
fis.close();
} catch (IOException ex) {
LOGGER.log(Level.FINE, "Unable to close stream", ex);
}
}
}
}
/**
* Parses the given xml stream and returns a list of the suppression rules contained.
*
* @param inputStream an InputStream containing suppression rues
* @return a list of suppression rules
* @throws SuppressionParseException if the xml cannot be parsed
*/
public List<SuppressionRule> parseSuppressionRules(InputStream inputStream) throws SuppressionParseException {
try {
final InputStream schemaStream = this.getClass().getClassLoader().getResourceAsStream("schema/suppression.xsd");
final SuppressionHandler handler = new SuppressionHandler();
final SAXParserFactory factory = SAXParserFactory.newInstance();
factory.setNamespaceAware(true);
factory.setValidating(true);
@@ -80,7 +105,6 @@ public class SuppressionParser {
xmlReader.setErrorHandler(new SuppressionErrorHandler());
xmlReader.setContentHandler(handler);
final InputStream inputStream = new FileInputStream(file);
final Reader reader = new InputStreamReader(inputStream, "UTF-8");
final InputSource in = new InputSource(reader);
//in.setEncoding("UTF-8");

View File

@@ -266,6 +266,30 @@ public class SuppressionRule {
return gav != null;
}
/**
* A flag indicating whether or not the suppression rule is a core/base rule that should not be included in the
* resulting report in the "suppressed" section.
*/
private boolean base;
/**
* Get the value of base.
*
* @return the value of base
*/
public boolean isBase() {
return base;
}
/**
* Set the value of base.
*
* @param base new value of base
*/
public void setBase(boolean base) {
this.base = base;
}
/**
* Processes a given dependency to determine if any CPE, CVE, CWE, or CVSS scores should be suppressed. If any
* should be, they are removed from the dependency.
@@ -300,7 +324,9 @@ public class SuppressionRule {
final Identifier i = itr.next();
for (PropertyType c : this.cpe) {
if (identifierMatches("cpe", c, i)) {
dependency.addSuppressedIdentifier(i);
if (!isBase()) {
dependency.addSuppressedIdentifier(i);
}
itr.remove();
break;
}
@@ -339,7 +365,9 @@ public class SuppressionRule {
}
}
if (remove) {
dependency.addSuppressedVulnerability(v);
if (!isBase()) {
dependency.addSuppressedVulnerability(v);
}
itr.remove();
}
}

View File

@@ -54,7 +54,9 @@ public final class DBUtils {
int id = 0;
try {
rs = statement.getGeneratedKeys();
rs.next();
if (!rs.next()) {
throw new DatabaseException("Unable to get primary key for inserted row");
}
id = rs.getInt(1);
} catch (SQLException ex) {
throw new DatabaseException("Unable to get primary key for inserted row");

View File

@@ -0,0 +1,46 @@
/*
* 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) 2014 Jeremy Long. All Rights Reserved.
*/
package org.owasp.dependencycheck.utils;
/**
*
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public final class DateUtil {
/**
* Private constructor for utility class.
*/
private DateUtil() {
}
/**
* Determines if the epoch date is within the range specified of the compareTo epoch time. This takes the
* (compareTo-date)/1000/60/60/24 to get the number of days. If the calculated days is less then the range the date
* is considered valid.
*
* @param date the date to be checked.
* @param compareTo the date to compare to.
* @param range the range in days to be considered valid.
* @return whether or not the date is within the range.
*/
public static boolean withinDateRange(long date, long compareTo, int range) {
final double differenceInDays = (compareTo - date) / 1000.0 / 60.0 / 60.0 / 24.0;
return differenceInDays < range;
}
}

View File

@@ -65,7 +65,7 @@ public class DependencyVersion implements Iterable, Comparable<DependencyVersion
public final void parseVersion(String version) {
versionParts = new ArrayList<String>();
if (version != null) {
final Pattern rx = Pattern.compile("(\\d+|[a-z]+\\d+|(release|beta|alpha)$)");
final Pattern rx = Pattern.compile("(\\d+[a-z]{1,3}$|[a-z]+\\d+|\\d+|(release|beta|alpha)$)");
final Matcher matcher = rx.matcher(version.toLowerCase());
while (matcher.find()) {
versionParts.add(matcher.group());
@@ -189,17 +189,23 @@ public class DependencyVersion implements Iterable, Comparable<DependencyVersion
if (version == null) {
return false;
}
boolean ret = true;
int max = (this.versionParts.size() < version.versionParts.size())
? this.versionParts.size() : version.versionParts.size();
if (max > 3) {
max = 3;
if (Math.abs(this.versionParts.size() - version.versionParts.size()) >= 3) {
return false;
}
final int max = (this.versionParts.size() < version.versionParts.size())
? this.versionParts.size() : version.versionParts.size();
boolean ret = true;
for (int i = 0; i < max; i++) {
if (this.versionParts.get(i) == null || !this.versionParts.get(i).equals(version.versionParts.get(i))) {
final String thisVersion = this.versionParts.get(i);
final String otherVersion = version.getVersionParts().get(i);
if (i >= 3) {
if (thisVersion.compareToIgnoreCase(otherVersion) >= 0) {
ret = false;
break;
}
} else if (!thisVersion.equals(otherVersion)) {
ret = false;
break;
}

View File

@@ -32,7 +32,7 @@ public final class DependencyVersionUtil {
/**
* Regular expression to extract version numbers from file names.
*/
private static final Pattern RX_VERSION = Pattern.compile("\\d+(\\.\\d{1,6})+(\\.?([_-](release|beta|alpha)|[a-zA-Z_-]{1,3}\\d{1,8}))?");
private static final Pattern RX_VERSION = Pattern.compile("\\d+(\\.\\d{1,6})+(\\.?([_-](release|beta|alpha|\\d+)|[a-zA-Z_-]{1,3}\\d{0,8}))?");
/**
* Regular expression to extract a single version number without periods. This is a last ditch effort just to check
* in case we are missing a version number using the previous regex.

BIN
dependency-check-core/src/main/resources/GrokAssembly.exe Executable file → Normal file

Binary file not shown.

View File

@@ -8,6 +8,7 @@ org.owasp.dependencycheck.analyzer.CpeSuppressionAnalyzer
org.owasp.dependencycheck.analyzer.DependencyBundlingAnalyzer
org.owasp.dependencycheck.analyzer.NvdCveAnalyzer
org.owasp.dependencycheck.analyzer.VulnerabilitySuppressionAnalyzer
org.owasp.dependencycheck.analyzer.CentralAnalyzer
org.owasp.dependencycheck.analyzer.NexusAnalyzer
org.owasp.dependencycheck.analyzer.NuspecAnalyzer
org.owasp.dependencycheck.analyzer.AssemblyAnalyzer

View File

@@ -1 +1,2 @@
org.owasp.dependencycheck.data.update.NvdCveUpdater
org.owasp.dependencycheck.data.update.NvdCveUpdater
org.owasp.dependencycheck.data.update.EngineVersionCheck

View File

@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<suppressions xmlns="https://www.owasp.org/index.php/OWASP_Dependency_Check_Suppression">
<suppress>
<suppress base="true">
<notes><![CDATA[
This suppresses false positives identified on spring security.
]]></notes>
@@ -9,4 +9,57 @@
<cpe>cpe:/a:springsource:spring_framework</cpe>
<cpe>cpe:/a:vmware:springsource_spring_framework</cpe>
</suppress>
<suppress base="true">
<notes><![CDATA[
This suppresses false positives identified on spring security.
]]></notes>
<filePath regex="true">.*spring-security-[^\\/]*\.jar$</filePath>
<cpe>cpe:/a:mod_security:mod_security</cpe>
<cpe>cpe:/a:springsource:spring_framework</cpe>
<cpe>cpe:/a:vmware:springsource_spring_framework</cpe>
</suppress>
<suppress base="true">
<notes><![CDATA[
This suppreses additional false positives for the xstream library that occur because spring has a copy of this library.
com.springsource.com.thoughtworks.xstream-1.3.1.jar
]]></notes>
<gav regex="true">com\.thoughtworks\.xstream:xstream:.*</gav>
<cpe>cpe:/a:springsource:spring_framework</cpe>
</suppress>
<suppress base="true">
<notes><![CDATA[
Suppresses false positives on velocity tools.
]]></notes>
<gav regex="true">org\.apache\.velocity:velocity-tools:.*</gav>
<cpe>cpe:/a:apache:struts</cpe>
</suppress>
<suppress base="true">
<notes><![CDATA[
Sandbox is a php blog platform and should not be flagged as a CPE for java or .net dependencies.
]]></notes>
<filePath regex="true">.*\.(jar|dll|exe|ear|war|pom)</filePath>
<cpe>cpe:/a:sandbox:sandbox</cpe>
</suppress>
<suppress base="true">
<notes><![CDATA[
Suppresses false positives on Jersey core client.
]]></notes>
<gav regex="true">(com\.sun\.jersey|org\.glassfish\.jersey\.core):jersey-(client|common):.*</gav>
<cpe>cpe:/a:oracle:glassfish</cpe>
<cpe>cpe:/a:oracle:oracle_client</cpe>
</suppress>
<suppress>
<notes><![CDATA[
Suppresses false positives on the grizzly-framework
]]></notes>
<gav regex="true">org\.glassfish\.grizzly:grizzly-framework:.*</gav>
<cpe>cpe:/a:oracle:glassfish</cpe>
</suppress>
<suppress>
<notes><![CDATA[
Suppresses false positives on the grizzly-framework
]]></notes>
<gav regex="true">org\.forgerock\.opendj:opendj-ldap-sdk:.*</gav>
<cpe>cpe:/a:ldap_project:ldap</cpe>
</suppress>
</suppressions>

View File

@@ -3,6 +3,9 @@ application.version=${pom.version}
autoupdate=true
max.download.threads=3
# the url to obtain the current engine version from
engine.version.url=http://jeremylong.github.io/DependencyCheck/current.txt
#temp.directory defaults to System.getProperty("java.io.tmpdir")
#temp.directory=[path to temp directory]
@@ -13,8 +16,10 @@ max.download.threads=3
# will not be used. The data.directory will be resolved and if the connection string
# below contains a %s then the data.directory will replace the %s.
data.directory=[JAR]/data
#if the filename has a %s it will be replaced with the current expected version
data.file_name=cve.%s.h2.db
data.version=2.9
data.connection_string=jdbc:h2:file:%s;FILE_LOCK=SERIALIZED;AUTOCOMMIT=ON;
#data.connection_string=jdbc:h2:file:%s;AUTO_SERVER=TRUE;AUTOCOMMIT=ON;
#data.connection_string=jdbc:mysql://localhost:3306/dependencycheck
# user name and password for the database connection. The inherent case is to use H2.
@@ -38,11 +43,16 @@ data.driver_path=
cve.url.modified.validfordays=7
# the path to the modified nvd cve xml file.
cve.url-1.2.modified=http://nvd.nist.gov/download/nvdcve-modified.xml
cve.url-2.0.modified=http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-modified.xml
cve.url-1.2.modified=https://nvd.nist.gov/download/nvdcve-Modified.xml.gz
#cve.url-1.2.modified=http://nvd.nist.gov/download/nvdcve-modified.xml
cve.url-2.0.modified=https://nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-Modified.xml.gz
#cve.url-2.0.modified=http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-modified.xml
cve.startyear=2002
cve.url-2.0.base=http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-%d.xml
cve.url-1.2.base=http://nvd.nist.gov/download/nvdcve-%d.xml
cve.url-1.2.base=https://nvd.nist.gov/download/nvdcve-%d.xml.gz
#cve.url-1.2.base=http://nvd.nist.gov/download/nvdcve-%d.xml
cve.url-2.0.base=https://nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-%d.xml.gz
#cve.url-2.0.base=http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-%d.xml
# file type analyzer settings:
analyzer.archive.enabled=true
@@ -56,3 +66,7 @@ analyzer.nexus.url=https://repository.sonatype.org/service/local/
# If set to true, the proxy will still ONLY be used if the proxy properties (proxy.url, proxy.port)
# are configured
analyzer.nexus.proxy=true
# the URL for searching search.maven.org for SHA-1 and whether it's enabled
analyzer.central.enabled=true
analyzer.central.url=http://search.maven.org/solrsearch/select

View File

@@ -50,6 +50,7 @@
<xs:element name="cvssBelow" type="dc:cvssScoreType"/>
</xs:choice>
</xs:sequence>
<xs:attribute name="base" use="optional" type="xs:boolean" default="false"/>
</xs:complexType>
</xs:element>
</xs:sequence>

View File

@@ -33,8 +33,8 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
</script>
<script type="text/javascript">
$(document).ready(function() {
$(".expandable").click(function (e) {
e = e || window.event;
$(".expandable").click(function (event) {
e = event || window.event;
var h = e.target || e.srcElement;
var content = "#content" + h.id.substr(6);
var header = "#" + h.id;
@@ -56,6 +56,7 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
$(header).addClass("expandablesubsection");
$(header).removeClass("collaspablesubsection");
}
return false;
});
});
@@ -84,13 +85,14 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
$('#modal-text').focus();
$('#modal-text').select();
}
function toggleDisplay(el, clzName) {
function toggleDisplay(el, clzName, all, some) {
$(clzName).toggle();
if (el.innerHTML == 'show all') {
el.innerHTML = 'less';
if (el.innerHTML == all) {
el.innerHTML = some;
} else {
el.innerHTML = 'show all';
el.innerHTML = all;
}
return false;
}
</script>
<style type="text/css">
@@ -427,15 +429,24 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
.indent {
margin-left:20px;
}
td, th {
td{
vertical-align:text-top;
padding:6px;
margin:0px;
}
th {
text-align:left
vertical-align:text-top;
padding:6px;
margin:0px;
border-bottom:1px;
border-color: black;
}
table {
border: 0px;
}
table.lined tr:nth-child(even) {
background-color: #fbfbfb;
background-color: #f3f3f3;
}
.fullwidth {
width:100%;
@@ -448,10 +459,7 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
margin-bottom:3px;
}
.vulnerable {
color: #f00;
}
.vulnerable li {
color: #000;
color: #000;
}
.notvulnerable {
display:none;
@@ -481,7 +489,7 @@ Copyright (c) 2012 Jeremy Long. All Rights Reserved.
<div id="modal-content">
<div>Press CTR-C to copy XML&nbsp;<a href="http://jeremylong.github.io/DependencyCheck/suppression.html" class="infolink" target="_blank" title="Help with suppressing false positives">[help]</a></div>
<textarea id="modal-text" cols="50" rows="10"></textarea><br/>
<button id="modal-add-header" class="modal-button">Complete XML Doc</button><button id="modal-close" class="modal-button-right">Close</button>
<button id="modal-add-header" title="Add the parent XML nodes to create the complete XML file that can be used to suppress this finding" class="modal-button">Complete XML Doc</button><button id="modal-close" class="modal-button-right">Close</button>
</div>
<div class="wrapper">
<h1>Dependency-Check Report</h1>
@@ -513,7 +521,7 @@ arising out of or in connection with the use of this tool, the analysis performe
#set($vulnSuppressedCount=$vulnSuppressedCount+$dependency.getSuppressedVulnerabilities().size())
#end
#end
Scan Information (<a href="#" onclick="toggleDisplay(this, '.scaninfo'); return false;">show all</a>):<br/>
Scan Information (<a href="#" title="Click to toggle display" onclick="return toggleDisplay(this, '.scaninfo', 'show all', 'show less'); return false;">show all</a>):<br/>
<ul class="indent">
<li><i>dependency-check version</i>: $version</li>
<li><i>Report Generated On</i>: $scanDate</li>
@@ -526,23 +534,94 @@ arising out of or in connection with the use of this tool, the analysis performe
<li class="scaninfo hidden"><i>$enc.html($prop.key)</i>: $enc.html($prop.value)</li>
#end
</ul><br/>
Dependency Display:&nbsp;<a href="#" onclick="toggleDisplay(this,'.notvulnerable'); return false;">show all</a><br/><br/>
<ul class="indent">
Display:&nbsp;<a href="#" title="Click to toggle display" onclick="return toggleDisplay(this, '.notvulnerable', 'Showing Vulnerable Dependencies', 'Showing All Dependencies'); return false;">Showing Vulnerable Dependencies</a><br/><br/>
#set($lnkcnt=0)
#foreach($dependency in $dependencies)
<table class="lined">
<tr style="text-align:left">
<th title="The name of the dependency">Dependency</th>
<th title="The Common Platform Enumeration">CPE</th>
<th title="The Maven GAV Coordinates">GAV</th>
<th title="The highest CVE Severity">Highest Severity</th>
<th title="The number of Common Vulnerability and Exposure (CVE) entries">CVE Count</th>
<th title="The confidence rating dependency-check has for the identified CPE">CPE Confidence</th>
<th title="The count of evidence used to identify the CPE">Evidence Count</th>
</tr>
#foreach($dependency in $dependencies)
#set($lnkcnt=$lnkcnt+1)
<li class="#if($dependency.getVulnerabilities().size()==0)notvulnerable#else vulnerable#end">
<a href="#l${lnkcnt}_$enc.html($enc.url($dependency.Sha1sum))">$enc.html($dependency.DisplayFileName)</a>
#if($dependency.getRelatedDependencies().size()>0)
<ul>
#foreach($related in $dependency.getRelatedDependencies())
<li>$enc.html($related.DisplayFileName)</li>
<tr class="#if($dependency.getVulnerabilities().size()==0)notvulnerable#else vulnerable#end">
<td><a href="#l${lnkcnt}_$enc.html($enc.url($dependency.Sha1sum))">$enc.html($dependency.DisplayFileName)</a></td>
#set($mavenlink="")
#set($cpeIdCount=0)
#set($cpeIdConf="")
<td>
#foreach($id in $dependency.getIdentifiers())
#if ($id.type=="maven")
#if ($mavenlink=="" || !$mavenlink.url)
#set($mavenlink=$id)
#end
#else
#if ($cpeIdCount>=1)
<br/>
#end
#if( $id.url )
<a href="$enc.html($id.url)" target="_blank">$enc.html($id.value)</a>
#else
$enc.html($id.value)
#end
#if ($cpeIdConf == "")
#set($cpeIdConf=$id.confidence)
#elseif ($cpeIdConf.compareTo($id.confidence)>0)
#set($cpeIdConf=$id.confidence)
#end
#set($cpeIdCount=$cpeIdCount+1)
#end
#end
</ul>
</td>
<td>#if( $mavenlink.url )
##yes, we are HTML Encoding the href. this is okay. We can't URL encode as we have to trust the analyzer here...
<a href="$enc.html($mavenlink.url)" target="_blank">$enc.html($mavenlink.value)</a>
#elseif ($mavenlink.value)
$enc.html($mavenlink.value)
#end</td>
#set($cveImpact=-1)
#foreach($vuln in $dependency.getVulnerabilities())
#if ($cveImpact<$vuln.cvssScore)
#set($cveImpact=$vuln.cvssScore)
#end
#end
<td>
#if ($cveImpact<0)
&nbsp;
#elseif ($cveImpact<4.0)
Low
#elseif ($cveImpact>=7.0)
High
#else
Medium
#end
</td>
<td>$dependency.getVulnerabilities().size()</td>
<td>$cpeIdConf</td>
<td>$dependency.getEvidenceForDisplay().size()</td>
</tr>
#end
</li>
#end
</ul>
</table>
## <ul class="indent">
## #set($lnkcnt=0)
## #foreach($dependency in $dependencies)
## #set($lnkcnt=$lnkcnt+1)
## <li class="#if($dependency.getVulnerabilities().size()==0)notvulnerable#else vulnerable#end">
## <a href="#l${lnkcnt}_$enc.html($enc.url($dependency.Sha1sum))">$enc.html($dependency.DisplayFileName)</a>
## #if($dependency.getRelatedDependencies().size()>0)
## <ul>
## #foreach($related in $dependency.getRelatedDependencies())
## <li>$enc.html($related.DisplayFileName)</li>
## #end
## </ul>
## #end
## </li>
## #end
## </ul>
<h2>Dependencies</h2>
#set($lnkcnt=0)
#set($cnt=0)
@@ -630,7 +709,7 @@ arising out of or in connection with the use of this tool, the analysis performe
#end
#if ($id.type=="cpe")
##yes, we are HTML Encoding into JavaScript... the escape utils don't have a JS Encode and I haven't written one yet
&nbsp;&nbsp;<button class="copybutton" onclick="copyText('$enc.html($dependency.FileNameForJavaScript)', '$enc.html($dependency.Sha1sum)', 'cpe', '$enc.html($id.value)')">suppress</button>
&nbsp;&nbsp;<button class="copybutton" title="Generate Suppression XML for this CPE for this file" onclick="copyText('$enc.html($dependency.FileNameForJavaScript)', '$enc.html($dependency.Sha1sum)', 'cpe', '$enc.html($id.value)')">suppress</button>
#end
#if ($id.description)
<br/>$enc.html($id.description)
@@ -646,7 +725,7 @@ arising out of or in connection with the use of this tool, the analysis performe
<div id="content$cnt" class="subsectioncontent standardsubsection">
#foreach($vuln in $dependency.getVulnerabilities())
#set($vsctr=$vsctr+1)
<p><b><a target="_blank" href="http://web.nvd.nist.gov/view/vuln/detail?vulnId=$enc.url($vuln.name)">$enc.html($vuln.name)</a></b>&nbsp;&nbsp;<button class="copybutton" onclick="copyText('$enc.html($dependency.FileNameForJavaScript)', '$enc.html($dependency.Sha1sum)', 'cve', '$enc.html($vuln.name)')">suppress</button></p>
<p><b><a target="_blank" href="http://web.nvd.nist.gov/view/vuln/detail?vulnId=$enc.url($vuln.name)">$enc.html($vuln.name)</a></b>&nbsp;&nbsp;<button class="copybutton" title="Generate Suppression XML for this CCE for this file" onclick="copyText('$enc.html($dependency.FileNameForJavaScript)', '$enc.html($dependency.Sha1sum)', 'cve', '$enc.html($vuln.name)')">suppress</button></p>
<p>Severity:
#if ($vuln.cvssScore<4.0)
Low
@@ -674,7 +753,7 @@ arising out of or in connection with the use of this tool, the analysis performe
<li class="vs$vsctr"><a target="_blank" href="https://web.nvd.nist.gov/view/vuln/search-results?adv_search=true&cves=on&cpe_version=$enc.url($vuln.matchedCPE)">$enc.html($vuln.matchedCPE)</a> #if($vuln.hasMatchedAllPreviousCPE()) and all previous versions#end</li>
</ul></p>
#else
<p>Vulnerable Software &amp; Versions:&nbsp;(<a href="#" onclick="toggleDisplay(this,'.vs$vsctr'); return false;">show all</a>)<ul>
<p>Vulnerable Software &amp; Versions:&nbsp;(<a href="#" onclick="return toggleDisplay(this,'.vs$vsctr', 'show all', 'show less');">show all</a>)<ul>
<li class="vs$vsctr"><a target="_blank" href="https://web.nvd.nist.gov/view/vuln/search-results?adv_search=true&cves=on&cpe_version=$enc.url($vuln.matchedCPE)">$enc.html($vuln.matchedCPE)</a> #if($vuln.hasMatchedAllPreviousCPE()) and all previous versions#end</li>
<li class="vs$vsctr">...</li>
#foreach($vs in $vuln.getVulnerableSoftware())
@@ -808,7 +887,7 @@ arising out of or in connection with the use of this tool, the analysis performe
git st<li class="vs$vsctr"><a target="_blank" href="https://web.nvd.nist.gov/view/vuln/search-results?adv_search=true&cves=on&cpe_version=$enc.url($vuln.matchedCPE)">$enc.html($vuln.matchedCPE)</a> #if($vuln.hasMatchedAllPreviousCPE()) and all previous versions#end</li>
</ul></p>
#else
<p>Vulnerable Software &amp; Versions:&nbsp;(<a href="#" onclick="toggleDisplay(this,'.vs$vsctr'); return false;">show all</a>)<ul>
<p>Vulnerable Software &amp; Versions:&nbsp;(<a href="#" onclick="return toggleDisplay(this,'.vs$vsctr', 'show all', 'show less');">show all</a>)<ul>
<li class="vs$vsctr"><a target="_blank" href="https://web.nvd.nist.gov/view/vuln/search-results?adv_search=true&cves=on&cpe_version=$enc.url($vuln.matchedCPE)">$enc.html($vuln.matchedCPE)</a> #if($vuln.hasMatchedAllPreviousCPE()) and all previous versions#end</li>
<li class="vs$vsctr">...</li>
#foreach($vs in $vuln.getVulnerableSoftware())
@@ -827,6 +906,6 @@ arising out of or in connection with the use of this tool, the analysis performe
## END SUPPRESSED VULNERABILITIES
</div>
</div>
<div><br/><br/>This report contains data retrieved from the <a href="nvd.nist.gov">National Vulnerability Database</a>.</div>
<div><br/><br/>This report contains data retrieved from the <a href="http://nvd.nist.gov">National Vulnerability Database</a>.</div>
</body>
</html>

View File

@@ -236,6 +236,6 @@ arising out of or in connection with the use of this tool, the analysis performe
</tbody>
</table>
</div>
<p><br/><br/>This report contains data retrieved from the <a href="nvd.nist.gov">National Vulnerability Database</a>.</p>
<p><br/><br/>This report contains data retrieved from the <a href="http://nvd.nist.gov">National Vulnerability Database</a>.</p>
</body>
</html>

View File

@@ -23,7 +23,6 @@ import org.junit.Before;
import org.junit.Test;
import org.owasp.dependencycheck.data.nvdcve.CveDB;
import org.owasp.dependencycheck.data.nvdcve.DatabaseProperties;
import org.owasp.dependencycheck.dependency.Dependency;
import org.owasp.dependencycheck.reporting.ReportGenerator;
import org.owasp.dependencycheck.utils.Settings;
@@ -42,26 +41,6 @@ public class EngineIntegrationTest extends BaseTest {
public void tearDown() {
}
/**
* Test of scan method, of class Engine.
*
* @throws Exception is thrown when an exception occurs.
*/
@Test
public void testScan() throws Exception {
String testClasses = "target/test-classes/*.zip";
boolean autoUpdate = Settings.getBoolean(Settings.KEYS.AUTO_UPDATE);
Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, false);
Engine instance = new Engine();
Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, autoUpdate);
instance.scan(testClasses);
assertTrue(instance.getDependencies().size() > 0);
for (Dependency d : instance.getDependencies()) {
assertTrue("non-zip file collected " + d.getFileName(), d.getFileName().toLowerCase().endsWith(".zip"));
}
instance.cleanup();
}
/**
* Test running the entire engine.
*
@@ -70,10 +49,10 @@ public class EngineIntegrationTest extends BaseTest {
@Test
public void testEngine() throws Exception {
String testClasses = "target/test-classes";
// boolean autoUpdate = Settings.getBoolean(Settings.KEYS.AUTO_UPDATE);
// Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, false);
boolean autoUpdate = Settings.getBoolean(Settings.KEYS.AUTO_UPDATE);
Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, false);
Engine instance = new Engine();
// Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, autoUpdate);
Settings.setBoolean(Settings.KEYS.AUTO_UPDATE, autoUpdate);
instance.scan(testClasses);
assertTrue(instance.getDependencies().size() > 0);
instance.analyzeDependencies();
@@ -81,8 +60,7 @@ public class EngineIntegrationTest extends BaseTest {
cveDB.open();
DatabaseProperties dbProp = cveDB.getDatabaseProperties();
cveDB.close();
ReportGenerator rg = new ReportGenerator("DependencyCheck",
instance.getDependencies(), instance.getAnalyzers(), dbProp);
ReportGenerator rg = new ReportGenerator("DependencyCheck", instance.getDependencies(), instance.getAnalyzers(), dbProp);
rg.generateReports("./target/", "ALL");
instance.cleanup();
}

View File

@@ -40,7 +40,7 @@ public class ArchiveAnalyzerIntegrationTest extends AbstractDatabaseTestCase {
@Test
public void testGetSupportedExtensions() {
ArchiveAnalyzer instance = new ArchiveAnalyzer();
Set expResult = new HashSet<String>();
Set<String> expResult = new HashSet<String>();
expResult.add("zip");
expResult.add("war");
expResult.add("ear");

View File

@@ -25,9 +25,11 @@ import java.util.Set;
import org.apache.lucene.index.CorruptIndexException;
import org.apache.lucene.queryparser.classic.ParseException;
import org.junit.Assert;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.owasp.dependencycheck.data.cpe.AbstractDatabaseTestCase;
import org.owasp.dependencycheck.data.cpe.IndexEntry;
import org.owasp.dependencycheck.dependency.Confidence;
import org.owasp.dependencycheck.dependency.Dependency;
import org.owasp.dependencycheck.dependency.Identifier;
@@ -81,12 +83,24 @@ public class CPEAnalyzerIntegrationTest extends AbstractDatabaseTestCase {
*/
@Test
public void testDetermineCPE_full() throws Exception {
callDetermineCPE_full("hazelcast-2.5.jar", null);
callDetermineCPE_full("spring-context-support-2.5.5.jar", "cpe:/a:vmware:springsource_spring_framework:2.5.5");
callDetermineCPE_full("spring-core-3.0.0.RELEASE.jar", "cpe:/a:vmware:springsource_spring_framework:3.0.0");
callDetermineCPE_full("org.mortbay.jetty.jar", "cpe:/a:mortbay_jetty:jetty:4.2");
callDetermineCPE_full("jaxb-xercesImpl-1.5.jar", null);
callDetermineCPE_full("ehcache-core-2.2.0.jar", null);
CPEAnalyzer instance = new CPEAnalyzer();
instance.open();
FileNameAnalyzer fnAnalyzer = new FileNameAnalyzer();
JarAnalyzer jarAnalyzer = new JarAnalyzer();
HintAnalyzer hAnalyzer = new HintAnalyzer();
FalsePositiveAnalyzer fp = new FalsePositiveAnalyzer();
try {
//callDetermineCPE_full("struts2-core-2.3.16.3.jar", "cpe:/a:apache:struts:2.3.16.3", instance, fnAnalyzer, jarAnalyzer, hAnalyzer, fp);
callDetermineCPE_full("hazelcast-2.5.jar", null, instance, fnAnalyzer, jarAnalyzer, hAnalyzer, fp);
callDetermineCPE_full("spring-context-support-2.5.5.jar", "cpe:/a:vmware:springsource_spring_framework:2.5.5", instance, fnAnalyzer, jarAnalyzer, hAnalyzer, fp);
callDetermineCPE_full("spring-core-3.0.0.RELEASE.jar", "cpe:/a:vmware:springsource_spring_framework:3.0.0", instance, fnAnalyzer, jarAnalyzer, hAnalyzer, fp);
callDetermineCPE_full("org.mortbay.jetty.jar", "cpe:/a:mortbay_jetty:jetty:4.2", instance, fnAnalyzer, jarAnalyzer, hAnalyzer, fp);
callDetermineCPE_full("jaxb-xercesImpl-1.5.jar", null, instance, fnAnalyzer, jarAnalyzer, hAnalyzer, fp);
callDetermineCPE_full("ehcache-core-2.2.0.jar", null, instance, fnAnalyzer, jarAnalyzer, hAnalyzer, fp);
} finally {
instance.close();
}
}
/**
@@ -94,25 +108,16 @@ public class CPEAnalyzerIntegrationTest extends AbstractDatabaseTestCase {
*
* @throws Exception is thrown when an exception occurs
*/
public void callDetermineCPE_full(String depName, String expResult) throws Exception {
public void callDetermineCPE_full(String depName, String expResult, CPEAnalyzer instance, FileNameAnalyzer fnAnalyzer, JarAnalyzer jarAnalyzer, HintAnalyzer hAnalyzer, FalsePositiveAnalyzer fp) throws Exception {
File file = new File(this.getClass().getClassLoader().getResource(depName).getPath());
Dependency dep = new Dependency(file);
FileNameAnalyzer fnAnalyzer = new FileNameAnalyzer();
fnAnalyzer.analyze(dep, null);
JarAnalyzer jarAnalyzer = new JarAnalyzer();
jarAnalyzer.analyze(dep, null);
HintAnalyzer hAnalyzer = new HintAnalyzer();
hAnalyzer.analyze(dep, null);
CPEAnalyzer instance = new CPEAnalyzer();
instance.open();
instance.analyze(dep, null);
instance.close();
FalsePositiveAnalyzer fp = new FalsePositiveAnalyzer();
fp.analyze(dep, null);
if (expResult != null) {
@@ -180,6 +185,30 @@ public class CPEAnalyzerIntegrationTest extends AbstractDatabaseTestCase {
//Assert.assertTrue("Incorrect match - spring", spring.getIdentifiers().get(0).getValue().equals(expResultSpring));
}
/**
* Test of determineIdentifiers method, of class CPEAnalyzer.
*
* @throws Exception is thrown when an exception occurs
*/
@Test
public void testDetermineIdentifiers() throws Exception {
Dependency openssl = new Dependency();
openssl.getVendorEvidence().addEvidence("test", "vendor", "openssl", Confidence.HIGHEST);
openssl.getProductEvidence().addEvidence("test", "product", "openssl", Confidence.HIGHEST);
openssl.getVersionEvidence().addEvidence("test", "version", "1.0.1c", Confidence.HIGHEST);
CPEAnalyzer instance = new CPEAnalyzer();
instance.open();
instance.determineIdentifiers(openssl, "openssl", "openssl", Confidence.HIGHEST);
instance.close();
String expResult = "cpe:/a:openssl:openssl:1.0.1c";
Identifier expIdentifier = new Identifier("cpe", expResult, expResult);
assertTrue(openssl.getIdentifiers().contains(expIdentifier));
}
/**
* Test of searchCPE method, of class CPEAnalyzer.
*
@@ -190,12 +219,12 @@ public class CPEAnalyzerIntegrationTest extends AbstractDatabaseTestCase {
String vendor = "apache software foundation";
String product = "struts 2 core";
String version = "2.1.2";
String expResult = "cpe:/a:apache:struts:2.1.2";
String expVendor = "apache";
String expProduct = "struts";
CPEAnalyzer instance = new CPEAnalyzer();
instance.open();
//TODO - yeah, not a very good test as the results are the same with or without weighting...
Set<String> productWeightings = new HashSet<String>(1);
productWeightings.add("struts2");
@@ -203,9 +232,16 @@ public class CPEAnalyzerIntegrationTest extends AbstractDatabaseTestCase {
vendorWeightings.add("apache");
List<IndexEntry> result = instance.searchCPE(vendor, product, productWeightings, vendorWeightings);
//TODO fix this assert
//Assert.assertEquals(expResult, result.get(0).getName());
instance.close();
boolean found = false;
for (IndexEntry entry : result) {
if (expVendor.equals(entry.getVendor()) && expProduct.equals(entry.getProduct())) {
found = true;
break;
}
}
assertTrue("apache:struts was not identified", found);
}
}

View File

@@ -86,4 +86,40 @@ public class DependencyBundlingAnalyzerTest extends BaseTest {
assertEquals(expResult, result);
}
@Test
public void testFirstPathIsShortest() {
DependencyBundlingAnalyzer instance = new DependencyBundlingAnalyzer();
String left = "./a/c.jar";
String right = "./d/e/f.jar";
boolean expResult = true;
boolean result = instance.firstPathIsShortest(left, right);
assertEquals(expResult, result);
left = "./a/b/c.jar";
right = "./d/e/f.jar";
expResult = true;
result = instance.firstPathIsShortest(left, right);
assertEquals(expResult, result);
left = "./d/b/c.jar";
right = "./a/e/f.jar";
expResult = false;
result = instance.firstPathIsShortest(left, right);
assertEquals(expResult, result);
left = "./a/b/c.jar";
right = "./d/f.jar";
expResult = false;
result = instance.firstPathIsShortest(left, right);
assertEquals(expResult, result);
left = "./a/b/c.jar";
right = "./a/b/c.jar";
expResult = true;
result = instance.firstPathIsShortest(left, right);
assertEquals(expResult, result);
}
}

View File

@@ -85,7 +85,7 @@ public class HintAnalyzerTest extends BaseTest {
for (Dependency d : engine.getDependencies()) {
if (d.getActualFile().equals(guice)) {
gdep = d;
} else {
} else if (d.getActualFile().equals(spring)) {
sdep = d;
}
}

View File

@@ -93,7 +93,7 @@ public class JarAnalyzerTest extends BaseTest {
@Test
public void testGetSupportedExtensions() {
JarAnalyzer instance = new JarAnalyzer();
Set expResult = new HashSet();
Set<String> expResult = new HashSet<String>();
expResult.add("jar");
expResult.add("war");
Set result = instance.getSupportedExtensions();

View File

@@ -38,7 +38,7 @@ public class JavaScriptAnalyzerTest extends BaseTest {
@Test
public void testGetSupportedExtensions() {
JavaScriptAnalyzer instance = new JavaScriptAnalyzer();
Set expResult = new HashSet<String>();
Set<String> expResult = new HashSet<String>();
expResult.add("js");
Set result = instance.getSupportedExtensions();
assertEquals(expResult, result);

View File

@@ -0,0 +1,63 @@
package org.owasp.dependencycheck.data.central;
import org.junit.Before;
import org.junit.Test;
import org.owasp.dependencycheck.BaseTest;
import org.owasp.dependencycheck.data.nexus.MavenArtifact;
import org.owasp.dependencycheck.utils.Settings;
import java.io.FileNotFoundException;
import java.net.URL;
import java.util.List;
import java.util.logging.Logger;
import static org.junit.Assert.*;
/**
* Created by colezlaw on 10/13/14.
*/
public class CentralSearchTest extends BaseTest {
private static final Logger LOGGER = Logger.getLogger(CentralSearchTest.class.getName());
private CentralSearch searcher;
@Before
public void setUp() throws Exception {
String centralUrl = Settings.getString(Settings.KEYS.ANALYZER_CENTRAL_URL);
LOGGER.fine(centralUrl);
searcher = new CentralSearch(new URL(centralUrl));
}
@Test(expected = IllegalArgumentException.class)
public void testNullSha1() throws Exception { searcher.searchSha1(null); }
@Test(expected = IllegalArgumentException.class)
public void testMalformedSha1() throws Exception {
searcher.searchSha1("invalid");
}
// This test does generate network traffic and communicates with a host
// you may not be able to reach. Remove the @Ignore annotation if you want to
// test it anyway
@Test
public void testValidSha1() throws Exception {
List<MavenArtifact> ma = searcher.searchSha1("9977a8d04e75609cf01badc4eb6a9c7198c4c5ea");
assertEquals("Incorrect group", "org.apache.maven.plugins", ma.get(0).getGroupId());
assertEquals("Incorrect artifact", "maven-compiler-plugin", ma.get(0).getArtifactId());
assertEquals("Incorrect version", "3.1", ma.get(0).getVersion());
}
// This test does generate network traffic and communicates with a host
// you may not be able to reach. Remove the @Ignore annotation if you want to
// test it anyway
@Test(expected = FileNotFoundException.class)
public void testMissingSha1() throws Exception {
searcher.searchSha1("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA");
}
// This test should give us multiple results back from Central
@Test
public void testMultipleReturns() throws Exception {
List<MavenArtifact> ma = searcher.searchSha1("94A9CE681A42D0352B3AD22659F67835E560D107");
assertTrue(ma.size() > 1);
}
}

View File

@@ -45,8 +45,10 @@ public abstract class BaseDBTestCase extends BaseTest {
public static void ensureDBExists() throws Exception {
java.io.File dataPath = Settings.getDataFile(Settings.KEYS.DATA_DIRECTORY);
if (!dataPath.exists() || (dataPath.isDirectory() && dataPath.listFiles().length < 3)) {
java.io.File dataPath = Settings.getDataDirectory();
String fileName = String.format(Settings.getString(Settings.KEYS.DB_FILE_NAME), Settings.getString(Settings.KEYS.DB_VERSION));
java.io.File dataFile = new File(dataPath, fileName);
if (!dataPath.exists() || !dataFile.exists()) {
dataPath.mkdirs();
FileInputStream fis = null;
ZipInputStream zin = null;

View File

@@ -19,9 +19,11 @@ package org.owasp.dependencycheck.data.nvdcve;
import java.util.List;
import java.util.Set;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Test;
import org.owasp.dependencycheck.dependency.VulnerableSoftware;
import org.owasp.dependencycheck.utils.DependencyVersion;
/**
*
@@ -72,4 +74,21 @@ public class CveDBIntegrationTest extends BaseDBTestCase {
instance.close();
}
}
/**
* Test of isAffected method, of class CveDB.
*/
@Test
public void testIsAffected() throws Exception {
String vendor = "openssl";
String product = "openssl";
DependencyVersion identifiedVersion = new DependencyVersion("1.0.1o");
String cpeId = "cpe:/a:openssl:openssl:1.0.1e";
String previous = "y";
CveDB instance = new CveDB();
assertFalse(instance.isAffected(vendor, product, identifiedVersion, cpeId, previous));
}
}

View File

@@ -0,0 +1,144 @@
/*
* Copyright 2014 OWASP.
*
* 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.
*/
package org.owasp.dependencycheck.data.update;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.Properties;
import mockit.Mock;
import mockit.MockUp;
import static org.junit.Assert.assertEquals;
import org.junit.Test;
import org.owasp.dependencycheck.BaseTest;
import org.owasp.dependencycheck.data.nvdcve.DatabaseProperties;
import org.owasp.dependencycheck.data.update.exception.UpdateException;
import org.owasp.dependencycheck.utils.DependencyVersion;
/**
*
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public class EngineVersionCheckTest extends BaseTest {
// /**
// * Test of update method, of class EngineVersionCheck.
// */
// @Test
// public void testUpdate() throws Exception {
// EngineVersionCheck instance = new EngineVersionCheck();
// instance.update();
// }
/**
* Test of shouldUpdate method, of class EngineVersionCheck.
*/
@Test
public void testShouldUpdate() throws Exception {
DatabaseProperties properties = new MockUp<DatabaseProperties>() {
final private Properties properties = new Properties();
@Mock
public void save(String key, String value) throws UpdateException {
properties.setProperty(key, value);
}
@Mock
public String getProperty(String key) {
return properties.getProperty(key);
}
}.getMockInstance();
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
String updateToVersion = "1.2.6";
String currentVersion = "1.2.6";
long lastChecked = df.parse("2014-12-01").getTime();
long now = df.parse("2014-12-01").getTime();
EngineVersionCheck instance = new EngineVersionCheck();
boolean expResult = false;
instance.setUpdateToVersion(updateToVersion);
boolean result = instance.shouldUpdate(lastChecked, now, properties, currentVersion);
assertEquals(expResult, result);
updateToVersion = "1.2.5";
currentVersion = "1.2.5";
lastChecked = df.parse("2014-10-01").getTime();
now = df.parse("2014-12-01").getTime();
expResult = true;
instance.setUpdateToVersion(updateToVersion);
result = instance.shouldUpdate(lastChecked, now, properties, currentVersion);
assertEquals(expResult, result);
//System.out.println(properties.getProperty(CURRENT_ENGINE_RELEASE));
updateToVersion = "1.2.5";
currentVersion = "1.2.5";
lastChecked = df.parse("2014-12-01").getTime();
now = df.parse("2014-12-03").getTime();
expResult = false;
instance.setUpdateToVersion(updateToVersion);
result = instance.shouldUpdate(lastChecked, now, properties, currentVersion);
assertEquals(expResult, result);
updateToVersion = "1.2.6";
currentVersion = "1.2.5";
lastChecked = df.parse("2014-12-01").getTime();
now = df.parse("2014-12-03").getTime();
expResult = true;
instance.setUpdateToVersion(updateToVersion);
result = instance.shouldUpdate(lastChecked, now, properties, currentVersion);
assertEquals(expResult, result);
updateToVersion = "1.2.5";
currentVersion = "1.2.6";
lastChecked = df.parse("2014-12-01").getTime();
now = df.parse("2014-12-08").getTime();
expResult = false;
instance.setUpdateToVersion(updateToVersion);
result = instance.shouldUpdate(lastChecked, now, properties, currentVersion);
assertEquals(expResult, result);
updateToVersion = "";
currentVersion = "1.2.5";
lastChecked = df.parse("2014-12-01").getTime();
now = df.parse("2014-12-03").getTime();
expResult = false;
instance.setUpdateToVersion(updateToVersion);
result = instance.shouldUpdate(lastChecked, now, properties, currentVersion);
assertEquals(expResult, result);
updateToVersion = "";
currentVersion = "1.2.5";
lastChecked = df.parse("2014-12-01").getTime();
now = df.parse("2014-12-08").getTime();
expResult = true;
instance.setUpdateToVersion(updateToVersion);
result = instance.shouldUpdate(lastChecked, now, properties, currentVersion);
assertEquals(expResult, result);
}
/**
* Test of getCurrentReleaseVersion method, of class EngineVersionCheck.
*/
@Test
public void testGetCurrentReleaseVersion() {
EngineVersionCheck instance = new EngineVersionCheck();
DependencyVersion expResult = new DependencyVersion("1.2.6");
String release = instance.getCurrentReleaseVersion();
DependencyVersion result = new DependencyVersion(release);
assertEquals(expResult, result);
}
}

View File

@@ -18,8 +18,6 @@
package org.owasp.dependencycheck.data.update;
import java.net.MalformedURLException;
import java.util.Calendar;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertNotNull;
import org.junit.Test;
import org.owasp.dependencycheck.BaseTest;
@@ -47,26 +45,6 @@ public class StandardUpdateIntegrationTest extends BaseTest {
instance.closeDataStores();
}
/**
* Test of withinRange method, of class StandardUpdate.
*/
@Test
public void testWithinRange() throws Exception {
Calendar c = Calendar.getInstance();
long current = c.getTimeInMillis();
long lastRun = c.getTimeInMillis() - (3 * (1000 * 60 * 60 * 24));
int range = 7; // 7 days
StandardUpdate instance = getStandardUpdateTask();
boolean expResult = true;
boolean result = instance.withinRange(lastRun, current, range);
assertEquals(expResult, result);
lastRun = c.getTimeInMillis() - (8 * (1000 * 60 * 60 * 24));
expResult = false;
result = instance.withinRange(lastRun, current, range);
assertEquals(expResult, result);
}
// test removed as it is duplicative of the EngineIntegrationTest and the NvdCveUpdaterIntergraionTest
// /**
// * Test of update method, of class StandardUpdate.
@@ -77,7 +55,6 @@ public class StandardUpdateIntegrationTest extends BaseTest {
// instance.update();
// //TODO make this an actual test
// }
/**
* Test of updatesNeeded method, of class StandardUpdate.
*/

View File

@@ -0,0 +1,75 @@
/*
* 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) 2014 Jeremy Long. All Rights Reserved.
*/
package org.owasp.dependencycheck.data.update.task;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Future;
import org.junit.After;
import org.junit.AfterClass;
import static org.junit.Assert.assertNull;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.owasp.dependencycheck.data.nvdcve.CveDB;
import org.owasp.dependencycheck.data.update.NvdCveInfo;
import org.owasp.dependencycheck.utils.Settings;
/**
*
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public class DownloadTaskTest {
public DownloadTaskTest() {
}
@BeforeClass
public static void setUpClass() {
}
@AfterClass
public static void tearDownClass() {
}
@Before
public void setUp() {
Settings.initialize();
}
@After
public void tearDown() {
Settings.cleanup();
}
/**
* Test of call method, of class DownloadTask.
*/
@Test
public void testCall() throws Exception {
NvdCveInfo cve = new NvdCveInfo();
cve.setId("modified");
cve.setNeedsUpdate(true);
cve.setUrl(Settings.getString(Settings.KEYS.CVE_MODIFIED_20_URL));
cve.setOldSchemaVersionUrl(Settings.getString(Settings.KEYS.CVE_MODIFIED_12_URL));
ExecutorService processExecutor = null;
CveDB cveDB = null;
DownloadTask instance = new DownloadTask(cve, processExecutor, cveDB, Settings.getInstance());;
Future<ProcessTask> result = instance.call();
assertNull(result);
}
}

View File

@@ -23,10 +23,12 @@ import java.util.Set;
import org.junit.After;
import org.junit.AfterClass;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
import org.owasp.dependencycheck.data.nexus.MavenArtifact;
/**
*
@@ -152,7 +154,7 @@ public class DependencyTest {
public void testGetMd5sum() {
File file = new File(this.getClass().getClassLoader().getResource("struts2-core-2.1.2.jar").getPath());
Dependency instance = new Dependency(file);
// assertEquals("89CE9E36AA9A9E03F1450936D2F4F8DD0F961F8B", result.getSha1sum());
//assertEquals("89CE9E36AA9A9E03F1450936D2F4F8DD0F961F8B", result.getSha1sum());
String expResult = "C30B57142E1CCBC1EFD5CD15F307358F";
String result = instance.getMd5sum();
assertEquals(expResult, result);
@@ -294,4 +296,34 @@ public class DependencyTest {
EvidenceCollection result = instance.getVersionEvidence();
assertTrue(true); //this is just a getter setter pair.
}
/**
* Test of addAsEvidence method, of class Dependency.
*/
@Test
public void testAddAsEvidence() {
Dependency instance = new Dependency();
MavenArtifact mavenArtifact = new MavenArtifact("group", "artifact", "version", "url");
instance.addAsEvidence("pom", mavenArtifact, Confidence.HIGH);
assertTrue(instance.getEvidence().contains(Confidence.HIGH));
assertFalse(instance.getEvidence().getEvidence("pom", "groupid").isEmpty());
assertFalse(instance.getEvidence().getEvidence("pom", "artifactid").isEmpty());
assertFalse(instance.getEvidence().getEvidence("pom", "version").isEmpty());
assertFalse(instance.getIdentifiers().isEmpty());
}
/**
* Test of addAsEvidence method, of class Dependency.
*/
@Test
public void testAddAsEvidenceWithEmptyArtefact() {
Dependency instance = new Dependency();
MavenArtifact mavenArtifact = new MavenArtifact(null, null, null, null);
instance.addAsEvidence("pom", mavenArtifact, Confidence.HIGH);
assertFalse(instance.getEvidence().contains(Confidence.HIGH));
assertTrue(instance.getEvidence().getEvidence("pom", "groupid").isEmpty());
assertTrue(instance.getEvidence().getEvidence("pom", "artifactid").isEmpty());
assertTrue(instance.getEvidence().getEvidence("pom", "version").isEmpty());
assertTrue(instance.getIdentifiers().isEmpty());
}
}

View File

@@ -88,7 +88,15 @@ public class SuppressionHandlerTest {
xmlReader.parse(in);
List result = handler.getSuppressionRules();
List<SuppressionRule> result = handler.getSuppressionRules();
assertTrue(result.size() > 3);
int baseCount = 0;
for (SuppressionRule r : result) {
if (r.isBase()) {
baseCount++;
}
}
assertTrue(baseCount > 0);
}
}

View File

@@ -146,6 +146,17 @@ public class SuppressionRuleTest {
List<String> result = instance.getCve();
assertEquals(cve, result);
}
/**
* Test of base property, of class SuppressionRule.
*/
@Test
public void testBase() {
SuppressionRule instance = new SuppressionRule();
assertFalse(instance.isBase());
instance.setBase(true);
assertTrue(instance.isBase());
}
//</editor-fold>
//<editor-fold defaultstate="collapsed" desc="Ignored duplicate tests, left in, as empty tests, so IDE doesn't re-generate them">
@@ -424,33 +435,33 @@ public class SuppressionRuleTest {
instance.setSha1(sha1);
instance.addCwe("287");
instance.process(dependency);
assertTrue(dependency.getVulnerabilities().size() == 1);
assertEquals(1, dependency.getVulnerabilities().size());
dependency.setSha1sum(sha1);
instance.process(dependency);
assertTrue(dependency.getVulnerabilities().isEmpty());
assertTrue(dependency.getSuppressedVulnerabilities().size() == 1);
assertEquals(1, dependency.getSuppressedVulnerabilities().size());
//cvss
dependency.addVulnerability(v);
instance = new SuppressionRule();
instance.addCvssBelow(5f);
instance.process(dependency);
assertTrue(dependency.getVulnerabilities().size() == 1);
assertEquals(1, dependency.getVulnerabilities().size());
instance.addCvssBelow(8f);
instance.process(dependency);
assertTrue(dependency.getVulnerabilities().isEmpty());
assertTrue(dependency.getSuppressedVulnerabilities().size() == 1);
assertEquals(1, dependency.getSuppressedVulnerabilities().size());
//cve
dependency.addVulnerability(v);
instance = new SuppressionRule();
instance.addCve("CVE-2012-1337");
instance.process(dependency);
assertTrue(dependency.getVulnerabilities().size() == 1);
assertEquals(1, dependency.getVulnerabilities().size());
instance.addCve("CVE-2013-1337");
instance.process(dependency);
assertTrue(dependency.getVulnerabilities().isEmpty());
assertTrue(dependency.getSuppressedVulnerabilities().size() == 1);
assertEquals(1, dependency.getSuppressedVulnerabilities().size());
//cpe
instance = new SuppressionRule();
@@ -468,18 +479,21 @@ public class SuppressionRuleTest {
instance.setFilePath(pt);
instance.process(dependency);
assertTrue(dependency.getIdentifiers().isEmpty());
assertTrue(dependency.getSuppressedIdentifiers().size() == 1);
assertEquals(1, dependency.getSuppressedIdentifiers().size());
instance = new SuppressionRule();
dependency.addIdentifier("cpe", "cpe:/a:microsoft:.net_framework:4.0", "some url not needed for this test");
dependency.addIdentifier("cpe", "cpe:/a:microsoft:.net_framework:4.5", "some url not needed for this test");
dependency.addIdentifier("cpe", "cpe:/a:microsoft:.net_framework:5.0", "some url not needed for this test");
pt = new PropertyType();
pt.setValue("cpe:/a:microsoft:.net_framework");
instance.addCpe(pt);
assertTrue(dependency.getIdentifiers().size() == 3);
instance.setBase(true);
assertEquals(3, dependency.getIdentifiers().size());
assertEquals(1, dependency.getSuppressedIdentifiers().size());
instance.process(dependency);
assertTrue(dependency.getIdentifiers().isEmpty());
assertTrue(dependency.getSuppressedIdentifiers().size() == 3);
assertEquals(1, dependency.getSuppressedIdentifiers().size());
}
/**

View File

@@ -0,0 +1,71 @@
/*
* Copyright 2014 OWASP.
*
* 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.
*/
package org.owasp.dependencycheck.utils;
import java.util.Calendar;
import org.junit.After;
import org.junit.AfterClass;
import static org.junit.Assert.assertEquals;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
/**
*
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public class DateUtilTest {
public DateUtilTest() {
}
@BeforeClass
public static void setUpClass() {
}
@AfterClass
public static void tearDownClass() {
}
@Before
public void setUp() {
}
@After
public void tearDown() {
}
/**
* Test of withinDateRange method, of class DateUtil.
*/
@Test
public void testWithinDateRange() {
Calendar c = Calendar.getInstance();
long current = c.getTimeInMillis();
long lastRun = c.getTimeInMillis() - (3 * (1000 * 60 * 60 * 24));
int range = 7; // 7 days
boolean expResult = true;
boolean result = DateUtil.withinDateRange(lastRun, current, range);
assertEquals(expResult, result);
lastRun = c.getTimeInMillis() - (8 * (1000 * 60 * 60 * 24));
expResult = false;
result = DateUtil.withinDateRange(lastRun, current, range);
assertEquals(expResult, result);
}
}

View File

@@ -134,14 +134,14 @@ public class DependencyVersionTest {
@Test
public void testMatchesAtLeastThreeLevels() {
DependencyVersion instance = new DependencyVersion("1.2.3.4");
DependencyVersion version = new DependencyVersion("1.2.3.5");
DependencyVersion instance = new DependencyVersion("2.3.16.3");
DependencyVersion version = new DependencyVersion("2.3.16.4");
//true tests
assertEquals(true, instance.matchesAtLeastThreeLevels(version));
version = new DependencyVersion("1.2");
version = new DependencyVersion("2.3");
assertEquals(true, instance.matchesAtLeastThreeLevels(version));
//false tests
version = new DependencyVersion("1.2.2.5");
version = new DependencyVersion("2.3.16.1");
assertEquals(false, instance.matchesAtLeastThreeLevels(version));
version = new DependencyVersion("2");
assertEquals(false, instance.matchesAtLeastThreeLevels(version));
@@ -165,6 +165,14 @@ public class DependencyVersionTest {
version = new DependencyVersion("1.2.3.1");
assertEquals(-1, instance.compareTo(version));
instance = new DependencyVersion("1.0.1n");
version = new DependencyVersion("1.0.1m");
assertEquals(1, instance.compareTo(version));
version = new DependencyVersion("1.0.1n");
assertEquals(0, instance.compareTo(version));
version = new DependencyVersion("1.0.1o");
assertEquals(-1, instance.compareTo(version));
DependencyVersion[] dv = new DependencyVersion[7];
dv[0] = new DependencyVersion("2.1.3");
dv[1] = new DependencyVersion("2.1.3.r2");

View File

@@ -54,13 +54,13 @@ public class DependencyVersionUtilTest {
* Test of parseVersion method, of class DependencyVersionUtil.
*/
@Test
public void testParseVersionFromFileName() {
public void testParseVersion() {
final String[] fileName = {"something-0.9.5.jar", "lib2-1.1.jar", "lib1.5r4-someflag-R26.jar",
"lib-1.2.5-dev-20050313.jar", "testlib_V4.4.0.jar", "lib-core-2.0.0-RC1-SNAPSHOT.jar",
"lib-jsp-2.0.1_R114940.jar", "dev-api-2.3.11_R121413.jar", "lib-api-3.7-SNAPSHOT.jar",
"-", "", "1.3-beta", "6"};
"-", "", "1.3-beta", "6", "openssl1.0.1c", "jsf-impl-2.2.8-02.jar"};
final String[] expResult = {"0.9.5", "1.1", "1.5.r4", "1.2.5", "4.4.0", "2.0.0.rc1",
"2.0.1.r114940", "2.3.11.r121413", "3.7", "-", null, "1.3.beta", "6"};
"2.0.1.r114940", "2.3.11.r121413", "3.7", "-", null, "1.3.beta", "6", "1.0.1c", "2.2.8.02"};
for (int i = 0; i < fileName.length; i++) {
final DependencyVersion version = DependencyVersionUtil.parseVersion(fileName[i]);

View File

@@ -3,6 +3,9 @@ application.version=${pom.version}
autoupdate=true
max.download.threads=3
# the url to obtain the current engine version from
engine.version.url=http://jeremylong.github.io/DependencyCheck/current.txt
#temp.directory defaults to System.getProperty("java.io.tmpdir")
#temp.directory=[path to temp directory]
@@ -13,8 +16,12 @@ max.download.threads=3
# will not be used. The data.directory will be resolved and if the connection string
# below contains a %s then the data.directory will replace the %s.
data.directory=[JAR]/data
# if the filename has a %s it will be replaced with the current expected version. For file
# based databases the below filename will be added to the data directory above and then
# if the connection string has a %s it will be replaced by the directory/filename path.
data.file_name=cve.%s.h2.db
data.version=2.9
data.connection_string=jdbc:h2:file:%s;FILE_LOCK=SERIALIZED;AUTOCOMMIT=ON;
#data.connection_string=jdbc:h2:file:%s;AUTO_SERVER=TRUE;AUTOCOMMIT=ON;
#data.connection_string=jdbc:mysql://localhost:3306/dependencycheck
# user name and password for the database connection. The inherent case is to use H2.
@@ -43,11 +50,16 @@ cpe.meta.url=http://static.nvd.nist.gov/feeds/xml/cpe/dictionary/official-cpe-di
cve.url.modified.validfordays=7
# the path to the modified nvd cve xml file.
cve.url-1.2.modified=http://nvd.nist.gov/download/nvdcve-modified.xml
cve.url-2.0.modified=http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-modified.xml
cve.startyear=2014
cve.url-2.0.base=http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-%d.xml
cve.url-1.2.base=http://nvd.nist.gov/download/nvdcve-%d.xml
cve.url-1.2.modified=https://nvd.nist.gov/download/nvdcve-Modified.xml.gz
#cve.url-1.2.modified=http://nvd.nist.gov/download/nvdcve-modified.xml
cve.url-2.0.modified=https://nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-Modified.xml.gz
#cve.url-2.0.modified=http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-modified.xml
cve.url-1.2.base=https://nvd.nist.gov/download/nvdcve-%d.xml.gz
#cve.url-1.2.base=http://nvd.nist.gov/download/nvdcve-%d.xml
cve.url-2.0.base=https://nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-%d.xml.gz
#cve.url-2.0.base=http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-%d.xml
# the URL for searching Nexus for SHA-1 hashes and whether it's enabled
analyzer.nexus.enabled=true
@@ -55,3 +67,7 @@ analyzer.nexus.url=https://repository.sonatype.org/service/local/
# If set to true, the proxy will still ONLY be used if the proxy properties (proxy.url, proxy.port)
# are configured
analyzer.nexus.proxy=true
# the URL for searching search.maven.org for SHA-1 and whether it's enabled
analyzer.central.enabled=true
analyzer.central.url=http://search.maven.org/solrsearch/select

View File

@@ -10,7 +10,7 @@
<filePath>c:\path\to\some.jar</filePath>
<cpe>cpe:/a:csv:csv:1.0</cpe>
</suppress>
<suppress>
<suppress base="true">
<notes><![CDATA[
This suppresses any jboss:jboss cpe for any test.jar in any directory.
]]></notes>

View File

@@ -1,17 +1,25 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<description>This plug-in can independently execute a Dependency-Check analysis and visualize the results.</description>
<url>http://wiki.jenkins-ci.org/display/JENKINS/OWASP+Dependency-Check+Plugin</url>
<parent>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-parent</artifactId>
<version>1.2.2</version>
<version>1.2.7</version>
</parent>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-jenkins</artifactId>
<name>Dependency-Check Jenkins Plugin</name>
<url>http://wiki.jenkins-ci.org/display/JENKINS/OWASP+Dependency-Check+Plugin</url>
<description>dependency-check-jenkins is a Jenkins plugin that runs dependency-check-core on a project to detect publicly disclosed vulnerabilities associated with the project's dependencies. The plugin will generate a report listing the dependency, any identified Common Platform Enumeration (CPE) identifiers, and the associated Common Vulnerability and Exposure (CVE) entries. This module is simply a placeholder and does not contain the actual plugin source code. The source code and distribution of the plugin is handled via https://github.com/jenkinsci/dependency-check-jenkins and Jenkin's plugin management.</description>
<!-- begin copy from http://minds.coremedia.com/2012/09/11/problem-solved-deploy-multi-module-maven-project-site-as-github-pages/ -->
<distributionManagement>
<site>
<id>github-pages-site</id>
<name>Deployment through GitHub's site deployment plugin</name>
<url>${basedir}/../target/site/${project.version}/dependency-check-jenkins</url>
</site>
</distributionManagement>
<!-- end copy -->
<packaging>pom</packaging>
<inceptionYear>2012</inceptionYear>
<organization>
@@ -31,15 +39,6 @@
</roles>
</developer>
</developers>
<!-- begin copy from http://minds.coremedia.com/2012/09/11/problem-solved-deploy-multi-module-maven-project-site-as-github-pages/ -->
<distributionManagement>
<site>
<id>github-pages-site</id>
<name>Deployment through GitHub's site deployment plugin</name>
<url>${basedir}/../target/site/${project.version}/dependency-check-maven</url>
</site>
</distributionManagement>
<!-- end copy -->
<scm>
<connection>scm:git:git@github.com:jenkinsci/dependency-check-jenkins.git</connection>
<url>https://github.com/jenkinsci/dependency-check-jenkins</url>

View File

@@ -22,14 +22,14 @@ Copyright (c) 2013 Jeremy Long. All Rights Reserved.
<parent>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-parent</artifactId>
<version>1.2.2</version>
<version>1.2.7</version>
</parent>
<artifactId>dependency-check-maven</artifactId>
<packaging>maven-plugin</packaging>
<name>Dependency-Check Maven Plugin</name>
<description>Dependency-Check-Maven is a Maven Plugin that attempts to detect publicly disclosed vulnerabilities contained within project dependencies. It does this by determining if there is a Common Platform Enumeration (CPE) identifier for a given dependency. If found, it will generate a report linking to the associated CVE entries.</description>
<description>dependency-check-maven is a Maven Plugin that uses dependency-check-core to detect publicly disclosed vulnerabilities associated with the project's dependencies. The plugin will generate a report listing the dependency, any identified Common Platform Enumeration (CPE) identifiers, and the associated Common Vulnerability and Exposure (CVE) entries.</description>
<inceptionYear>2013</inceptionYear>
<!-- begin copy from http://minds.coremedia.com/2012/09/11/problem-solved-deploy-multi-module-maven-project-site-as-github-pages/ -->
<distributionManagement>
@@ -149,6 +149,9 @@ Copyright (c) 2013 Jeremy Long. All Rights Reserved.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<bottom>Copyright© 2012-14 Jeremy Long. All Rights Reserved.</bottom>
</configuration>
<reportSets>
<reportSet>
<id>default</id>
@@ -238,7 +241,7 @@ Copyright (c) 2013 Jeremy Long. All Rights Reserved.
<linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding>
<excludes>
<exclude>**/generated/*.java</exclude>
<exclude>**/generated/**/*.java</exclude>
<exclude>**/HelpMojo.java</exclude>
</excludes>
<rulesets>

View File

@@ -0,0 +1,161 @@
/*
* This file is part of dependency-check-maven.
*
* 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) 2014 Jeremy Long. All Rights Reserved.
*/
package org.owasp.dependencycheck.maven;
import java.util.logging.Logger;
import org.apache.maven.project.MavenProject;
import org.owasp.dependencycheck.analyzer.Analyzer;
import org.owasp.dependencycheck.analyzer.CPEAnalyzer;
import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
import org.owasp.dependencycheck.utils.Settings;
/**
* A modified version of the core engine specifically designed to persist some data between multiple executions of a
* multi-module Maven project.
*
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public class Engine extends org.owasp.dependencycheck.Engine {
/**
* The logger.
*/
private static final transient Logger LOGGER = Logger.getLogger(Engine.class.getName());
/**
* A key used to persist an object in the MavenProject.
*/
private static final String CPE_ANALYZER_KEY = "dependency-check-CPEAnalyzer";
/**
* The current MavenProject.
*/
private MavenProject currentProject;
/**
* Creates a new Engine to perform anyalsis on dependencies.
*
* @param project the current Maven project
* @throws DatabaseException thrown if there is an issue connecting to the database
*/
public Engine(MavenProject project) throws DatabaseException {
this.currentProject = project;
final MavenProject parent = getRootParent();
if (parent != null && parent.getContextValue("dependency-check-data-was-updated") != null) {
System.setProperty(Settings.KEYS.AUTO_UPDATE, Boolean.FALSE.toString());
}
initializeEngine();
if (parent != null) {
parent.setContextValue("dependency-check-data-was-updated", Boolean.valueOf(true));
}
}
/**
* This constructor should not be called. Use Engine(MavenProject) instead.
*
* @throws DatabaseException thrown if there is an issue connecting to the database
*/
private Engine() throws DatabaseException {
}
/**
* Initializes the given analyzer. This skips the initialization of the CPEAnalyzer if it has been initialized by a
* previous execution.
*
* @param analyzer the analyzer to initialize
* @return the initialized analyzer
*/
@Override
protected Analyzer initializeAnalyzer(Analyzer analyzer) {
if ((analyzer instanceof CPEAnalyzer)) {
CPEAnalyzer cpe = getPreviouslyLoadedAnalyzer();
if (cpe != null) {
return cpe;
}
cpe = (CPEAnalyzer) super.initializeAnalyzer(analyzer);
storeCPEAnalyzer(cpe);
}
return super.initializeAnalyzer(analyzer);
}
/**
* Closes the given analyzer. This skips closing the CPEAnalyzer.
*
* @param analyzer the analyzer to close
*/
@Override
protected void closeAnalyzer(Analyzer analyzer) {
if ((analyzer instanceof CPEAnalyzer)) {
if (getPreviouslyLoadedAnalyzer() == null) {
super.closeAnalyzer(analyzer);
}
} else {
super.closeAnalyzer(analyzer);
}
}
/**
* Closes the CPEAnalyzer if it has been created and persisted in the root parent MavenProject context.
*/
public void cleanupFinal() {
final CPEAnalyzer cpe = getPreviouslyLoadedAnalyzer();
if (cpe != null) {
cpe.close();
}
}
/**
* Gets the CPEAnalyzer from the root Maven Project.
*
* @return an initialized CPEAnalyzer
*/
private CPEAnalyzer getPreviouslyLoadedAnalyzer() {
CPEAnalyzer cpe = null;
final MavenProject project = getRootParent();
if (project != null) {
cpe = (CPEAnalyzer) project.getContextValue(CPE_ANALYZER_KEY);
}
return cpe;
}
/**
* Stores a CPEAnalyzer in the root Maven Project.
*
* @param cpe the CPEAnalyzer to store
*/
private void storeCPEAnalyzer(CPEAnalyzer cpe) {
final MavenProject p = getRootParent();
if (p != null) {
p.setContextValue(CPE_ANALYZER_KEY, cpe);
}
}
/**
* Returns the root Maven Project.
*
* @return the root Maven Project
*/
private MavenProject getRootParent() {
if (this.currentProject == null) {
return null;
}
MavenProject p = this.currentProject;
while (p.getParent() != null) {
p = p.getParent();
}
return p;
}
}

View File

@@ -0,0 +1,468 @@
/*
* This file is part of dependency-check-maven.
*
* 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) 2014 Jeremy Long. All Rights Reserved.
*/
package org.owasp.dependencycheck.maven;
import java.io.File;
import java.util.ArrayList;
import java.util.Collections;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Locale;
import java.util.Map;
import java.util.Set;
import java.util.logging.Logger;
import org.apache.maven.doxia.sink.Sink;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.plugins.annotations.Component;
import org.apache.maven.plugins.annotations.Parameter;
import org.apache.maven.project.MavenProject;
import org.apache.maven.reporting.MavenReport;
import org.apache.maven.reporting.MavenReportException;
/**
* <p>
* This is an abstract reporting mojo that enables report aggregation. Some of the code in the this class was copied
* from the CoberturaReportMojo (http://mojo.codehaus.org/cobertura-maven-plugin/, version 2.6). The authors of the
* CoberturaReportMojo were <a href="will.gwaltney@sas.com">Will Gwaltney</a> and
* <a href="mailto:joakim@erdfelt.com">Joakim Erdfelt</a>. There working example of how to do report aggregation was
* invaluable.</p>
* <p>
* An important point about using this abstract class is that it is intended for one to write some form of serialized
* data (via the {@link org.owasp.dependencycheck.maven.ReportAggregationMojo#writeDataFile() }; note that the
* <code>writeDataFile()</code> function is called automatically after either {@link org.owasp.dependencycheck.maven.ReportAggregationMojo#executeNonAggregateReport(org.apache.maven.doxia.sink.Sink,
* org.apache.maven.doxia.sink.SinkFactory, java.util.Locale)
* } or {@link org.owasp.dependencycheck.maven.ReportAggregationMojo#executeAggregateReport(org.apache.maven.doxia.sink.Sink,
* org.apache.maven.doxia.sink.SinkFactory, java.util.Locale)
* } are called. When <code>executeAggregateReport()</code> is implemented, one can call {@link org.owasp.dependencycheck.maven.ReportAggregationMojo#getChildDataFiles()
* } to obtain a list of the data files to aggregate.</p>
*
*
* @author Jeremy Long <jeremy.long@owasp.org>
*/
public abstract class ReportAggregationMojo extends AbstractMojo implements MavenReport {
/**
* The Maven Project Object.
*/
@Component
private MavenProject project;
/**
* Logger field reference.
*/
private static final Logger LOGGER = Logger.getLogger(ReportAggregationMojo.class.getName());
/**
* List of Maven project of the current build
*/
@Parameter(readonly = true, required = true, property = "reactorProjects")
private List<MavenProject> reactorProjects;
/**
* Generate aggregate reports in multi-module projects.
*/
@Parameter(property = "aggregate", defaultValue = "false")
private boolean aggregate;
/**
* Sets whether or not the external report format should be used.
*/
@Parameter(property = "metaFileName", defaultValue = "dependency-check.ser", required = true)
private String dataFileName;
/**
* Specifies the destination directory for the generated Dependency-Check report. This generally maps to
* "target/site".
*/
@Parameter(property = "reportOutputDirectory", defaultValue = "${project.reporting.outputDirectory}", required = true)
private File reportOutputDirectory;
/**
* Sets the Reporting output directory.
*
* @param directory the output directory
*/
@Override
public void setReportOutputDirectory(File directory) {
reportOutputDirectory = directory;
}
/**
* Returns the output directory.
*
* @return the output directory
*/
@Override
public File getReportOutputDirectory() {
return reportOutputDirectory;
}
/**
* Returns the output directory for the given project.
*
* @param project the Maven project to get the output directory for
* @return the output directory for the given project
*/
public File getReportOutputDirectory(MavenProject project) {
final Object o = project.getContextValue(getOutputDirectoryContextKey());
if (o != null && o instanceof File) {
return (File) o;
}
return null;
}
/**
* Returns whether this is an external report. This method always returns true.
*
* @return <code>true</code>
*/
@Override
public final boolean isExternalReport() {
return true;
}
/**
* Initializes the mojo.
*/
protected abstract void initialize();
/**
* The collection of child projects.
*/
private final Map<MavenProject, Set<MavenProject>> projectChildren = new HashMap<MavenProject, Set<MavenProject>>();
/**
* Called before execute; allows for any setup that is needed. If this is overridden you must call
* </code>super.preExecute()</code>.
*
* @throws MojoExecutionException thrown if there is an issue executing the mojo
* @throws MojoFailureException thrown if there is an issue executing the mojo
*/
protected void preExecute() throws MojoExecutionException, MojoFailureException {
buildAggregateInfo();
}
/**
* Called when the mojo is being executed.
*
* @throws MojoExecutionException thrown if there is an issue executing the mojo
* @throws MojoFailureException thrown if there is an issue executing the mojo
*/
protected abstract void performExecute() throws MojoExecutionException, MojoFailureException;
/**
* Runs after the mojo has executed. This implementation will call <code>writeDataFile()</code>. As such, it is
* important that if this method is overriden that <code>super.postExecute()</code> is called.
*
* @throws MojoExecutionException thrown if there is an issue executing the mojo
* @throws MojoFailureException thrown if there is an issue executing the mojo
*/
protected void postExecute() throws MojoExecutionException, MojoFailureException {
final File written = writeDataFile();
if (written != null) {
project.setContextValue(getDataFileContextKey(), written.getAbsolutePath());
}
}
/**
* Returns the key used to store the path to the data file that is saved by <code>writeDataFile()</code>. This key
* is used in the <code>MavenProject.(set|get)ContextValue</code>.
*
* @return the key used to store the path to the data file
*/
protected String getDataFileContextKey() {
return "dependency-check-path-" + this.getDataFileName();
}
/**
* Returns the key used to store the path to the output directory. When generating the report in the
* <code>executeAggregateReport()</code> the output directory should be obtained by using this key.
*
* @return the key used to store the path to the output directory
*/
protected String getOutputDirectoryContextKey() {
return "dependency-output-dir-" + this.getDataFileName();
}
/**
* Is called by Maven to execute the mojo.
*
* @throws MojoExecutionException thrown if there is an issue executing the mojo
* @throws MojoFailureException thrown if there is an issue executing the mojo
*/
public final void execute() throws MojoExecutionException, MojoFailureException {
try {
initialize();
preExecute();
performExecute();
} finally {
postExecute();
}
}
/**
* Runs prior to the site report generation.
*
* @throws MavenReportException if a maven report exception occurs
*/
protected void preGenerate() throws MavenReportException {
buildAggregateInfo();
project.setContextValue(getOutputDirectoryContextKey(), getReportOutputDirectory());
}
/**
* Executes after the site report has been generated.
*
* @throws MavenReportException if a maven report exception occurs
*/
protected void postGenerate() throws MavenReportException {
final File written = writeDataFile();
if (written != null) {
project.setContextValue(getDataFileContextKey(), written.getAbsolutePath());
}
}
/**
* Generates the non aggregate report.
*
* @param locale the locale to use when generating the report
* @throws MavenReportException if a maven report exception occurs
*/
protected abstract void executeNonAggregateReport(Locale locale) throws MavenReportException;
/**
* Generates the aggregate Site Report.
*
* @param project the maven project used to generate the aggregate report
* @param locale the locale to use when generating the report
* @throws MavenReportException if a maven report exception occurs
*/
protected abstract void executeAggregateReport(MavenProject project, Locale locale) throws MavenReportException;
/**
* Generates the Dependency-Check Site Report.
*
* @param sink the sink to write the report to
* @param locale the locale to use when generating the report
* @throws MavenReportException if a maven report exception occurs
* @deprecated use {@link #generate(org.apache.maven.doxia.sink.Sink, java.util.Locale) instead.
*/
@Deprecated
public final void generate(@SuppressWarnings("deprecation") org.codehaus.doxia.sink.Sink sink, Locale locale) throws MavenReportException {
generate((Sink) sink, locale);
}
/**
* Generates the Dependency-Check Site Report.
*
* @param sink the sink to write the report to
* @param locale the locale to use when generating the report
* @throws MavenReportException if a maven report exception occurs
*/
public final void generate(Sink sink, Locale locale) throws MavenReportException {
try {
initialize();
preGenerate();
if (canGenerateNonAggregateReport()) {
executeNonAggregateReport(locale);
}
} finally {
postGenerate();
}
if (canGenerateAggregateReport()) {
for (MavenProject proj : reactorProjects) {
if (!isMultiModule(proj)) {
continue;
}
executeAggregateReport(proj, locale);
}
}
}
/**
* Returns whether or not the mojo can generate a non-aggregate report for this project.
*
* @return <code>true</code> if a non-aggregate report can be generated, otherwise <code>false</code>
*/
protected abstract boolean canGenerateNonAggregateReport();
/**
* Returns whether or not we can generate any aggregate reports at this time.
*
* @return <code>true</code> if an aggregate report can be generated, otherwise <code>false</code>
*/
protected abstract boolean canGenerateAggregateReport();
/**
* Returns the name of the data file that contains the serialized data.
*
* @return the name of the data file that contains the serialized data
*/
protected String getDataFileName() {
return dataFileName;
}
/**
* Writes the data file to disk in the target directory.
*
* @return the File object referencing the data file that was written
*/
protected abstract File writeDataFile();
/**
* Collects the information needed for building aggregate reports.
*/
private void buildAggregateInfo() {
// build parent-child map
for (MavenProject proj : reactorProjects) {
Set<MavenProject> depList = projectChildren.get(proj.getParent());
if (depList == null) {
depList = new HashSet<MavenProject>();
projectChildren.put(proj.getParent(), depList);
}
depList.add(proj);
}
}
/**
* Returns a list containing all the recursive, non-pom children of the given project, never <code>null</code>.
*
* @return a list of child projects
*/
protected List<MavenProject> getAllChildren() {
return getAllChildren(project);
}
/**
* Returns a list containing all the recursive, non-pom children of the given project, never <code>null</code>.
*
* @param parentProject the parent project to collect the child project references
* @return a list of child projects
*/
protected List<MavenProject> getAllChildren(MavenProject parentProject) {
final Set<MavenProject> children = projectChildren.get(parentProject);
if (children == null) {
return Collections.emptyList();
}
final List<MavenProject> result = new ArrayList<MavenProject>();
for (MavenProject child : children) {
if (isMultiModule(child)) {
result.addAll(getAllChildren(child));
} else {
result.add(child);
}
}
return result;
}
/**
* Returns a list of data files that were produced by the direct children of the given MavenProject.
*
* @param project the Maven project to obtain the child data files from
* @return a list of the data files
*/
protected List<File> getAllChildDataFiles(MavenProject project) {
final List<MavenProject> children = getAllChildren(project);
return getDataFiles(children);
}
/**
* Returns any existing output files from the given list of projects.
*
* @param projects the list of projects to obtain the output files from
* @return a list of output files
*/
protected List<File> getDataFiles(List<MavenProject> projects) {
final List<File> files = new ArrayList<File>();
for (MavenProject proj : projects) {
final Object path = project.getContextValue(getDataFileContextKey());
if (path == null) {
final String msg = String.format("Unable to aggregate data for '%s' - aggregate data file was not generated",
proj.getName());
LOGGER.warning(msg);
} else {
final File outputFile = new File((String) path);
if (outputFile.exists()) {
files.add(outputFile);
} else {
if (!isMultiModule(project)) {
final String msg = String.format("Unable to aggregate data for '%s' - missing data file '%s'",
proj.getName(), outputFile.getPath());
LOGGER.warning(msg);
}
}
}
}
return files;
}
/**
* Test if the project has pom packaging
*
* @param mavenProject Project to test
* @return <code>true</code> if it has a pom packaging; otherwise <code>false</code>
*/
protected boolean isMultiModule(MavenProject mavenProject) {
return "pom".equals(mavenProject.getPackaging());
}
/**
* Test if the current project has pom packaging
*
* @return <code>true</code> if it has a pom packaging; otherwise <code>false</code>
*/
protected boolean isMultiModule() {
return isMultiModule(project);
}
/**
* Check whether the current project is the last project in a multi-module build. If the maven build is not a
* multi-module project then this will always return true.
*
* @return <code>true</code> if the current project is the last project in a multi-module build; otherwise
* <code>false</code>
*/
protected boolean isLastProject() {
return project.equals(reactorProjects.get(reactorProjects.size() - 1));
}
/**
* Returns whether or not the mojo is configured to perform report aggregation.
*
* @return <code>true</code> if report aggregation is enabled; otherwise <code>false</code>
*/
public boolean isAggregate() {
return aggregate;
}
/**
* Returns a reference to the current project. This method is used instead of auto-binding the project via component
* annotation in concrete implementations of this. If the child has a <code>@Component MavenProject project;</code>
* defined then the abstract class (i.e. this class) will not have access to the current project (just the way Maven
* works with the binding).
*
* @return returns a reference to the current project
*/
protected MavenProject getProject() {
return project;
}
}

View File

@@ -0,0 +1,455 @@
/*
* This file is part of dependency-check-maven.
*
* 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) 2014 Jeremy Long. All Rights Reserved.
*/
package org.owasp.dependencycheck.maven;
import java.io.File;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.net.URLEncoder;
import java.text.DateFormat;
import java.util.Date;
import java.util.List;
import java.util.Set;
import java.util.logging.Level;
import java.util.logging.Logger;
import org.apache.maven.doxia.sink.Sink;
import org.owasp.dependencycheck.data.nvdcve.CveDB;
import org.owasp.dependencycheck.data.nvdcve.DatabaseException;
import org.owasp.dependencycheck.data.nvdcve.DatabaseProperties;
import org.owasp.dependencycheck.dependency.Dependency;
import org.owasp.dependencycheck.dependency.Evidence;
import org.owasp.dependencycheck.dependency.Identifier;
import org.owasp.dependencycheck.dependency.Reference;
import org.owasp.dependencycheck.dependency.Vulnerability;
import org.owasp.dependencycheck.dependency.VulnerableSoftware;
import org.owasp.dependencycheck.reporting.ReportGenerator;
/**
* A utility class that encapsulates the report generation for dependency-check-maven.
*
* @author Jeremy Long <jeremy.long@owasp.org>
*/
final class ReportingUtil {
/**
* Logger field reference.
*/
private static final Logger LOGGER = Logger.getLogger(ReportingUtil.class.getName());
/**
* Empty private constructor for this utility class.
*/
private ReportingUtil() {
}
/**
* Generates the reports for a given dependency-check engine.
*
* @param engine a dependency-check engine
* @param outDirectory the directory to write the reports to
* @param projectName the name of the project that a report is being generated for
* @param format the format of the report to generate
*/
static void generateExternalReports(Engine engine, File outDirectory, String projectName, String format) {
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 r = new ReportGenerator(projectName, engine.getDependencies(), engine.getAnalyzers(), prop);
try {
r.generateReports(outDirectory.getCanonicalPath(), format);
} catch (IOException ex) {
LOGGER.log(Level.SEVERE,
"Unexpected exception occurred during analysis; please see the verbose error log for more details.");
LOGGER.log(Level.FINE, null, ex);
} catch (Throwable ex) {
LOGGER.log(Level.SEVERE,
"Unexpected exception occurred during analysis; please see the verbose error log for more details.");
LOGGER.log(Level.FINE, null, ex);
}
}
/**
* Generates a dependency-check report using the Maven Site format.
*
* @param engine the engine used to scan the dependencies
* @param sink the sink to write the data to
* @param projectName the name of the project
*/
static void generateMavenSiteReport(final Engine engine, Sink sink, String projectName) {
final List<Dependency> dependencies = engine.getDependencies();
writeSiteReportHeader(sink, projectName);
writeSiteReportTOC(sink, dependencies);
int cnt = 0;
for (Dependency d : dependencies) {
writeSiteReportDependencyHeader(sink, d);
cnt = writeSiteReportDependencyEvidenceUsed(d, cnt, sink);
cnt = writeSiteReportDependencyRelatedDependencies(d, cnt, sink);
writeSiteReportDependencyIdentifiers(d, sink);
writeSiteReportDependencyVulnerabilities(d, sink, cnt);
}
sink.body_();
}
// <editor-fold defaultstate="collapsed" desc="various writeXXXXX methods to generate the Site Report">
/**
* Writes the vulnerabilities to the site report.
*
* @param d the dependency
* @param sink the sink to write the data to
* @param collapsibleHeaderCount the collapsible header count
*/
private static void writeSiteReportDependencyVulnerabilities(Dependency d, Sink sink, int collapsibleHeaderCount) {
int cnt = collapsibleHeaderCount;
if (d.getVulnerabilities() != null && !d.getVulnerabilities().isEmpty()) {
for (Vulnerability v : d.getVulnerabilities()) {
sink.paragraph();
sink.bold();
try {
sink.link("http://web.nvd.nist.gov/view/vuln/detail?vulnId=" + URLEncoder.encode(v.getName(), "US-ASCII"));
sink.text(v.getName());
sink.link_();
sink.bold_();
} catch (UnsupportedEncodingException ex) {
sink.text(v.getName());
sink.bold_();
sink.lineBreak();
sink.text("http://web.nvd.nist.gov/view/vuln/detail?vulnId=" + v.getName());
}
sink.paragraph_();
sink.paragraph();
sink.text("Severity: ");
if (v.getCvssScore() < 4.0) {
sink.text("Low");
} else {
if (v.getCvssScore() >= 7.0) {
sink.text("High");
} else {
sink.text("Medium");
}
}
sink.lineBreak();
sink.text("CVSS Score: " + v.getCvssScore());
if (v.getCwe() != null && !v.getCwe().isEmpty()) {
sink.lineBreak();
sink.text("CWE: ");
sink.text(v.getCwe());
}
sink.paragraph_();
sink.paragraph();
sink.text(v.getDescription());
if (v.getReferences() != null && !v.getReferences().isEmpty()) {
sink.list();
for (Reference ref : v.getReferences()) {
sink.listItem();
sink.text(ref.getSource());
sink.text(" - ");
sink.link(ref.getUrl());
sink.text(ref.getName());
sink.link_();
sink.listItem_();
}
sink.list_();
}
sink.paragraph_();
if (v.getVulnerableSoftware() != null && !v.getVulnerableSoftware().isEmpty()) {
sink.paragraph();
cnt += 1;
sink.rawText("Vulnerable Software <a href=\"javascript:toggleElement(this, 'vulnSoft" + cnt + "')\">[-]</a>");
sink.rawText("<div id=\"vulnSoft" + cnt + "\" style=\"display:block\">");
sink.list();
for (VulnerableSoftware vs : v.getVulnerableSoftware()) {
sink.listItem();
try {
sink.link("http://web.nvd.nist.gov/view/vuln/search-results?cpe=" + URLEncoder.encode(vs.getName(), "US-ASCII"));
sink.text(vs.getName());
sink.link_();
if (vs.hasPreviousVersion()) {
sink.text(" and all previous versions.");
}
} catch (UnsupportedEncodingException ex) {
sink.text(vs.getName());
if (vs.hasPreviousVersion()) {
sink.text(" and all previous versions.");
}
sink.text(" (http://web.nvd.nist.gov/view/vuln/search-results?cpe=" + vs.getName() + ")");
}
sink.listItem_();
}
sink.list_();
sink.rawText("</div>");
sink.paragraph_();
}
}
}
}
/**
* Writes the identifiers to the site report.
*
* @param d the dependency
* @param sink the sink to write the data to
*/
private static void writeSiteReportDependencyIdentifiers(Dependency d, Sink sink) {
if (d.getIdentifiers() != null && !d.getIdentifiers().isEmpty()) {
sink.sectionTitle4();
sink.text("Identifiers");
sink.sectionTitle4_();
sink.list();
for (Identifier i : d.getIdentifiers()) {
sink.listItem();
sink.text(i.getType());
sink.text(": ");
if (i.getUrl() != null && i.getUrl().length() > 0) {
sink.link(i.getUrl());
sink.text(i.getValue());
sink.link_();
} else {
sink.text(i.getValue());
}
if (i.getDescription() != null && i.getDescription().length() > 0) {
sink.lineBreak();
sink.text(i.getDescription());
}
sink.listItem_();
}
sink.list_();
}
}
/**
* Writes the related dependencies to the site report.
*
* @param d the dependency
* @param sink the sink to write the data to
* @param collapsibleHeaderCount the collapsible header count
* @return the collapsible header count
*/
private static int writeSiteReportDependencyRelatedDependencies(Dependency d, int collapsibleHeaderCount, Sink sink) {
int cnt = collapsibleHeaderCount;
if (d.getRelatedDependencies() != null && !d.getRelatedDependencies().isEmpty()) {
cnt += 1;
sink.sectionTitle4();
sink.rawText("Related Dependencies <a href=\"javascript:toggleElement(this, 'related" + cnt + "')\">[+]</a>");
sink.sectionTitle4_();
sink.rawText("<div id=\"related" + cnt + "\" style=\"display:none\">");
sink.list();
for (Dependency r : d.getRelatedDependencies()) {
sink.listItem();
sink.text(r.getFileName());
sink.list();
writeListItem(sink, "File Path: " + r.getFilePath());
writeListItem(sink, "SHA1: " + r.getSha1sum());
writeListItem(sink, "MD5: " + r.getMd5sum());
sink.list_();
sink.listItem_();
}
sink.list_();
sink.rawText("</div>");
}
return cnt;
}
/**
* Writes the evidence used to the site report.
*
* @param d the dependency
* @param sink the sink to write the data to
* @param collapsibleHeaderCount the collapsible header count
* @return the collapsible header count
*/
private static int writeSiteReportDependencyEvidenceUsed(Dependency d, int collapsibleHeaderCount, Sink sink) {
int cnt = collapsibleHeaderCount;
final Set<Evidence> evidence = d.getEvidenceForDisplay();
if (evidence != null && evidence.size() > 0) {
cnt += 1;
sink.sectionTitle4();
sink.rawText("Evidence Collected <a href=\"javascript:toggleElement(this, 'evidence" + cnt + "')\">[+]</a>");
sink.sectionTitle4_();
sink.rawText("<div id=\"evidence" + cnt + "\" style=\"display:none\">");
sink.table();
sink.tableRow();
writeTableHeaderCell(sink, "Source");
writeTableHeaderCell(sink, "Name");
writeTableHeaderCell(sink, "Value");
sink.tableRow_();
for (Evidence e : evidence) {
sink.tableRow();
writeTableCell(sink, e.getSource());
writeTableCell(sink, e.getName());
writeTableCell(sink, e.getValue());
sink.tableRow_();
}
sink.table_();
sink.rawText("</div>");
}
return cnt;
}
/**
* Writes the dependency header to the site report.
*
* @param d the dependency
* @param sink the sink to write the data to
*/
private static void writeSiteReportDependencyHeader(Sink sink, Dependency d) {
sink.sectionTitle2();
sink.anchor("sha1" + d.getSha1sum());
sink.text(d.getFileName());
sink.anchor_();
sink.sectionTitle2_();
if (d.getDescription() != null && d.getDescription().length() > 0) {
sink.paragraph();
sink.bold();
sink.text("Description: ");
sink.bold_();
sink.text(d.getDescription());
sink.paragraph_();
}
if (d.getLicense() != null && d.getLicense().length() > 0) {
sink.paragraph();
sink.bold();
sink.text("License: ");
sink.bold_();
if (d.getLicense().startsWith("http://") && !d.getLicense().contains(" ")) {
sink.link(d.getLicense());
sink.text(d.getLicense());
sink.link_();
} else {
sink.text(d.getLicense());
}
sink.paragraph_();
}
}
/**
* Adds a list item to the site report.
*
* @param sink the sink to write the data to
* @param text the text to write
*/
private static void writeListItem(Sink sink, String text) {
sink.listItem();
sink.text(text);
sink.listItem_();
}
/**
* Adds a table cell to the site report.
*
* @param sink the sink to write the data to
* @param text the text to write
*/
private static void writeTableCell(Sink sink, String text) {
sink.tableCell();
sink.text(text);
sink.tableCell_();
}
/**
* Adds a table header cell to the site report.
*
* @param sink the sink to write the data to
* @param text the text to write
*/
private static void writeTableHeaderCell(Sink sink, String text) {
sink.tableHeaderCell();
sink.text(text);
sink.tableHeaderCell_();
}
/**
* Writes the TOC for the site report.
*
* @param sink the sink to write the data to
* @param dependencies the dependencies that are being reported on
*/
private static void writeSiteReportTOC(Sink sink, final List<Dependency> dependencies) {
sink.list();
for (Dependency d : dependencies) {
sink.listItem();
sink.link("#sha1" + d.getSha1sum());
sink.text(d.getFileName());
sink.link_();
if (!d.getVulnerabilities().isEmpty()) {
sink.rawText(" <font style=\"color:red\">•</font>");
}
if (!d.getRelatedDependencies().isEmpty()) {
sink.list();
for (Dependency r : d.getRelatedDependencies()) {
writeListItem(sink, r.getFileName());
}
sink.list_();
}
sink.listItem_();
}
sink.list_();
}
/**
* Writes the site report header.
*
* @param sink the sink to write the data to
* @param projectName the name of the project
*/
private static void writeSiteReportHeader(Sink sink, String projectName) {
sink.head();
sink.title();
sink.text("Dependency-Check Report: " + projectName);
sink.title_();
sink.head_();
sink.body();
sink.rawText("<script type=\"text/javascript\">");
sink.rawText("function toggleElement(el, targetId) {");
sink.rawText("if (el.innerText == '[+]') {");
sink.rawText(" el.innerText = '[-]';");
sink.rawText(" document.getElementById(targetId).style.display='block';");
sink.rawText("} else {");
sink.rawText(" el.innerText = '[+]';");
sink.rawText(" document.getElementById(targetId).style.display='none';");
sink.rawText("}");
sink.rawText("}");
sink.rawText("</script>");
sink.section1();
sink.sectionTitle1();
sink.text("Project: " + projectName);
sink.sectionTitle1_();
sink.date();
final Date now = new Date();
sink.text(DateFormat.getDateTimeInstance().format(now));
sink.date_();
sink.section1_();
}
// </editor-fold>
}

View File

@@ -4,8 +4,8 @@ The following properties can be set on the dependency-check-maven plugin.
Property | Description | Default Value
---------------------|------------------------------------|------------------
aggregate | Sets whether report aggregation will be performed for multi-module site reports. This option only affects the report generation when configured within the reporting section. | false
autoUpdate | Sets whether auto-updating of the NVD CVE/CPE data is enabled. It is not recommended that this be turned to false. | true
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
format | 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. | HTML
@@ -23,38 +23,44 @@ Note, that specific analyzers will automatically disable themselves if no file
types that they support are detected - so specifically disabling them may not
be needed.
Property | Description | Default Value
------------------------|------------------------------------|------------------
archiveAnalyzerEnabled | Sets whether the Archive Analyzer will be used. | true
Property | Description | Default Value
------------------------|---------------------------------------------------------------------------|------------------
archiveAnalyzerEnabled | Sets whether the Archive Analyzer will be used. | true
zipExtensions | A comma-separated list of additional file extensions to be treated like a ZIP file, the contents will be extracted and analyzed. | &nbsp;
jarAnalyzer | Sets whether Jar Analyzer will be used. | true
nexusAnalyzerEnabled | Sets whether Nexus Analyzer will be used. | true
nexusUrl | Defines the Nexus URL. | https://repository.sonatype.org/service/local/
jarAnalyzer | Sets whether Jar Analyzer will be used. | true
nexusAnalyzerEnabled | Sets whether Nexus Analyzer will be used. | true
nexusUrl | Defines the Nexus Pro Server URL. 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
pathToMono | The path to Mono for .NET assembly analysis on non-windows systems | &nbsp;
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
pathToMono | The path to Mono for .NET assembly analysis on non-windows systems. | &nbsp;
Advanced Configuration
====================
The following properties can be configured in the plugin. However, they are less frequently changed. One exception
may be the cvedUrl properties, which can be used to host a mirror of the NVD within an enterprise environment.
Property | Description | Default Value
---------------------|-------------------------------------------------------------------------|------------------
cveUrl12Modified | URL for the modified CVE 1.2 | http://nvd.nist.gov/download/nvdcve-modified.xml
cveUrl20Modified | URL for the modified CVE 2.0 | http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-modified.xml
cveUrl12Base | Base URL for each year's CVE 1.2, the %d will be replaced with the year | http://nvd.nist.gov/download/nvdcve-%d.xml
cveUrl20Base | Base URL for each year's CVE 2.0, the %d will be replaced with the year | http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-%d.xml
connectionTimeout | The URL Connection Timeout. | &nbsp;
dataDirectory | Data directory to hold SQL CVEs contents. This should generally not be changed. | &nbsp;
Property | Description | Default Value
---------------------|--------------------------------------------------------------------------|------------------
cveUrl12Modified | URL for the modified CVE 1.2. | http://nvd.nist.gov/download/nvdcve-modified.xml
cveUrl20Modified | URL for the modified CVE 2.0. | http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-modified.xml
cveUrl12Base | Base URL for each year's CVE 1.2, the %d will be replaced with the year. | http://nvd.nist.gov/download/nvdcve-%d.xml
cveUrl20Base | Base URL for each year's CVE 2.0, the %d will be replaced with the year. | http://static.nvd.nist.gov/feeds/xml/cve/nvdcve-2.0-%d.xml
connectionTimeout | Sets the URL Connection Timeout used when downloading external data. | &nbsp;
dataDirectory | Sets the data directory to hold SQL CVEs contents. This should generally not be changed. | &nbsp;
databaseDriverName | The name of the database driver. Example: org.h2.Driver. | &nbsp;
databaseDriverPath | The path to the database driver JAR file; only used if the driver is not in the class path. | &nbsp;
connectionString | The connection string used to connect to the database. | &nbsp;
databaseUser | The username used when connecting to the database. | &nbsp;
databasePassword | The password used when connecting to the database. | &nbsp;
metaFileName | Sets the name of the file to use for storing the metadata about the project. | dependency-check.ser
Proxy Configuration
====================
Use [Maven's settings](https://maven.apache.org/settings.html#Proxies) to configure a proxy server.
Use [Maven's settings](https://maven.apache.org/settings.html#Proxies) to configure a proxy server. If multiple proxies
are configured in the Maven settings file you must tell dependency-check which proxy to use with the following property:
Property | Description | Default Value
---------------------|--------------------------------------------------------------------------------------|------------------
mavenSettingsProxyId | The id for the proxy, configured via settings.xml, that dependency-check should use. | &nbsp;

View File

@@ -17,7 +17,9 @@ Create the DependencyCheck-report.html in the target directory
```xml
<project>
...
<build>
...
<plugins>
...
<plugin>
@@ -41,11 +43,48 @@ Create the DependencyCheck-report.html in the target directory
```
$H$H$H Example 2:
Create an aggregated dependency-check report within the site
```xml
<project>
...
<reporting>
...
<plugins>
...
<plugin>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>${project.version}</version>
<configuration>
<aggregate>true</aggregate>
</configuration>
<reportSets>
<reportSet>
<reports>
<report>check</report>
</reports>
</reportSet>
</reportSets>
</plugin>
</plugin>
...
</plugins>
...
</reporting>
...
</project>
```
$H$H$H Example 3:
Create the DependencyCheck-report.html and fail the build for CVSS greater then 8
```xml
<project>
...
<build>
...
<plugins>
...
<plugin>
@@ -71,44 +110,14 @@ Create the DependencyCheck-report.html and fail the build for CVSS greater then
</project>
```
$H$H$H Example 3:
Create the dependency-check report within the site
```xml
<project>
<build>
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<configuration>
<reportPlugins>
<plugin>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-maven</artifactId>
<version>${project.version}</version>
<configuration>
<externalReport>false</externalReport>
</configuration>
</plugin>
</reportPlugins>
</configuration>
</plugin>
...
</plugins>
...
</build>
...
</project>
```
$H$H$H Example 4:
Create the DependencyCheck-report.html and skip artifacts no bundled in distribution (Provided and Runtime scope)
Create the DependencyCheck-report.html and skip artifacts not bundled in distribution (Provided and Runtime scope)
```xml
<project>
...
<build>
...
<plugins>
...
<plugin>
@@ -140,7 +149,9 @@ Create the DependencyCheck-report.html and use internal mirroring of CVE content
```xml
<project>
...
<build>
...
<plugins>
...
<plugin>

View File

@@ -21,18 +21,18 @@ Copyright (c) 2014 - Jeremy Long. All Rights Reserved.
<parent>
<groupId>org.owasp</groupId>
<artifactId>dependency-check-parent</artifactId>
<version>1.2.2</version>
<version>1.2.7</version>
</parent>
<artifactId>dependency-check-utils</artifactId>
<name>Dependency-Check Utils</name>
<description>Dependency-check-utils a collection of common utlity classes used within dependency-check.</description>
<description>dependency-check-utils is a collection of common utlity classes used within dependency-check that might be useful in other projects.</description>
<!-- begin copy from http://minds.coremedia.com/2012/09/11/problem-solved-deploy-multi-module-maven-project-site-as-github-pages/ -->
<distributionManagement>
<site>
<id>github-pages-site</id>
<name>Deployment through GitHub's site deployment plugin</name>
<url>${basedir}/../target/site/${project.version}/dependency-check-ant</url>
<url>${basedir}/../target/site/${project.version}/dependency-check-utils</url>
</site>
</distributionManagement>
<!-- end copy -->
@@ -158,6 +158,9 @@ Copyright (c) 2014 - Jeremy Long. All Rights Reserved.
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.9.1</version>
<configuration>
<bottom>Copyright© 2012-14 Jeremy Long. All Rights Reserved.</bottom>
</configuration>
<reportSets>
<reportSet>
<id>default</id>
@@ -246,6 +249,9 @@ Copyright (c) 2014 - Jeremy Long. All Rights Reserved.
<targetJdk>1.6</targetJdk>
<linkXref>true</linkXref>
<sourceEncoding>utf-8</sourceEncoding>
<excludes>
<exclude>**/org/owasp/dependencycheck/org/apache/**/*.java</exclude>
</excludes>
<rulesets>
<ruleset>../src/main/config/dcrules.xml</ruleset>
<ruleset>/rulesets/java/basic.xml</ruleset>
@@ -258,6 +264,9 @@ Copyright (c) 2014 - Jeremy Long. All Rights Reserved.
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
<version>2.5.3</version>
<configuration>
<onlyAnalyze>org.owasp.dependencycheck.utils.*</onlyAnalyze>
</configuration>
</plugin>
</reportPlugins>
</configuration>

View File

@@ -0,0 +1,153 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.owasp.dependencycheck.org.apache.tools.ant;
/**
* Signals an error condition during a build
*/
public class BuildException extends RuntimeException {
private static final long serialVersionUID = -5419014565354664240L;
/** Location in the build file where the exception occurred */
private Location location = Location.UNKNOWN_LOCATION;
/**
* Constructs a build exception with no descriptive information.
*/
public BuildException() {
super();
}
/**
* Constructs an exception with the given descriptive message.
*
* @param message A description of or information about the exception.
* Should not be <code>null</code>.
*/
public BuildException(String message) {
super(message);
}
/**
* Constructs an exception with the given message and exception as
* a root cause.
*
* @param message A description of or information about the exception.
* Should not be <code>null</code> unless a cause is specified.
* @param cause The exception that might have caused this one.
* May be <code>null</code>.
*/
public BuildException(String message, Throwable cause) {
super(message, cause);
}
/**
* Constructs an exception with the given message and exception as
* a root cause and a location in a file.
*
* @param msg A description of or information about the exception.
* Should not be <code>null</code> unless a cause is specified.
* @param cause The exception that might have caused this one.
* May be <code>null</code>.
* @param location The location in the project file where the error
* occurred. Must not be <code>null</code>.
*/
public BuildException(String msg, Throwable cause, Location location) {
this(msg, cause);
this.location = location;
}
/**
* Constructs an exception with the given exception as a root cause.
*
* @param cause The exception that might have caused this one.
* Should not be <code>null</code>.
*/
public BuildException(Throwable cause) {
super(cause);
}
/**
* Constructs an exception with the given descriptive message and a
* location in a file.
*
* @param message A description of or information about the exception.
* Should not be <code>null</code>.
* @param location The location in the project file where the error
* occurred. Must not be <code>null</code>.
*/
public BuildException(String message, Location location) {
super(message);
this.location = location;
}
/**
* Constructs an exception with the given exception as
* a root cause and a location in a file.
*
* @param cause The exception that might have caused this one.
* Should not be <code>null</code>.
* @param location The location in the project file where the error
* occurred. Must not be <code>null</code>.
*/
public BuildException(Throwable cause, Location location) {
this(cause);
this.location = location;
}
/**
* Returns the nested exception, if any.
*
* @return the nested exception, or <code>null</code> if no
* exception is associated with this one
* @deprecated Use {@link #getCause} instead.
*/
public Throwable getException() {
return getCause();
}
/**
* Returns the location of the error and the error message.
*
* @return the location of the error and the error message
*/
public String toString() {
return location.toString() + getMessage();
}
/**
* Sets the file location where the error occurred.
*
* @param location The file location where the error occurred.
* Must not be <code>null</code>.
*/
public void setLocation(Location location) {
this.location = location;
}
/**
* Returns the file location where the error occurred.
*
* @return the file location where the error occurred.
*/
public Location getLocation() {
return location;
}
}

View File

@@ -0,0 +1,158 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.owasp.dependencycheck.org.apache.tools.ant;
import java.io.File;
/**
* An interface used to describe the actions required of any type of
* directory scanner.
*
*/
public interface FileScanner {
/**
* Adds default exclusions to the current exclusions set.
*/
void addDefaultExcludes();
/**
* Returns the base directory to be scanned.
* This is the directory which is scanned recursively.
*
* @return the base directory to be scanned
*/
File getBasedir();
/**
* Returns the names of the directories which matched at least one of the
* include patterns and at least one of the exclude patterns.
* The names are relative to the base directory.
*
* @return the names of the directories which matched at least one of the
* include patterns and at least one of the exclude patterns.
*/
String[] getExcludedDirectories();
/**
* Returns the names of the files which matched at least one of the
* include patterns and at least one of the exclude patterns.
* The names are relative to the base directory.
*
* @return the names of the files which matched at least one of the
* include patterns and at least one of the exclude patterns.
*
*/
String[] getExcludedFiles();
/**
* Returns the names of the directories which matched at least one of the
* include patterns and none of the exclude patterns.
* The names are relative to the base directory.
*
* @return the names of the directories which matched at least one of the
* include patterns and none of the exclude patterns.
*/
String[] getIncludedDirectories();
/**
* Returns the names of the files which matched at least one of the
* include patterns and none of the exclude patterns.
* The names are relative to the base directory.
*
* @return the names of the files which matched at least one of the
* include patterns and none of the exclude patterns.
*/
String[] getIncludedFiles();
/**
* Returns the names of the directories which matched none of the include
* patterns. The names are relative to the base directory.
*
* @return the names of the directories which matched none of the include
* patterns.
*/
String[] getNotIncludedDirectories();
/**
* Returns the names of the files which matched none of the include
* patterns. The names are relative to the base directory.
*
* @return the names of the files which matched none of the include
* patterns.
*/
String[] getNotIncludedFiles();
/**
* Scans the base directory for files which match at least one include
* pattern and don't match any exclude patterns.
*
* @exception IllegalStateException if the base directory was set
* incorrectly (i.e. if it is <code>null</code>, doesn't exist,
* or isn't a directory).
*/
void scan() throws IllegalStateException;
/**
* Sets the base directory to be scanned. This is the directory which is
* scanned recursively. All '/' and '\' characters should be replaced by
* <code>File.separatorChar</code>, so the separator used need not match
* <code>File.separatorChar</code>.
*
* @param basedir The base directory to scan.
* Must not be <code>null</code>.
*/
void setBasedir(String basedir);
/**
* Sets the base directory to be scanned. This is the directory which is
* scanned recursively.
*
* @param basedir The base directory for scanning.
* Should not be <code>null</code>.
*/
void setBasedir(File basedir);
/**
* Sets the list of exclude patterns to use.
*
* @param excludes A list of exclude patterns.
* May be <code>null</code>, indicating that no files
* should be excluded. If a non-<code>null</code> list is
* given, all elements must be non-<code>null</code>.
*/
void setExcludes(String[] excludes);
/**
* Sets the list of include patterns to use.
*
* @param includes A list of include patterns.
* May be <code>null</code>, indicating that all files
* should be included. If a non-<code>null</code>
* list is given, all elements must be
* non-<code>null</code>.
*/
void setIncludes(String[] includes);
/**
* Sets whether or not the file system should be regarded as case sensitive.
*
* @param isCaseSensitive whether or not the file system should be
* regarded as a case sensitive one
*/
void setCaseSensitive(boolean isCaseSensitive);
}

View File

@@ -0,0 +1,178 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.owasp.dependencycheck.org.apache.tools.ant;
import java.io.Serializable;
import org.owasp.dependencycheck.org.apache.tools.ant.util.FileUtils;
import org.xml.sax.Locator;
/**
* Stores the location of a piece of text within a file (file name,
* line number and column number). Note that the column number is
* currently ignored.
*
*/
public class Location implements Serializable {
private static final long serialVersionUID = 1L;
/** Name of the file. */
private final String fileName;
/** Line number within the file. */
private final int lineNumber;
/** Column number within the file. */
private final int columnNumber;
/** Location to use when one is needed but no information is available */
public static final Location UNKNOWN_LOCATION = new Location();
private static final FileUtils FILE_UTILS = FileUtils.getFileUtils();
/**
* Creates an "unknown" location.
*/
private Location() {
this(null, 0, 0);
}
/**
* Creates a location consisting of a file name but no line number or
* column number.
*
* @param fileName The name of the file. May be <code>null</code>,
* in which case the location is equivalent to
* {@link #UNKNOWN_LOCATION UNKNOWN_LOCATION}.
*/
public Location(String fileName) {
this(fileName, 0, 0);
}
/**
* Creates a location from the SAX locator using the system ID as
* the filename.
*
* @param loc Must not be <code>null</code>.
*
* @since Ant 1.6
*/
public Location(Locator loc) {
this(loc.getSystemId(), loc.getLineNumber(), loc.getColumnNumber());
}
/**
* Creates a location consisting of a file name, line number and
* column number.
*
* @param fileName The name of the file. May be <code>null</code>,
* in which case the location is equivalent to
* {@link #UNKNOWN_LOCATION UNKNOWN_LOCATION}.
*
* @param lineNumber Line number within the file. Use 0 for unknown
* positions within a file.
* @param columnNumber Column number within the line.
*/
public Location(String fileName, int lineNumber, int columnNumber) {
if (fileName != null && fileName.startsWith("file:")) {
this.fileName = FILE_UTILS.fromURI(fileName);
} else {
this.fileName = fileName;
}
this.lineNumber = lineNumber;
this.columnNumber = columnNumber;
}
/**
* @return the filename portion of the location
* @since Ant 1.6
*/
public String getFileName() {
return fileName;
}
/**
* @return the line number
* @since Ant 1.6
*/
public int getLineNumber() {
return lineNumber;
}
/**
* @return the column number
* @since Ant 1.7
*/
public int getColumnNumber() {
return columnNumber;
}
/**
* Returns the file name, line number, a colon and a trailing space.
* An error message can be appended easily. For unknown locations, an
* empty string is returned.
*
* @return a String of the form <code>"fileName:lineNumber: "</code>
* if both file name and line number are known,
* <code>"fileName: "</code> if only the file name is known,
* and the empty string for unknown locations.
*/
public String toString() {
StringBuffer buf = new StringBuffer();
if (fileName != null) {
buf.append(fileName);
if (lineNumber != 0) {
buf.append(":");
buf.append(lineNumber);
}
buf.append(": ");
}
return buf.toString();
}
/**
* Equality operation.
* @param other the object to compare to.
* @return true if the other object contains the same information
* as this object.
* @since Ant 1.6.3
*/
public boolean equals(Object other) {
if (this == other) {
return true;
}
if (other == null) {
return false;
}
if (!(other.getClass() == getClass())) {
return false;
}
return toString().equals(other.toString());
}
/**
* Hash operation.
* @return a hash code value for this location.
* @since Ant 1.6.3
*/
public int hashCode() {
return toString().hashCode();
}
}

View File

@@ -0,0 +1,165 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.owasp.dependencycheck.org.apache.tools.ant;
import java.io.File;
import java.util.NoSuchElementException;
import java.util.StringTokenizer;
import org.owasp.dependencycheck.org.apache.tools.ant.taskdefs.condition.Os;
/**
* A Path tokenizer takes a path and returns the components that make up
* that path.
*
* The path can use path separators of either ':' or ';' and file separators
* of either '/' or '\'.
*
*/
public class PathTokenizer {
/**
* A tokenizer to break the string up based on the ':' or ';' separators.
*/
private StringTokenizer tokenizer;
/**
* A String which stores any path components which have been read ahead
* due to DOS filesystem compensation.
*/
private String lookahead = null;
/**
* A boolean that determines if we are running on Novell NetWare, which
* exhibits slightly different path name characteristics (multi-character
* volume / drive names)
*/
private boolean onNetWare = Os.isFamily("netware");
/**
* Flag to indicate whether or not we are running on a platform with a
* DOS style filesystem
*/
private boolean dosStyleFilesystem;
/**
* Constructs a path tokenizer for the specified path.
*
* @param path The path to tokenize. Must not be <code>null</code>.
*/
public PathTokenizer(String path) {
if (onNetWare) {
// For NetWare, use the boolean=true mode, so we can use delimiter
// information to make a better decision later.
tokenizer = new StringTokenizer(path, ":;", true);
} else {
// on Windows and Unix, we can ignore delimiters and still have
// enough information to tokenize correctly.
tokenizer = new StringTokenizer(path, ":;", false);
}
dosStyleFilesystem = File.pathSeparatorChar == ';';
}
/**
* Tests if there are more path elements available from this tokenizer's
* path. If this method returns <code>true</code>, then a subsequent call
* to nextToken will successfully return a token.
*
* @return <code>true</code> if and only if there is at least one token
* in the string after the current position; <code>false</code> otherwise.
*/
public boolean hasMoreTokens() {
if (lookahead != null) {
return true;
}
return tokenizer.hasMoreTokens();
}
/**
* Returns the next path element from this tokenizer.
*
* @return the next path element from this tokenizer.
*
* @exception NoSuchElementException if there are no more elements in this
* tokenizer's path.
*/
public String nextToken() throws NoSuchElementException {
String token = null;
if (lookahead != null) {
token = lookahead;
lookahead = null;
} else {
token = tokenizer.nextToken().trim();
}
if (!onNetWare) {
if (token.length() == 1 && Character.isLetter(token.charAt(0))
&& dosStyleFilesystem
&& tokenizer.hasMoreTokens()) {
// we are on a dos style system so this path could be a drive
// spec. We look at the next token
String nextToken = tokenizer.nextToken().trim();
if (nextToken.startsWith("\\") || nextToken.startsWith("/")) {
// we know we are on a DOS style platform and the next path
// starts with a slash or backslash, so we know this is a
// drive spec
token += ":" + nextToken;
} else {
// store the token just read for next time
lookahead = nextToken;
}
}
} else {
// we are on NetWare, tokenizing is handled a little differently,
// due to the fact that NetWare has multiple-character volume names.
if (token.equals(File.pathSeparator) || token.equals(":")) {
// ignore ";" and get the next token
token = tokenizer.nextToken().trim();
}
if (tokenizer.hasMoreTokens()) {
// this path could be a drive spec, so look at the next token
String nextToken = tokenizer.nextToken().trim();
// make sure we aren't going to get the path separator next
if (!nextToken.equals(File.pathSeparator)) {
if (nextToken.equals(":")) {
if (!token.startsWith("/") && !token.startsWith("\\")
&& !token.startsWith(".")
&& !token.startsWith("..")) {
// it indeed is a drive spec, get the next bit
String oneMore = tokenizer.nextToken().trim();
if (!oneMore.equals(File.pathSeparator)) {
token += ":" + oneMore;
} else {
token += ":";
lookahead = oneMore;
}
}
// implicit else: ignore the ':' since we have either a
// UNIX or a relative path
} else {
// store the token just read for next time
lookahead = nextToken;
}
}
}
}
return token;
}
}

View File

@@ -0,0 +1,161 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.owasp.dependencycheck.org.apache.tools.ant;
/**
* Base class for components of a project, including tasks and data types. Provides common facilities.
*
*/
public abstract class ProjectComponent implements Cloneable {
// // CheckStyle:VisibilityModifier OFF - bc
// /**
// * Project object of this component.
// * @deprecated since 1.6.x.
// * You should not be directly accessing this variable directly.
// * You should access project object via the getProject()
// * or setProject() accessor/mutators.
// */
// protected Project project;
/**
* Location within the build file of this task definition.
*
* @deprecated since 1.6.x. You should not be accessing this variable directly. Please use the
* {@link #getLocation()} method.
*/
protected Location location = Location.UNKNOWN_LOCATION;
/**
* Description of this component, if any.
*
* @deprecated since 1.6.x. You should not be accessing this variable directly.
*/
protected String description;
// CheckStyle:VisibilityModifier ON
/**
* Sole constructor.
*/
public ProjectComponent() {
}
// /**
// * Sets the project object of this component. This method is used by
// * Project when a component is added to it so that the component has
// * access to the functions of the project. It should not be used
// * for any other purpose.
// *
// * @param project Project in whose scope this component belongs.
// * Must not be <code>null</code>.
// */
// public void setProject(Project project) {
// this.project = project;
// }
//
// /**
// * Returns the project to which this component belongs.
// *
// * @return the components's project.
// */
// public Project getProject() {
// return project;
// }
/**
* Returns the file/location where this task was defined.
*
* @return the file/location where this task was defined. Should not return <code>null</code>.
* Location.UNKNOWN_LOCATION is used for unknown locations.
*
* @see Location#UNKNOWN_LOCATION
*/
public Location getLocation() {
return location;
}
/**
* Sets the file/location where this task was defined.
*
* @param location The file/location where this task was defined. Should not be <code>null</code>--use
* Location.UNKNOWN_LOCATION if the location isn't known.
*
* @see Location#UNKNOWN_LOCATION
*/
public void setLocation(Location location) {
this.location = location;
}
/**
* Sets a description of the current action. This may be used for logging purposes.
*
* @param desc Description of the current action. May be <code>null</code>, indicating that no description is
* available.
*
*/
public void setDescription(String desc) {
description = desc;
}
/**
* Returns the description of the current action.
*
* @return the description of the current action, or <code>null</code> if no description is available.
*/
public String getDescription() {
return description;
}
/**
* Logs a message with the default (INFO) priority.
*
* @param msg The message to be logged. Should not be <code>null</code>.
*/
public void log(String msg) {
// log(msg, Project.MSG_INFO);
}
/**
* Logs a message with the given priority.
*
* @param msg The message to be logged. Should not be <code>null</code>.
* @param msgLevel the message priority at which this message is to be logged.
*/
public void log(String msg, int msgLevel) {
// if (getProject() != null) {
// getProject().log(msg, msgLevel);
// } else {
// // 'reasonable' default, if the component is used without
// // a Project ( for example as a standalone Bean ).
// // Most ant components can be used this way.
// if (msgLevel <= Project.MSG_INFO) {
// System.err.println(msg);
// }
// }
}
/**
* @since Ant 1.7
* @return a shallow copy of this projectcomponent.
* @throws CloneNotSupportedException does not happen, but is declared to allow subclasses to do so.
*/
public Object clone() throws CloneNotSupportedException {
ProjectComponent pc = (ProjectComponent) super.clone();
pc.setLocation(getLocation());
//pc.setProject(getProject());
return pc;
}
}

View File

@@ -0,0 +1,530 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*/
package org.owasp.dependencycheck.org.apache.tools.ant.launch;
import java.net.MalformedURLException;
import java.net.URL;
import java.io.File;
import java.io.FilenameFilter;
import java.io.ByteArrayOutputStream;
import java.io.UnsupportedEncodingException;
import java.text.CharacterIterator;
import java.text.StringCharacterIterator;
import java.util.Locale;
import org.owasp.dependencycheck.org.apache.tools.ant.util.FileUtils;
// CheckStyle:LineLengthCheck OFF - urls are long!
/**
* The Locator is a utility class which is used to find certain items
* in the environment.
*
* It is used at boot time in the launcher, and cannot make use of any of Ant's other classes.
*
* This is a surprisingly brittle piece of code, and has had lots of bugs filed against it.
* {@link <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=42275">running ant off a network share can cause Ant to fail</a>}
* {@link <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=8031">use File.toURI().toURL().toExternalForm()</a>}
* {@link <a href="http://issues.apache.org/bugzilla/show_bug.cgi?id=42222">Locator implementation not encoding URI strings properly: spaces in paths</a>}
* It also breaks Eclipse 3.3 Betas
* {@link <a href="https://bugs.eclipse.org/bugs/show_bug.cgi?id=183283">Exception if installation path has spaces</a>}
*
* Be very careful when making changes to this class, as a break will upset a lot of people.
* @since Ant 1.6
*/
// CheckStyle:LineLengthCheck ON - urls are long!
public final class Locator {
private static final int NIBBLE = 4;
private static final int NIBBLE_MASK = 0xF;
private static final int ASCII_SIZE = 128;
private static final int BYTE_SIZE = 256;
private static final int WORD = 16;
private static final int SPACE = 0x20;
private static final int DEL = 0x7F;
/**
* encoding used to represent URIs
*/
public static final String URI_ENCODING = "UTF-8";
// stolen from org.apache.xerces.impl.XMLEntityManager#getUserDir()
// of the Xerces-J team
// which ASCII characters need to be escaped
private static boolean[] gNeedEscaping = new boolean[ASCII_SIZE];
// the first hex character if a character needs to be escaped
private static char[] gAfterEscaping1 = new char[ASCII_SIZE];
// the second hex character if a character needs to be escaped
private static char[] gAfterEscaping2 = new char[ASCII_SIZE];
private static char[] gHexChs = {'0', '1', '2', '3', '4', '5', '6', '7',
'8', '9', 'A', 'B', 'C', 'D', 'E', 'F'};
/** Error string used when an invalid uri is seen */
public static final String ERROR_NOT_FILE_URI
= "Can only handle valid file: URIs, not ";
// initialize the above 3 arrays
static {
for (int i = 0; i < SPACE; i++) {
gNeedEscaping[i] = true;
gAfterEscaping1[i] = gHexChs[i >> NIBBLE];
gAfterEscaping2[i] = gHexChs[i & NIBBLE_MASK];
}
gNeedEscaping[DEL] = true;
gAfterEscaping1[DEL] = '7';
gAfterEscaping2[DEL] = 'F';
char[] escChs = {' ', '<', '>', '#', '%', '"', '{', '}',
'|', '\\', '^', '~', '[', ']', '`'};
int len = escChs.length;
char ch;
for (int i = 0; i < len; i++) {
ch = escChs[i];
gNeedEscaping[ch] = true;
gAfterEscaping1[ch] = gHexChs[ch >> NIBBLE];
gAfterEscaping2[ch] = gHexChs[ch & NIBBLE_MASK];
}
}
/**
* Not instantiable
*/
private Locator() {
}
/**
* Find the directory or jar file the class has been loaded from.
*
* @param c the class whose location is required.
* @return the file or jar with the class or null if we cannot
* determine the location.
*
* @since Ant 1.6
*/
public static File getClassSource(Class<?> c) {
String classResource = c.getName().replace('.', '/') + ".class";
return getResourceSource(c.getClassLoader(), classResource);
}
/**
* Find the directory or jar a given resource has been loaded from.
*
* @param c the classloader to be consulted for the source.
* @param resource the resource whose location is required.
*
* @return the file with the resource source or null if
* we cannot determine the location.
*
* @since Ant 1.6
*/
public static File getResourceSource(ClassLoader c, String resource) {
if (c == null) {
c = Locator.class.getClassLoader();
}
URL url = null;
if (c == null) {
url = ClassLoader.getSystemResource(resource);
} else {
url = c.getResource(resource);
}
if (url != null) {
String u = url.toString();
try {
if (u.startsWith("jar:file:")) {
return new File(fromJarURI(u));
} else if (u.startsWith("file:")) {
int tail = u.indexOf(resource);
String dirName = u.substring(0, tail);
return new File(fromURI(dirName));
}
} catch (IllegalArgumentException e) {
//unable to determine the URI for reasons unknown.
return null;
}
}
return null;
}
/**
* Constructs a file path from a <code>file:</code> URI.
*
* <p>Will be an absolute path if the given URI is absolute.</p>
*
* <p>Prior to Java 1.4,<!-- TODO is JDK version actually relevant? -->
* swallows '%' that are not followed by two characters.</p>
*
* See <a href="http://www.w3.org/TR/xml11/#dt-sysid">dt-sysid</a>
* which makes some mention of how
* characters not supported by URI Reference syntax should be escaped.
*
* @param uri the URI designating a file in the local filesystem.
* @return the local file system path for the file.
* @throws IllegalArgumentException if the URI is malformed or not a legal file: URL
* @since Ant 1.6
*/
public static String fromURI(String uri) {
return fromURIJava13(uri);
// #buzilla8031: first try Java 1.4.
// TODO should use java.net.URI now that we can rely on 1.4...
// but check for UNC-related regressions, e.g. #42275
// (and remember that \\server\share\file -> file:////server/share/file
// rather than -> file://server/share/file as it should;
// fixed only in JDK 7's java.nio.file.Path.toUri)
// return fromUriJava14(uri);
}
/**
* Java1.4+ code to extract the path from the URI.
* @param uri
* @return null if a conversion was not possible
*/
/* currently unused:
private static String fromUriJava14(String uri) {
// Also check for properly formed URIs. Ant formerly recommended using
// nonsense URIs such as "file:./foo.xml" in XML includes. You shouldn't
// do that (just "foo.xml" is correct) but for compatibility we special-case
// things when the path is not absolute, and fall back to the old parsing behavior.
if (uri.startsWith("file:/")) {
try {
File f = new File(URI.create(encodeURI(uri)));
//bug #42227 forgot to decode before returning
return decodeUri(f.getAbsolutePath());
} catch (IllegalArgumentException e) {
// Bad URI, pass this on.
// no, this is downgraded to a warning after various
// JRE bugs surfaced. Hand off
// to our built in code on a failure
//throw new IllegalArgumentException(
// "Bad URI " + uri + ":" + e.getMessage(), e);
e.printStackTrace();
} catch (Exception e) {
// Unexpected exception? Should not happen.
e.printStackTrace();
}
}
return null;
}
*/
/**
* @param uri uri to expand
* @return the decoded URI
* @since Ant1.7.1
*/
private static String fromURIJava13(String uri) {
// Fallback method for Java 1.3 or earlier.
URL url = null;
try {
url = new URL(uri);
} catch (MalformedURLException emYouEarlEx) {
// Ignore malformed exception
}
if (url == null || !("file".equals(url.getProtocol()))) {
throw new IllegalArgumentException(ERROR_NOT_FILE_URI + uri);
}
StringBuffer buf = new StringBuffer(url.getHost());
if (buf.length() > 0) {
buf.insert(0, File.separatorChar).insert(0, File.separatorChar);
}
String file = url.getFile();
int queryPos = file.indexOf('?');
buf.append((queryPos < 0) ? file : file.substring(0, queryPos));
uri = buf.toString().replace('/', File.separatorChar);
if (File.pathSeparatorChar == ';' && uri.startsWith("\\") && uri.length() > 2
&& Character.isLetter(uri.charAt(1)) && uri.lastIndexOf(':') > -1) {
uri = uri.substring(1);
}
String path = null;
try {
path = decodeUri(uri);
//consider adding the current directory. This is not done when
//the path is a UNC name
String cwd = System.getProperty("user.dir");
int posi = cwd.indexOf(':');
boolean pathStartsWithFileSeparator = path.startsWith(File.separator);
boolean pathStartsWithUNC = path.startsWith("" + File.separator + File.separator);
if ((posi > 0) && pathStartsWithFileSeparator && !pathStartsWithUNC) {
path = cwd.substring(0, posi + 1) + path;
}
} catch (UnsupportedEncodingException exc) {
// not sure whether this is clean, but this method is
// declared not to throw exceptions.
throw new IllegalStateException(
"Could not convert URI " + uri + " to path: "
+ exc.getMessage());
}
return path;
}
/**
* Crack a JAR URI.
* This method is public for testing; we may delete it without any warning -it is not part of Ant's stable API.
* @param uri uri to expand; contains jar: somewhere in it
* @return the decoded URI
* @since Ant1.7.1
*/
public static String fromJarURI(String uri) {
int pling = uri.indexOf("!/");
String jarName = uri.substring("jar:".length(), pling);
return fromURI(jarName);
}
/**
* Decodes an Uri with % characters.
* The URI is escaped
* @param uri String with the uri possibly containing % characters.
* @return The decoded Uri
* @throws UnsupportedEncodingException if UTF-8 is not available
* @since Ant 1.7
*/
public static String decodeUri(String uri) throws UnsupportedEncodingException {
if (uri.indexOf('%') == -1) {
return uri;
}
ByteArrayOutputStream sb = new ByteArrayOutputStream(uri.length());
CharacterIterator iter = new StringCharacterIterator(uri);
for (char c = iter.first(); c != CharacterIterator.DONE;
c = iter.next()) {
if (c == '%') {
char c1 = iter.next();
if (c1 != CharacterIterator.DONE) {
int i1 = Character.digit(c1, WORD);
char c2 = iter.next();
if (c2 != CharacterIterator.DONE) {
int i2 = Character.digit(c2, WORD);
sb.write((char) ((i1 << NIBBLE) + i2));
}
}
} else if (c >= 0x0000 && c < 0x0080) {
sb.write(c);
} else { // #50543
byte[] bytes = String.valueOf(c).getBytes(URI_ENCODING);
sb.write(bytes, 0, bytes.length);
}
}
return sb.toString(URI_ENCODING);
}
/**
* Encodes an Uri with % characters.
* The URI is escaped
* @param path String to encode.
* @return The encoded string, according to URI norms
* @throws UnsupportedEncodingException if UTF-8 is not available
* @since Ant 1.7
*/
public static String encodeURI(String path) throws UnsupportedEncodingException {
int i = 0;
int len = path.length();
int ch = 0;
StringBuffer sb = null;
for (; i < len; i++) {
ch = path.charAt(i);
// if it's not an ASCII character, break here, and use UTF-8 encoding
if (ch >= ASCII_SIZE) {
break;
}
if (gNeedEscaping[ch]) {
if (sb == null) {
sb = new StringBuffer(path.substring(0, i));
}
sb.append('%');
sb.append(gAfterEscaping1[ch]);
sb.append(gAfterEscaping2[ch]);
// record the fact that it's escaped
} else if (sb != null) {
sb.append((char) ch);
}
}
// we saw some non-ascii character
if (i < len) {
if (sb == null) {
sb = new StringBuffer(path.substring(0, i));
}
// get UTF-8 bytes for the remaining sub-string
byte[] bytes = null;
byte b;
bytes = path.substring(i).getBytes(URI_ENCODING);
len = bytes.length;
// for each byte
for (i = 0; i < len; i++) {
b = bytes[i];
// for non-ascii character: make it positive, then escape
if (b < 0) {
ch = b + BYTE_SIZE;
sb.append('%');
sb.append(gHexChs[ch >> NIBBLE]);
sb.append(gHexChs[ch & NIBBLE_MASK]);
} else if (gNeedEscaping[b]) {
sb.append('%');
sb.append(gAfterEscaping1[b]);
sb.append(gAfterEscaping2[b]);
} else {
sb.append((char) b);
}
}
}
return sb == null ? path : sb.toString();
}
/**
* Convert a File to a URL.
* File.toURL() does not encode characters like #.
* File.toURI() has been introduced in java 1.4, so
* Ant cannot use it (except by reflection) <!-- TODO no longer true -->
* FileUtils.toURI() cannot be used by Locator.java
* Implemented this way.
* File.toURL() adds file: and changes '\' to '/' for dos OSes
* encodeURI converts characters like ' ' and '#' to %DD
* @param file the file to convert
* @return URL the converted File
* @throws MalformedURLException on error
* @deprecated since 1.9, use {@link FileUtils#getFileURL(File)}
*/
@Deprecated
public static URL fileToURL(File file)
throws MalformedURLException {
return new URL(file.toURI().toASCIIString());
}
/**
* Get the File necessary to load the Sun compiler tools. If the classes
* are available to this class, then no additional URL is required and
* null is returned. This may be because the classes are explicitly in the
* class path or provided by the JVM directly.
*
* @return the tools jar as a File if required, null otherwise.
*/
public static File getToolsJar() {
// firstly check if the tools jar is already in the classpath
boolean toolsJarAvailable = false;
try {
// just check whether this throws an exception
Class.forName("com.sun.tools.javac.Main");
toolsJarAvailable = true;
} catch (Exception e) {
try {
Class.forName("sun.tools.javac.Main");
toolsJarAvailable = true;
} catch (Exception e2) {
// ignore
}
}
if (toolsJarAvailable) {
return null;
}
// couldn't find compiler - try to find tools.jar
// based on java.home setting
String libToolsJar
= File.separator + "lib" + File.separator + "tools.jar";
String javaHome = System.getProperty("java.home");
File toolsJar = new File(javaHome + libToolsJar);
if (toolsJar.exists()) {
// Found in java.home as given
return toolsJar;
}
if (javaHome.toLowerCase(Locale.ENGLISH).endsWith(File.separator + "jre")) {
javaHome = javaHome.substring(
0, javaHome.length() - "/jre".length());
toolsJar = new File(javaHome + libToolsJar);
}
if (!toolsJar.exists()) {
System.out.println("Unable to locate tools.jar. "
+ "Expected to find it in " + toolsJar.getPath());
return null;
}
return toolsJar;
}
/**
* Get an array of URLs representing all of the jar files in the
* given location. If the location is a file, it is returned as the only
* element of the array. If the location is a directory, it is scanned for
* jar files.
*
* @param location the location to scan for Jars.
*
* @return an array of URLs for all jars in the given location.
*
* @exception MalformedURLException if the URLs for the jars cannot be
* formed.
*/
public static URL[] getLocationURLs(File location)
throws MalformedURLException {
return getLocationURLs(location, new String[]{".jar"});
}
/**
* Get an array of URLs representing all of the files of a given set of
* extensions in the given location. If the location is a file, it is
* returned as the only element of the array. If the location is a
* directory, it is scanned for matching files.
*
* @param location the location to scan for files.
* @param extensions an array of extension that are to match in the
* directory search.
*
* @return an array of URLs of matching files.
* @exception MalformedURLException if the URLs for the files cannot be
* formed.
*/
public static URL[] getLocationURLs(File location,
final String[] extensions)
throws MalformedURLException {
URL[] urls = new URL[0];
if (!location.exists()) {
return urls;
}
if (!location.isDirectory()) {
urls = new URL[1];
String path = location.getPath();
String littlePath = path.toLowerCase(Locale.ENGLISH);
for (int i = 0; i < extensions.length; ++i) {
if (littlePath.endsWith(extensions[i])) {
urls[0] = fileToURL(location);
break;
}
}
return urls;
}
File[] matches = location.listFiles(
new FilenameFilter() {
public boolean accept(File dir, String name) {
String littleName = name.toLowerCase(Locale.ENGLISH);
for (int i = 0; i < extensions.length; ++i) {
if (littleName.endsWith(extensions[i])) {
return true;
}
}
return false;
}
});
urls = new URL[matches.length];
for (int i = 0; i < matches.length; ++i) {
urls[i] = fileToURL(matches[i]);
}
return urls;
}
}

View File

@@ -0,0 +1,14 @@
/**
* <html>
* <head>
* <title>org.owasp.dependencycheck.org.apache.tools.ant.launch</title>
* </head>
* <body>
* This is a copy of classes within Apache Ant. The DirectoryScanner
* is needed by dependency-check. However, we did not want to make
* Ant a dependency. As such, a few files were copied and slightly
* modified to remove any references to the Ant Project class.
* </body>
* </html>
*/
package org.owasp.dependencycheck.org.apache.tools.ant.launch;

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