Earlier quoted context omitted.
Any sufficiently competent typescript developer can build out an adhoc wrapper (that just inherits the type definition and passes along whatever it is passed after altering it however needed) in under a hour. It doesn't scale in the sense that you don't expose a configuration, but config as code is king. (Source: have built out much more scuffed variants of this than the one I just described like https://github.com/b…
Ah yes ad hoc, the best way to write fundamental utilities underpinning every fetch your app makes.
OpenAI's response to the Axios developer tool compromise
61–68 of 68 posts
Re: OpenAI's response to the Axios developer tool compromise
#62Earlier quoted context omitted.
When the vulnerability was announced, it took me two minutes to one-shot convert an entire legacy project from axios to fetch (it already wrapped api calls neatly), react cra to vite, update all dependencies, convert to deep imports to reduce bundle size and get zero npm warnings while fetching coffee. There is just no excuse to use it.
Move from a tested library where when a vulnerability is discovered everyone in the world is made aware to an untested one shot llm output that if a vulnerability is discovered will never come to light . What's the reason to switch to something less stable short/long term? Because its older and newer code is always better?
Re: OpenAI's response to the Axios developer tool compromise
#63Axios, like Express, is something I'm shocked to see used in any modern codebase. I loved both in the 2010s. In JS/TS-land there are much simpler and better options these days. Depending on Axios suggests the devs don't know how to use fetch. I can't think of another reason it would be a necessary dependency
Re: OpenAI's response to the Axios developer tool compromise
#64Earlier quoted context omitted.
I do "just use fetch" nowadays -- but I have to say, axios definitely has better ergonomics than fetch, especially for calling APIs.
I drag a tiny fetch wrapper around with error/json handling, timeouts and basic interceptor support. It doesn't cover everything axios does but it's nice enough and I haven't had to touch it in a couple years. For reference: https://github.com/sampullman/fetch-api/blob/main/lib/fetchA...
Re: OpenAI's response to the Axios developer tool compromise
#65Re: OpenAI's response to the Axios developer tool compromise
#66Re: OpenAI's response to the Axios developer tool compromise
#67Re: OpenAI's response to the Axios developer tool compromise
#68Earlier quoted context omitted.
Of course, when everyone sets min-release-age=7, supply chain attacks won't get noticed until 7 days later. So you should set min-release-age=14 and be safe forever.
I chuckled, but in all seriousness, thankfully those individuals and companies who often discover these attacks listen in on every new npm push and analyze it relatively fast. The time to detect is sometimes in minutes in recent months, less than the process of getting npm to remove the packages. Not always but looking at recent ones and advances in latest SOTA models make detection easier than ever. It might change…