Palimpsests

Los proyectos que siguen las mejores prácticas a continuación pueden autocertificarse voluntariamente y demostrar que han obtenido una insignia de mejores prácticas de Open Source Security Foundation (OpenSSF).

No existe un conjunto de prácticas que pueda garantizar que el software nunca tendrá defectos o vulnerabilidades; incluso los métodos formales pueden fallar si las especificaciones o suposiciones son incorrectas. Tampoco existe ningún conjunto de prácticas que pueda garantizar que un proyecto mantenga una comunidad de desarrollo saludable y que funcione bien. Sin embargo, seguir las mejores prácticas puede ayudar a mejorar los resultados de los proyectos. Por ejemplo, algunas prácticas permiten la revisión por parte de múltiples personas antes del lanzamiento, lo que puede ayudar a encontrar vulnerabilidades técnicas que de otro modo serían difíciles de encontrar y ayudar a generar confianza y un deseo repetido de interacción entre desarrolladores de diferentes compañías. Para obtener una insignia, se deben cumplir todos los criterios DEBE y NO DEBE, se deben cumplir, así como todos los criterios DEBERÍAN deben cumplirse o ser justificados, y todos los criterios SUGERIDOS se pueden cumplir o incumplir (queremos que se consideren al menos). Si desea añadir texto como justificación mediante un comentario genérico, en lugar de ser un razonamiento de que la situación es aceptable, comience el bloque de texto con '//' seguido de un espacio. Los comentarios son bienvenidos a través del sitio de GitHub mediante "issues" o "pull requests". También hay una lista de correo electrónico para el tema principal.

Con mucho gusto proporcionaríamos la información en varios idiomas, sin embargo, si hay algún conflicto o inconsistencia entre las traducciones, la versión en inglés es la versión autorizada.
Si este es su proyecto, por favor muestre el estado de su insignia en la página de su proyecto. El estado de la insignia se ve así: El nivel de insignia para el proyecto 13534 es gold Aquí se explica cómo insertarla:
Puede mostrar el estado de su insignia insertando esto en su archivo markdown:
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/13534/badge)](https://www.bestpractices.dev/projects/13534)
o insertando esto en su HTML:
<a href="https://www.bestpractices.dev/projects/13534"><img src="https://www.bestpractices.dev/projects/13534/badge"></a>


Estos son los criterios de nivel Oro. También puede ver los criterios de nivel Básico o Plata.

Baseline Series: Nivel Base 1 Nivel Base 2 Nivel Base 3

        

 Fundamentos 5/5

  • General

    Tenga en cuenta que otros proyectos pueden usar el mismo nombre.

    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.

    Por favor use formato de expresión de licencia SPDX; los ejemplos incluyen "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause", "GPL-2.0+", "LGPL-3.0+", "MIT" y "(BSD-2-Clause OR Ruby)". No incluya comillas simples o comillas dobles.
    Si hay más de un lenguaje, enumérelos como valores separados por comas (los espacios son opcionales) y ordénelos de más a menos usado. Si hay una lista larga, por favor enumere al menos los tres primeros más comunes. Si no hay lenguaje (por ejemplo, este es un proyecto solo de documentación o solo de pruebas), use el carácter único "-". Por favor use una capitalización convencional para cada lenguaje, por ejemplo, "JavaScript".
    La Common Platform Enumeration (CPE) es un esquema de nomenclatura estructurado para sistemas de tecnología de la información, software y paquetes. Se utiliza en varios sistemas y bases de datos al reportar vulnerabilidades.
  • Prerrequisitos


    El proyecto DEBE lograr una insignia de nivel plata. [achieve_silver]

  • Supervisión del proyecto


    El proyecto DEBE tener un "bus factor" de 2 o más. (URL requerida) [bus_factor]
    Un "factor de autobús" (también conocido como "factor de camión") es el número mínimo de miembros del proyecto que tienen que desaparecer repentinamente de un proyecto ("ser atropellados por un autobús") antes de que el proyecto se paralice debido a la falta de personal conocedor o competente. La herramienta truck-factor puede estimar esto para proyectos en GitHub. Para más información, ver Assessing the Bus Factor of Git Repositories de Cosentino et al.

    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



    El proyecto DEBE tener al menos dos contribuidores significativos no asociados. (URL requerida) [contributors_unassociated]
    Los contribuidores están asociados si son pagados para trabajar por la misma organización (como empleado o contratista) y la organización se beneficia de los resultados del proyecto. Las subvenciones financieras no cuentan como ser de la misma organización si pasan a través de otras organizaciones (por ejemplo, las subvenciones científicas pagadas a diferentes organizaciones de una fuente gubernamental o de ONG común no hacen que los contribuidores estén asociados). Alguien es un contribuidor significativo si ha hecho contribuciones no triviales al proyecto en el último año. Ejemplos de buenos indicadores de un contribuidor significativo son: haber escrito al menos 1,000 líneas de código, haber contribuido 50 commits, o haber contribuido al menos 20 páginas de documentación.

    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


  • Otro


    El proyecto DEBE incluir una declaración de licencia en cada archivo fuente. Esto PUEDE hacerse incluyendo lo siguiente dentro de un comentario cerca del comienzo de cada archivo: SPDX-License-Identifier: [expresión de licencia SPDX para el proyecto]. [license_per_file]
    Esto también PUEDE hacerse incluyendo una declaración en lenguaje natural que identifique la licencia. El proyecto también PUEDE incluir una URL estable que apunte al texto de la licencia, o el texto completo de la licencia. Tenga en cuenta que el criterio license_location requiere que la licencia del proyecto esté en una ubicación estándar. Vea este tutorial de SPDX para obtener más información sobre expresiones de licencia SPDX. Observe la relación con copyright_per_file, cuyo contenido típicamente precedería la información de la licencia.

    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.


 Control de cambios 4/4

  • Repositorio público para el control de versiones de código fuente


    El repositorio de código fuente del proyecto DEBE usar un software de control de versiones distribuido común (por ejemplo, git o mercurial). [repo_distributed]
    Git no se requiere específicamente y los proyectos pueden usar un software de control de versiones centralizado (como subversion) con justificación.

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



    El proyecto DEBE identificar claramente tareas pequeñas que puedan ser realizadas por contribuyentes nuevos o casuales. (URL requerida) [small_tasks]
    Esta identificación típicamente se hace marcando issues seleccionados en un rastreador de issues con una o más etiquetas que el proyecto usa para el propósito, por ejemplo, up-for-grabs, first-timers-only, "Small fix", microtask, o IdealFirstBug. Estas nuevas tareas no necesitan implicar agregar funcionalidad; pueden ser mejorar la documentación, agregar casos de prueba, o cualquier otra cosa que ayude al proyecto y ayude al contribuyente a entender más sobre el proyecto.

    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



    El proyecto DEBE requerir autenticación de dos factores (2FA) para desarrolladores para cambiar un repositorio central o acceder a datos sensibles (como informes de vulnerabilidad privados). Este mecanismo 2FA PUEDE usar mecanismos sin mecanismos criptográficos como SMS, aunque eso no se recomienda. [require_2FA]

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



    La autenticación de dos factores (2FA) del proyecto DEBERÍA usar mecanismos criptográficos para prevenir la suplantación de identidad. La 2FA basada en el Servicio de Mensajes Cortos (SMS), por sí sola, NO cumple este criterio, ya que no está cifrada. [secure_2FA]
    Un mecanismo 2FA que cumpla con este criterio sería una aplicación de Contraseña de Un Solo Uso Basada en Tiempo (TOTP) que genera automáticamente un código de autenticación que cambia después de un cierto período de tiempo. Tenga en cuenta que GitHub soporta 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.


 Calidad 7/7

  • Estándares de codificación


    El proyecto DEBE documentar sus requisitos de revisión de código, incluyendo cómo se lleva a cabo la revisión de código, qué debe verificarse, y qué se requiere para que sea aceptable. (URL requerida) [code_review_standards]
    Vea también two_person_review y 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



    El proyecto DEBE tener al menos el 50% de todas las modificaciones propuestas revisadas antes del lanzamiento por una persona distinta del autor, para determinar si es una modificación valiosa y libre de problemas conocidos que argumentarían en contra de su inclusión [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.


  • Sistema de construcción funcional


    El proyecto DEBE tener una construcción reproducible. Si no ocurre construcción (por ejemplo, lenguajes de scripting donde el código fuente se usa directamente en lugar de ser compilado), seleccione "no aplicable" (N/A). (URL requerida) [build_reproducible]
    Una construcción reproducible significa que múltiples partes pueden rehacer independientemente el proceso de generar información desde archivos fuente y obtener exactamente el mismo resultado bit por bit. En algunos casos, esto puede resolverse forzando algún tipo de orden. Los desarrolladores de JavaScript pueden considerar usar npm shrinkwrap y webpack OccurrenceOrderPlugin. Los usuarios de GCC y clang pueden encontrar útil la opción -frandom-seed. El entorno de construcción (incluido el conjunto de herramientas) a menudo puede definirse para partes externas especificando el hash criptográfico de un contenedor o máquina virtual específicos que pueden usar para reconstruir. El proyecto de construcciones reproducibles tiene documentación sobre cómo hacer esto.

    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


  • Suite de pruebas automatizadas


    Una suite de pruebas DEBE ser invocable de una manera estándar para ese lenguaje. (URL requerida) [test_invocation]
    Ejemplos: "make check", "mvn test" o "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



    El proyecto DEBE implementar integración continua, donde el código nuevo o modificado se integra frecuentemente en un repositorio de código central y se ejecutan pruebas automatizadas sobre el resultado. (URL requerida) [test_continuous_integration]
    En la mayoría de los casos, esto significa que cada desarrollador que trabaja a tiempo completo en el proyecto se integra al menos diariamente.

    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



    El proyecto DEBE tener suite(s) de pruebas automatizadas FLOSS que proporcionen al menos 90% de cobertura de sentencias si hay al menos una herramienta FLOSS que pueda medir este criterio en el lenguaje seleccionado. [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.



    El proyecto DEBE tener suite(s) de pruebas automatizadas FLOSS que proporcionen al menos 80% de cobertura de ramas si hay al menos una herramienta FLOSS que pueda medir este criterio en el lenguaje seleccionado. [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.


 Seguridad 5/5

  • Use buenas prácticas criptográficas

    Tenga en cuenta que algunos programas de software no necesitan usar mecanismos criptográficos. Si su proyecto produce software que (1) incluye, activa o habilita funcionalidad de cifrado, y (2) podría ser liberado desde los Estados Unidos (EE.UU.) hacia fuera de los EE.UU. o a una persona que no sea ciudadana de los EE.UU., es posible que esté legalmente obligado a tomar algunos pasos adicionales. Típicamente esto solo implica enviar un correo electrónico. Para más información, consulte la sección de cifrado de Understanding Open Source Technology & US Export Controls.

    El software producido por el proyecto DEBE soportar protocolos seguros para todas sus comunicaciones de red, como SSHv2 o posterior, TLS1.2 o posterior (HTTPS), IPsec, SFTP y SNMPv3. Los protocolos inseguros como FTP, HTTP, telnet, SSLv3 o anterior, y SSHv1 DEBEN estar deshabilitados por defecto, y solo habilitados si el usuario lo configura específicamente. Si el software producido por el proyecto no soporta comunicaciones de red, seleccione "no aplicable" (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.



    El software producido por el proyecto DEBE, si soporta o usa TLS, soportar al menos la versión 1.2 de TLS. Tenga en cuenta que el predecesor de TLS se llamaba SSL. Si el software no usa TLS, seleccione "no aplicable" (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.


  • Entrega garantizada contra ataques de hombre en el medio (MITM)


    El sitio web del proyecto, el repositorio (si es accesible a través de la web) y el sitio de descarga (si está separado) DEBEN incluir encabezados clave de endurecimiento con valores no permisivos. (URL requerida) [hardened_site]
    Tenga en cuenta que se sabe que GitHub y GitLab cumplen con esto. Sitios como https://securityheaders.com/ pueden verificar esto rápidamente. Los encabezados clave de endurecimiento son: Content Security Policy (CSP), HTTP Strict Transport Security (HSTS), X-Content-Type-Options (como "nosniff"), y X-Frame-Options. Los sitios web totalmente estáticos sin capacidad de iniciar sesión a través de las páginas web podrían omitir algunos encabezados de endurecimiento con menos riesgo, pero no hay una manera confiable de detectar tales sitios, por lo que requerimos estos encabezados incluso si son sitios totalmente estáticos.

    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.


  • Otros problemas de seguridad


    El proyecto DEBE haber realizado una revisión de seguridad dentro de los últimos 5 años. Esta revisión DEBE considerar los requisitos de seguridad y el límite de seguridad. [security_review]
    Esto PUEDE ser realizado por los miembros del proyecto y/o una evaluación independiente. Esta evaluación PUEDE estar respaldada por herramientas de análisis estático y dinámico, pero también debe haber una revisión humana para identificar problemas (particularmente en el diseño) que las herramientas no pueden detectar.

    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.



    Los mecanismos de endurecimiento DEBEN usarse en el software producido por el proyecto para que los defectos del software tengan menos probabilidades de resultar en vulnerabilidades de seguridad. (URL requerida) [hardening]
    Los mecanismos de endurecimiento pueden incluir encabezados HTTP como Content Security Policy (CSP), banderas de compilador para mitigar ataques (como -fstack-protector), o banderas de compilador para eliminar comportamiento indefinido. Para nuestros propósitos, el menor privilegio no se considera un mecanismo de endurecimiento (el menor privilegio es importante, pero separado).

    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


 Análisis 2/2

  • Análisis dinámico de código


    El proyecto DEBE aplicar al menos una herramienta de análisis dinámico a cualquier versión de producción principal propuesta del software producido por el proyecto antes de su lanzamiento. [dynamic_analysis]
    Una herramienta de análisis dinámico examina el software ejecutándolo con entradas específicas. Por ejemplo, el proyecto PUEDE usar una herramienta de fuzzing (por ejemplo, American Fuzzy Lop) o un escáner de aplicaciones web (por ejemplo, OWASP ZAP o w3af). En algunos casos, el proyecto OSS-Fuzz puede estar dispuesto a aplicar pruebas de fuzzing a su proyecto. Para los propósitos de este criterio, la herramienta de análisis dinámico necesita variar las entradas de alguna manera para buscar varios tipos de problemas o ser una suite de pruebas automatizada con al menos 80% de cobertura de ramas. La página de Wikipedia sobre análisis dinámico y la página de OWASP sobre fuzzing identifican algunas herramientas de análisis dinámico. La(s) herramienta(s) de análisis PUEDEN estar enfocadas en buscar vulnerabilidades de seguridad, pero esto no es obligatorio.

    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



    El proyecto DEBERÍA incluir muchas aserciones en tiempo de ejecución en el software que produce y verificar esas aserciones durante el análisis dinámico. [dynamic_analysis_enable_assertions]
    Este criterio no sugiere habilitar aserciones durante la producción; eso depende completamente del proyecto y sus usuarios decidir. El enfoque de este criterio es en cambio mejorar la detección de fallas durante el análisis dinámico antes del despliegue. Habilitar aserciones en el uso de producción es completamente diferente de habilitar aserciones durante el análisis dinámico (como las pruebas). En algunos casos, habilitar aserciones en el uso de producción es extremadamente imprudente (especialmente en componentes de alta integridad). Hay muchos argumentos contra habilitar aserciones en producción, por ejemplo, las bibliotecas no deberían bloquear a los llamadores, su presencia puede causar rechazo por las tiendas de aplicaciones, y/o activar una aserción en producción puede exponer datos privados como claves privadas. Tenga en cuenta que en muchas distribuciones de Linux NDEBUG no está definido, por lo que assert() de C/C++ estará habilitado por defecto para producción en esos entornos. Puede ser importante usar un mecanismo de aserción diferente o definir NDEBUG para producción en esos entornos.

    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.



Puede utilizar herramientas y sistemas de IA para proponer cambios a través de una URL simple, como https://www.bestpractices.dev/es/projects/13534/choose/edit?osps_ac_01_01_status=Met&osps_ac_01_01_justification=GitHub+enforced. Consulte nuestro sistema de propuestas de automatización para saber cómo hacerlo. Estos datos están disponibles bajo el Acuerdo de Licencia de Datos de la Comunidad – Permisivo, Versión 2.0 (CDLA-Permissive-2.0). Esto significa que un Destinatario de Datos puede compartir los Datos, con o sin modificaciones, siempre que el Destinatario de Datos ponga a disposición el texto de este acuerdo con los Datos compartidos. Por favor, acredite a andreysparish y a los colaboradores de la insignia de Mejores Prácticas de OpenSSF.

Entrada de insignia del proyecto propiedad de: andreysparish.
Entrada creada el 2026-07-08 10:49:53 UTC, última actualización el 2026-08-23 07:20:40 UTC. Última obtención de la insignia de nivel básico el 2026-07-08 11:51:23 UTC.