惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

Microsoft Azure Blog
Microsoft Azure Blog
aimingoo的专栏
aimingoo的专栏
F
Fortinet All Blogs
Blog — PlanetScale
Blog — PlanetScale
GbyAI
GbyAI
MongoDB | Blog
MongoDB | Blog
月光博客
月光博客
The Cloudflare Blog
量子位
T
Tailwind CSS Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
B
Blog
MyScale Blog
MyScale Blog
T
The Blog of Author Tim Ferriss
The GitHub Blog
The GitHub Blog
G
Google Developers Blog
D
DataBreaches.Net
V
Visual Studio Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Last Week in AI
Last Week in AI
U
Unit 42
博客园 - 聂微东
有赞技术团队
有赞技术团队
A
About on SuperTechFans

Datadog | The Monitor blog

Introducing our open source AI-native SAST Instrument and monitor Boomi integration flows with OpenTelemetry and Datadog Not all index scans are equal: How we cut query latency by over 99% Platform engineering metrics: What to measure and what to ignore Integrate Recorded Future threat intelligence with Datadog Cloud SIEM CI/CD security: threat modeling using a MITRE-style threat matrix CI/CD security: How to secure your GitHub ecosystem Ingress NGINX is EOL: A practical guide for migrating to Kubernetes Gateway API Operating agentic AI with Amazon Bedrock AgentCore and Datadog LLM Observability: Lessons from NTT DATA Introducing the Datadog Code Security MCP Capture and analyze custom heatmaps in Session Replay Understand session replays faster with AI summaries and smart chapters Monitor ClickHouse query performance with Datadog Database Monitoring How we designed empathetic alert sounds for on-call engineers Search and act across Datadog to resolve issues faster with Bits Assistant Measure the business impact of every product change with Datadog Experiments Analyzing round trip query latency Configuring JavaScript caches for better performance Introducing Bits AI Dev Agent for Code Security Datadog achieves ISO 42001 certification for responsible AI Monitor Nutanix clusters, hosts, and VMs with Datadog Monitor Juniper Mist in Datadog A new Host Map for modern infrastructure Annotate traces to improve LLM quality with Datadog LLM Observability What’s new in Cloud SIEM: AI-powered investigations, enhanced threat intelligence, and scalable security operations Explore Kubernetes with native OpenTelemetry data Monitor Oracle Fusion Cloud Applications with Datadog Announcing the Datadog Terraform provider v4.0.0 Scaling Kubernetes workloads on custom metrics How to design cloud environments for AI-powered threat analysis
Ship high-quality, secure code faster with Datadog Code A...
2023-02-15 · via Datadog | The Monitor blog

As your engineering teams grow and commit code more frequently, it becomes increasingly difficult to release high-quality, secure code while achieving your desired development velocity. To create smoother developer workflows that ensure high standards for code quality and security, it’s critical for developers to detect and remediate issues earlier in the software development lifecycle— without switching tools or contexts.

To help engineering teams effectively address code quality and security issues before they get merged to production, Datadog Code Analysis uses our open source Static Analyzer to scan your codebase for security vulnerabilities and maintainability issues, and highlights them directly within your IDE and GitHub pull requests. Code Analysis can also run Software Composition Analysis to scan the open source libraries imported into your repositories for known vulnerabilities. By incorporating Code Analysis into your existing workflows, you can continuously improve your code quality and secure new features before they reach your end users.

In this post, we’ll cover how Datadog Code Analysis helps you identify and resolve vulnerabilities and code quality issues in your local environment before deploying them to production. We’ll also explore how you can triage existing issues to improve your codebase over time and mitigate vulnerabilities in open source libraries.

Resolve vulnerabilities and code quality issues in development

When vulnerabilities and performance issues are merged into production, they can impact customers and interrupt workflows, as developers need to devote time to investigating and correcting these problems. Addressing these problems earlier in the development cycle enables developers to adhere to best practices and improve the security of their code.

Datadog Static Analysis analyzes your code in real time directly in your IDE as you write it. The analysis helps identify vulnerabilities, violations of industry-standard best practices, and other issues such as code that is prone to errors or difficult to maintain. After installing the Datadog plugin that’s available for your IDE (VS Code or JetBrains) and selecting the out-of-the-box rules you’d like it to use, our plugin will dynamically detect rule violations as you make changes to your code. This enables you to proactively address issues during the development stage and reduce the amount of context switching and investigation required after your code has been merged.

When Datadog detects a rule violation, our plugin will call out the code that requires correcting. In the following example, we’re making a GET request, but we’ve failed to include a timeout. The requests module in Python doesn’t include timeouts by default, which means that the connections created by this function call may hang indefinitely, leading to server overloads or crashes. For certain violations, Datadog will suggest a fix that you can apply directly within your IDE. In the example below, clicking “Add timeout argument” will automatically add an additional timeout parameter to your GET request to help you resolve the issue.

Quickly resolve code issues with our plugin's suggested fix feature.

Enabling our Static Analysis security rulesets also helps you secure your code before it reaches production. Our analyzer detects cases of non-compliant code—such as SQL queries and file reads that use unsanitized user input—that can leave your application vulnerable to SQL injection attacks and data leaks. If left unchecked, these vulnerabilities can present a huge security risk to your organization.

In addition to providing developers with real-time feedback on their code with our IDE integrations, you can also get automated feedback and suggestions across your repository or codebase by configuring Datadog’s GitHub integration. This enables you to flag rule violations directly in pull requests and create transparent suggestions for developers committing new code. You’ll also have the option to require contributors to fix their code violations prior to PR approval. To further enforce these rulesets, you can configure Quality Gates that will automatically halt a PR from getting merged if it fails to meet your defined standards (e.g., unaddressed security violations). You can learn more about how to use Quality Gates in our blog post.

Flag code violations in your pull request with Datadog's GitHub integration.

Triage existing code violations in Datadog

After enabling Code Analysis within a repository, you can view and begin addressing existing Static Analysis violations in the Datadog platform. You can filter by result status to triage and prioritize higher severity issues or by specific rule IDs to identify the prevalence of any given violation. By inspecting a violation, Datadog will direct you to the location of the source code directly in your GitHub repository—and recommend a suggested fix to help you quickly resolve the issue without any manual effort.

View and triage existing code violations in Datadog Code Analysis.

While code vulnerabilities may require a more urgent response, it’s also important to resolve code quality violations to avoid accumulating technical debt. By triaging all of these issues, your engineering teams can improve the quality and security of your codebase over time—and prevent the introduction of new issues using the IDE and GitHub integrations for Static Analysis.

Mitigate vulnerabilities in open source libraries

Static Analysis can help you find and fix vulnerabilities before your code changes are shipped to production, but vulnerabilities may still be introduced through third-party, open source libraries imported within your codebase. Datadog Software Composition Analysis (SCA) scans the open source libraries imported within your service so that your libraries are held to the same high standards as your first-party code. By navigating to Code Analysis within Datadog, you can view a list of vulnerabilities found in your libraries in the “Library Vulnerabilities” tab as shown below. You can toggle Code Analysis to your development branches for visibility into your working code changes as well. By inspecting a library, Datadog will give you additional details into how the vulnerability affects your application and users, where it’s located in your stack, and remediation steps to help you minimize the risk of exploitation.

Scan open source libraries imported into your application for security vulnerabilities.

You can also inspect critical library vulnerabilities at runtime in Datadog Code Security. This means that you gain insights into services running in your production environment with exposed vulnerabilities, as well as services actively under attack by threat actors. In the screenshot below, SCA has detected a remote code execution vulnerability in one of the frameworks used in your application. By following Datadog’s suggested next steps, you can quickly upgrade the framework to a new, recommended version and verify that the fix is working as intended.

Quickly resolve runtime vulnerabilities with Datadog Code Security.

Get started with Code Analysis

Datadog Code Analysis enables developers to proactively catch and fix issues within their code before they create impact for end users. To get started with the public beta for this feature, head to our Code Analysis setup page, where you’ll need to select your repository’s programming language(s), your CI/CD provider, and the name of your service and environment. After you select the rulesets you want to apply, such as code quality, security, and supported frameworks, Datadog will automatically generate rulesets that you can use to create a static-analysis.datadog.yml file within your project directory. You can also choose to enable Software Composition Analysis for your service.

Configure Code Analysis for your project.

To run Static Analysis on your local machine, you can get started by installing our plugins for IntelliJ or VS Code.

If you don’t already have a Datadog account, sign up for a free 14-day trial today.