TypeScript, Security, and Type Juggling with Ariel Shulman & Liran Tal - JSJ 679

TypeScript, Security, and Type Juggling with Ariel Shulman & Liran Tal - JSJ 679

In this episode, we dove headfirst into the swirling waters of TypeScript, its real-world use cases, and where it starts to fall short—especially when it comes to security. Joining us from sunny Tel Aviv (and a slightly cooler Portland), we had the brilliant Ariel Shulman and security advocate Liran Tal bring the heat on everything from type safety to runtime vulnerabilities.


We started off with a friendly debate: Has TypeScript really taken over the world? Our verdict? Pretty much. Whether it’s starter projects, enterprise codebases, or AI-generated snippets, TypeScript has become the de facto standard. But as we quickly found out, that doesn’t mean it’s perfect.


Key Takeaways:
-TypeScript ≠ Security
We tend to trust TypeScript a bit too much. It’s a build-time tool, not a runtime enforcer. As Liran pointed out, “TypeScript is not a security tool,” and treating it like one leads to dangerous assumptions.
-Type Juggling is Real (and Sneaky)
We explored how something as innocent as using as string on request data can open the door to vulnerabilities like HTTP parameter pollution and prototype pollution. Just because your IDE is happy doesn’t mean your runtime is.
-Enter Zod – Runtime Type Checking to the Rescue?
Zod got some love for bridging the dev-time/runtime gap by validating data on the fly and inferring TypeScript types. But even Zod isn’t foolproof. For example, unless you're using .strict(), extra fields can sneak past your validations, leading to mass assignment bugs.
-Common Developer Fallacies
We discussed the misplaced confidence developers have in things like code coverage and TypeScript alone. One of the big takeaways: defense in depth matters. Just like testing, layering your security practices (like using Zod, type guards, and proper sanitization) is key.
-TypeScript Best Practices Are Evolving
From discriminated unions to avoiding any, from using Maps over plain objects to prevent prototype pollution—TypeScript developers are adapting. And tools like modern Node.js now support type stripping, which makes working with .ts files at runtime a bit easier.


Become a supporter of this podcast: https://www.spreaker.com/podcast/javascript-jabber--6102064/support.

Avsnitt(738)

JSJ 397: Design Systems with Kaelig Deloumeau-Prigent

JSJ 397: Design Systems with Kaelig Deloumeau-Prigent

Kaelig Deloumeau-Prigent is a self taught web developer from west France. He has worked for BBC, The Guardian, and The Financial Times in the UK. He has also worked in the US for SalesForce and curren...

3 Okt 201939min

JSJ 396: Publishing Your Book with Jonathan Lee Martin

JSJ 396: Publishing Your Book with Jonathan Lee Martin

Jonathan Lee Martin is an instructor and developer. He got his start in teaching at Big Nerd Ranch doing 1-2 week trainings for mid to senior developers, and then transitioned to 16 week courses for c...

1 Okt 201958min

JSJ 395: The New Ember with Mike North

JSJ 395: The New Ember with Mike North

Mike North is the Ember guy at Frontend Masters and LinkedIn’s web developer trainer. Today the panel is talking about the upcoming Ember update, which Mike calls a total reinvention of the way you bu...

26 Sep 20191h 8min

JSJ 394: SMS Integration with Dominik Kundel

JSJ 394: SMS Integration with Dominik Kundel

Episode SummaryDominik Kundel works as developer evangelist at Twilio. Dominik talks about the history of Twilio, which actually started with integrating phone calls into apps and then moved to SMS in...

24 Sep 201928min

JSJ 393: Why You Should Be Using Web Workers with Surma

JSJ 393: Why You Should Be Using Web Workers with Surma

Episode SummarySurma is an open web advocate for Google currently working with WebAssembly team. He was invited on the show today to talk about using web workers and how to move work away from the bro...

19 Sep 201957min

JSJ 392: The Murky Past and Misty Future of JavaScript with Douglas Crockford

JSJ 392: The Murky Past and Misty Future of JavaScript with Douglas Crockford

Episode SummaryDouglas is a language architect and helped with the development of JavaScript. He started working with JavaScript in 2000. He talks about his journey with the language, including his in...

17 Sep 20191h 13min

JSJ 391: Debugging with Todd Gardner

JSJ 391: Debugging with Todd Gardner

Episode SummaryTodd Gardner is a software developer, podcaster on the show Script and Style, startup founder,  and comedy host for Pub Conf, a ‘comedy after party for developers’. Since he was last on...

12 Sep 201949min

JSJ 390: Transposit with Adam Leventhal

JSJ 390: Transposit with Adam Leventhal

Episode SummaryAdam Leventhal is the CEO and cofounder of Transposit. Transposit was born from the desire to build a way for developers to work with lots of different APIs, take authentication and pag...

10 Sep 201946min

Populärt inom Business & ekonomi

badfluence
framgangspodden
varvet
rss-jossan-nina
rss-svart-marknad
rss-borsens-finest
avanzapodden
uppgang-och-fall
rss-dagen-med-di
lastbilspodden
fill-or-kill
svd-tech-brief
rss-inga-dumma-fragor-om-pengar
24fragor
rss-kort-lang-analyspodden-fran-di
rss-den-nya-ekonomin
kapitalet-en-podd-om-ekonomi
dynastin
borsmorgon
rikatillsammans-om-privatekonomi-rikedom-i-livet