Palimpsests

Projects that follow the best practices below can voluntarily self-certify and show that they've achieved an Open Source Security Foundation (OpenSSF) best practices badge.

There is no set of practices that can guarantee that software will never have defects or vulnerabilities; even formal methods can fail if the specifications or assumptions are wrong. Nor is there any set of practices that can guarantee that a project will sustain a healthy and well-functioning development community. However, following best practices can help improve the results of projects. For example, some practices enable multi-person review before release, which can both help find otherwise hard-to-find technical vulnerabilities and help build trust and a desire for repeated interaction among developers from different companies. To earn a badge, all MUST and MUST NOT criteria must be met, all SHOULD criteria must be met OR be unmet with justification, and all SUGGESTED criteria must be met OR unmet (we want them considered at least). If you want to enter justification text as a generic comment, instead of being a rationale that the situation is acceptable, start the text block with '//' followed by a space. Feedback is welcome via the GitHub site as issues or pull requests There is also a mailing list for general discussion.

We gladly provide the information in several locales, however, if there is any conflict or inconsistency between the translations, the English version is the authoritative version.
If this is your project, please show your badge status on your project page! The badge status looks like this: Badge level for project 13534 is gold Here is how to embed it:
You can show your badge status by embedding this in your markdown file:
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/13534/badge)](https://www.bestpractices.dev/projects/13534)
or by embedding this in your HTML:
<a href="https://www.bestpractices.dev/projects/13534"><img src="https://www.bestpractices.dev/projects/13534/badge"></a>


These are the Silver level criteria. You can also view the Passing or Gold level criteria.

Baseline Series: Baseline Level 1 Baseline Level 2 Baseline Level 3

        

 Basics 17/17

  • General

    Note that other projects may use the same name.

    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.

    Please use SPDX license expression format; examples include "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause", "GPL-2.0+", "LGPL-3.0+", "MIT", and "(BSD-2-Clause OR Ruby)". Do not include single quotes or double quotes.
    If there is more than one language, list them as comma-separated values (spaces optional) and sort them from most to least used. If there is a long list, please list at least the first three most common ones. If there is no language (e.g., this is a documentation-only or test-only project), use the single character "-". Please use a conventional capitalization for each language, e.g., "JavaScript".
    The Common Platform Enumeration (CPE) is a structured naming scheme for information technology systems, software, and packages. It is used in a number of systems and databases when reporting vulnerabilities.
  • Prerequisites


    The project MUST achieve a passing level badge. [achieve_passing]

  • Basic project website content


    The information on how to contribute MUST include the requirements for acceptable contributions (e.g., a reference to any required coding standard). (URL required) [contribution_requirements]

    CONTRIBUTING.md states the requirements for acceptable contributions explicitly. It defines ground rules (don't break the engine abstraction, don't modify the attention kernel), the required workflow (branch, pull request, green CI on all three platforms before merge), and a dedicated Code Style section specifying the coding standard: ruff with ["E","F","I","B","UP"], line length 100, target py311, type hints on public functions, English comments, and a tests-with-every-change policy. URL: https://github.com/Assault-Consulting/Palimpsests/blob/main/CONTRIBUTING.md


  • Project oversight


    The project SHOULD have a legal mechanism where all developers of non-trivial amounts of project software assert that they are legally authorized to make these contributions. The most common and easily-implemented approach for doing this is by using a Developer Certificate of Origin (DCO), where users add "signed-off-by" in their commits and the project links to the DCO website. However, this MAY be implemented as a Contributor License Agreement (CLA), or other legal mechanism. (URL required) [dco]
    The DCO is the recommended mechanism because it's easy to implement, tracked in the source code, and git directly supports a "signed-off" feature using "commit -s". To be most effective it is best if the project documentation explains what "signed-off" means for that project. A CLA is a legal agreement that defines the terms under which intellectual works have been licensed to an organization or project. A contributor assignment agreement (CAA) is a legal agreement that transfers rights in an intellectual work to another party; projects are not required to have CAAs, since having CAA increases the risk that potential contributors will not contribute, especially if the receiver is a for-profit organization. The Apache Software Foundation CLAs (the individual contributor license and the corporate CLA) are examples of CLAs, for projects which determine that the risks of these kinds of CLAs to the project are less than their benefits.

    The project uses the Developer Certificate of Origin (DCO). Every commit MUST carry a Signed-off-by: line matching the commit author (real name and reachable email), added with git commit -s; this line is the contributor's DCO certification that they have the legal right to submit the contribution. The requirement, the exact command, and how to fix a missing sign-off (git commit --amend -s, git rebase --signoff <base>) are documented in CONTRIBUTING.md. No separate CLA is used.
    https://developercertificate.org/
    Supporting evidence URL in the repo
    https://github.com/Assault-Consulting/Palimpsests/blob/main/CONTRIBUTING.md



    The project MUST clearly define and document its project governance model (the way it makes decisions, including key roles). (URL required) [governance]
    There needs to be some well-established documented way to make decisions and resolve disputes. In small projects, this may be as simple as "the project owner and lead makes all final decisions". There are various governance models, including benevolent dictator and formal meritocracy; for more details, see Governance models. Both centralized (e.g., single-maintainer) and decentralized (e.g., group maintainers) approaches have been successfully used in projects. The governance information does not need to document the possibility of creating a project fork, since that is always possible for FLOSS projects.

    The project's governance model is defined in docs/GOVERNANCE.md. It documents the roles and their responsibilities (maintainers hold merge rights, review pull requests, and cut releases; the named maintainers and co-maintainer are listed with their duties), and the decision-making process: all changes — code and documentation alike — land via pull request against a branch-protected main, requiring one non-author approval plus green status checks (lint, tests, coverage) before merge. Governance also records continuity/access (two maintainers with repository admin) and openly acknowledges the structural limits of a small maintainer team.
    https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/GOVERNANCE.md



    The project MUST adopt a code of conduct and post it in a standard location. (URL required) [code_of_conduct]
    Projects may be able to improve the civility of their community and to set expectations about acceptable conduct by adopting a code of conduct. This can help avoid problems before they occur and make the project a more welcoming place to encourage contributions. This should focus only on behavior within the community/workplace of the project. Example codes of conduct are the Linux kernel code of conduct, the Contributor Covenant Code of Conduct, the Debian Code of Conduct, the Ubuntu Code of Conduct, the Fedora Code of Conduct, the GNOME Code Of Conduct, the KDE Community Code of Conduct, the Python Community Code of Conduct, The Ruby Community Conduct Guideline, and The Rust Code of Conduct.

    The project has adopted a code of conduct, published as CODE_OF_CONDUCT.md in the repository root — one of GitHub's standard, auto-discovered locations for the file. It sets out expected behaviour, unacceptable behaviour, and how to report concerns to the maintainers.
    https://github.com/Assault-Consulting/Palimpsests/blob/main/CODE_OF_CONDUCT.md



    The project MUST clearly define and publicly document the key roles in the project and their responsibilities, including any tasks those roles must perform. It MUST be clear who has which role(s), though this might not be documented in the same way. (URL required) [roles_responsibilities]
    The documentation for governance and roles and responsibilities may be in one place.

    Key roles and their responsibilities are publicly documented in docs/GOVERNANCE.md. It defines the maintainer role — hold merge rights, review pull requests, cut releases, administer the repository — and names who holds it: the maintainer (@andreysparish) and the co-maintainer (@olksandrvertel-arch, repository admin; review and hardware benchmarks). The mapping of person → role is explicit in the maintainers table, so it is clear who performs which role, and the duties attached to each are stated alongside.
    https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/GOVERNANCE.md



    The project MUST be able to continue with minimal interruption if any one person dies, is incapacitated, or is otherwise unable or unwilling to continue support of the project. In particular, the project MUST be able to create and close issues, accept proposed changes, and release versions of software, within a week of confirmation of the loss of support from any one individual. This MAY be done by ensuring someone else has any necessary keys, passwords, and legal rights to continue the project. Individuals who run a FLOSS project MAY do this by providing keys in a lockbox and a will providing any needed legal rights (e.g., for DNS names). (URL required) [access_continuity]

    The project can continue with minimal disruption if any one contributor becomes unable or unwilling to maintain it. There are two maintainers, both with full repository-admin rights (@andreysparish and @olksandrvertel-arch, per docs/GOVERNANCE.md). Either can independently open and close issues, approve and merge proposed changes, and cut releases — so any one of them stepping away leaves the other able to keep the project running well within a week. Release signing uses GitHub Trusted Publishing (OIDC), which is tied to the repository/organization rather than a single person's private key, so publishing to PyPI does not depend on one individual holding a secret. This continuity — two admins, no single-person bottleneck for review, merge, or release — is documented in GOVERNANCE.md.
    https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/GOVERNANCE.md



    The project SHOULD have a "bus factor" of 2 or more. (URL required) [bus_factor]
    A "bus factor" (aka "truck factor") is the minimum number of project members that have to suddenly disappear from a project ("hit by a bus") before the project stalls due to lack of knowledgeable or competent personnel. The truck-factor tool can estimate this for projects on GitHub. For more information, see Assessing the Bus Factor of Git Repositories by 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


  • Documentation


    The project MUST have a documented roadmap that describes what the project intends to do and not do for at least the next year. (URL required) [documentation_roadmap]
    The project might not achieve the roadmap, and that's fine; the purpose of the roadmap is to help potential users and contributors understand the intended direction of the project. It need not be detailed.

    The project maintains a documented roadmap in docs/ROADMAP.md. It states what the project plans to do — a "Working order" of near-term milestones (verifiable audit / the PALA-1 format as the deliverable at 0.7, then assurance tiers B/C at 0.8) — and, explicitly, what it does not plan to do: a "Deferred: sleep-time compute — not scheduled" section that records the idea but rules it out of the current effort, and a "Deferred, with conditions" section listing work that is intentionally not pursued yet and the conditions under which it would be. The horizon spans the coming release cycle (0.6 → 0.7 → 0.8) and beyond, well over the next year, and the document is kept honest about scope rather than aspirational ("subject to revision", measured-not-asserted).
    https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/ROADMAP.md



    The project MUST include documentation of the architecture (aka high-level design) of the software produced by the project. If the project does not produce software, select "not applicable" (N/A). (URL required) [documentation_architecture]
    A software architecture explains a program's fundamental structures, i.e., the program's major components, the relationships among them, and the key properties of these components and relationships.

    The software's high-level architecture is documented in ARCHITECTURE.md at the repository root. It describes the layered design of the engine — a single InferenceEngine abstraction over three interchangeable execution levels (L1 Ollama, L2 llama-server, L3 in-process llama.cpp), with a context-memory layer (window manager + block memory) that runs identically across all levels and lets callers move from level 1 to level 3 without changing code above the engine. The README carries a condensed "Architecture in one screen" section mapping the layers to the providers/ adapters, and the key design decisions behind the level-3 backend are recorded as Architecture Decision Records in docs/adr/ (ADR-0001: level-3 inference backend; ADR-0002: level-3 in-process design and the test boundary).
    https://github.com/Assault-Consulting/Palimpsests/blob/main/ARCHITECTURE.md



    The project MUST document what the user can and cannot expect in terms of security from the software produced by the project (its "security requirements"). (URL required) [documentation_security]
    These are the security requirements that the software is intended to meet.

    The project documents both what a user can and cannot expect in terms of security. SECURITY.md sets out the security model — the private vulnerability-disclosure process, supported versions, and a mapping of vulnerability classes to the mitigations actually implemented (what the software protects against). What it deliberately does not guarantee is documented just as explicitly: docs/THREAT_MODEL.md defines the threat boundaries and out-of-scope threats, docs/ASSURANCE-CASE.md lays out the assurance argument, and the audit-format specification is unusually direct about limits — its assurance tiers table states, per tier, what each "Proves" and "Does not prove", and a dedicated "What this format does not do" section enumerates the guarantees it does not make (e.g. it proves a record was recorded unmodified, not that the record is true; it does not defend against the device owner at the base tier; it does not bind to hardware without a hardware root of trust). Together these give a user a clear, honest picture of the security requirements — what to rely on and what not to.
    https://github.com/Assault-Consulting/Palimpsests/blob/main/SECURITY.md



    The project MUST provide a "quick start" guide for new users to help them quickly do something with the software. (URL required) [documentation_quick_start]
    The idea is to show users how to get started and make the software do anything at all. This is critically important for potential users to get started.

    The project provides a quick-start guide for new users in the README, immediately after installation: a "Quick start" section with copy-paste commands to get going in minutes — talk to a model (prompt via flag or piped over stdin), give a long conversation a smaller context budget so the sink/window/evict path engages, list the models the active engine can see, and inspect or switch engines. It is preceded by a short "Install" section (pip install palimpsests for the base level, plus the extras that enable levels 2 and 3). A fuller usage guide covering the CLI and the Python API, with inputs and outputs, is in docs/USAGE.md.
    https://github.com/Assault-Consulting/Palimpsests#quick-start



    The project MUST make an effort to keep the documentation consistent with the current version of the project results (including software produced by the project). Any known documentation defects making it inconsistent MUST be fixed. If the documentation is generally current, but erroneously includes some older information that is no longer true, just treat that as a defect, then track and fix as usual. [documentation_current]
    The documentation MAY include information about differences or changes between versions of the software and/or link to older versions of the documentation. The intent of this criterion is that an effort is made to keep the documentation consistent, not that the documentation must be perfect.

    The project keeps documentation aligned with the current version of the software, and treats any documentation that has fallen out of date as a defect to be fixed. CONTRIBUTING.md mandates that documentation and tests ship with every behavioral change, so docs move with the code rather than lagging a release. When a stale statement is found, it is corrected like any other defect through the normal pull-request process — for example, a note that still described the project as single-maintainer ("human code review before merge is a solo-project limitation") was corrected once a co-maintainer joined and non-author review became the actual practice. There are no known documentation defects left outstanding; any discovered later are tracked and fixed the same way.



    The project repository front page and/or website MUST identify and hyperlink to any achievements, including this best practices badge, within 48 hours of public recognition that the achievement has been attained. (URL required) [documentation_achievements]
    An achievement is any set of external criteria that the project has specifically worked to meet, including some badges. This information does not need to be on the project website front page. A project using GitHub can put achievements on the repository front page by adding them to the README file.

    All of the project's achievements are displayed with hyperlinks at the top of the repository front page (the README), immediately under the title: License (Apache-2.0), CI status, PyPI version, supported Python versions, the OpenSSF Best Practices badge (project 13534, rendered live from bestpractices.dev and linking back to the project's badge page), and the OpenSSF Scorecard badge. Because the Best Practices badge is embedded live from bestpractices.dev, its displayed level updates automatically the moment the achievement is recognized — well within 48 hours — and it already links to the project page. New achievements are added to the same badge row as they are earned.
    https://github.com/Assault-Consulting/Palimpsests


  • Accessibility and internationalization


    The project (both project sites and project results) SHOULD follow accessibility best practices so that persons with disabilities can still participate in the project and use the project results where it is reasonable to do so. [accessibility_best_practices]
    For web applications, see the Web Content Accessibility Guidelines (WCAG 2.0) and its supporting document Understanding WCAG 2.0; see also W3C accessibility information. For GUI applications, consider using the environment-specific accessibility guidelines (such as Gnome, KDE, XFCE, Android, iOS, Mac, and Windows). Some TUI applications (e.g. `ncurses` programs) can do certain things to make themselves more accessible (such as `alpine`'s `force-arrow-cursor` setting). Most command-line applications are fairly accessible as-is. This criterion is often N/A, e.g., for program libraries. Here are some examples of actions to take or issues to consider:
    • Provide text alternatives for any non-text content so that it can be changed into other forms people need, such as large print, braille, speech, symbols or simpler language ( WCAG 2.0 guideline 1.1)
    • Color is not used as the only visual means of conveying information, indicating an action, prompting a response, or distinguishing a visual element. ( WCAG 2.0 guideline 1.4.1)
    • The visual presentation of text and images of text has a contrast ratio of at least 4.5:1, except for large text, incidental text, and logotypes ( WCAG 2.0 guideline 1.4.3)
    • Make all functionality available from a keyboard (WCAG guideline 2.1)
    • A GUI or web-based project SHOULD test with at least one screen-reader on the target platform(s) (e.g. NVDA, Jaws, or WindowEyes on Windows; VoiceOver on Mac & iOS; Orca on Linux/BSD; TalkBack on Android). TUI programs MAY work to reduce overdraw to prevent redundant reading by screen-readers.

    The project's outputs and implementation sites are text-based, which places them at the accessible end of the spectrum by construction, and the documentation follows accessibility best practices where they apply: The software is a command-line tool and a Python library. Its interface is plain text: terminal output works with screen readers and other assistive technology without modification, there is no custom GUI that could introduce visual or interaction barriers, and nothing depends on colour alone to convey meaning. Documentation is Markdown, rendered accessibly by GitHub with proper heading structure, and it handles images correctly for assistive technology — the decorative project icon carries empty alt text so screen readers skip it, while the status badges carry descriptive alt text (License, CI, PyPI, Python versions, OpenSSF Best Practices, Scorecard) so their meaning is announced. The project's development happens on GitHub, whose issue tracker, pull-request, and review interfaces already meet recognized accessibility standards, so contributors using assistive technology can participate in the workflow. Given a text-only CLI and library with plain-text documentation, there is no reasonable additional accessibility work outstanding; the criterion is met within the scope that applies to this kind of project.



    The software produced by the project SHOULD be internationalized to enable easy localization for the target audience's culture, region, or language. If internationalization (i18n) does not apply (e.g., the software doesn't generate text intended for end-users and doesn't sort human-readable text), select "not applicable" (N/A). [internationalization]
    Localization "refers to the adaptation of a product, application or document content to meet the language, cultural and other requirements of a specific target market (a locale)." Internationalization is the "design and development of a product, application or document content that enables easy localization for target audiences that vary in culture, region, or language." (See W3C's "Localization vs. Internationalization".) Software meets this criterion simply by being internationalized. No localization for another specific language is required, since once software has been internationalized it's possible for others to work on localization.

    Internationalization does not meaningfully apply to this project. Palimpsests is a command-line tool and a developer library; its only user-facing text is short diagnostic and status output aimed at developers and operators (e.g. verification results, engine-level messages), not end-user prose or content presented to a general audience. It generates no localizable UI, does no locale-sensitive sorting of human-readable text, and its inputs and outputs are model prompts and structured/binary data (the audit records are a binary wire format with integer fields, deliberately locale-independent by design). There is therefore no target-audience culture, region, or language to localize for. Given a text-only developer CLI/library with no end-user-facing content, i18n is not applicable.


  • Other


    If the project sites (website, repository, and download URLs) store passwords for authentication of external users, the passwords MUST be stored as iterated hashes with a per-user salt by using a key stretching (iterated) algorithm (e.g., Argon2id, Bcrypt, Scrypt, or PBKDF2). If the project sites do not store passwords for this purpose, select "not applicable" (N/A). [sites_password_security]
    Note that the use of GitHub meets this criterion. This criterion only applies to passwords used for authentication of external users into the project sites (aka inbound authentication). If the project sites must log in to other sites (aka outbound authentication), they may need to store authorization tokens for that purpose differently (since storing a hash would be useless). This applies criterion crypto_password_storage to the project sites, similar to sites_https.

    The project's sites do not store authentication passwords for external users, so this criterion does not apply. The repository is hosted on GitHub and the project website (palimpsests.dev) is a static site; neither runs a project-operated authentication system or user-account database. Access and identity are handled by the underlying platforms (GitHub authentication, and OIDC/Trusted Publishing for releases), not by password storage the project controls. There are no external-user passwords held on any project site to hash.


 Change Control 1/1

  • Previous versions


    The project MUST maintain the most often used older versions of the product or provide an upgrade path to newer versions. If the upgrade path is difficult, the project MUST document how to perform the upgrade (e.g., the interfaces that have changed and detailed suggested steps to help upgrade). [maintenance_or_update]

    The project provides a clear upgrade path to newer versions rather than backporting to old ones, which is the appropriate model for a pre-1.0 project. SECURITY.md states the version policy explicitly: Palimpsests is pre-1.0 and evolving, security fixes land on main and in the latest published release, older 0.x releases are not maintained, and users should track the latest version. The upgrade path itself is simple — the package is installed and updated through pip in the standard way — and the changes that affect an upgrade are documented per release in CHANGELOG.md, which follows a Keep-a-Changelog structure with explicit Changed and Breaking sections and upgrade notes where behaviour shifts (for example, the changelog records that before v1.0 minor versions may include breaking changes, and calls out cases such as a first post-upgrade write being required before verify() reports fully). So where an upgrade is non-trivial, the interfaces that changed and the recommended steps are documented.


 Reporting 3/3

  • Bug-reporting process


    The project MUST use an issue tracker for tracking individual issues. [report_tracker]

    The project uses GitHub Issues as its issue-tracking system to track individual bugs, tasks, and enhancement requests. CONTRIBUTING.md directs contributors to open or link an issue when submitting work, and security-sensitive reports are routed separately through the private channel described in SECURITY.md. URL: https://github.com/Assault-Consulting/Palimpsests/issues


  • Vulnerability report process


    The project MUST give credit to the reporter(s) of all vulnerability reports resolved in the last 12 months, except for the reporter(s) who request anonymity. If there have been no vulnerabilities resolved in the last 12 months, select "not applicable" (N/A). (URL required) [vulnerability_report_credit]

    No externally reported vulnerabilities have been fixed in the last 12 months, so there is no reporter to credit — which makes this criterion not applicable for the current period. The project is nonetheless set up to credit reporters when the situation arises: SECURITY.md commits to crediting reporters in the release notes unless they ask to remain anonymous. When the first such report is fixed, the reporter will be credited there.



    The project MUST have a documented process for responding to vulnerability reports. (URL required) [vulnerability_response_process]
    This is strongly related to vulnerability_report_process, which requires that there be a documented way to report vulnerabilities. It also related to vulnerability_report_response, which requires response to vulnerability reports within a certain time frame.

    The project has a documented process for responding to vulnerability reports, published in SECURITY.md. It sets out how to report privately (GitHub private security advisories and a maintainer email, not a public issue), a response commitment (the maintainers will acknowledge a report within a few business days and agree on a disclosure timeline before any public disclosure), how reporters are credited (in the release notes, unless anonymity is requested), and which versions receive fixes (security fixes land on main and in the latest release; older 0.x releases are not maintained). This gives a reporter a clear, end-to-end path from private report to coordinated disclosure.
    https://github.com/Assault-Consulting/Palimpsests/blob/main/SECURITY.md


 Quality 19/19

  • Coding standards


    The project MUST identify the specific coding style guides for the primary languages it uses, and require that contributions generally comply with it. (URL required) [coding_standards]
    In most cases this is done by referring to some existing style guide(s), possibly listing differences. These style guides can include ways to improve readability and ways to reduce the likelihood of defects (including vulnerabilities). Many programming languages have one or more widely-used style guides. Examples of style guides include Google's style guides and SEI CERT Coding Standards.

    The project identifies a specific coding style standard for its main language (Python) and requires contributions to comply with it. CONTRIBUTING.md has a "Code style" section naming the standard: ruff with the rule set ["E", "F", "I", "B", "UP"] (pycodestyle/PEP 8, Pyflakes, isort import ordering, flake8-bugbear, pyupgrade), a line length of 100, and target Python 3.11 — with the instruction to run ruff check . before pushing. This is not just documented but enforced: the ruleset is pinned in pyproject.toml ([tool.ruff] / [tool.ruff.lint]), and lint is a merge-blocking status check on main, so every contribution must generally conform before it can be merged.
    https://github.com/Assault-Consulting/Palimpsests/blob/main/CONTRIBUTING.md



    The project MUST automatically enforce its selected coding style(s) if there is at least one FLOSS tool that can do so in the selected language(s). [coding_standards_enforced]
    This MAY be implemented using static analysis tool(s) and/or by forcing the code through code reformatters. In many cases the tool configuration is included in the project's repository (since different projects may choose different configurations). Projects MAY allow style exceptions (and typically will); where exceptions occur, they MUST be rare and documented in the code at their locations, so that these exceptions can be reviewed and so that tools can automatically handle them in the future. Examples of such tools include ESLint (JavaScript), Rubocop (Ruby), and devtools check (R).

    The project automatically enforces its chosen coding style. The style is defined as ruff with the rule set ["E", "F", "I", "B", "UP"], line length 100, target Python 3.11 (pyproject.toml, [tool.ruff] / [tool.ruff.lint]). ruff is an open-source style/lint tool for Python, and it is run automatically as a merge-blocking status check in CI on every push and pull request — a change that does not conform to the ruleset cannot be merged into main. Contributors also run ruff check . locally before pushing, per CONTRIBUTING.md. So enforcement is automated by an open-source tool for the project's main language, not left to manual review.


  • Working build system


    Build systems for native binaries MUST honor the relevant compiler and linker (environment) variables passed in to them (e.g., CC, CFLAGS, CXX, CXXFLAGS, and LDFLAGS) and pass them to compiler and linker invocations. A build system MAY extend them with additional flags; it MUST NOT simply replace provided values with its own. If no native binaries are being generated, select "not applicable" (N/A). [build_standard_variables]
    It should be easy to enable special build features like Address Sanitizer (ASAN), or to comply with distribution hardening best practices (e.g., by easily turning on compiler flags to do so).

    The project does not build native binaries, so compiler/linker environment variables (CC, CFLAGS, CXX, CXXFLAGS, LDFLAGS) do not apply. Palimpsests is pure Python, packaged with a PEP 517 build backend (hatchling); the build produces platform-independent wheels and an sdist, with no compilation step of its own. The one native component it can use — the llama.cpp C library — is not compiled by this project; it is consumed at runtime through the optional [native] extra as a separately built dependency. There is therefore no compiler or linker invocation in the project's build for these variables to be honored by.



    The build and installation system SHOULD preserve debugging information if they are requested in the relevant flags (e.g., "install -s" is not used). If there is no build or installation system (e.g., typical JavaScript libraries), select "not applicable" (N/A). [build_preserve_debug]
    E.G., setting CFLAGS (C) or CXXFLAGS (C++) should create the relevant debugging information if those languages are used, and they should not be stripped during installation. Debugging information is needed for support and analysis, and also useful for measuring the presence of hardening features in the compiled binaries.

    There is no compilation or install step in this project that could strip debug information. Palimpsests is pure Python, built with a PEP 517 backend (hatchling) into platform-independent wheels — there are no compiled artifacts and no install -s-style stripping to avoid. Python source is shipped as-is and remains fully inspectable/debuggable; nothing in the build or install removes debug information. (The one native component, llama.cpp, is a separately built runtime dependency behind the optional [native] extra, not something this project's build or install produces.) This criterion therefore does not apply.



    The build system for the software produced by the project MUST NOT recursively build subdirectories if there are cross-dependencies in the subdirectories. If there is no build or installation system (e.g., typical JavaScript libraries), select "not applicable" (N/A). [build_non_recursive]
    The project build system's internal dependency information needs to be accurate, otherwise, changes to the project may not build correctly. Incorrect builds can lead to defects (including vulnerabilities). A common mistake in large build systems is to use a "recursive build" or "recursive make", that is, a hierarchy of subdirectories containing source files, where each subdirectory is independently built. Unless each subdirectory is fully independent, this is a mistake, because the dependency information is incorrect.

    This criterion concerns recursive Make-style builds over subdirectories that have cross-dependencies (the classic "recursive make considered harmful" problem). It does not apply here: Palimpsests is pure Python with a PEP 517 build backend (hatchling), which builds the package as a single unit into wheels and an sdist — there is no recursive per-subdirectory build and therefore no opportunity for a recursive build to mishandle cross-directory dependencies. There is no Makefile or equivalent recursive build system in the project.



    The project MUST be able to repeat the process of generating information from source files and get exactly the same bit-for-bit result. If no building occurs (e.g., scripting languages where the source code is used directly instead of being compiled), select "not applicable" (N/A). [build_repeatable]
    GCC and clang users may find the -frandom-seed option useful; in some cases, this can be resolved by forcing some sort order. More suggestions can be found at the reproducible build site.

    Palimpsests is a pure-Python project: the source is used directly rather than compiled into a different form. There is no compilation step whose output would need to be reproduced bit-for-bit — the .py files that run are the same source files kept in the repository, and packaging (a PEP 517 wheel/sdist via hatchling) simply archives that same source with metadata, it does not transform it. The criterion's own escape clause applies here — "scripting languages where source is used directly rather than compiled" — so this is not applicable.


  • Installation system


    The project MUST provide a way to easily install and uninstall the software produced by the project using a commonly-used convention. [installation_common]
    Examples include using a package manager (at the system or language level), "make install/uninstall" (supporting DESTDIR), a container in a standard format, or a virtual machine image in a standard format. The installation and uninstallation process (e.g., its packaging) MAY be implemented by a third party as long as it is FLOSS.

    Installation and removal use the standard, conventional mechanism for Python: pip. The software is published on PyPI and installed with pip install palimpsests (with optional extras — e.g. [native] — enabling the higher execution levels). It is a PEP 517/518 package built with hatchling, so it installs cleanly into any environment via the normal Python packaging path, and it is removed just as conventionally with pip uninstall palimpsests. No custom installer, build-from-source step, or manual file placement is required — the common practice for the language is exactly what the project uses.
    https://pypi.org/project/palimpsests/



    The installation system for end-users MUST honor standard conventions for selecting the location where built artifacts are written to at installation time. For example, if it installs files on a POSIX system it MUST honor the DESTDIR environment variable. If there is no installation system or no standard convention, select "not applicable" (N/A). [installation_standard_variables]

    The project has no custom end-user installation system that writes compiled files to system locations, so conventions like DESTDIR do not apply. Installation is handled entirely by pip installing a PEP 517 wheel — pip already places files according to the active Python environment's standard scheme (site-packages / the environment prefix, honoring virtualenv/--prefix/--target as pip defines them), and the project neither overrides that placement nor ships a Makefile-style install target that would need to honor DESTDIR. There are also no compiled files of the project's own to place (pure Python). The criterion's escape clause — no separate install system of the project's own — therefore applies.



    The project MUST provide a way for potential developers to quickly install all the project results and support environment necessary to make changes, including the tests and test environment. This MUST be performed with a commonly-used convention. [installation_development_quick]
    This MAY be implemented using a generated container and/or installation script(s). External dependencies would typically be installed by invoking system and/or language package manager(s), per external_dependencies.

    The project lets a potential developer set up the full change-making environment quickly, using common Python practice. CONTRIBUTING.md gives the steps: clone the repository, then python -m pip install -e ".[dev]" — an editable install of the project plus the [dev] extra, which pulls in the developer and test tooling (ruff pinned, pytest, pytest-httpx, numpy). After that, ruff check . runs the linter and python -m pytest runs the full test suite. So one standard editable-install command brings in the software, the supporting tools, and the test environment together, and tests are run with the standard Python invocation — no bespoke bootstrap script or manual dependency wrangling.


  • Externally-maintained components


    The project MUST list external dependencies in a computer-processable way. (URL required) [external_dependencies]
    Typically this is done using the conventions of package manager and/or build system. Note that this helps implement installation_development_quick.

    External dependencies are declared in a computer-processable format in pyproject.toml — the standard machine-readable manifest for a PEP 621 Python project. Runtime dependencies are listed under [project.dependencies], and the optional feature sets (e.g. [native] for the level-3 backend, [dev] for the developer/test tooling) under [project.optional-dependencies], each with version constraints (lower bounds; the lint tool pinned). Any standard tool — pip, build back-ends, dependency scanners, Dependabot — parses this file directly, and Dependabot is enabled on the repository to monitor those dependencies.
    https://github.com/Assault-Consulting/Palimpsests/blob/main/pyproject.toml



    Projects MUST monitor or periodically check their external dependencies (including convenience copies) to detect known vulnerabilities, and fix exploitable vulnerabilities or verify them as unexploitable. [dependency_monitoring]
    This can be done using an origin analyzer / dependency checking tool / software composition analysis tool such as OWASP's Dependency-Check, Sonatype's Nexus Auditor, Synopsys' Black Duck Software Composition Analysis, and Bundler-audit (for Ruby). Some package managers include mechanisms to do this. It is acceptable if the components' vulnerability cannot be exploited, but this analysis is difficult and it is sometimes easier to simply update or fix the part.

    The project monitors its external dependencies for known vulnerabilities on an ongoing basis. Dependabot is enabled on the repository, which continuously watches the dependencies declared in pyproject.toml against vulnerability databases and opens alerts/update pull requests when a known-vulnerable dependency is identified. The project also runs OpenSSF Scorecard, whose checks include dependency-update and vulnerability signals (badge shown on the repository front page). When an alert surfaces, it is handled through the normal pull-request process — updating the dependency, or confirming non-exploitability — under the response practice documented in SECURITY.md. There are currently no known unaddressed vulnerable dependencies.



    The project MUST either:
    1. make it easy to identify and update reused externally-maintained components; or
    2. use the standard components provided by the system or programming language.
    Then, if a vulnerability is found in a reused component, it will be easy to update that component. [updateable_reused_components]
    A typical way to meet this criterion is to use system and programming language package management systems. Many FLOSS programs are distributed with "convenience libraries" that are local copies of standard libraries (possibly forked). By itself, that's fine. However, if the program *must* use these local (forked) copies, then updating the "standard" libraries as a security update will leave these additional copies still vulnerable. This is especially an issue for cloud-based systems; if the cloud provider updates their "standard" libraries but the program won't use them, then the updates don't actually help. See, e.g., "Chromium: Why it isn't in Fedora yet as a proper package" by Tom Callaway.

    Reused external components are easy to identify and update. The project does not vendor or copy third-party code into the tree; every externally maintained component is a normal, versioned dependency declared in pyproject.toml ([project.dependencies] and the optional-dependency groups), resolved from PyPI. Because they are standard packaged dependencies rather than embedded copies, updating one when a vulnerability is found is a routine version bump — pip resolves it, Dependabot proposes the update automatically, and no in-tree fork has to be patched by hand. The project also favors standard, widely used components delivered by the platform (e.g. SQLCipher/keyring for at-rest encryption and credential storage, httpx for transport) rather than bespoke implementations, so fixes flow from upstream maintenance.



    The project SHOULD avoid using deprecated or obsolete functions and APIs where FLOSS alternatives are available in the set of technology it uses (its "technology stack") and to a supermajority of the users the project supports (so that users have ready access to the alternative). [interfaces_current]

    The project avoids deprecated or obsolete functions and APIs where supported open-source alternatives exist. It targets current, actively supported Python (3.11+), and modern-Python usage is enforced automatically: the ruff ruleset includes UP (pyupgrade), which flags legacy idioms and pushes code to current language constructs, and lint is a merge-blocking gate — so deprecated patterns do not accumulate. Dependencies are kept current through Dependabot rather than pinned to end-of-life versions, and the components chosen are current, maintained ones (httpx for HTTP, SQLCipher/keyring, hatchling/PEP 517 packaging, Sigstore for signing) rather than deprecated predecessors. There are no known uses of obsolete APIs for which a readily available alternative is being ignored.


  • Automated test suite


    An automated test suite MUST be applied on each check-in to a shared repository for at least one branch. This test suite MUST produce a report on test success or failure. [automated_integration_testing]
    This requirement can be viewed as a subset of test_continuous_integration, but focused on just testing, without requiring continuous integration.

    An automated test suite runs on every change to the shared repository. GitHub Actions CI is triggered on push and on pull request against main (.github/workflows/ci.yml) and executes the full pytest suite across a matrix of three operating systems and Python 3.11/3.12. It produces a clear pass/fail report: the run's success or failure is reported back as a required status check on the commit/PR (and gates merge into main), and the CI status is shown as a live badge on the repository front page. So each change gets an automated suite with an explicit success-or-failure result, not a manual or best-effort check.



    The project MUST add regression tests to an automated test suite for at least 50% of the bugs fixed within the last six months. [regression_tests_added50]

    Regression tests are added for well over 50% of bugs fixed — it is the project's standing policy, enforced in review. CONTRIBUTING.md mandates that tests ship with every behavioral change, and a bug fix is a behavioral change, so fixes land with a test that exercises the corrected behavior; because the test suite is a merge-blocking gate, a fix without its covering test does not get merged. Recent fixes demonstrate the practice: for example, a defect in the audit-format test vectors (an anchor-completeness inconsistency) was fixed together with regression tests that assert the exact diagnosis — tests/test_pala_codec.py and tests/test_pala_cli.py verify that a lagging anchor is reported as an unanchored tail with the correct lag count — and earlier subsystem fixes (e.g. in the state validator and the native scheduler) each landed with their own tests/ additions. The per-PR history shows the test-with-fix pattern throughout.



    The project MUST have FLOSS automated test suite(s) that provide at least 80% statement coverage if there is at least one FLOSS tool that can measure this criterion in the selected language. [test_statement_coverage80]
    Many FLOSS tools are available to measure test coverage, including gcov/lcov, Blanket.js, Istanbul, JCov, and covr (R). Note that meeting this criterion is not a guarantee that the test suite is thorough, instead, failing to meet this criterion is a strong indicator of a poor test suite.

    The project's automated test suite achieves statement coverage above the 80% threshold, measured by a FLOSS tool. Coverage is measured in CI with pytest-cov / coverage.py (both open source), and the CI coverage job is gated: the build fails if statement coverage drops below 80%. Current statement coverage is ~87% across the codebase. The one module that sits low is the hardware-only ctypes backend (llamacpp_backend.py), which requires a real GGUF model and GPU and is validated on hardware per benchmarks/RUNBOOK.md rather than in CI; excluding that hardware-gated path, the pure-software surface is well covered, and the overall figure still clears 80% comfortably.


  • New functionality testing


    The project MUST have a formal written policy that as major new functionality is added, tests for the new functionality MUST be added to an automated test suite. [test_policy_mandated]

    The project has a formal written policy requiring tests for new significant functionality to be added to the automated test suite. CONTRIBUTING.md states, as a ground rule for contributions, that tests ship with every behavioral change — so adding new functionality obliges adding the tests that cover it, in the same pull request. The policy is not advisory: the automated suite is a merge-blocking status check on main, so a change introducing new functionality without its covering tests cannot be merged. The requirement is documented in writing, applied to every contributor, and enforced automatically.



    The project MUST include, in its documented instructions for change proposals, the policy that tests are to be added for major new functionality. [tests_documented_added]
    However, even an informal rule is acceptable as long as the tests are being added in practice.

    The policy of adding tests for new functionality is documented in the contribution guidelines. CONTRIBUTING.md states, under its Tests section, "Every behavioral change ships with tests in the same PR," and additionally requires security-sensitive code to test escape and denial paths explicitly. This places the policy directly in the instructions contributors read before submitting changes. URL: https://github.com/Assault-Consulting/Palimpsests/blob/main/CONTRIBUTING.md


  • Warning flags


    Projects MUST be maximally strict with warnings in the software produced by the project, where practical. [warnings_strict]
    Some warnings cannot be effectively enabled on some projects. What is needed is evidence that the project is striving to enable warning flags where it can, so that errors are detected early.

    The project enforces a curated, deliberately-chosen strict rule set that is practical for the codebase: ruff with ["E","F","I","B","UP"] — pycodestyle/pyflakes correctness rules, import ordering, flake8-bugbear (which catches likely bugs and unsafe patterns), and pyupgrade. The linter is pinned to a fixed version and enforced as a required, merge-blocking CI check on every push and pull request, so the strictness is applied consistently rather than advisory. The rule set was chosen for signal over noise rather than enabling every available rule, which is the practical maximum for this project. URL: https://github.com/Assault-Consulting/Palimpsests/blob/main/pyproject.toml


 Security 13/13

  • Secure development knowledge


    The project MUST implement secure design principles (from "know_secure_design"), where applicable. If the project is not producing software, select "not applicable" (N/A). [implement_secure_design]
    For example, the project results should have fail-safe defaults (access decisions should deny by default, and projects' installation should be secure by default). They should also have complete mediation (every access that might be limited must be checked for authority and be non-bypassable). Note that in some cases principles will conflict, in which case a choice must be made (e.g., many mechanisms can make things more complex, contravening "economy of mechanism" / keep it simple).

    The project implements secure-design principles concretely, not just documents them:
    Fail-safe / secure defaults. TLS verification is on by default and no insecure transport is enabled by default; in the audit format, an unknown time source (time_trust = UNKNOWN) is required to carry a zero timestamp — the design refuses a confident-but-unjustified value rather than guessing.
    Least privilege. The release workflow grants only the scopes it needs (id-token for OIDC publish, contents for the release), and publishing uses short-lived OIDC identity rather than a broad stored token.
    Minimize / separate the attack surface. Header-only chain verification needs no key and touches no bodies, so a verifier sees no sensitive data; the audit codec is stdlib-only; and the one memory-unsafe boundary (the llama.cpp C library) is isolated behind an optional extra rather than in the core.
    Defense in depth. Untrusted persisted state is bounds-checked by a validator and fuzzed; changes must pass branch protection, non-author review, green tests, coverage, SAST, and signed provenance — layered, not a single control.
    Separation of privilege / keys apart from data. Encryption keys live outside the log (addressed by key_id, in an OS keychain or injected), so the data, its keys, config, and logs are separated; the audit path observes safety events rather than controlling them.
    Open design (no security through obscurity). The audit format is fully specified and independently verifiable — its guarantees rely on the published mechanism, not on secrecy, to the point that a third party can verify a log with their own tool.
    SECURITY.md maps vulnerability classes to these implemented mitigations, and docs/THREAT_MODEL.md and docs/ASSURANCE-CASE.md carry the design reasoning.


  • Use basic good cryptographic practices

    Note that some software does not need to use cryptographic mechanisms. If your project produces software that (1) includes, activates, or enables encryption functionality, and (2) might be released from the United States (US) to outside the US or to a non-US-citizen, you may be legally required to take a few extra steps. Typically this just involves sending an email. For more information, see the encryption section of Understanding Open Source Technology & US Export Controls.

    The default security mechanisms within the software produced by the project MUST NOT depend on cryptographic algorithms or modes with known serious weaknesses (e.g., the SHA-1 cryptographic hash algorithm or the CBC mode in SSH). [crypto_weaknesses]
    Concerns about CBC mode in SSH are discussed in CERT: SSH CBC vulnerability.

    The project's default security mechanisms do not depend on any cryptographic algorithm or mode with known serious weaknesses. It does not use SHA-1 for security purposes, and it does not use SSH or the SSH CBC mode. At-rest encryption uses SQLCipher (AES-256 with HMAC-SHA-256/512, not SHA-1), and transport security uses the platform TLS stack with modern negotiated algorithms. No SHA-1-based or otherwise seriously-weakened primitive is relied upon. URL: https://github.com/Assault-Consulting/Palimpsests/blob/main/SECURITY.md



    The project SHOULD support multiple cryptographic algorithms, so users can quickly switch if one is broken. Common symmetric key algorithms include AES, Twofish, and Serpent. Common cryptographic hash algorithm alternatives include SHA-2 (including SHA-224, SHA-256, SHA-384 AND SHA-512) and SHA-3. [crypto_algorithm_agility]

    The project uses multiple, current cryptographic algorithms and provides an appropriate path to switch if one is broken, though the mechanism differs by layer:
    Transport crypto is delegated to TLS via httpx, which supports multiple algorithms and cipher suites and negotiates them — so algorithm agility there is inherent and does not depend on the project.
    The tamper-evident audit format (PALA-1) deliberately fixes a single strong algorithm per purpose — AES-256-GCM for record bodies, SHA-256 for the hash chain and Merkle tree — because byte-exact agreement between independent verifier implementations is the format's core property, and runtime algorithm negotiation would break reproducibility and open downgrade attacks. Agility is instead handled at the format-version level: the wire header carries format_version, a frozen-field forward-compatibility discipline (§7.6) lets a future version specify a different algorithm while older verifiers still process records they do not fully interpret, so migrating off a broken primitive is a defined, non-disruptive path rather than a rewrite. All algorithms in use are current (SHA-2 family, AES-256), with no broken ones.



    The project MUST support storing authentication credentials (such as passwords and dynamic tokens) and private cryptographic keys in files that are separate from other information (such as configuration files, databases, and logs), and permit users to update and replace them without code recompilation. If the project never processes authentication credentials and private cryptographic keys, select "not applicable" (N/A). [crypto_credential_agility]

    Authentication credentials and private cryptographic keys are kept separate from other information and are replaceable without recompiling.
    Audit-log encryption keys are not stored inside the project's own files. They are addressed by key_id and held outside the log — in an OS keychain or supplied by explicit injection — so keys live apart from the data, config, and logs they protect. Rotating or replacing a key is a runtime operation (the format even records key destruction as a KEY_SHRED record), never a code change or recompile; and because it is a pure-Python project there is no compilation step to redo regardless.
    Release/publishing identity uses GitHub Trusted Publishing (OIDC), so there is no long-lived private token stored in the repository at all — the credential is short-lived and issued at publish time, not embedded in code or config.
    At-rest secrets (where the desktop/persistence path applies) go through SQLCipher/keyring, which hold them in their own dedicated stores, separate from application data.
    No credential or private key is embedded in source, config files, databases, or logs; each can be updated or replaced independently of the code.



    The software produced by the project SHOULD support secure protocols for all of its network communications, such as SSHv2 or later, TLS1.2 or later (HTTPS), IPsec, SFTP, and SNMPv3. Insecure protocols such as FTP, HTTP, telnet, SSLv3 or earlier, and SSHv1 SHOULD be disabled by default, and only enabled if the user specifically configures it. If the software produced by the project does not support network communications, select "not applicable" (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.



    The software produced by the project SHOULD, if it supports or uses TLS, support at least TLS version 1.2. Note that the predecessor of TLS was called SSL. If the software does not use TLS, select "not applicable" (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.



    The software produced by the project MUST, if it supports TLS, perform TLS certificate verification by default when using TLS, including on subresources. If the software does not use TLS, select "not applicable" (N/A). [crypto_certificate_verification]

    Where the software uses TLS, it verifies TLS certificates by default. HTTPS communication goes through httpx, which performs certificate verification (chain and hostname) by default — the project does not disable it (no verify=False, no custom context that turns verification off) and does not weaken it for any request or sub-resource. So certificate validation is on for every TLS connection the software makes, as the library's secure default, and nothing in the project overrides that.



    The software produced by the project MUST, if it supports TLS, perform certificate verification before sending HTTP headers with private information (such as secure cookies). If the software does not use TLS, select "not applicable" (N/A). [crypto_verification_private]

    Where the software uses TLS, certificate validation happens before any request data is sent, so no sensitive HTTP header is transmitted ahead of verification. HTTPS goes through httpx, which completes the TLS handshake — including certificate chain and hostname verification — as part of establishing the connection, before the request line and headers are written; the project keeps this default (no verify=False, no verification deferral or override). In practice the project also does not rely on browser-style secret headers: publishing authentication uses short-lived OIDC tokens over verified HTTPS rather than long-lived secured cookies. Either way, verification precedes the transmission of any header.


  • Secure release


    The project MUST cryptographically sign releases of the project results intended for widespread use, and there MUST be a documented process explaining to users how they can obtain the public signing keys and verify the signature(s). The private key for these signature(s) MUST NOT be on site(s) used to directly distribute the software to the public. If releases are not intended for widespread use, select "not applicable" (N/A). [signed_releases]
    The project results include both source code and any generated deliverables where applicable (e.g., executables, packages, and containers). Generated deliverables MAY be signed separately from source code. These MAY be implemented as signed git tags (using cryptographic digital signatures). Projects MAY provide generated results separately from tools like git, but in those cases, the separate results MUST be separately signed.

    Releases intended for wide use are cryptographically signed, and there is a documented verification process. Distribution artifacts are published to PyPI via Trusted Publishing (OIDC) with Sigstore-backed PEP 740 attestations and signed SLSA Build Level 2 provenance binding the artifact digest to the release workflow, the tag, and the OIDC issuer (.github/workflows/release.yml). How a user obtains the verification material and checks a release is documented in RELEASING.md (referenced from SECURITY.md and the assurance case), and the attestations are also surfaced on the artifact's PyPI "Provenance" section. Crucially, signing is keyless: Sigstore issues short-lived certificates tied to the workflow's OIDC identity and logs them in the Rekor transparency log, and PyPI publishing uses OIDC rather than a stored token — so there is no long-lived private signing key held anywhere, and in particular none on the distribution site. That satisfies the "private key not on the distribution site" requirement by construction.



    It is SUGGESTED that in the version control system, each important version tag (a tag that is part of a major release, minor release, or fixes publicly noted vulnerabilities) be cryptographically signed and verifiable as described in signed_releases. [version_tags_signed]

    The project's release artifacts are cryptographically signed (Sigstore/PEP 740 attestations + SLSA provenance — see signed_releases), but the git version tags themselves are currently lightweight tags, which cannot carry a cryptographic signature. So the specific practice this criterion recommends — signed, verifiable VCS tags — is not yet in place. This is a SUGGESTED criterion, recorded honestly rather than stretched; the artifact-level signing already gives end users a verifiable provenance chain, and adopting signed annotated tags (git tag -s) for future releases is a straightforward improvement we can add.


  • Other security issues


    The project results MUST check all inputs from potentially untrusted sources to ensure they are valid (an *allowlist*), and reject invalid inputs, if there are any restrictions on the data at all. [input_validation]
    Note that comparing input against a list of "bad formats" (aka a *denylist*) is normally not enough, because attackers can often work around a denylist. In particular, numbers are converted into internal formats and then checked if they are between their minimum and maximum (inclusive), and text strings are checked to ensure that they are valid text patterns (e.g., valid UTF-8, length, syntax, etc.). Some data may need to be "anything at all" (e.g., a file uploader), but these would typically be rare.

    The project validates input from potentially untrusted sources against an allowlist of what is structurally valid and rejects anything that does not conform.
    Persisted KV-state blobs (the surface reachable through load_state) are checked by a dedicated validator before use: it requires the correct PALKV1 magic and validates the structure, rejecting malformed or unexpected blobs rather than trusting them. This validator is the target of a coverage-guided fuzz harness (Atheris), precisely because it is the untrusted-input boundary.
    The PALA-1 audit wire format is parsed defensively by the codec: every fixed-header field and every TLV is bounds-checked, the container is parsed by frozen-field offsets, and violations (bad lengths, TLV overruns, truncated tails, unexpected values) are reported/rejected rather than accepted. Verification is allowlist-shaped — records are accepted only if they satisfy the specified constraints — and unknown record/TLV types are handled as explicitly-defined "uninterpretable", not silently trusted.
    So untrusted input is validated against known constraints and invalid input is rejected wherever the format imposes constraints.



    Hardening mechanisms SHOULD be used in the software produced by the project so that software defects are less likely to result in security vulnerabilities. [hardening]
    Hardening mechanisms may include HTTP headers like Content Security Policy (CSP), compiler flags to mitigate attacks (such as -fstack-protector), or compiler flags to eliminate undefined behavior. For our purposes least privilege is not considered a hardening mechanism (least privilege is important, but separate).

    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



    The project MUST provide an assurance case that justifies why its security requirements are met. The assurance case MUST include: a description of the threat model, clear identification of trust boundaries, an argument that secure design principles have been applied, and an argument that common implementation security weaknesses have been countered. (URL required) [assurance_case]
    An assurance case is "a documented body of evidence that provides a convincing and valid argument that a specified set of critical claims regarding a system’s properties are adequately justified for a given application in a given environment" ("Software Assurance Using Structured Assurance Case Models", Thomas Rhodes et al, NIST Interagency Report 7608). Trust boundaries are boundaries where data or execution changes its level of trust, e.g., a server's boundaries in a typical web application. It's common to list secure design principles (such as Saltzer and Schroeer) and common implementation security weaknesses (such as the OWASP top 10 or CWE/SANS top 25), and show how each are countered. The BadgeApp assurance case may be a useful example. This is related to documentation_security, documentation_architecture, and implement_secure_design.

    The project provides a structured assurance case in docs/ASSURANCE-CASE.md — a defeasible Claims → Arguments → Evidence argument that Palimpsests provides the security and record-keeping properties it claims. It contains all four required elements:
    Threat model description — the assurance case is built on and cross-references docs/THREAT_MODEL.md, which states the threats and guarantees precisely; the assurance case's Scope and top-level claim (G0 → C1–C5) frame what is defended.
    Clear trust boundaries — the threat model and the per-claim scope define the boundaries (e.g. the audit chain vs. the device owner at the base tier, host-resident at-rest data, the untrusted-input validator surface), and a "Defeaters" section names the conditions under which each claim breaks.
    Argument that secure-design principles are applied — claims C1–C5 argue tamper-evidence, at-rest confidentiality, supply-chain verifiability, declared capabilities, and the engineering-quality substrate, each with its supporting evidence.
    Argument that common implementation vulnerabilities are prevented — C5 (the quality substrate) plus SECURITY.md map vulnerability classes to the implemented mitigations (memory-safe language, validated/fuzzed untrusted input, SAST, no hardcoded secrets), and each claim carries a stated residual so the argument is honest about limits rather than overclaiming.
    https://github.com/Assault-Consulting/Palimpsests/blob/main/docs/ASSURANCE-CASE.md


 Analysis 2/2

  • Static code analysis


    The project MUST use at least one static analysis tool with rules or approaches to look for common vulnerabilities in the analyzed language or environment, if there is at least one FLOSS tool that can implement this criterion in the selected language. [static_analysis_common_vulnerabilities]
    Static analysis tools that are specifically designed to look for common vulnerabilities are more likely to find them. That said, using any static tools will typically help find some problems, so we are suggesting but not requiring this for the 'passing' level badge.

    Yes. Bandit — the SAST tool added for the static-analysis criterion — is designed specifically to find common security vulnerabilities in Python. Its rule set targets known vulnerability patterns: hardcoded credentials, injection via unsafe subprocess/shell=True/eval/exec, unsafe deserialization (pickle/yaml), weak or misused cryptographic calls, insecure temp-file handling, and unsafe network/SSL defaults. It runs on the package source on every push and pull request. URL: https://github.com/Assault-Consulting/Palimpsests/blob/main/.github/workflows/sast.yml


  • Dynamic code analysis


    If the software produced by the project includes software written using a memory-unsafe language (e.g., C or C++), then at least one dynamic tool (e.g., a fuzzer or web application scanner) MUST be routinely used in combination with a mechanism to detect memory safety problems such as buffer overwrites. If the project does not produce software written in a memory-unsafe language, choose "not applicable" (N/A). [dynamic_analysis_unsafe]
    Examples of mechanisms to detect memory safety problems include Address Sanitizer (ASAN) (available in GCC and LLVM), Memory Sanitizer, and valgrind. Other potentially-used tools include thread sanitizer and undefined behavior sanitizer. Widespread assertions would also work.

    The project does not develop software in a memory-unsafe language. Palimpsests is written entirely in Python, a memory-safe language; it works above the attention kernel and contains no C, C++, or other memory-unsafe code of its own. The only native code involved (llama.cpp) is an external, separately-maintained dependency invoked through the [native] extra, not code developed within this project. Per the criterion's own guidance, N/A is selected because the project develops no memory-unsafe software. URL: https://github.com/Assault-Consulting/Palimpsests/blob/main/README.md



You can use tools and AI systems to propose changes via a simple URL, such as https://www.bestpractices.dev/en/projects/13534/choose/edit?osps_ac_01_01_status=Met&osps_ac_01_01_justification=GitHub+enforced. See our automation proposals system for how to do that. This data is available under the Community Data License Agreement – Permissive, Version 2.0 (CDLA-Permissive-2.0). This means that a Data Recipient may share the Data, with or without modifications, so long as the Data Recipient makes available the text of this agreement with the shared Data. Please credit andreysparish and the OpenSSF Best Practices badge contributors.

Project badge entry owned by: andreysparish.
Entry created on 2026-07-08 10:49:53 UTC, last updated on 2026-08-23 07:20:40 UTC. Last achieved passing badge on 2026-07-08 11:51:23 UTC.