Si estás usando npm install, estás en peligro.
¡Así de crudo te lo cuento para que reacciones!
Ayer se comprometieron paquetes de TanStack en npm.
De las bibliotecas más usadas en el mundo JavaScript.
Y de ahí saltó a Mistral, OpenSearch, UiPath, PyPI...
Porque muchos ataques no necesitan que importes nada. Basta con una instalación para infectarte.
¿Cómo?
Colando scripts como preinstall o postinstall que se ejecutan durante la instalación.
Lo importante es que tiene solución:
① Usa pnpm 11
Viene con defensas por defecto contra este tipo de ataques.
② Si sigues usando pnpm 10, npm, yarn o bun
Activa minimumReleaseAge y ponle 1440.
Evita instalar versiones publicadas el mismo día.
③ Bloquea scripts de instalación por defecto
pnpm evita que cualquier dependencia ejecute código en tu máquina solo por instalarla.
Por favor, comparte esto para que le llegue al máximo número de personas y paremos la cadena de ataques.
¡SORTEO un teclado Keychron K3 mecánico!
Con retroiluminación RGB y switches Red o Brown.
¿Cómo participar?
→ Like y RT a este post
→ Sígueme
✓ Participación abierta a todo el mundo
✓ Resultado el 6 de diciembre
✓ Envío internacional incluido
Today, we’re deprecating Create React App for new apps, and encouraging existing apps to migrate to a framework.
We’re also providing docs for when a framework isn’t a good fit for your project, or you prefer to start by building a framework.
https://t.co/8REQYvcqHs
🧪 ¿Conoces todas las etiquetas HTML?
Posiblemente conozcas div, span o input, pero... ¿Conoces algunas como details, dialog, data, menu, picture, template o hgroup?
👇 En esta tabla periódica las tienes todas, por categorías, con su explicación detallada. ¡En español y gratis!
@deporvillage No creo que sea así @deporvillage . En primer lugar, porque ni siquiera es mi caso, es de una amiga. Y, a fecha de hoy, no se ha solucionado. Así que está como al principio, sin reloj y sin dinero.
No puedo creerme que el servicio de atención al cliente de @deporvillage no pueda dar una solución a un caso como este. La diferencia entre una gran marca y una mediocre está en cosas como estas...
https://t.co/uxlyfUOI5X
How do we design effective and safe APIs?
APIs have increasingly become the backbone of modern software.
To understand some of the key principles and best practices of API design, Let's analyze a social media platform example:
🔹 Resource naming
Clarity is key when creating APIs.
Adopting simple resource names, like /users for accessing user profiles and /posts for retrieving user posts, streamlines the development process and reduces mental strain.
🔹 Use of plurals
It's important to maintain a standard of consistency in API design.
For consistency and readability, use plural resource names, such as GET /users/{userId}/friends vs. /friend), to avoid ambiguity in API requests.
🔹 Cross-referencing resources
Interlinking resources, like taking comments on a post using GET /posts/{postId}/comments, simplifies the retrieval of related data.
It provides a more streamlined and well-organized user experience.
🔹 Security
It goes without saying, security is a must-have.
To secure the API endpoints, employ authentication methods like X-AUTH-TOKEN and X-SIGNATURE, and use authorization headers for verifying user permissions.
Learn more about API security here: https://t.co/eGNp9pjo2J
🔹 Versioning
Using versioning and communicating version updates is another important practice.
Endpoints like GET /v2/users/{userId}/posts allow API versioning to maintain functionality regardless of updates.
This approach ensures backward compatibility and a smooth transition for users and us.
Learn more about API versioning here: https://t.co/6L1SrPClME
🔹 Pagination
This technique is important for performance.
Paginate large datasets, like feeds or comment lists, with GET /posts?page=5&pageSize=20 to enhance data delivery and UX.
🔹 Idempotency
Maintaining API reliability is necessary.
Idempotency ensures that operations like profile updates (PUT /users/{userId}/profile) achieve their intended result, regardless of how often they are executed.
These practices are very important, but there’s still much more to API design.
Learn more about API design here: https://t.co/mokDFEG965
Thorough documentation, robust monitoring and logging, and consistent error handling are just a few more of the many essential habits required for designing effective and safe APIs.
Adopting these principles and practices enables us to develop secure and performant APIs that deliver good user experiences.
P.S. If you like this post, then you'll love our newsletter. Subscribe here: https://t.co/zFn968t07t
10 Must-know best practices for optimizing API endpoints:
Optimizing API endpoints is critical for achieving optimal performance in robust, scalable applications.
By following best practices, we can significantly enhance performance, strengthen security, and improve user and developer experience of APIs.
Let's look at 10 core best practices for optimizing API endpoints:
Performance best practices:
🔹 Optimize SQL queries
Ensure your queries are performant. Use query execution plans to identify bottlenecks. Optimize and implement caching for frequent queries to minimize database load.
🔹 Caching
Store frequently requested data at the client, server, or CDN level using caching headers or tools like Redis. This reduces response time and lightens backend load. Be mindful of stale data and implement cache invalidation strategies.
🔹 Payload optimization
Compress large responses with Gzip, remove unnecessary fields from payloads, and use efficient formats like JSON for faster data transmission. Keep payloads lightweight, but don’t compromise on essential details for the client.
🔹 Pagination
Break large datasets into smaller chunks with tools like limit and offset parameters. This improves performance and avoids crashing clients with oversized responses. Combine with cursors for better consistency in real-time data.
🔹 Asynchronous processing
For time-intensive operations like file uploads or report generation, use background jobs with tools like RabbitMQ or Celery to keep APIs responsive. Return task IDs so clients can check the operation's status.
Security best practices:
🔹 Rate limiting and throttling
Set limits on requests per user or client to prevent abuse, avoid server overload, and ensure consistent performance during traffic spikes. Customize thresholds based on endpoint sensitivity.
🔹 Input validation and sanitization
Validate and sanitize all user inputs to protect against injection attacks (e.g., SQL injection, XSS) and ensure data integrity.
🔹 Monitoring and logging
Track API metrics like response times, error rates, and usage patterns using tools like Datadog or New Relic. Comprehensive logs simplify debugging and help predict scaling needs. Regularly review logs to identify trends or anomalies. This is also important to identify performance bottlenecks.
🔹 Authentication and authorization
Implement robust mechanisms like OAuth2, API keys, or JWT to ensure secure access and restrict resource usage to authorized users.
🔹 Encrypting data in transit
Use HTTPS to secure data exchanges between clients and servers, ensuring sensitive information remains protected from interception.
💬 What’s your favorite API optimization tip? 💭
~~
P.S. If you like this post, then you'll love our newsletter. Subscribe here: https://t.co/zFn968t07t
Learn how to automate the validation & testing of your DataOps pipeline for continuous testing. RESTful API with 100+ API calls & Swagger documentation #dataquality#testautomation#ETLtesting
Aprovecho que hoy acompaño como reserva al equipo de relevo mixto de marcha para hacer algo que nunca puedo: contaros cómo se vive desde dentro el día de competir en unos Juegos Olímpicos
(Abro hilo)
Who remembers this moment in Prince of Persia (1989) where a magic mirror suddenly blocks the hero's path (and what happens afterward)?
This moment was actually never planned to be in the game. My original vision was a game with lots of traps, but NO enemies... (1/10)
GUÍA con 16 TRUCOS para mejorar tu UI
¡Aplicable a cualquier tipo de página web o app!
Fáciles de aplicar, entendibles y marcan la diferencia:
→ https://t.co/FthZg3kyoW