WEBVTT

00:00:01.120 --> 00:00:01.790
Okay.

00:00:01.930 --> 00:00:05.870
You've installed Dependency‑Check, you've configured it just the way you want it,

00:00:05.880 --> 00:00:09.910
you run it against your app, and you have a bunch of vulnerabilities reported.

00:00:09.930 --> 00:00:11.500
Well, now what?

00:00:12.170 --> 00:00:15.360
Unfortunately, using the tool is the easy bit.

00:00:15.370 --> 00:00:19.950
Deciding what to do with the output is tricky and it can be very time consuming,

00:00:20.300 --> 00:00:21.710
but don't panic.

00:00:22.710 --> 00:00:24.420
First, prioritize.

00:00:24.430 --> 00:00:27.280
If you're staring at a lot of vulnerabilities in that report,

00:00:27.300 --> 00:00:29.570
and you might be if this is the first time running

00:00:29.570 --> 00:00:32.830
Dependency‑Check on that project, it can be overwhelming.

00:00:33.300 --> 00:00:36.240
So click on the severity column to sort descending

00:00:36.250 --> 00:00:37.950
and just take them one at a time.

00:00:39.220 --> 00:00:42.440
For each vulnerable dependency, you have a few options.

00:00:42.680 --> 00:00:47.160
The first question you should be asking is can we patch this vulnerability?

00:00:48.070 --> 00:00:51.800
If the issue is in a popular well‑maintained open source package,

00:00:51.810 --> 00:00:54.940
then there is a very good chance that there is already a fixed version of

00:00:54.940 --> 00:00:57.740
that package by the time the vulnerability is reported.

00:00:58.820 --> 00:00:59.610
Often,

00:00:59.660 --> 00:01:02.150
the easiest thing to do is just to upgrade that

00:01:02.150 --> 00:01:04.470
dependency to a version that isn't vulnerable,

00:01:04.590 --> 00:01:08.050
especially if you're using a package manager that can help with the upgrade.

00:01:08.060 --> 00:01:11.830
Why spend lots of time trying to investigate the issue if you can

00:01:11.830 --> 00:01:14.380
type a couple of commands and just make it go away.

00:01:15.580 --> 00:01:19.260
Whether or not you can patch, of course, depends on a few things.

00:01:19.530 --> 00:01:23.470
Obviously, if no patch has been released yet, well that's going to be a problem.

00:01:23.910 --> 00:01:24.650
Unfortunately,

00:01:24.650 --> 00:01:27.800
a common reason for this is that an affected dependency

00:01:27.810 --> 00:01:30.340
just isn't in active development anymore,

00:01:30.430 --> 00:01:32.860
which means a patch probably isn't coming.

00:01:33.470 --> 00:01:36.390
Or you might also find that a patched version does exist,

00:01:36.450 --> 00:01:39.390
but other libraries in your project depend on that vulnerable

00:01:39.390 --> 00:01:42.150
version in a way that prevents you from updating.

00:01:43.420 --> 00:01:46.790
This is common when you have very complex dependency graphs and

00:01:46.790 --> 00:01:50.130
vulnerabilities surface inside those transitive dependencies,

00:01:50.390 --> 00:01:54.180
that's the dependencies of your dependencies that you didn't directly require.

00:01:56.240 --> 00:01:58.560
If you're already doing continuous deployment,

00:01:58.760 --> 00:02:01.190
then a quick patch release should be straightforward,

00:02:01.440 --> 00:02:04.100
but if your release schedule is more constrained or a

00:02:04.100 --> 00:02:06.010
release is very time consuming to do,

00:02:06.020 --> 00:02:08.600
you might need to do further analysis to decide

00:02:08.610 --> 00:02:10.940
whether to justify issuing a patch.

00:02:12.570 --> 00:02:15.680
Finally, if the vulnerability is very serious,

00:02:15.690 --> 00:02:17.890
even if you can patch it right away,

00:02:17.900 --> 00:02:21.090
you may still want to do some analysis to just understand the

00:02:21.090 --> 00:02:24.880
impact and perhaps try and confirm that it wasn't exploited in your

00:02:24.880 --> 00:02:27.270
system before you were able to patch it.

00:02:29.180 --> 00:02:31.500
If you can't just simply patch it and move on,

00:02:31.510 --> 00:02:34.360
you're going to have to do some investigating to see

00:02:34.370 --> 00:02:36.050
if it really does apply to you.

00:02:36.750 --> 00:02:41.690
First, understand that Dependency‑Check reports possible vulnerabilities,

00:02:41.740 --> 00:02:43.880
and just because a vulnerability is listed,

00:02:43.970 --> 00:02:48.490
it doesn't mean that your specific application actually has that floor.

00:02:49.050 --> 00:02:49.580
Often,

00:02:49.580 --> 00:02:53.630
the vulnerability is only triggered in very specific circumstances or

00:02:53.630 --> 00:02:58.780
configurations and it may well be that your app doesn't use the affected library

00:02:58.780 --> 00:03:01.720
functionality or it's not configured in a vulnerable way.

00:03:02.820 --> 00:03:05.250
You can start by reading the description for that

00:03:05.250 --> 00:03:07.480
vulnerability in the Dependency‑Check report,

00:03:07.750 --> 00:03:10.230
and if that doesn't give you enough information to decide,

00:03:10.520 --> 00:03:13.220
follow the links to the various external databases like

00:03:13.220 --> 00:03:15.580
the NVD and the GitHub advisories.

00:03:15.690 --> 00:03:17.610
They're often a very helpful resource.

00:03:18.450 --> 00:03:21.190
You might also find some good information just by

00:03:21.190 --> 00:03:23.660
searching the web for the CVE identifier.

00:03:25.460 --> 00:03:29.360
If after all that, you're confident that the vulnerability doesn't apply to you,

00:03:29.560 --> 00:03:31.790
then you can go ahead and suppress the report so that

00:03:31.790 --> 00:03:33.400
it doesn't appear going forward,

00:03:33.450 --> 00:03:35.450
and I'll show you how to do that in the next clip.

00:03:36.170 --> 00:03:41.030
Now there is some risk associated with suppressing vulnerability reports.

00:03:41.480 --> 00:03:45.340
It can be extremely hard to figure out whether you are affected,

00:03:45.420 --> 00:03:48.310
especially if you're dealing with a transitive dependency

00:03:48.410 --> 00:03:52.010
where it may not be possible to tell how it's being used and

00:03:52.010 --> 00:03:53.300
you could make a mistake here.

00:03:53.840 --> 00:03:56.690
And even if your app isn't affected now,

00:03:57.000 --> 00:03:59.710
if the vulnerable dependency remains in your project,

00:03:59.760 --> 00:04:03.050
it could very easily become affected with a harmless looking

00:04:03.050 --> 00:04:06.660
configuration change or a code commit at some time in the future.

00:04:07.750 --> 00:04:11.620
For those reasons, I recommend that if you suppress a particular warning,

00:04:11.630 --> 00:04:15.450
you do it only temporarily so that you're reminded to review

00:04:15.450 --> 00:04:18.950
it later on to see if a fix has come out and to check that

00:04:18.950 --> 00:04:20.560
you're still not vulnerable.

00:04:22.110 --> 00:04:25.490
It's also really important that you document the reason why

00:04:25.490 --> 00:04:27.000
you're suppressing the vulnerability,

00:04:27.010 --> 00:04:29.620
whether that's for the benefit of another developer who

00:04:29.620 --> 00:04:32.170
comes across it or for you in 6 months time.

00:04:32.510 --> 00:04:35.700
After all, you may have spent quite a bit of time investigating this,

00:04:35.830 --> 00:04:38.260
and it would be a shame for all of that work to get forgotten.

00:04:40.220 --> 00:04:42.970
Finally, if there is no fix available,

00:04:43.160 --> 00:04:47.540
you've determined that your application is vulnerable and it's sufficiently

00:04:47.540 --> 00:04:50.400
serious that you can't wait for a fix to be released,

00:04:50.520 --> 00:04:53.630
you're going to have to make your application safe somehow.

00:04:54.030 --> 00:04:57.530
This could mean swapping out the vulnerable dependency for an alternative

00:04:57.530 --> 00:05:01.470
library or making a code or configuration change to prevent the

00:05:01.470 --> 00:05:04.230
vulnerable functionality from actually being used.
