dsoftbus_safety_guard

Review OpenHarmony dsoftbus C/C++ sources for unsafe coding patterns.

31|6|Updated Jan 29, 2026
One-click install
npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill dsoftbus-safety-guard
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: dsoftbus_safety_guard
Source: https://github.com/openharmonyinsight/openharmony-skills/tree/main/skills/dsoftbus-security
Command: npx skills add https://github.com/openharmonyinsight/openharmony-skills --skill dsoftbus-safety-guard

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This skill helps you proactively find security and robustness issues in OpenHarmony dsoftbus C/C++ code, with emphasis on safe pointer/memory/lock handling and preventing sensitive information from leaking through logs.

Core Features & Use Cases

  • Comprehensive security rule-based code review: Applies 40+ safety rules across pointer safety, memory management, lock management, fd handling, integer/loop correctness, permission checks, and external input validation.
  • Cross-file calling and control-flow analysis: Traces call chains, resource/data flows across files, and analyzes execution paths to uncover path-sensitive defects.
  • Actionable, read-only reporting: Produces a detailed review report with fix suggestions in the report only, without modifying source files.

Use case example: When you review a suspicious dsoftbus module change that touches IPC, threading, and memory allocations, you can run this skill to generate a structured report highlighting high-risk vulnerabilities such as null dereferences, lock leaks, buffer/array misuse, sensitive log output, and unsafe return/log patterns.

Quick Start

Ask your AI assistant: 软总线安全卫士 请审查这个目录:<your dsoftbus code path>(会生成只读安全检视报告,并覆盖跨文件调用与控制流分析)。

Frequently Asked Questions about dsoftbus_safety_guard

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I perform a security code review on OpenHarmony dsoftbus C/C++ sources?

To perform a security code review on OpenHarmony dsoftbus C/C++ sources, run this skill on your target directory to detect unsafe coding patterns and generate a detailed read-only report. It applies 40+ safety rules across pointer, memory, lock, and fd categories.

What types of memory safety and pointer vulnerabilities can I detect in dsoftbus IPC and network code?

You can detect memory safety and pointer vulnerabilities in dsoftbus IPC and network code using built-in rules for null dereferences, buffer misuse, and lock leaks. The analysis traces cross-file call chains and control-flow paths to uncover path-sensitive defects.

How does cross-file control-flow analysis help find security risks in multithreaded C/C++ code?

Cross-file control-flow analysis helps find security risks in multithreaded C/C++ code by tracing resource and data flows across files. This path-sensitive execution analysis uncovers defects like lock leaks and unsafe return patterns that single-file reviews often miss.

Does this code review tool check for sensitive information leaking through logs?

Yes, this code review tool checks for sensitive information leaking through logs by enforcing logging policy compliance rules. It identifies unsafe log output patterns and prevents sensitive data from being exposed in dsoftbus components.

Can I use this to automatically fix null dereferences and lock leaks in my dsoftbus code?

No, you cannot use this to automatically fix null dereferences and lock leaks because it generates a read-only review report. It provides actionable fix suggestions within the report output without modifying your original source files.

What are the limitations of using automated safety rules for external input validation in C/C++?

A limitation of using automated safety rules for external input validation in C/C++ is that the review is read-only and does not modify files. It focuses on detecting predefined unsafe patterns across permission and input categories rather than runtime dynamic testing.