# Qihoo360/safe-rules

详细的C/C++编程规范指南，由360质量工程部编著，适用于桌面、服务端及嵌入式软件系统。

Repository: https://github.com/Qihoo360/safe-rules
Canonical: https://ross.abutalabs.com/products/safe-rules
License: Apache-2.0
License Family: permissive
Topics: safe, security, guidelines, code-quality
Last push: 2024-10-19T05:07:17+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 1771, "days_push": 683, "days_rel": 683, "gap_med": null, "n_releases_24m": 1}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2713, forks 312 (observed 2026-08-28T04:07:11.953933+00:00)

## What it is
A detailed C/C++ secure programming guideline collection (the '360 Safety Rules') authored by Qihoo 360's quality engineering department. It provides rule documents in Markdown and JSON formats plus lists of C and C++ undefined behavior causes, applicable to desktop, server, and embedded software.

## Use cases
- establish a C/C++ coding standard for my team
- learn about undefined behavior pitfalls in C and C++
- guidance for auditing C/C++ code for security issues
- training material for secure programming practices
- improve reliability and portability of embedded C code
- find rules to prevent common C++ security bugs

## When to choose
- you need an authoritative, structured reference for C/C++ secure coding rules
- you are building or refining an internal coding standard or code review checklist
- you want machine-readable rules (JSON) to integrate into tooling or training

## When to avoid
- you need automated linting or static analysis rather than written guidelines
- your project is in a language other than C or C++
- you need executable enforcement of rules rather than documentation

## Facets
- artifact type: learning-resource
- maturity: active
- function: documentation, security, developer-tools
- domain: security, developer-tools, programming-languages, tutorials
- platform: cross-platform
- tags: c-cpp, coding-standards, secure-coding, code-audit, undefined-behavior, guidelines

## Member repositories
- Qihoo360/safe-rules (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:11.953933+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T02:15:32.180183+00:00, confidence not recorded.
  - readme: https://github.com/Qihoo360/safe-rules (fetched 2026-08-28T04:07:11.953933+00:00, sha a95ed3cbb4f2)
- Data as of 2026-08-30T08:39:29.467469+00:00.
