00:00:0087% of Docker images on Docker Hub contain critical or high vulnerabilities.
00:00:04So statistically, the image you're about to deploy?
00:00:08Yeah, it's probably vulnerable somewhere, somehow.
00:00:11And the scary part is you won't notice because everything still builds,
00:00:14everything still runs. Until it doesn't.
00:00:16This is Trivi, an open source tool that can find the problem in seconds with zero install.
00:00:21We have videos coming out all the time, be sure to subscribe.
00:00:29Trivi has blown up on GitHub with over 32,000 stars and it's being used more and more every day.
00:00:34And you'd expect a tool like this to only scan containers, but no, it actually scans everything.
00:00:40Containers, local file systems, Git repos, Kubernetes, misconfigurations, you name it.
00:00:45And it's even the default scanner in GitLab.
00:00:48This is infrastructure.
00:00:50And in the next 30 odd seconds or something, I'm going to show you how to put this to use.
00:00:53It's easy enough to actually make it usable, too.
00:00:56All right, no install here. The only real thing I did was clone their Git repo,
00:01:00as they have test containers, we can put this to run for quick use.
00:01:04Only other thing you have to do is open up Docker.
00:01:07Now in my terminal here in VS Code, we can just drop this line, which can be found in the docs.
00:01:12That's really it.
00:01:14Docker now pulls Trivi, runs it, scans the official Nginx image, and boom.
00:01:21Critical vulnerabilities will pop up if there are any to begin with, right here.
00:01:26Here's where it starts saving you, because if this is a real pipeline,
00:01:29you don't want to report, you want a hard stop on that program.
00:01:32Now, if it finds a critical vulnerability, exit code one,
00:01:36your pipeline is going to fail, and then the build is blocked.
00:01:39So the thing you expected, security tools just slow you down, Trivi kind of changes this here.
00:01:45This speeds you up because it prevents the rollback later.
00:01:49Now, cool, but container scanning is the easy part.
00:01:51The real issues usually come from what we commit.
00:01:54So yeah, containers are cool, but bad code is worse.
00:01:57Let's scan a disaster Docker file here.
00:01:59Again, this is just in the Trivi repo.
00:02:01Okay, I'm going to cd into Trivi demo.
00:02:03Now you can see here it catches insecure practices and problems like insecure base images,
00:02:07missing user directives, privileged configurations, outdated dependencies, you name it.
00:02:12It's going to kind of pick this up for us.
00:02:14This is what you want in CI, not after deployment before merge.
00:02:18Because if it gets merged, it becomes everyone's problem.
00:02:22Now fix the Docker file, run it again.
00:02:24It's all clean and ready to go.
00:02:26And if you're thinking, yeah, my repo is huge, good.
00:02:30That's exactly where this is most useful actually,
00:02:32because there are other tools out there that I'm going to touch on in a second.
00:02:35Now let's point it at an entire repo.
00:02:38File system scan dependencies, misconfigurations, everything.
00:02:41Since I'm using this repo, we can see if it all checks out relatively well.
00:02:45So where does this actually live day to day and what are people actually doing with this?
00:02:50You'd think that this is just a one-time scan tool, but it's not.
00:02:54Trivi fits into the places you already work.
00:02:56In local development, there's the VS code extension in CI, three lines of GitHub actions.
00:03:02And if you're in Kubernetes, Trivi operator auto scans every workload in your cluster.
00:03:07You just need one command in your pipeline.
00:03:09Some reports are showing supply chain attacks are up over 400%.
00:03:12Devs have always been a part of the security side of things, so this helps out.
00:03:17The best security tools don't slow you down, they block problems and more work down the line.
00:03:22I found Trivi to be pretty cool, but is this actually better than others?
00:03:26Because there are some.
00:03:26So let's be honest, there's other scanners out there.
00:03:29You may have already been using them.
00:03:31We got gripe, but it's containers only.
00:03:34Then there's snike, but costs money.
00:03:37Both of those are a reason that many others are turning to Trivi.
00:03:41It's fast, it's free.
00:03:42It handles things like containers, secret, SBOMs, Kubernetes file systems, all that stuff.
00:03:48It's kind of a more all-in-one tool.
00:03:50So if this is new to you, if it's not, what are your thoughts on Trivi?
00:03:53We'll see you in another video.