Best of Snyk2024

  1. 1
    Article
    Avatar of snykSnyk·2y

    10 modern Node.js runtime features to start using in 2024

    Explore 10 modern Node.js runtime features to start using in 2024. Includes the Node.js test runner, native mocking, test coverage, watch mode, .env loader, import.meta support, native timers with promises, permissions model, and policy module.

  2. 2
    Article
    Avatar of snykSnyk·2y

    5 Node.js security code snippets every backend developer should know

    Learn about essential Node.js security code snippets, including using the Node.js Permissions Model, implementing input validation with Fastify JSON schema, securing password hashing with Bcrypt, preventing SQL injection attacks with Knex.js, and implementing rate limiting with fastify-rate-limit.

  3. 3
    Article
    Avatar of snykSnyk·2y

    What you should know about PHP security vulnerabilities

    PHP is a popular scripting language for web development, which makes it a target for hackers. Developers must understand PHP security risks like SQL Injection and code injection, and use practices like sanitizing inputs, using prepared statements, and regularly updating dependencies to mitigate these risks. Tools like Snyk can automate the process of identifying and fixing vulnerabilities in PHP applications, ensuring compliance and protecting against breaches.

  4. 4
    Article
    Avatar of snykSnyk·2y

    Preventing SQL injection in C# with Entity Framework

    SQL injection (SQLi) is a severe security threat that happens when malicious SQL code is injected into user inputs, potentially compromising the database. To avoid SQLi, it's crucial to avoid using string concatenation for SQL queries. Instead, Entity Framework (EF) offers secure options: LINQ for most queries, FromSqlInterpolated for raw SQL using string interpolation, and FromSqlRaw when explicit parameters are defined. Tools like Snyk Code can help detect unsafe code during development.

  5. 5
    Article
    Avatar of snykSnyk·2y

    How to prevent log injection vulnerability in JavaScript and Node.js applications

    Enterprise applications rely heavily on logging for debugging and monitoring, but this opens up vulnerabilities like log injection attacks. These occur when attackers manipulate input data to insert malicious code into logs. To prevent this, it's crucial to sanitize user inputs, carefully consider what data gets logged, use structured logging, and opt for logging libraries over simple console.log. Tools like the Snyk IDE extension for VS Code can help identify vulnerabilities in Node.js applications.

  6. 6
    Article
    Avatar of snykSnyk·2y

    Nine Docker pro tips for Node.js developers

    Learn advanced Docker commands for Node.js developers, including opening a shell in a Docker container, finding the version of a Node.js Docker image, and using Apple M1-optimized Docker images.

  7. 7
    Article
    Avatar of snykSnyk·2y

    10 GitHub Security Best Practices

    Learn how to improve GitHub security with best practices including enabling 2FA, limiting access to repositories, avoiding storing credentials in code, scanning for vulnerabilities with Snyk, using branch protection rules, rotating SSH tokens and personal keys, automatically updating dependencies, using private repositories for sensitive data, and making smart choices about GitHub apps.

  8. 8
    Article
    Avatar of snykSnyk·2y

    How to secure an S3 bucket on AWS?

    Amazon S3 provides scalable, high-performance cloud storage, but securing S3 buckets is crucial to prevent data breaches. Key vulnerabilities include misconfigured permissions, unencrypted data, and lack of monitoring. Best practices for S3 bucket security include safeguarding permissions using IAM roles, enforcing encryption, and implementing secure transport policies like HTTPS. Regular auditing and using tools like Snyk for automated detection and remediation of cloud misconfigurations can significantly bolster security.

  9. 9
    Article
    Avatar of snykSnyk·2y

    Fastify plugins as building blocks for a backend Node.js API

    Fastify is a high-performance web framework for building backend Node.js APIs. It offers advantages such as modern ESM support, async/await promise-based route definitions, high performance with fast radix route tree resolution, and a rich plugin architecture with encapsulation. The plugins mentioned in the post, including @fastify/pino, @fastify/cors, @fastify/env, and @fastify/swagger, serve as building blocks for Fastify applications and provide features like logging, CORS support, environment variable management, and API documentation.

  10. 10
    Article
    Avatar of snykSnyk·2y

    Preventing broken access control in express Node.js applications

    Learn about broken access control in Node.js applications and how to prevent vulnerabilities. Understand the risks and strategies to enhance application security.

  11. 11
    Article
    Avatar of snykSnyk·2y

    10 Dimensions of Python Static Analysis

    Python static analysis, or linting, involves inspecting code to identify bugs, errors, and non-adherence to coding standards. It helps catch vulnerabilities early, increasing code security and reliability. Tools like Pylint, Mypy, and Snyk aid in this process. Additionally, code complexity, dependency analysis, and performance profiling are essential components of maintaining high-quality, secure Python code. Integrating these tools in development workflows, CI pipelines, and code editors can enhance the software development process and ensure better code quality and security.