Experiencia en Seguridad de la Cadena de Suministro

Rate this content
Bookmark

Los desarrolladores están inundados de herramientas y preocupaciones proporcionadas por los proveedores de seguridad. Desde investigadores que encuentran ataques teóricos, hasta el tiempo invertido en lidiar con actualizaciones de paquetes, hasta simples accidentes que causan tiempo de inactividad, todo esto existe. Tomar en cuenta algo de historia para comprender las categorías básicas de ataques y qué tan prácticos son para explotar o incluso qué tan comunes son, brindará cierta seguridad y orientación sobre dónde puede enfocar su energía limitada un desarrollador y obtener el máximo provecho de sus esfuerzos.

Bradley Farias
Bradley Farias
8 min
17 Apr, 2023

Video Summary and Transcription

La seguridad de la cadena de suministro es importante en el desarrollo de software y es crucial evaluar el impacto real de las amenazas. Al tratar con proveedores de seguridad, haga preguntas prácticas sobre vulnerabilidades e impactos. Enfoque en la relación señal-ruido de calidad al considerar el número de dependencias. Las conversaciones continuas con los proveedores son importantes para abordar inquietudes. Manténgase informado y tome decisiones informadas.

Available in English

1. Introducción a la Seguridad de la Cadena de Suministro

Short description:

Hola, soy Bradley Farias. Trabajo en Socket en Seguridad de la Cadena de Suministro. La cadena de suministro se refiere a la red de personas, herramientas y dependencias que se unen para construir software. Los proveedores de seguridad a menudo exageran los riesgos e intentan que entres en pánico. Es importante hacer preguntas y evaluar el impacto real de las amenazas. Al considerar la seguridad, enfócate en tu aplicación, sus dependencias y los consumidores. En Socket, priorizamos defendernos contra las dependencias y los riesgos que introducen. Comprender lo que ofrece el proveedor de seguridad y adaptarlo a tus necesidades es crucial.

Trabajo en Socket en Seguridad de la Cadena de Suministro, y quiero hablarles un poco sobre mi experiencia en hacerlo y cómo no sentirse abrumado por todas estas personas de seguridad que intentan hablar contigo sobre sus maravillosos productos y todo el caos que tenemos.

Entonces, la cadena de suministro simplemente significa una red de diferentes personas, diferentes herramientas, diferentes dependencias, que se unen para crear tu aplicación de software. La gente quiere exagerar esto, oh, esta red se está expandiendo cada vez más y cosas así. Y es grande, especialmente en JavaScript. La dependencia promedio puede tener alrededor de 80 dependencias, eso es lo que estamos viendo en el trabajo hoy en día. Así que cada vez que agregas una dependencia en tu package.json para node, en realidad estás agregando alrededor de 81 en promedio. Porque cada dependencia puede tener otra dependencia. Lo cual es un poco aterrador de pensar, pero es la realidad de la naturaleza de construir software en estos días. Todos estamos trabajando juntos. Y eso significa que nuestra cadena de suministro es muy grande.

Esto hace que las personas de seguridad y los proveedores de seguridad quieran que entres en pánico. Quieren que pienses que todo tipo de cosas son vulnerables. Cualquier tipo de ataque, en cualquier lugar, incluso el tipo más mínimo de ataque, es algo contra lo que debes estar alerta. Debes gastar miles y miles de tu dinero solo para defenderte de algo cuando en realidad si haces algunas preguntas. ¿Quién puede realizar realmente el ataque? ¿Qué puede hacer el ataque? ¿Dónde puede realizarse realmente el ataque? Y esas cosas. Puedes darte cuenta de que, vale, podemos invertir en estas cosas que el proveedor de seguridad ha dicho que son las cosas más importantes, pero el impacto de ellas es muy pequeño. Y así puede ser el caso de que todas estas amenazas de seguridad que se están identificando, que se están mostrando por estos proveedores de seguridad, sean imprácticas o simplemente no hagan nada a lo que tienes.

Entonces, cuando pienses en esto, debes pensar en tu aplicación, en las dependencias de tu aplicación y en los consumidores de tu aplicación. ¿Y para quién está haciendo algo realmente el proveedor de seguridad? ¿Están evitando que los consumidores hagan algo malo en tu aplicación? ¿Están evitando que las dependencias expongan peligros para tu aplicación? En nuestro trabajo en Socket, nos enfocamos principalmente en tus dependencias. Tenemos un alto nivel de confianza en tu aplicación. Y eso no quiere decir que sea lo único contra lo que nos defendemos, pero muchas veces, cuando trabajas con dependencias, no lees su código fuente. No sabes qué sucede cuando actualizas tus dependencias. Podrían agregar una nueva dependencia, y cuando esa dependencia se actualice, agregar una nueva dependencia podría introducir una puerta trasera. Podría introducir un script problemático que se ejecute en tu máquina de desarrollo, en tu servidor de compilación y cosas así. Gran parte de esto se trata de tratar de entender qué está proporcionando el proveedor de seguridad para ti. Para qué está tratando de adaptar su experiencia. Podrían ser informativos. Están tratando de decirte que esta cosa que instalaste tiene 80 dependencias dentro de ella. No estás instalando solo una cuando la agregas a tu package JSON.

2. Haciendo las Preguntas Correctas a los Proveedores de Seguridad

Short description:

Debes hacer preguntas prácticas a los proveedores de seguridad sobre vulnerabilidades, escenarios e impactos. No te sientas abrumado por la cantidad de dependencias; enfócate en la relación calidad-señal y ruido. Asegúrate de que los proveedores tengan respuestas para incidentes y medidas preventivas. Mantén conversaciones continuas con los proveedores para abordar inquietudes. El tiempo de demostración es limitado, pero mantente informado y toma decisiones informadas.

Pueden ser proactivos. Podrían intentar evitar que instales algo. Oh, esta instalación hará que tengas un script de instalación. El script de instalación parece un poco aterrador. Retrocedamos.

Así que podrían ser proactivos en cuanto a la security, o podrían ser reactivos. Oh, vimos que ocurrió esta vulnerabilidad. Estos son los pasos que podrías seguir para identificar qué sucedió. ¿Qué fue vulnerable y qué data se vio afectada por ello? Debes hacer estas preguntas cuando hables con los proveedores de security. Y preguntar sobre escenarios, escenarios prácticos.

Figure.js, Event Stream, Lettpad, todos estos son muy famosos. Tengo muchas esperanzas de que cada proveedor de security con el que hables tenga al menos alguna respuesta básica sobre lo que ocurriría al usar su herramienta, si su herramienta incluso afecta esos escenarios. Sobre estos eventos se han escrito artículos académicos, están en artículos de Wikipedia y cosas así. O cualquier escenario teórico que se te ocurra.

Pero muchos de estos se reducen a un famoso xkcd. Una persona aleatoria está oculta dentro de tus dependencias. No sabes quién es esta persona aleatoria. Está tan profundamente enterrada allí, su dependencia está tan profundamente enterrada allí que cuando tienen un problema, cuando introducen scripts maliciosos en tu código, es posible que no puedas verlo. Y estas herramientas intentan exponer eso. Y parece abrumador.

A menudo, cuando tienes cientos y cientos de dependencias, es posible que solo tengas algunas que sean riesgosas. Así que no te sientas abrumado por los números. Obtén relaciones calidad-señal y ruido para poder tomar una decisión informada. Y el impacto. Cuando hables con estos proveedores, es posible que te muestren una gran demostración, pero definitivamente necesitan tener respuestas sobre qué sucede si hay un incidente. ¿Va a afectar tu máquina de producción? ¿Va a causar problemas para tu negocio? ¿Y cuánto esfuerzo requerirá para que un desarrollador, mientras espera una solución, mantenga las máquinas de producción funcionando? ¿Qué puedes hacer después? Lo has solucionado, pero ¿hay algo que la herramienta pueda hacer para prevenir el próximo incidente? Y necesitas tener esa conversación repetidamente. Y esperemos que los proveedores tengan una respuesta para ti. Eso es todo. No te sientas abrumado. Todos están tratando de mostrar el valor de su producto lo más rápido posible porque tenemos un tiempo muy corto cuando estamos demostrando cosas. Sí, todo estará bien. De acuerdo.

Check out more articles and videos

We constantly think of articles and videos that might spark Git people interest / skill us up or help building a stellar career

It's a Jungle Out There: What's Really Going on Inside Your Node_Modules Folder
Node Congress 2022Node Congress 2022
26 min
It's a Jungle Out There: What's Really Going on Inside Your Node_Modules Folder
Top Content
Do you know what’s really going on in your node_modules folder? Software supply chain attacks have exploded over the past 12 months and they’re only accelerating in 2022 and beyond. We’ll dive into examples of recent supply chain attacks and what concrete steps you can take to protect your team from this emerging threat.
You can check the slides for Feross' talk here.
The State of Passwordless Auth on the Web
JSNation 2023JSNation 2023
30 min
The State of Passwordless Auth on the Web
Can we get rid of passwords yet? They make for a poor user experience and users are notoriously bad with them. The advent of WebAuthn has brought a passwordless world closer, but where do we really stand?
In this talk we'll explore the current user experience of WebAuthn and the requirements a user has to fulfill for them to authenticate without a password. We'll also explore the fallbacks and safeguards we can use to make the password experience better and more secure. By the end of the session you'll have a vision for how authentication could look in the future and a blueprint for how to build the best auth experience today.
Let Me Show You How React Applications Get Hacked in the Real-World
React Advanced Conference 2021React Advanced Conference 2021
22 min
Let Me Show You How React Applications Get Hacked in the Real-World
Top Content
Modern frontend frameworks like React are well thought-of in their application security design and that’s great. However, there is still plenty of room for developers to make mistakes and use insecure APIs, vulnerable components, or generally do the wrong thing that turns user input into a Cross-site Scripting vulnerability (XSS). Let me show you how React applications get hacked in the real-world.
5 Ways You Could Have Hacked Node.js
JSNation 2023JSNation 2023
22 min
5 Ways You Could Have Hacked Node.js
All languages are or were vulnerable to some kind of threat. I’m part of the Node.js Security team and during the year 2022, we've performed many Security Releases and some of them were really hard to think about.
Did you know you can make money by finding critical vulnerabilities in Node.js? In this talk, I’ll show you 5 ways you can have hacked Node.js and how the Node.js team deals with vulnerabilities.
How React Applications Get Hacked in the Real-World
React Summit 2022React Summit 2022
7 min
How React Applications Get Hacked in the Real-World
React has a great security standard as default, but if you don’t pay close attention to the details you could get burned by some of the escape hatches APIs, or even by just passing props insecurely to components. I’ll teach you how to avoid these pitfalls.
Securing Node.js APIs with Decentralised Identity Tokens
JSNation Live 2021JSNation Live 2021
9 min
Securing Node.js APIs with Decentralised Identity Tokens
Authentication and Authorization are serious problems. We often dedicate a lot of time to craft powerful APIs but overlook proper security measures. Let's solve it with Magic using a key-based identity solution built on top of DID standard, where users’ identities are self-sovereign leveraging blockchain public-private key pairs. In this talk, we’ll look at proper ways to secure our Node.js APIs with Decentralised Identity Tokens. We’ll go from learning what Decentralised Identity standards are, how the users’ identities are self-sovereign leveraging blockchain public-private key pairs, why they’re the future of API security, and to put theory into practice we will build a real-world implementation using Node.js where I’ll show common best practices.

Workshops on related topic

0 to Auth in an hour with ReactJS
React Summit 2023React Summit 2023
56 min
0 to Auth in an hour with ReactJS
WorkshopFree
Kevin Gao
Kevin Gao
Passwordless authentication may seem complex, but it is simple to add it to any app using the right tool. There are multiple alternatives that are much better than passwords to identify and authenticate your users - including SSO, SAML, OAuth, Magic Links, One-Time Passwords, and Authenticator Apps.
While addressing security aspects and avoiding common pitfalls, we will enhance a full-stack JS application (Node.js backend + React frontend) to authenticate users with OAuth (social login) and One Time Passwords (email), including:- User authentication - Managing user interactions, returning session / refresh JWTs- Session management and validation - Storing the session securely for subsequent client requests, validating / refreshing sessions- Basic Authorization - extracting and validating claims from the session token JWT and handling authorization in backend flows
At the end of the workshop, we will also touch other approaches of authentication implementation with Descope - using frontend or backend SDKs.
Finding, Hacking and fixing your NodeJS Vulnerabilities with Snyk
JSNation 2022JSNation 2022
99 min
Finding, Hacking and fixing your NodeJS Vulnerabilities with Snyk
WorkshopFree
Matthew Salmon
Matthew Salmon
npm and security, how much do you know about your dependencies?Hack-along, live hacking of a vulnerable Node app https://github.com/snyk-labs/nodejs-goof, Vulnerabilities from both Open source and written code. Encouraged to download the application and hack along with us.Fixing the issues and an introduction to Snyk with a demo.Open questions.
Bring Code Quality and Security to your CI/CD pipeline
DevOps.js Conf 2022DevOps.js Conf 2022
76 min
Bring Code Quality and Security to your CI/CD pipeline
WorkshopFree
Elena Vilchik
Elena Vilchik
In this workshop we will go through all the aspects and stages when integrating your project into Code Quality and Security Ecosystem. We will take a simple web-application as a starting point and create a CI pipeline triggering code quality monitoring for it. We will do a full development cycle starting from coding in the IDE and opening a Pull Request and I will show you how you can control the quality at those stages. At the end of the workshop you will be ready to enable such integration for your own projects.
JS Security Testing Automation for Developers on Every Build
TestJS Summit 2021TestJS Summit 2021
111 min
JS Security Testing Automation for Developers on Every Build
WorkshopFree
Oliver Moradov
Bar Hofesh
2 authors
As a developer, you need to deliver fast, and you simply don't have the time to constantly think about security. Still, if something goes wrong it's your job to fix it, but security testing blocks your automation, creates bottlenecks and just delays releases...but it doesn't have to...

NeuraLegion's developer-first Dynamic Application Security Testing (DAST) scanner enables developers to detect, prioritise and remediate security issues EARLY, on every commit, with NO false positives/alerts, without slowing you down.

Join this workshop to learn different ways developers can access Nexploit & start scanning without leaving the terminal!

We will be going through the set up end-to-end, whilst setting up a pipeline, running security tests and looking at the results.

Table of contents:
- What developer-first DAST (Dynamic Application Security Testing) actually is and how it works
- See where and how a modern, accurate dev-first DAST fits in the CI/CD
- Integrate NeuraLegion's Nexploit scanner with GitHub Actions
- Understand how modern applications, APIs and authentication mechanisms can be tested
- Fork a repo, set up a pipeline, run security tests and look at the results
Passwordless Auth to Servers: hands on with ASA
DevOps.js Conf 2022DevOps.js Conf 2022
32 min
Passwordless Auth to Servers: hands on with ASA
WorkshopFree
E. Dunham
E. Dunham
These days, you don't need a separate password for every website you log into. Yet thanks to tech debt and tradition, many DevOps professionals are still wrangling a host of SSH keys to access the servers where we sometimes need to be. With modern OAuth, a single login and second factor to prove your identity are enough to securely get you into every service that you're authorized to access. What if SSHing into servers was that easy? In this workshop, we'll use Okta's Advanced Server Access tool (formerly ScaleFT) to experience one way that the dream of sending SSH keys the way of the password has been realized.
- we'll discuss how ASA works and when it's the right tool for the job- we'll walk through setting up a free trial Okta account to use ASA from, and configuring the ASA gateway and server on Linux servers- we'll then SSH into our hosts with the ASA clients without needing to supply an SSH key from our laptops- we'll review the audit logs of our SSH sessions to examine what commands were run