Security lessons with a Snyk Ambassador
Tags: applicationsecurity, dependencyhealth, opensource
Published: 2022-10-18 07:46:38

---
title: Security lessons with a Snyk Ambassador
published: true
date: 2022-10-10 19:30:00 UTC
tags: ApplicationSecurity,DependencyHealth,OpenSource
canonical_url: https://snyk.io/blog/security-lessons-with-a-snyk-ambassador/
---

_From [Andres Haro](https://twitter.com/madebyux), Snyk Ambassador_

Security has been a concern in the tech industry for years now. However, not a lot of companies follow their own protocols or guides when it comes to securing  code.

It’s easy to believe that security incidents are uncommon (or unlikely to happen in your own organization), but the latest issue with Uber is one of many examples to the contrary. This incident stemmed from an 18 year old who used social engineering to instruct an employee from Uber to log in to a fake Uber site, allowing them to grab the entered credentials in real time and log in to the real Uber site.

## Uber breach & lessons learned

At that time, Uber had MFA enabled — an app that prompted the employee to push a button alert on his/her smartphone at the time of logging in. What the hacker did to bypass this protection was entering the credentials into the real site multiple times. The employee was confused or tired, and eventually pushed the button. At the time the employee pushed the button, the hacker was already in.

Now, imagine Uber as a company that was unable to do anything. Even with MFA, a malicious user was creative enough to get personal information from the company and do some damage. Now imagine what could have happened if they hadn’t taken steps to secure their code.

## How to protect your code?

If you are part of the tech community, you probably check [Stack Overflow](https://medium.com/u/d53dd768d047?source=post_page-----951329890982--------------------------------) fairly often for open source code and answers to questions. It’s a great tool for collaboration and problem solving, but copying code from a third party site directly into your application can expose you to a lot of potential vulnerabilities. 

To avoid these potential risks, I  recommend using  the [Code Checker tool from Snyk](https://snyk.io/code-checker/) to scan your chosen code before copying it to a branch in your production environment. 

![Screenshot of the Snyk Code Checker tool.](https://snyk.io/wp-content/uploads/blog-security-lesson-code-checker.jpg)

Now, you may be wondering [**what Snyk can do for me.**](https://medium.com/u/b1a6b467bdd0) Well, in addition to helping you scan code from any platform, Snyk provides insights into what could be wrong with your current repositories and advice on how to fix it.

Looking at the picture below, you will see that Snyk is connected to my [**GitHub**](https://medium.com/u/8df3bf3c40ae) account.

![Screenshot of the author's Snyk dashboard.](https://snyk.io/wp-content/uploads/blog-security-lesson-snyk-dashboard.jpg)

Connecting Snyk to your GitHub account will allow you to check what dependencies are not updated, what is corrupting your code, and what needs to be updated.

The following image shows a Snyk report, which lists the vulnerabilities found in its scan and categorizes them as low, medium, high, or critical based on severity. Now, you have all the information you need to either ignore the vulnerability or fix it.

![Snyk report on the health and security of a package.json project.](https://snyk.io/wp-content/uploads/blog-security-lesson-package-json.jpg)

As a DevSecOps practitioner, I  always prioritize critical vulnerabilities, and encourage teams to look at the scorecard and figure out if this is something that we can fix immediately. Why do I say this? Because your Software Engineers will have to be brought up to speed on the vulnerabilities that were discovered and see if there’s room in their current sprint to resolve them **.** On the other hand, some teams will decide to fix high or critical vulnerabilities on the same day they’re discovered — it all comes down to the resources and personnel your organization has. Snyk is an especially helpful tool because it supports either decision and gives you the ability to fix a vulnerability later or immediately create a PR.

If you click in fix this vulnerability, you will see the following:

![Snyk open a fix PR UI, with list of all issues found.](https://snyk.io/wp-content/uploads/blog-security-lesson-open-pr.jpg)

The **Open a Fix PR** screen lists all the vulnerabilities found in the scan — and might leave you with some specific questions.  For more information about a specific issue in the PR list, click on one of the vulnerabilities. In this case, we will click on Regular Expression Denial of Service (ReDoS) under **Issues with a fix**.

![Snyk Vulnerability Database report on a Regular Expression Denial of Service (ReDos) vulnerability.](https://snyk.io/wp-content/uploads/blog-security-lesson-redos-vulndb.jpg)

This will give you a full breakdown of what you’re dealing with, and if isn’t real or was flagged by mistake, you can always report it by clicking “ **Found a mistake?** ” — which will take you to another screen where you can share the details. 

If you’re unfamiliar with a certain vulnerability, you can learn more about it on [Snyk Learn](https://learn.snyk.io/). For our current example, [head over to the ReDos lessons page](https://learn.snyk.io/lessons/redos/javascript/). 

Now that we feel more confident and informed, we can proceed to create the PR. It should look something like this inside [GitHub](https://medium.com/u/8df3bf3c40ae?source=post_page-----951329890982--------------------------------):

![Screenshot of a Snyk-generated pull request in GitHub.](https://snyk.io/wp-content/uploads/blog-security-lesson-fix-for-vuln.jpg)

After that, you will have an option to merge the new PR and new branch with all the fixes.

![Screenshot of "All checks have passed" and "This branch has no conflicts" popup in GitHub.](https://snyk.io/wp-content/uploads/blog-security-lesson-checks-passed.jpg)

If you decided to Merge, you will see the following:

![Screenshot of "Pull request successfully merged" popup in GitHub.](https://snyk.io/wp-content/uploads/blog-security-lesson-pr-success.jpg)

If you want to learn what changed in your repo, you will have to look at files that changed inside of [GitHub](https://medium.com/u/8df3bf3c40ae?source=post_page-----951329890982--------------------------------):

![GitHub screenshot showing changes made to code.](https://snyk.io/wp-content/uploads/blog-security-lesson-load-diff.jpg)

As you can see, we had some updates to be able to be up-to-date. Now, we can go back and check our Snyk dashboard to see if everything has been fixed. If you ever need to send a report to management, I suggest adding those people to your [Snyk](https://medium.com/u/b1a6b467bdd0?source=post_page-----951329890982--------------------------------) account and sharing this type of report with them.

![Snyk dashboard showing that security vulnerabilities were resolved.](https://snyk.io/wp-content/uploads/blog-security-lesson-report.jpg)

## Expanding your security expertise with Snyk

If you’d like to learn more about developer security, check out [Snyk Learn](https://learn.snyk.io/) — there are lot of interactive lessons exploring vulnerabilities across a variety of languages and ecosystems. Or, if you’re more of a video person, head over to the [official Snyk Youtube channel](https://www.youtube.com/c/Snyksec).   
If you ever need security advice, [feel free to reach out to any of the Snyk Ambassadors](https://snyk.io/blog/newest-snyk-ambassadors-mar-2022/) — they’re a group of really lovely people with a wealth of cybersecurity knowledge, and the club is always growing!

## Secure code at no cost to you

Create a Snyk account today and let Snyk's cutting edge security intelligence help you protect your applications.

[Sign up for free](https://app.snyk.io/login?cta=sign-up&loc=body&page=security-lessons-with-a-snyk-ambassador)
<!-- /.block -->