spector

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 14829 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/14829/badge)](https://www.bestpractices.dev/projects/14829)
or by embedding this in your HTML:
<a href="https://www.bestpractices.dev/projects/14829"><img src="https://www.bestpractices.dev/projects/14829/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.

    Memory backbone for AI agents. Four-tier store — working, episodic, semantic, procedural — with decay, consolidation, and association graphs. Fused semantic + SIMD-accelerated hybrid recall, in-process MCP, REST/gRPC, and language SDKs.

    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]
  • 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 enforces a mandatory legal contribution mechanism using both the Developer Certificate of Origin (DCO 1.1) and a formal Contributor License Agreement (CLA.md). All commits require a Signed-off-by line (git commit -s) certifying the author is legally authorized to submit the code under Apache 2.0, enforced by automated CI checks. https://github.com/spectrayan/spector/blob/main/CONTRIBUTING.md#developer-certificate-of-origin-dco-11--licensing



    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 documents its open-source governance model, leadership roles, and decision-making mechanics in GOVERNANCE.md:
    https://github.com/spectrayan/spector/blob/main/GOVERNANCE.md

    Key Roles & Structure:

    • Defined meritocratic roles: Project Lead, Technical Lead (TSC Chair), Architecture Working Group (AWG), Technical Steering Committee (TSC), Maintainers, Committers/Reviewers, and Contributors.
    • A 4-tier Contributor Ladder with transparent progression criteria from first-time contributor to TSC member based on sustained technical merit. Corporate titles hold no review or merge authority.

    Decision-Making Process:

    • Lazy Consensus (72 hours without objection) for routine pull requests, bug fixes, and documentation.
    • Simple Majority (>50%) of Maintainers for committer appointments and non-breaking deprecations.
    • Supermajority (2/3 vote) of the Technical Steering Committee for formal Architecture Decision Records (ADRs), breaking API changes, and governance amendments.


    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 adopts the Contributor Covenant Code of Conduct (v2.1), posted in the standard root location (CODE_OF_CONDUCT.md), outlining community standards, enforcement guidelines, and reporting channels (support@spectrayan.com). https://github.com/spectrayan/spector/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.

    Spector defines and documents its project roles, responsibilities, and specific tasks in GOVERNANCE.md (https://github.com/spectrayan/spector/blob/main/GOVERNANCE.md#2-governance-structure--roles), covering the Project Lead, Technical Lead, Architecture Working Group, Technical Steering Committee, Maintainers, Committers, and Contributors. Specific role holders and maintainer responsibilities are publicly assigned in .github/CODEOWNERS (https://github.com/spectrayan/spector/blob/main/.github/CODEOWNERS) and GOVERNANCE.md (https://github.com/spectrayan/spector/blob/main/GOVERNANCE.md#immediate-eligibility-for-committer--reviewer-status)



    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]

    Project continuity and credential redundancy are documented in GOVERNANCE.md under Project Continuity & Redundancy (https://github.com/spectrayan/spector/blob/main/GOVERNANCE.md#32-project-continuity--redundancy). Organization ownership, domain management, and GitHub repository administration are distributed across multiple administrative contacts with backup credentials. Review and merge rights on main are assigned to team aliases in .github/CODEOWNERS (https://github.com/spectrayan/spector/blob/main/.github/CODEOWNERS), and release credentials (GHCR, PyPI, npm, Maven) are managed via organization-level GitHub Actions secrets, ensuring that issue triage, PR merges, and software releases can continue within one week if any individual contributor becomes unavailable.



    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 maintains a bus factor of 2 or more across its core codebase and governance hierarchy, as documented in ACKNOWLEDGMENTS.md (https://github.com/spectrayan/spector/blob/main/ACKNOWLEDGMENTS.md#open-source-contributors) and GOVERNANCE.md (https://github.com/spectrayan/spector/blob/main/GOVERNANCE.md#3-the-4-tier-contributor-ladder). Technical knowledge, code review authority, and codebase maintenance are shared between Project Lead Bharat Joshi (@sbharatjoshi) and active committer Timothy Kim (@timothytkim), who has authored merged contributions across kernel documentation, provider architecture, index diagnostics, and observability, alongside functional team aliases in .github/CODEOWNERS (https://github.com/spectrayan/spector/blob/main/.github/CODEOWNERS).


  • 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 public 12-month architectural roadmap in ROADMAP.md (https://github.com/spectrayan/spector/blob/main/ROADMAP.md) and docs/roadmap.md (https://github.com/spectrayan/spector/blob/main/docs/roadmap.md). It outlines planned milestones from Q4 2026 through Q3 2027 and JDK 29 LTS (including native Goose extensions, streamable HTTP MCP transport, A2A federated memory sharing, Valhalla value classes, and edge SIMD optimizations). It explicitly details project boundaries and non-goals (what the project will NOT do: it will not become an agent orchestrator framework, will not become a general-purpose SQL database, will not introduce external framework dependencies into the core engine kernel, and will not gate features behind proprietary cloud services).



    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 project documents its system architecture and high-level design in the Architecture Overview documentation (https://github.com/spectrayan/spector/blob/main/docs/architecture/overview.md) and the public documentation portal (https://spectrayan.github.io/spector/architecture/overview/). The documentation details the complete multi-tier system architecture, including client SDKs, the Synapse transport layer (MCP and Armeria REST/gRPC), the 4-tier cognitive memory engine (Working, Episodic, Semantic, Procedural), Panama FFM off-heap memory-mapped slab layouts, SIMD vector acceleration kernels, and dataflow/threading models. Additional subsystem architecture deep-dives are maintained under docs/architecture/ and in the Architecture Decision Record catalog (https://github.com/spectrayan/spector/blob/main/docs/adr/catalog.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 its security requirements and threat model in SECURITY.md under Security Guarantees & Non-Guarantees (https://github.com/spectrayan/spector/blob/main/SECURITY.md#security-guarantees--non-guarantees-security-requirements) and in docs/architecture/encryption-at-rest.md (https://github.com/spectrayan/spector/blob/main/docs/architecture/encryption-at-rest.md). Users can expect physical on-disk tenant isolation with zero cross-tenant leakage, AES-256-GCM at-rest encryption for text payloads and WAL, memory safety via Panama FFM bounded arenas, timing-attack-resistant authentication, and continuous vulnerability scanning. Users cannot expect application-layer vector decryption (vector slabs are zero-copy memory mapped for SIMD search and require operator-managed volume/disk encryption), implicit perimeter protection (operators must configure TLS/mTLS or reverse proxies for public exposure), or defense against a compromised host OS/root user.



    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 dedicated quick start guide titled 'Quick Start — 30 Seconds to First Memory' in docs/getting-started/quickstart.md (https://github.com/spectrayan/spector/blob/main/docs/getting-started/quickstart.md) and on the public documentation portal (https://spectrayan.github.io/spector/getting-started/quickstart/). The guide enables new users to store and recall their first memory within seconds via multiple paths: a zero-install MCP launcher (npx -y @spectrayan/spector mcp), the Python SDK (pip install spector-client), the TypeScript SDK (npm install @spectrayan/spector-client), and a one-command Docker Compose setup. It is also linked directly from the root README (https://github.com/spectrayan/spector/blob/main/README.md#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 actively maintains documentation consistency with the current codebase through automated CI gates and disciplined documentation review. The automated documentation deployment pipeline in .github/workflows/docs.yml (https://github.com/spectrayan/spector/blob/main/.github/workflows/docs.yml) and CI suite enforce strict validation (mkdocs build --strict), causing the build to fail if broken links, missing references, or documentation warnings are introduced. In addition, the PR checklist in CONTRIBUTING.md (https://github.com/spectrayan/spector/blob/main/CONTRIBUTING.md#pr-checklist) requires doc updates for any altered interfaces, and documentation defects are tracked and resolved in GitHub Issues (demonstrated in major synchronization overhauls like PR #960 aligning docs with runtime kernel implementations).



    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.

    The project prominently displays and hyperlinks all project achievements and badges on the repository front page in README.md (https://github.com/spectrayan/spector/blob/main/README.md#L14-L23), including the OpenSSF Best Practices badge (hyperlinked to https://www.bestpractices.dev/projects/14829), CI build status, PyPI package releases, npm package releases, Docker GHCR images, documentation status, and contributor recognition. Maintainers update and display recognized badges immediately upon attainment.


  • 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 follows accessibility best practices across its documentation and interfaces. The public documentation portal (https://spectrayan.github.io/spector/) is built using Material for MkDocs, configured in mkdocs.yml (https://github.com/spectrayan/spector/blob/main/mkdocs.yml#L8-L31) to adhere to WCAG 2.1 Level AA accessibility standards. It features semantic HTML5 navigation, accessible keyboard controls, high-contrast dark and light mode color palette toggles, screen-reader-friendly layout hierarchies, and descriptive alt text on all imagery. Furthermore, CLI and server components support plain-text and structured JSON outputs to remain fully accessible to terminal screen readers.



    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 apply to the core software produced by the project. Spector is a backend cognitive memory engine, native off-heap storage kernel, and Model Context Protocol (MCP) server for autonomous AI agents, as described in docs/architecture/overview.md (https://github.com/spectrayan/spector/blob/main/docs/architecture/overview.md). It processes vector embeddings, association graphs, and structured JSON machine-to-machine payloads, and does not generate human-facing user interface text or locale-dependent strings. All text ingestion and payload handling natively support full Unicode/UTF-8 character encodings.


  • 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 sites do not store passwords for the authentication of external users. The project repository and download artifacts are hosted on GitHub (https://github.com/spectrayan/spector), and the project documentation website is statically hosted via GitHub Pages (https://spectrayan.github.io/spector/). The project sites maintain no independent user authentication database or credential storage, relying entirely on the host platform's infrastructure.


 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 maintains active versions and provides transparent upgrade and migration paths documented in CHANGELOG.md (https://github.com/spectrayan/spector/blob/main/CHANGELOG.md) adhering to Semantic Versioning (SemVer 2.0.0) and Keep a Changelog standards. Each release notes interface changes, configuration deprecations, and backward-compatible migration chains. Supported active release streams are explicitly defined in SECURITY.md under Supported Versions (https://github.com/spectrayan/spector/blob/main/SECURITY.md#supported-versions). In addition, storage bundle headers enforce binary schema format version validation to guarantee on-disk data integrity across version upgrades.


 Reporting 3/3 ●

  • Bug-reporting process


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

    The project uses GitHub Issues to track all bug reports, feature requests, and architectural tasks, with dedicated templates for bug reports, feature requests, and performance investigations. https://github.com/spectrayan/spector/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 vulnerability reports were received or resolved in the last 12 months. The project's documented policy in SECURITY.md under Coordinated Disclosure Process (https://github.com/spectrayan/spector/blob/main/SECURITY.md#coordinated-disclosure-process) explicitly mandates that reporters are publicly credited in published GitHub Security Advisories (GHSAs) and release notes unless they explicitly request anonymity, alongside permanent recognition in ACKNOWLEDGMENTS.md (https://github.com/spectrayan/spector/blob/main/ACKNOWLEDGMENTS.md).



    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 maintains a formal, step-by-step vulnerability response process documented in SECURITY.md under Coordinated Disclosure Process and Response Timeline & Severity SLAs (https://github.com/spectrayan/spector/blob/main/SECURITY.md#coordinated-disclosure-process). The policy outlines the complete workflow: initial receipt acknowledgment within 24 to 48 hours, private reproduction and triage in a secure fork with CVE assignment, collaborative patch preparation, and coordinated release publication alongside a GitHub Security Advisory (GHSA). Target fix windows are codified by CVSS v3.1 severity tiers (7 days for Critical, 14 days for High, 30 days for Medium).


 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 defines and enforces language-specific coding standards in CONTRIBUTING.md under Coding Standards (https://github.com/spectrayan/spector/blob/main/CONTRIBUTING.md#coding-standards). For Java (the primary engine language), it mandates Java 25 modern idioms (records, sealed classes, pattern matching), Project Panama FFM bounded arena lifecycles, Vector API conventions (FloatVector.SPECIES_PREFERRED), zero-allocation hot paths, and comprehensive Javadoc on all public interfaces. For TypeScript and Python client SDKs, it requires strict typing, sanitization standards, and standard package layouts. Compliance is required for all contributions and enforced via the PR checklist in .github/pull_request_template.md (https://github.com/spectrayan/spector/blob/main/.github/pull_request_template.md) and automated CI build gates.



    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 coding style and source standards in its CI pipeline and build lifecycle using automated FLOSS tooling. License headers and file formatting are automatically verified during the build via the license-maven-plugin, failing compilation and CI runs if any source file violates the style template, as documented in CONTRIBUTING.md (https://github.com/spectrayan/spector/blob/main/CONTRIBUTING.md#license-headers). Architectural and structural code styles are automatically enforced via ArchUnit (com.tngtech.archunit) during test runs, and static code quality/idiom rules are enforced across Java, TypeScript, and Python via automated GitHub CodeQL analysis on every pull request (.github/workflows/codeql.yml: https://github.com/spectrayan/spector/blob/main/.github/workflows/codeql.yml).


  • 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 or compile native binaries (such as C/C++ ELF executables or shared libraries). The build system is Apache Maven (pom.xml: https://github.com/spectrayan/spector/blob/main/pom.xml), producing pure JVM bytecode and JAR artifacts for OpenJDK 25, alongside npm and pip packages for TypeScript and Python SDKs. Native memory and SIMD hardware acceleration are accessed directly within the JVM using Java 25 Project Panama Foreign Function & Memory (FFM) and the Vector API without invoking native C/C++ compilers or linkers.



    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.

    The build and packaging system preserves full debugging information across all compiled artifacts. The Apache Maven compiler configuration in pom.xml (https://github.com/spectrayan/spector/blob/main/pom.xml#L731-L746) preserves all javac debugging symbols (line number tables, source file attributes, and local variable tables) in generated class files and shaded JARs. No symbol-stripping tools or unstripped binary flags are applied during compilation or installation, allowing complete stack traces, line-number mapping, and interactive debugging in production and developer environments.



    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.

    The project uses Apache Maven's multi-module reactor architecture defined in the root pom.xml (https://github.com/spectrayan/spector/blob/main/pom.xml#L54-L100) rather than recursive make or isolated subdirectory build scripts. Maven analyzes all inter-module dependencies globally to construct a single topological Directed Acyclic Graph (DAG) before compilation starts. Modules are compiled in strict dependency order, circular dependencies are automatically detected and forbidden, and cross-module artifacts are resolved deterministically across the reactor.



    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.

    The project achieves bit-for-bit reproducible builds using Apache Maven's standardized Reproducible Builds mechanism configured in pom.xml (https://github.com/spectrayan/spector/blob/main/pom.xml#L190). By defining a fixed <project.build.outputTimestamp> (2024-01-01T00:00:00Z), Maven plugins (maven-jar-plugin, maven-shade-plugin, flatten-maven-plugin) normalize zip entry timestamps, file ordering, and manifest metadata, ensuring identical cryptographic byte output from repeated builds on OpenJDK 25.


  • 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.

    The project provides standard, conventional installation and uninstallation methods across platforms, documented in docs/getting-started/installation.md (https://github.com/spectrayan/spector/blob/main/docs/getting-started/installation.md) and the root README (https://github.com/spectrayan/spector/blob/main/README.md#quick-start). Package managers support standard life-cycle commands: Python SDK via pip install / pip uninstall spector-client, TypeScript SDK via npm install / npm uninstall @spectrayan/spector-client, Homebrew via brew install / brew uninstall spector, Scoop for Windows via scoop install / scoop uninstall spector, Docker Compose via docker compose up -d / docker compose down -v, and standalone binary removal via rm -rf ~/.spector.



    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 installation system for end-users honors standard directory selection conventions across platforms, documented in scripts/install.sh (https://github.com/spectrayan/spector/blob/main/scripts/install.sh#L16-L45) and docs/getting-started/installation.md (https://github.com/spectrayan/spector/blob/main/docs/getting-started/installation.md). On POSIX systems, the standalone installer honors the standard DESTDIR and SPECTOR_HOME environment variables as well as the --install-dir <path> CLI flag to redirect all binary and JAR writes. Similarly, client package installations honor standard package-manager destination conventions: pip honors --target and --prefix, and npm honors --prefix.



    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 provides standard, rapid developer environment setup instructions in CONTRIBUTING.md under Development Setup (https://github.com/spectrayan/spector/blob/main/CONTRIBUTING.md#development-setup) and AGENTS.md (https://github.com/spectrayan/spector/blob/main/AGENTS.md#prerequisites). Potential developers can clone the repository and automatically download all reactor dependencies, build artifacts, test libraries (JUnit 5, AssertJ, jqwik), and execution environments using standard Apache Maven conventions via mvn clean compile and mvn test. No non-standard tooling, proprietary compilers, or external database services are required to develop or run tests locally.


  • 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.

    The project declares all external dependencies in standardized, computer-processable formats across all modules. Java dependencies are centrally managed via Apache Maven's machine-readable XML format in root pom.xml under dependencyManagement (https://github.com/spectrayan/spector/blob/main/pom.xml#L200-L725) and spectrayan-bom, complemented by the cyclonedx-maven-plugin (https://github.com/spectrayan/spector/blob/main/pom.xml#L1016-L1032) which generates standardized machine-readable CycloneDX 1.6 Software Bill of Materials (SBOMs) in XML and JSON. Client packages declare dependencies in standard package manifests (package.json for TypeScript and pyproject.toml for Python), and dependencies are automatically parsed and monitored by GitHub Dependabot (.github/dependabot.yml).



    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 continuously monitors and updates external dependencies for known security vulnerabilities using automated tooling configured in .github/dependabot.yml (https://github.com/spectrayan/spector/blob/main/.github/dependabot.yml) and container vulnerability scanning in .github/workflows/container-security.yml (https://github.com/spectrayan/spector/blob/main/.github/workflows/container-security.yml). Automated scans run weekly across all package ecosystems (Maven, npm, Docker base images, and GitHub Actions). Flagged vulnerabilities are actively remediated (demonstrated in issue #880 resolving all open dependency alerts and recent container base image digest pinning), resulting in 0 open Dependabot alerts across the repository.



    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.

    The project satisfies both criteria. First, as documented in AGENTS.md under Architecture Conventions (https://github.com/spectrayan/spector/blob/main/AGENTS.md#architecture-conventions-for-ai-agents), the core engine kernel (spector-core, spector-cpu, spector-kernel, spector-memory, and spector-index) has an invariant of zero third-party dependencies, relying purely on standard OpenJDK 25 platform APIs (java.lang.foreign, jdk.incubator.vector, java.lang.ScopedValue). Second, all external dependencies used in gateway and transport layers are centrally managed in root pom.xml under properties and dependencyManagement (https://github.com/spectrayan/spector/blob/main/pom.xml#L110-L185), enabling single-variable version bumps across the entire multi-module reactor, and automated via GitHub Dependabot (.github/dependabot.yml).



    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 actively avoids deprecated and obsolete APIs by targeting modern toolchains (Java 25, Angular 22, Python 3.11+). As documented in CONTRIBUTING.md under Coding Standards (https://github.com/spectrayan/spector/blob/main/CONTRIBUTING.md#coding-standards), the Java codebase strictly utilizes modern replacement standards: Project Panama FFM (java.lang.foreign) replacing obsolete sun.misc.Unsafe and JNI, Virtual Threads and ScopedValues replacing legacy ThreadLocal concurrency patterns, and modern records/sealed classes replacing verbose legacy POJOs. Compiler warnings and CodeQL static analysis workflows in .github/workflows/codeql.yml (https://github.com/spectrayan/spector/blob/main/.github/workflows/codeql.yml) continuously monitor for and eliminate deprecated API invocations.


  • 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.

    Automated test suites are executed on every check-in and pull request targeting the main branch via GitHub Actions in .github/workflows/ci.yml (https://github.com/spectrayan/spector/blob/main/.github/workflows/ci.yml#L110-L135). The workflow runs unit, property, and benchmark test suites across multiple hardware architectures (x86_64 and aarch64), generates Surefire XML test reports archived as build artifacts (actions/upload-artifact under **/target/surefire-reports/*.xml), aggregates JaCoCo code coverage reports, and outputs clear pass/fail check statuses visible directly on GitHub Actions (https://github.com/spectrayan/spector/actions).



    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]

    The project strictly requires and adds automated regression tests for bug fixes, far exceeding the 50% threshold. The project policy documented in CONTRIBUTING.md under Testing Expectations (https://github.com/spectrayan/spector/blob/main/CONTRIBUTING.md#testing-expectations) mandates unit tests for all bug fixes. Recent bug fixes demonstrate 100% regression test coverage: PR #984 (https://github.com/spectrayan/spector/pull/984) fixing silent Hebbian edge drops added dedicated regression tests (ForgetAndVacuumHonestyTest.java, HebbianGraphMaxDegreeMismatchTest.java), PR #982 (https://github.com/spectrayan/spector/pull/982) fixing batch bundle fabrication added SpectorBatchUnimplementedStepsTest.java, and PR #991 added distance precision regression suites. All regression tests run automatically in CI on every push.



    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 measures and enforces statement and branch coverage using the open-source JaCoCo tool (jacoco-maven-plugin), configured in the root pom.xml (https://github.com/spectrayan/spector/blob/main/pom.xml#L1046-L1048) with an 80% coverage target baseline. The automated CI pipeline in .github/workflows/ci.yml (https://github.com/spectrayan/spector/blob/main/.github/workflows/ci.yml#L134-L142) runs jacoco:report-aggregate on every check-in to measure statement execution across unit, property, and integration tests, ensuring that core memory layouts, decay algorithms, and scoring kernels maintain 80%+ statement coverage.


  • 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 maintains a formal written testing policy documented in CONTRIBUTING.md under Testing Expectations (https://github.com/spectrayan/spector/blob/main/CONTRIBUTING.md#testing-expectations). The policy explicitly mandates automated tests for all new functionality across defined categories: unit tests are required for all new classes and bug fixes, jqwik property tests are required for new indexing algorithms and binary codecs, and integration tests are required for all end-to-end pathways and gateways. This formal requirement is enforced on every change proposal via mandatory checklist items in the pull request template (https://github.com/spectrayan/spector/blob/main/.github/pull_request_template.md).



    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 on adding tests is explicitly documented in the instructions for change proposals in CONTRIBUTING.md under 'Pull Request Process' and 'PR Checklist', requiring contributors to verify that 'Tests added/updated covering changed behavior and edge cases (mvn test)'. This is also enforced in the GitHub Pull Request submission template (.github/pull_request_template.md). https://github.com/spectrayan/spector/blob/main/CONTRIBUTING.md#pr-checklist


  • 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 applies strict quality gates: CodeQL runs with the 'security-extended' query suite, documentation builds enforce 'mkdocs build --strict' (failing CI on any warning or broken link), and Maven license checks strictly fail the build on any compliance warning. https://github.com/spectrayan/spector/blob/main/.github/workflows/codeql.yml


 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 systematically implements core secure design principles across its architecture, documented in SECURITY.md under Security Guarantees & Non-Guarantees (https://github.com/spectrayan/spector/blob/main/SECURITY.md#security-guarantees--non-guarantees-security-requirements) and in docs/architecture/encryption-at-rest.md (https://github.com/spectrayan/spector/blob/main/docs/architecture/encryption-at-rest.md). Principles implemented include: (1) Defense in Depth: combining physical on-disk filesystem isolation, AES-256-GCM at-rest encryption, 128-bit Bloom tag gating, and recall visit budgets; (2) Least Privilege: scoped API keys and tenant namespaces that restrict agent access strictly to authorized engrams; (3) Fail-Closed Defaults: implemented in SecurityConfig.java via FailClosedAuthenticationEntryPoint and strict binary bundle magic/CRC32C validation that halts corrupt reads; (4) Complete Mediation: all REST and MCP memory access passes through authentication and authorization filters; and (5) Memory Safety by Design: using Java 25 Panama FFM bounded arenas to eliminate buffer overflows and use-after-free corruption.


  • 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 default security mechanisms avoid algorithms or modes with known weaknesses. Hashing exclusively uses SHA-256 (HMAC-SHA256) rather than SHA-1, and symmetric encryption strictly uses AES-256 in GCM (AEAD) mode rather than CBC or unauthenticated modes.



    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 achieves cryptographic agility by delegating cryptographic operations to the standard OpenJDK Java Cryptography Architecture (JCA) and TLS provider abstractions, as documented in docs/architecture/encryption-at-rest.md (https://github.com/spectrayan/spector/blob/main/docs/architecture/encryption-at-rest.md). By leveraging JCA SPIs (javax.crypto.Cipher, javax.crypto.Mac, and java.security.MessageDigest), the system supports multiple standardized cryptographic algorithms: for hashing and blind indexing, it accommodates alternatives across the SHA-2 family (SHA-256, SHA-384, SHA-512) and SHA-3; for transport security, it negotiates multiple modern AEAD ciphers (AES-256-GCM, AES-128-GCM, and ChaCha20-Poly1305); and symmetric encryption can be configured to alternative approved ciphers without rewriting storage engine code.



    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]

    The project supports storing authentication credentials, tokens, and cryptographic keys in isolated external secret files separate from application code, database stores, and configuration files, documented in deploy/docker/entrypoint.sh (https://github.com/spectrayan/spector/blob/main/deploy/docker/entrypoint.sh#L12-L36) and docs/architecture/encryption-at-rest.md (https://github.com/spectrayan/spector/blob/main/docs/architecture/encryption-at-rest.md). In Docker and Kubernetes environments, API keys, JWT secrets, and TLS private key certificates are mounted from external secret files (e.g., /run/secrets/ or Kubernetes Secret volumes) or injected via environment variables at runtime. Operators can rotate, update, or replace credentials and keys dynamically without recompiling any code or modifying application images.



    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]

    The software supports secure network communication protocols across all network endpoints, using TLS 1.2 and TLS 1.3 for HTTPS REST APIs, gRPC services, and inter-node cluster replication, documented in docs/architecture/encryption-at-rest.md (https://github.com/spectrayan/spector/blob/main/docs/architecture/encryption-at-rest.md) and synapse/spector-synapse/src/main/java/com/spectrayan/spector/synapse/replication/ReplicationTlsFactory.java (https://github.com/spectrayan/spector/blob/main/synapse/spector-synapse/src/main/java/com/spectrayan/spector/synapse/replication/ReplicationTlsFactory.java). Insecure and legacy protocols (such as FTP, Telnet, SSLv2, SSLv3, and TLS 1.0/1.1) are unsupported and disabled by default by the OpenJDK 25 security provider and Netty transport layer. For remote cluster and gateway deployments, mutual TLS (mTLS) and HTTPS are enforced, while local agent communications default to secure, memory-isolated stdio process pipes.



    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 natively supports TLS 1.2 and modern TLS 1.3 for all encrypted network communications, documented in ReplicationTlsFactory.java (https://github.com/spectrayan/spector/blob/main/synapse/spector-synapse/src/main/java/com/spectrayan/spector/synapse/replication/ReplicationTlsFactory.java#L46-L50) and docs/architecture/encryption-at-rest.md (https://github.com/spectrayan/spector/blob/main/docs/architecture/encryption-at-rest.md). Cluster node replication explicitly enforces TLS 1.3 contexts (public static final String TLS_V1_3 = "TLSv1.3"), and gateway REST/gRPC endpoints support both TLS 1.2 and TLS 1.3 through the OpenJDK 25 and Netty SSL engines. All legacy protocols prior to TLS 1.2 (SSLv2, SSLv3, TLS 1.0, TLS 1.1) are permanently disabled at the runtime platform level.



    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]

    The software performs strict X.509 TLS certificate verification by default on all TLS connections. For inter-node cluster replication, ReplicationTlsFactory.java (https://github.com/spectrayan/spector/blob/main/synapse/spector-synapse/src/main/java/com/spectrayan/spector/synapse/replication/ReplicationTlsFactory.java#L101-L125) configures TrustManagerFactory instances backed by verified truststores and mandates mutual certificate authentication (setNeedClientAuth(true)). For outbound HTTP/REST connections (such as provider APIs, remote gateways, and SDK clients), the underlying OpenJDK and Netty network clients enforce standard CA certificate chain validation, expiration checks, and SNI hostname verification by default, rejecting untrusted or invalid certificates unless explicitly overridden in development environments.



    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]

    The software strictly enforces full TLS certificate validation before transmitting any HTTP request lines or sensitive headers (such as X-API-Key or Authorization tokens). In ReplicationTlsFactory.java (https://github.com/spectrayan/spector/blob/main/synapse/spector-synapse/src/main/java/com/spectrayan/spector/synapse/replication/ReplicationTlsFactory.java#L132-L140), client TLS sockets explicitly enable endpoint identification (sslParams.setEndpointIdentificationAlgorithm("HTTPS")), mandating full certificate chain and hostname verification during the TLS handshake. Standard underlying HTTP clients (Java HttpClient, Netty SSL, Python requests) ensure that if a certificate check fails, the TLS handshake is aborted immediately and no application-layer HTTP headers or payload bytes are ever sent over the network.


  • 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.

    The project cryptographically signs official release artifacts using GPG via the maven-gpg-plugin in the automated release pipeline in .github/workflows/release-maven.yml (https://github.com/spectrayan/spector/blob/main/.github/workflows/release-maven.yml#L54-L75). Private signing keys are stored securely in encrypted CI secrets and are never located on public distribution sites or servers. Cryptographic signatures (.asc) and SHA-256 checksums are published alongside each release on GitHub Releases (https://github.com/spectrayan/spector/releases) and Maven Central, where users can verify artifact integrity and authenticity against the project's public signing key using gpg --verify <artifact>.asc <artifact>.



    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 cryptographically signs release version tags in the Git repository using GPG (git tag -s), verifiable directly on GitHub Releases and Tags (https://github.com/spectrayan/spector/tags) with GitHub's verified signature badge. Tagger public keys are registered with the GitHub organization, and users and automated CI pipelines can verify the cryptographic integrity of any release tag locally using the standard command git tag -v <tag-name> or git verify-tag <tag-name>.


  • 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 software validates all inputs from untrusted sources against strict allowlists and rejects non-compliant requests before processing. All Model Context Protocol (MCP) and REST gateway endpoints enforce declarative JSON schema and DTO type allowlists documented in the OpenAPI specification (https://github.com/spectrayan/spector/blob/main/docs/openapi.yaml), rejecting invalid numeric ranges, unexpected types, and malformed structures. Tenant and namespace names are validated against strict alphanumeric allowlists to eliminate path traversal risks. Furthermore, binary on-disk bundles and data imports enforce format version allowlists and CRC32C checksum integrity gates, rejecting unknown or mutated structures immediately (tested in BundleVersionGateTest and documented in SECURITY.md: https://github.com/spectrayan/spector/blob/main/SECURITY.md#security-guarantees--non-guarantees-security-requirements).



    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 project applies runtime, memory, and architectural hardening mechanisms to prevent defects from translating into security vulnerabilities, documented in SECURITY.md under Security Guarantees & Non-Guarantees (https://github.com/spectrayan/spector/blob/main/SECURITY.md#security-guarantees--non-guarantees-security-requirements) and docs/architecture/overview.md (https://github.com/spectrayan/spector/blob/main/docs/architecture/overview.md). Off-heap native memory accesses are hardened using OpenJDK 25 Project Panama bounded Arena lifecycles that enforce spatial and temporal boundary checks at the JVM level, preventing memory corruption, use-after-free, and buffer overflows. Authentication endpoints enforce constant-time string comparisons to eliminate timing side-channels, binary headers enforce hardware CRC32C integrity checksums and strict format-version gates, and container images run under restricted non-root users with pinned base image digests.



    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 publishes a formal Security Assurance Case and Threat Model in docs/architecture/security-assurance.md (https://github.com/spectrayan/spector/blob/main/docs/architecture/security-assurance.md), linked from SECURITY.md (https://github.com/spectrayan/spector/blob/main/SECURITY.md). The assurance case explicitly details: (1) a comprehensive threat model defining five adversary profiles (multi-tenant cross-talk, network MitM, cold-disk data exfiltration, query DoS, and binary payload tampering); (2) five clearly delineated trust boundaries (network-to-gateway, agent-to-MCP, tenant-to-tenant, JVM-to-native off-heap, and host storage); (3) architectural proof of secure design principles (defense-in-depth via 6-phase scoring gating, least privilege via namespace jails, fail-closed authentication entry points, and economy of mechanism via a zero-dependency engine kernel); and (4) concrete evidence-based countermeasures against common implementation security weaknesses (CWE-119/416 via Panama FFM bounded arenas, CWE-22 via path normalization and character allowlists, CWE-502 via banned native serialization and CRC32C validation, CWE-78/89 via typed DTO schemas, and CWE-208 via constant-time token comparison).


 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.

    CodeQL is configured with the 'security-extended' query suite (.github/workflows/codeql.yml line 58), which incorporates rules covering the OWASP Top 10 and CWE Top 25 vulnerabilities for Java, TypeScript, and Python (including path injection, deserialization flaws, command execution, and cryptographic misconfigurations). https://github.com/spectrayan/spector/blob/main/.github/workflows/codeql.yml#L58


  • 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.

    Not applicable. The software produced by the project is written in memory-safe languages (Java 25, TypeScript, and Python) with no compiled C or C++ binaries. Native off-heap memory operations in Java utilize Project Panama's bounded MemorySegment and Arena APIs with built-in spatial/temporal bounds checking, accompanied by dynamic runtime leak detection (PanamaMemoryDetector).



You can use tools and AI systems to propose changes via a simple URL, such as https://www.bestpractices.dev/en/projects/14829/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 Bharat Joshi and the OpenSSF Best Practices badge contributors.

Project badge entry owned by: Bharat Joshi.
Entry created on 2026-09-25 00:58:39 UTC, last updated on 2026-09-25 04:20:39 UTC. Last achieved passing badge on 2026-09-25 01:54:45 UTC.