DeepSeek Harness Plugin: Read-only Security Assessment of Dameng DM8 Database

Foreword

In the DeepSeek Harness (DSH) ecosystem, database security assessment is a common scenario in agent development and operations. As a mainstream domestic database, Dameng Database (DM8) security baseline checks often involve a large number of SQL queries and configuration verifications. Manually writing assessment scripts is not only time-consuming but also difficult to maintain consistent standards.

The dsh-plugin-dm-security plugin aims to solve this pain point. It performs security scans on DM8 instances in a read-only manner, automatically generating assessment conclusions with Classified Protection (Dengbao) alignment and HTML reports for developers or operations personnel to use directly.

Plugin Introduction

This is a read-only security assessment plugin for the Dameng DM8 database. The plugin executes 60 read-only checks covering 13 security domains, provides six-state conclusions (Critical/Warning/Notice/Compliant/Not Applicable/Not Retrieved), aligns with Classified Protection 2.0 (GB/T 22239-2019) control points, and finally outputs a zero-dependency HTML report.

This plugin is maintained by Shiyuedong-Jade and licensed under the MIT License.

Core Features

  • 60 Read-only Checks: Covers 13 security domains, including Identity Authentication, Authentication Methods, Password Policies, Discretionary Access Control, Mandatory Access Control, Security Audit, Communication Security, Storage Encryption, Resource Limits, Access Paths, Exposure Surface & Code Security, as well as Host-side OS/SSH checks.
  • Six-State Conclusions: Provides a clear status for each check (Critical/Warning/Notice/Compliant/Not Applicable/Not Retrieved) to facilitate quick risk localization.
  • Classified Protection 2.0 Alignment: Supports the GB/T 22239-2019 standard with selectable Level 2/3/4 alignment, providing clause-level compliance determinations.
  • Host-side Checks: Additionally provides 7 OS/SSH checks (requires SSH account), including process running account, directory permissions, config file listening, plaintext password traces, and audit file retention periods.
  • Cluster Support: Supports per-node assessment for single instances and Shared Storage Clusters (DMDSC), and verifies configuration consistency between nodes.
  • Zero-Dependency Report: Outputs a single-file HTML report with no external script dependencies; it can be opened with a double-click.
  • Read-only Design: All database SQL statements are queries, and the host side only executes 7 read-only commands, modifying no configurations.

Installation and Activation

1. Install Plugin

Execute the following command in the terminal to install the plugin:

dsh plugin --profile web add github:Shiyuedong-Jade/DM-security

2. Prepare Environment

The plugin depends on the following environment:

  • Node.js: Version ≥ 20.
  • Java: Version ≥ 8. The bridge will be automatically compiled on first run, and the result is cached in the working directory.
  • Dameng JDBC Driver: DmJdbcDriver8.jar. The plugin does not bundle this driver; you need to prepare it yourself.

3. Place Driver

Copy the JDBC driver from the Dameng installation directory to the working directory:

Platform Path
Windows %USERPROFILE%\.dsh\dm-security\drivers\
Linux ~/.dsh/dm-security/drivers/

The plugin will automatically look for drivers with filenames matching DmJdbcDriver*.jar in this directory.

4. Restart

After installation is complete, restart dsh web and refresh the page.

Typical Usage

The plugin registers the dm_security_assess tool, supporting three actions:

action Description
assess Only outputs text conclusions in the session
report Assesss and generates an HTML report
list Lists the check item catalog without connecting to the database

Basic Invocation Example

Assess using default configuration or specified parameters:

dm_security_assess action=report host=127.0.0.1 port=5236 user=SYSDBA level=3

Connection Parameters

  • driver: Specifies the connection mode. jdbc connects to a real database, demo uses built-in sample data.
  • targets: Multi-node targets (e.g., DMDSC), format as host:port, supports comma or space separation.
  • user / password: Database account and password. It is recommended to configure credentials in the settings card to avoid exposure on the command line.
  • level: Classified Protection alignment level, default is 3, options are 2 or 4.
  • sshUser / sshPassword: If host-side checks are required, SSH account and password must be provided.

Host-side Check Example

If host-side security baseline checks are also needed:

dm_security_assess action=report host=127.0.0.1 port=5236 sshUser=dmdba sshPassword=xxx

Notes

  • Security: The plugin does not save passwords to disk; they are only recorded in session logs. Plaintext password scans are masked at the collection layer, and the original text will not appear in the report.
  • Read-only Feature: All SQL and host commands are read-only operations. They will not modify database or host configuration files, making it suitable for direct execution in assessment or production environments.
  • Scope of Application: The Standard Edition (Standard/Enterprise) does not support Mandatory Access Control and the separation of four privileges; related items will be judged as “Not Applicable”.
  • Source Code Updates: The plugin host loads the installed copy under the profile directory. After modifying the repository source code, you must execute dsh plugin --profile web update dsh-plugin-dm-security to apply changes.
  • Report Output: Reports are output to dm-security-reports in the working directory by default. Filenames include the timestamp and alignment level.
  • Unverified Environments: The plugin has not been verified in environments such as the Security Edition (mac.* six-state path), DM9, Dameng on Windows, or ARM architectures (Kunpeng/Phytium).

Conclusion

dsh-plugin-dm-security provides a standardized read-only solution for Dameng database security assessment within the DSH ecosystem. Through six-state conclusions and Classified Protection alignment, it helps developers quickly identify security baseline issues. To learn more details or view report samples, please visit the plugin directory or the GitHub repository.

羽毛球分组比赛记分
小程序二维码

欢迎使用《羽毛球分组比赛记分》微信小程序

Xiaoye