Palimpsests

遵循以下最佳实践的项目将能够自愿的自我认证,并显示他们已经实现了核心基础设施计划(OpenSSF)徽章。

没有一套可以保证软件永远不会有缺陷或漏洞的做法;如果规范或假设是错误的,即使合适的方法也可能失败。也没有哪些做法可以保证一个项目能够维持健康和运作良好的开发者社区。但是,遵循最佳做法可以帮助改善项目的成果。例如,一些做法可以在发布之前进行多人评估,这可以帮助您找到其他难以找到的技术漏洞,并帮助建立信任,并希望不同公司的开发人员之间进行重复的交互。要获得徽章,必须满足所有“必须”和“禁止”的条款,满足所有“应该”条款或有合适的理由,所有“建议”条款必须满足或未满足(至少希望考虑)。欢迎通过 GitHub网站创建问题或提出请求进行反馈。另外还有一个一般讨论邮件列表

如果这是您的项目,请在您的项目页面上显示您的徽章状态!徽章状态如下所示: 项目13534的徽章级别为gold 这里是如何嵌入它:
您可以通过将其嵌入在您的Markdown文件中:
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/13534/badge)](https://www.bestpractices.dev/projects/13534)
或将其嵌入到HTML中来显示您的徽章状态:
<a href="https://www.bestpractices.dev/projects/13534"><img src="https://www.bestpractices.dev/projects/13534/badge"></a>


这些是黄金级别条款。您还可以查看通过白银级别条款。

Baseline Series: 基准等级1 基准等级2 基准等级3

        

 基本 5/5

  • 常规

    请注意,其他项目可能使用相同的名称。

    Layered local-LLM inference engine for agentic workloads: Ollama and llama.cpp behind one abstraction, context-memory (sink/window/evict + block retrieval), encrypted audit log. Native L3 serving layer in progress.

    请使用 SPDX许可证表达格式;例子包括“Apache-2.0”,“BSD-2-Clause”,“BSD-3-Clause”,“GPL-2.0+”,“LGPL-3.0 +”,“MIT”和“(BSD-2-Clause OR Ruby)”。
    如果有多种语言,请将它们列为逗号分隔值(可选空格),并将它们从最多到最少使用。如果有长列表,请至少列出前三个最常见的列表。如果没有语言(例如,这是仅文档或仅测试项目),请使用单个字符“ - ”。请使用每种语言的常规大小写,例如“JavaScript”。
    通用平台枚举(CPE)是用于信息技术系统,软件和软件包的结构化命名方案。在报告漏洞时,它可用于多个系统和数据库。
  • 先决条件


    该项目必须拥有银级徽章。 [achieve_silver]

  • 项目监督


    项目必须具有2个或更多的“公交车因子”。 (需要网址) [bus_factor]
    “公交车系数”(又名“卡车因子”)是指最少数量的项目成员,如果突然离开项目(“被公交车撞了”),项目会由于缺乏具备知识的或有能力的人员而暂停。 卡车因子 工具可以对GitHub上的项目进行估计。有关详细信息,请参阅Cosentino等人的评估Git存储库的卡车因子

    The project's bus factor is 2. Two people are significant contributors, each able to keep the project going on their own: the maintainer (@andreysparish) and the co-maintainer (@olksandrvertel-arch). Both hold repository-admin rights and can independently review, merge, and release; the co-maintainer has 35+ commits, including the hardware-isolation test suite and the role of independent PALA-1 verifier. Losing either one would not halt the project. Roles and the split of work are documented in docs/GOVERNANCE.md, and the contribution history is visible in the repository.
    URL (required) — the contributors graph is the most direct evidence of a bus factor ≥ 2:
    https://github.com/Assault-Consulting/Palimpsests/graphs/contributors



    该项目必须至少有两个不相关的重要贡献者。 (需要网址) [contributors_unassociated]
    如果同一组织(作为雇员或承包商)支付工作费用,并且组织将从项目的结果中受益,则贡献者是相关联的。如果通过其他组织得到财务补助(例如,源自政府或非政府组织,支付给不同组织的科学补助金不会导致捐助者关联),不视为来自同一组织。重要贡献者定义为过去一年对项目做出了不平凡的贡献。一个重要贡献者的良好指标的例子是:编写至少1,000行代码,贡献50个提交或至少提交20页的文档。

    Unassociated significant contributors in the past year: (1) Oleksii Turak, independent developer, no relationship with Assault Consulting — author of the fifth independent PALA-1 verification: a from-spec Perl 5 verifier with a hand-rolled NIST-validated AES-GCM implementation, ~2,300 lines (verifier + methodology + run record), merged 2026-08-18 (docs/specs/pala-1/independent-runs/turak/); (2) Sharyar Naseem, independent — the fourth independent verification run and a merged feature contribution (export seq-range bounds, PR #135, 2026-08-14). The two contributors are not associated with each other or with Assault Consulting; neither is paid by Assault Consulting. Andrii Sparysh and Oleksandr Verteletskyi (Assault Consulting) are counted as one associated group and excluded. Evidence: https://github.com/Assault-Consulting/Palimpsests/graphs/contributors


  • 其他


    项目必须在每个源文件中包含许可证声明。这可以通过在每个文件开头附近的注释中加入以下内容来实现: SPDX-License-Identifier: [SPDX license expression for project][license_per_file]
    这可以通过在自然语言中包含许可证标识来完成。该项目还可以包括完整许可证文本,或者指向许可证文本的稳定URL。请注意,license_location条款要求项目许可证在标准位置。有关SPDX许可证表达式的更多信息,请参阅SPDX教程。请注意与 copyright_per_file 的关系,其内容通常在许可证信息之前。

    Every file in the Palimpsests repository has an explicit SPDX license statement. Most source files include an inline # SPDX-License-Identifier: [expression] comment near the top of the file; the remaining files are covered by a catch-all annotation in REUSE.toml (path = "**"). The project uses two licenses, each declared per file with the correct SPDX expression: the main codebase is Apache-2.0, while the PALA-1 specification and its reference implementations are dedicated to the public domain as CC0-1.0 (so a third party can implement the format without being bound by Apache terms). The repository is compliant with version 3.3 of the REUSE Specification: reuse lint reports 206/206 files with license information. The full license texts are stored in the standard location under LICENSES/ (Apache-2.0.txt and CC0-1.0.txt), and the conventional LICENSE file remains at the repository root.


 变更控制 4/4

  • 公开的版本控制的源代码存储库


    必须使用通用的分布式版本控制软件(例如,git,mercurial)作为项目的源代码存储库。 [repo_distributed]
    Git不是必须,项目在合适场景可以使用集中版本控制软件(如subversion)。

    Repository on GitHub, which uses git. git is distributed.



    该项目必须清楚地识别新的或临时贡献者可以执行的小型任务。 (需要网址) [small_tasks]
    此标识通常通过在项目使用的一个或多个标签的问题跟踪器中标记所选问题来完成,例如 up- for-grabs 仅限第一时间,“小修复”,微任务或IdealFirstBug。这些新任务不需要添加功能;他们可以改进文档,添加测试用例或其他有助于项目的内容,并帮助贡献者更了解项目。

    The project maintains a good first issue label that marks starter tasks suitable for new or casual contributors — small, self-contained work such as documentation fixes, CLI polish, and additional test cases (the label and its initial set of tasks were curated on 2026-08-14). These tasks do not require adding core functionality, so they can be picked up by contributors who are not yet familiar with the codebase. They are discoverable as a filtered list of open issues carrying the label (see URL).
    met_url:
    https://github.com/Assault-Consulting/Palimpsests/issues?q=is%3Aissue+is%3Aopen+label%3A%22good+first+issue%22



    项目必须要求开发人员使用双因素身份验证(2FA)来更改中央存储库或访问敏感数据(如私密漏洞报告)。这种2FA机制可以使用没有密码学机制的方案,如SMS(短消息),尽管不推荐。 [require_2FA]

    GitHub requires 2FA as of March 2023. [osps_ac_01_01]



    项目的双因素身份认证(2FA)应该使用加密机制来防止仿冒。基于短消息服务(SMS)的2FA本身不符合此标准,因为它不被加密。 [secure_2FA]
    满足此条款的2FA机制将是一种基于时间的一次性密码(TOTP)应用程序,可自动生成在一段时间后更改的验证码。请注意, GitHub支持TOTP

    Two-factor authentication for the project's maintainers is provided by a Time-based One-Time Password (TOTP) authenticator application, not SMS. TOTP is a cryptographic mechanism — an HMAC-based one-time code derived from a shared secret and the current time — so it does not carry the impersonation risk of unencrypted SMS-based 2FA. All maintainers with write/admin access to the central GitHub repository authenticate with app-based TOTP (and/or hardware security keys); none rely on SMS.


 质量 7/7

  • 编码标准


    该项目必须记录其代码检视需求,包括代码检视是如何进行的,必须检查的内容以及哪些是可接纳的内容。 (需要网址) [code_review_standards]
    另请参阅 two_person_review 和contribution_requirements 条款。

    Code review requirements are documented in docs/REVIEW.md, with the contributor workflow in CONTRIBUTING.md and merge authority in GOVERNANCE.md. The document covers all three required elements. How review is conducted: every change — code and documentation — lands through a pull request that a non-author must approve before merge; main is branch-protected, so required green checks plus one non-author approval are enforced, not merely requested. What must be checked: the reviewer confirms that tests ship with behavior and that coverage stays above the gate (statement ≥ 90%, branch ≥ 80%), that ruff lint is clean, that any new dependency is justified, that security-sensitive paths (audit chain, key management, the crypto boundary, untrusted-input deserialization, the capability boundary) receive extra scrutiny against SECURITY.md / THREAT_MODEL.md / ASSURANCE-CASE.md, that public API/CLI and wire-format changes are deliberate and respect the format freeze, and that documentation matches the change; changes affecting released artifacts additionally require byte-verification and a green reproducible-build job. What is acceptable: approval means the reviewer believes the change is correct, tested, within the project's security and design boundaries, and free of known issues that would argue against inclusion — a reviewer who is unsure asks rather than approves, and author confidence alone is not grounds to merge.
    met_url:
    https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/REVIEW.md



    该项目必须至少有50%的修改(作者之外的人提出的)在发布之前审查,以确定是否是一个有价值的修改,并且没有已知的问题,会反对其包含 [two_person_review]

    Every proposed modification to Palimpsests is reviewed by a non-author before release, which far exceeds the 50% threshold. main is branch-protected: direct pushes are blocked, and every change — code and documentation alike — must go through a pull request that receives at least one approval from a person other than the author, plus a green required status check (ci-complete: lint, tests, and coverage across macOS/Linux/Windows), before it can be merged. These protections have been enforced since 2026-07-11 (documented in GOVERNANCE.md), which is the measurement anchor for the review-coverage figure: every merge from that date forward is non-author reviewed, so the reviewed fraction is effectively 100% and monotonically rising. The requirement is documented in GOVERNANCE.md and CONTRIBUTING.md.


  • 可工作的构建系统


    该项目必须具有可重复构建。如果没有发生构建(例如,直接使用源代码而不是编译的脚本语言),请选择“不适用”(N/A)。 (需要网址) [build_reproducible]
    可重复的构建意味着多方可以独立地重做从源文件生成信息的过程,并获得每比特完全相同的结果。在某些情况下,这可以通过强制某种排序来解决。 JavaScript开发人员可能会考虑使用npm shrinkwrap和webpack的OccurenceOrderPlugin。 GCC和clang用户可能会发现-frandom-seed选项有用。通常可以通过指定可用于重新构建的特定容器或虚拟机的加密散列来为外部方定义构建环境(包括工具集)。 可重复构建项目具有文档指导如何执行此操作。

    Palimpsests has a reproducible build, so this is Met rather than N/A: the project publishes distribution artifacts, and both the sdist (.tar.gz) and the wheel (.whl) are bit-for-bit reproducible — building the same commit produces identical bytes. Determinism is achieved by building with hatchling via PEP 517 (fixed archive-member order, no wall-clock build time stamped into output), pinning SOURCE_DATE_EPOCH to the commit date, and fixing LC_ALL=C.UTF-8, TZ=UTC, and umask 0022. This is enforced on every push and pull request by the reproducible-build job in .github/workflows/ci.yml, which runs scripts/check_reproducible_build.sh to build the artifacts twice and fail if they differ; the job is a required check in the ci-complete gate. The release workflow builds published artifacts with the same pinned SOURCE_DATE_EPOCH/locale/umask, so released files are the reproducible ones. A step-by-step reproduction recipe is documented (docs/REPRODUCIBLE-BUILD.md) so any third party can independently rebuild a release and verify it by hash. Reproducibility covers the Python distribution artifacts; the optional native (llama.cpp) path links against a separately installed C library and is out of scope.
    https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/REPRODUCIBLE-BUILD.md


  • 自动测试套件


    测试套件必须以该语言的标准方式进行调用。 (需要网址) [test_invocation]
    例如“make check”,“mvn test”或“rake test”。

    The test suite is invoked in the standard way for Python: python -m pytest (equivalently pytest) from the repository root, with pytest configured in the standard [tool.pytest.ini_options] section of pyproject.toml. This is the conventional Python test invocation, documented in CONTRIBUTING.md and used unchanged by the CI workflow. URL: https://github.com/Assault-Consulting/Palimpsests/blob/main/pyproject.toml



    该项目必须实施持续集成,将新的或更改的代码经常集成到中央代码库中,并对结果进行自动化测试。 (需要网址) [test_continuous_integration]
    在大多数情况下,这意味着每个在项目上全职工作的开发人员至少每天都会整合。

    The project uses continuous integration. On every push to main and every pull request, GitHub Actions runs the automated test suite (pytest) and the linter (ruff) across a matrix of three operating systems (Linux, macOS, Windows) and two Python versions (3.11, 3.12). New and changed code is integrated into main frequently via pull requests, with the tests run automatically on each. Branch protection requires the checks to pass before merge. URL: https://github.com/Assault-Consulting/Palimpsests/blob/main/.github/workflows/ci.yml



    如果有至少一个FLOSS工具可以以所选语言度量此条款,该项目的FLOSS自动测试套件必须具有至少90%语句覆盖率。 [test_statement_coverage90]

    A FLOSS coverage tool exists for the selected language (coverage.py, run via pytest-cov), so N/A does not apply and the project meets the bar directly. The automated pytest suite achieves 90.3% statement coverage measured over the whole src/palimpsests package; only if TYPE_CHECKING: blocks and raise NotImplementedError lines are excluded, per the standard coverage convention. The single module that reads low — the in-process ctypes backend llamacpp_backend.py, which can only run with the optional [native] extra against a real GGUF model on GPU hardware and therefore cannot be exercised in CI — is counted, not omitted: the overall figure clears 90% with it included, and that backend is validated separately on hardware (benchmarks/RUNBOOK.md). Coverage is computed on every push and pull request (pytest --cov --cov-report=json) and enforced by scripts/coverage_gate.py, which fails the build below 90% statement (and 80% branch). The coverage job is a required check in the ci-complete gate, so coverage cannot silently regress below the bar.



    如果有至少一个FLOSS工具可以以所选语言度量此条款,该项目的FLOSS自动测试套件必须具有至少80%分支覆盖率。 [test_branch_coverage80]

    A FLOSS coverage tool exists for the selected language (coverage.py, run via pytest-cov with branch coverage enabled), so N/A does not apply and the project meets the bar directly. The automated pytest suite achieves 82.4% branch coverage measured over the whole src/palimpsests package, with branch = true set in the coverage configuration; only if TYPE_CHECKING: blocks and raise NotImplementedError lines are excluded, per the standard convention. The hardware-only in-process ctypes backend llamacpp_backend.py — runnable only with the optional [native] extra against a real GGUF model on GPU hardware, so not exercisable in CI — is counted, not omitted: the overall figure clears 80% with it included, and that backend is validated separately on hardware (benchmarks/RUNBOOK.md). Branch coverage is computed on every push and pull request and enforced together with statement coverage by scripts/coverage_gate.py, which fails the build below 80% branch (and 90% statement). The coverage job is a required check in the ci-complete gate, so branch coverage cannot silently regress below the bar.


 安全 5/5

  • 使用基础的良好加密实践

    请注意,某些软件不需要使用加密机制。

    项目生成的软件必须支持所有网络通信的安全协议,如SSHv2或更高版本,TLS1.2或更高版本(HTTPS),IPsec,SFTP和SNMPv3。默认情况下,FTP,HTTP,Telnet,SSLv3或更早版本以及SSHv1等不安全协议必须被禁用,只有在用户专门配置时才启用。如果项目生成的软件不支持网络通信,请选择“不适用”(N/A)。 [crypto_used_network]

    Where the software makes network communication, it uses secure protocols only. Outbound network access (e.g. talking to model/back-end endpoints and to release/publishing infrastructure) goes through httpx over HTTPS/TLS — TLS 1.2+ as negotiated by the platform's TLS stack — and release publishing uses HTTPS with OIDC Trusted Publishing and Sigstore. The project does not implement or default to any insecure protocol (no plain HTTP fetch-and-trust, no FTP/telnet/SSLv3/SSHv1); an insecure transport is not enabled anywhere by default. The core product is a local-first, on-device inference engine, so most operation involves no network at all, and what network communication exists is over TLS.



    由项目生成的软件必须,如果支持或使用TLS,至少支持TLS版本1.2。请注意,TLS的前身称为SSL。如果软件不使用TLS,请选择“不适用”(N/A)。 [crypto_tls12]

    The software uses TLS and supports TLS 1.2 or later. All HTTPS communication goes through httpx, which uses Python's standard TLS stack (OpenSSL via the ssl module); on the supported Python versions (3.11+) that stack negotiates TLS 1.2 and 1.3 and treats older SSL/TLS versions as disabled by default. The project does not force, pin, or fall back to any pre-1.2 protocol (no SSLv3/TLS 1.0/1.1), so TLS 1.2+ is the effective floor for every TLS connection it makes.


  • 安全交付防御中间人(MITM)的攻击


    项目网站,存储库(如果可通过网络访问)和下载站点(如果单独)必须包括具有非允许值的密钥加固头。 (需要网址) [hardened_site]
    请注意,GitHub是已知满足的。 https://securityheaders.io/ 等网站可以快速查看。主要头加固包含:内容安全策略(CSP),HTTP严格传输安全性(HSTS),X-Content-Type-Options(“nosniff”),X-Frame-Options和X-XSS-Protection。

    The project website (https://palimpsests.dev) returns the four key hardening headers with nonpermissive values on every response, configured in site/vercel.json. Content-Security-Policy: default-src 'self' with object-src 'none', frame-ancestors 'none', base-uri 'self', and upgrade-insecure-requests. Strict-Transport-Security: max-age=63072000; includeSubDomains; preload (two years). X-Content-Type-Options: nosniff. X-Frame-Options: DENY. It additionally sets Referrer-Policy and a restrictive Permissions-Policy. An external scan (securityheaders.com, 2026-08-14) grades the site A, with all key headers present; the only item below A+ is 'unsafe-inline' in script-src/style-src, tracked as a site improvement. The source repository and the download site are hosted on GitHub (and the package is published to PyPI), which are known to meet this criterion.


  • 其他安全问题


    该项目必须在过去5年内进行安全审查。此审查必须考虑安全需求和安全边界。 [security_review]
    这可以由项目成员完成和/或独立评估。此评估可能由静态和动态分析工具支持,但还必须进行人工审查,以确定工具无法检测到的问题(特别是设计问题)。

    The project performed an internal security review in July 2026 — within the last 5 years — documented in docs/security/AUDIT-2026-07.md. It was a human review (manual examination of the audit subsystem, key management, process lifecycle, native backend, KV store, context memory, and CLI), supported by Bandit SAST and dependency/workflow review, covering the full source tree at a pinned commit plus the CI workflows and the published PyPI artifact. The review explicitly considered both the security requirements and the security boundary: the assets and properties to protect, the trust boundaries (the filesystem and the Python→C hand-off), and attacker capabilities are documented in docs/THREAT_MODEL.md, and the audit assessed the design against them — including validating the project's stated "honest boundary" (what the tamper-evident anchor does and does not guarantee; e.g., an attacker holding both the key and keychain-write access is explicitly out of scope). The review produced concrete findings (H1–H2, M1–M4, L1–L3) with severity and remediation status; most were fixed in PR #47, and the remaining items are tracked as explicit, boundary-scoped decisions.



    加固机制必须用于项目生产的软件,以便软件缺陷不太可能导致安全漏洞。 (需要网址) [hardening]
    加固机制可能包括HTTP头,如内容安全策略(CSP),用于减轻攻击的编译器标志(如-fstack-protector)或用以消除未定义行为的编译器标志。对于此条款的目的,最小权限不被认为是一种加固机制(最少权限是重要的,但是另有条款)。

    The software uses hardening mechanisms so that a defect is less likely to become a security vulnerability. The primary mechanism is language choice: all code the project produces is written in a memory-safe language (Python), eliminating whole classes of defect-to-vulnerability paths (buffer overflows, use-after-free). The single memory-unsafe boundary — the third-party llama.cpp C library — is isolated behind an optional [native] extra, and the untrusted-input surface in front of it (the KV-state validator guarding load_state) is coverage-guided fuzzed with Atheris, so malformed input is rejected before any byte reaches C. Additional mechanisms: SQL is parameterized throughout (no injection); there is no unsafe deserialization (pickle/eval/shell=True are absent); cryptographic keys come from a CSPRNG (secrets.token_bytes); the at-rest audit store is encrypted (SQLCipher/AES-256) with the key held in the OS keychain, and the design fails closed — it refuses to open rather than fall back to plaintext if SQLCipher is unavailable; the audit chain's canonical serialization is length-prefixed so field boundaries cannot be forged; provider exception text is clipped before it enters the log to prevent secret leakage; and the CI/release pipeline runs with least-privilege permissions, SHA-pinned actions, and OIDC-scoped publishing. These mechanisms, and the security argument for them, are documented in docs/ASSURANCE-CASE.md, with the asset-to-mechanism mapping in docs/THREAT_MODEL.md. As a local-first library with no network service of its own, HTTP transport-hardening headers do not apply to the software itself; the project website's hardening headers are covered separately under hardened_site.
    https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/ASSURANCE-CASE.md


 分析 2/2

  • 动态代码分析


    必须在发布之前,至少将一个动态分析工具应用于软件任何候选发布的主要生产版本。 [dynamic_analysis]
    动态分析工具通过执行特定输入来检查软件。例如,项目可以使用模糊工具(例如, American Fuzzy Lop )或Web应用扫描程序(例如, ZAP w3af )。在某些情况下, OSS-Fuzz 项目可以对您的项目应用模糊测试。为满足此条款,动态分析工具需要以某种方式改变输入,以寻找各种问题,或者将其作为一个具有至少80%分支覆盖率的自动测试套件。 动态分析维基百科页面 OWASP的fuzzing页面 识别一些动态分析工具。分析工具可能专注于寻找安全漏洞,但这不是必需的。

    The project applies a dynamic analysis tool — Atheris, the Python binding for libFuzzer — as coverage-guided fuzzing. The harness (fuzz/fuzz_state_blob.py) targets the security-critical untrusted-input boundary: NativeSession.load_state, the pure-Python frame parser standing between arbitrary bytes and the C KV-state deserializer (llama_state_seq_set_data). It enforces the invariant that a malformed blob is rejected in Python (raising StateBlobError, with the backend never called) and never reaches C; any other outcome is a finding. Fuzzing runs in .github/workflows/fuzz.yml: a short deterministic regression pass on every push and pull request to main (so a previously found crash cannot silently return), plus a longer time-budgeted run nightly and on demand. Because every change to main is fuzzed and releases are cut from main, at least one dynamic analysis tool has been applied to the code before each release. Assertions are enabled during the run (the harness executes under CPython without -O). The one memory-unsafe component — the third-party llama.cpp C library — is outside the project's own code; the harness deliberately fuzzes the project's guard in front of it. (Independently, the project's automated test suite also exceeds 80% branch coverage, which on its own satisfies this criterion.)
    https://github.com/Assault-Consulting/Palimpsests/blob/main/fuzz/README.md



    项目应该在其生成的软件中包含许多运行时断言,并在动态分析期间检查这些断言。 [dynamic_analysis_enable_assertions]
    这个标准并不建议使生产过程中的断言;这完全取决于项目及其用户的决定。该标准的重点是部署之前的动态分析过程中改善故障检测。在生产使用中启用断言与在动态分析(例如测试)期间启用断言完全不同。在某些情况下,在生产中使用断言是极其不明智的(尤其是在高完整性组件中)。存在许多反对在生产环境中启用断言的论点,例如,库不应使调用程序崩溃,它们的存在可能会导致应用商店拒绝,和/或在生产环境中激活断言可能会暴露诸如私钥之类的私有数据。请注意,在许多Linux发行版中都未定义NDEBUG ,因此C / C ++缺省情况下,assert()将在这些环境中启用生产。对于那些环境中的生产,使用不同的断言机制或定义NDEBUG可能很重要。

    The project deliberately enforces validation and invariants with explicit exceptions (raise, ~113 across the codebase) rather than assert, because assert is stripped under -O and must not be relied on for checks that need to always execute. These checks run unconditionally, including during fuzzing. The project does not add a large number of dedicated assert-style assertions solely for dynamic analysis, so this SHOULD is not claimed as met.



您可以使用工具和AI系统通过简单的URL提交变更建议,例如 https://www.bestpractices.dev/zh-CN/projects/13534/choose/edit?osps_ac_01_01_status=Met&osps_ac_01_01_justification=GitHub+enforced。请参阅我们的自动化提案系统,了解具体操作方法。 该数据可在社区数据许可协议 – 许可性,版本 2.0 (CDLA-Permissive-2.0)下获取。这意味着数据接收方可以共享数据,无论是否经过修改,只要数据接收方在共享数据时提供本协议文本。请注明andreysparish和OpenSSF最佳实践徽章贡献者。

项目徽章条目拥有者: andreysparish.
最后更新于 2026-07-08 10:49:53 UTC, 最后更新于 2026-08-23 07:20:40 UTC。 最后在 2026-07-08 11:51:23 UTC 获得通过徽章。