silken_net

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

    Silken Net: a trustless, decentralized D-MRV / Nature-as-a-Service (NaaS) platform for planetary-scale forest-health monitoring. Edge IoT sensors in trees bridge to the Polygon blockchain via a Chainlink oracle, minting Silken Carbon (SCC) and Silken Forest (SFC) tokens from verified biomass-growth telemetry; a Lorenz-attractor homeostasis signal guards against fraud.

    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.

    Honest TRL: backend TRL 8, firmware TRL 6, bio-anchor TRL 3; multi-zone licensing — see NOTICE.

  • 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 "Requirements for acceptable contributions" lists the checks every contribution must pass, per domain: Ruby/Rails — RuboCop, RSpec, Brakeman, bundler-audit; Python — Ruff; firmware — host test suite (make -C firmware/test); Solidity — forge build/test. It also requires matching the surrounding code style and keeping the docs/ single source of truth updated.
    https://github.com/Alexey-Lukin/silken_net/blob/main/CONTRIBUTING.md#requirements-for-acceptable-contributions


  • 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) 1.1 as its contributor-authorization mechanism, documented in CONTRIBUTING.md: by signing off a commit (git commit -s, adding a Signed-off-by trailer) a contributor certifies they wrote the patch or otherwise have the right to submit it under the project's licenses. It complements the inbound=outbound "License of contributions" statement in the same file. (The first DCO-signed commit is already in history.)
    https://github.com/Alexey-Lukin/silken_net/blob/main/CONTRIBUTING.md#developer-certificate-of-origin-dco
    https://developercertificate.org/



    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 is documented in GOVERNANCE.md: Silken Net uses a single-maintainer ("benevolent dictator") model — the founder and sole maintainer (Oleksii Lukin, @Alexey-Lukin) makes all final technical, architectural and release decisions. Day-to-day changes land via the CONTRIBUTING.md pull-request flow with maintainer review (CODEOWNERS); architecture is decided documentation-first in the SSOT docs. This project (development) governance is explicitly distinct from the on-chain SFC DAO that governs the deployed protocol's parameters (docs/05_06).
    https://github.com/Alexey-Lukin/silken_net/blob/main/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 the Contributor Covenant 2.1 as its code of conduct, posted in the standard top-level location CODE_OF_CONDUCT.md (GitHub surfaces it on the repository's Community page and when opening issues/PRs). It defines expected and unacceptable behavior, scope, and a reporting/enforcement process with a contact.
    https://github.com/Alexey-Lukin/silken_net/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.

    The project's key roles and responsibilities are documented in GOVERNANCE.md (the "Roles" section): Maintainer / Lead — Oleksii Lukin (@Alexey-Lukin) — responsible for final decisions, code review, releases and security response; Contributors — anyone — propose changes via pull requests (CONTRIBUTING.md). It is clear who holds the maintainer role. Governance and roles are documented together, as this criterion permits.
    https://github.com/Alexey-Lukin/silken_net/blob/main/GOVERNANCE.md#roles



    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 is fully FLOSS (AGPL-3.0-or-later) with all source, history, issues, pull requests and releases public on GitHub, the docs mirrored to the wiki, and contracts/telemetry on public chains — nothing required to continue the project is held in a private silo. As documented in GOVERNANCE.md ("Continuity"), if the sole maintainer becomes unavailable any contributor can fork the public repository and, within a week, create/close issues, accept proposed changes, and cut releases (release-please + standard GitHub Releases need no private key); the AGPL licence grants the legal rights to do so. Additional maintainers will be added as the project grows.
    https://github.com/Alexey-Lukin/silken_net/blob/main/GOVERNANCE.md#continuity



    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.

    Unmet — the project currently has a single maintainer, so its bus factor is 1. This is mitigated: the project is fully FLOSS with all code, history, issues and releases public on GitHub (forkable by anyone — see GOVERNANCE.md "Continuity"), so loss of the maintainer does not lose the project, only its stewardship. The maintainer intends to add co-maintainers as the contributor base grows, raising the bus factor to 2+.
    https://github.com/Alexey-Lukin/silken_net/blob/main/GOVERNANCE.md#continuity


  • 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 has a documented roadmap in docs/00_01 (Vision, Mission & Roadmap), §4 "High-Level Roadmap", with dated phases — Phase 1 "The First Breath" (2026: R&D + validation), Phase 2 "The Cyber-Physical State" (2027-2028: regional expansion), Phase 3 "Planetary Scale" (2029-2030) — well beyond the next year. What is deliberately out of near-term scope is separated into the far-horizon agenda (docs/00_08, 2030-2040+, explicitly not TRL-gated). Near-term intended work is tracked live in docs/00_07.
    https://github.com/Alexey-Lukin/silken_net/blob/main/docs/00_01_Vision_Mission_and_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 architecture is documented as the 8-level SilkenNet stack (L1 biophysics / Ti-6Al-4V anchor + EBFC → L3 firmware + edge AI → L5 Rails backend → L7 Polygon/DeFi → L8 Ethereum L1 finalization): the high-level diagram and the multichain / tech-stack tables are in the README, the canonical system map and reading order in docs/00_00, and each layer's detailed design has its own module (e.g. docs/02_01 hardware architecture, docs/05_01 multichain). The major components, their relationships and key properties are all covered.
    https://github.com/Alexey-Lukin/silken_net/blob/main/docs/00_00_SSOT_Index.md
    https://github.com/Alexey-Lukin/silken_net#readme



    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's security expectations and limitations are documented. SECURITY.md states the in-scope components and a "Known, documented limitations" section that openly states what users should NOT expect today — e.g. the transitional AES-128-ECB LoRa link (no MAC/IV yet, bench-gated for migration to authenticated AES-128-CCM), with the open security backlog tracked in docs/00_07 (SEC.*). The intended security model the software aims to meet — AES-128-CCM (LoRa) / AES-256-CBC+GCM (CoAP + at-rest), SE050 secure element, per-device HKDF keys, IV/nonce generation, and the PQC migration roadmap — is the canonical SSOT in docs/03_05.
    https://github.com/Alexey-Lukin/silken_net/blob/main/SECURITY.md
    https://github.com/Alexey-Lukin/silken_net/blob/main/docs/03_05_Hardware_Symmetric_Crypto_and_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 README has a "Quick Start" section: clone the repo, bundle install, bin/rails db:prepare, bin/dev (Rails + Sidekiq + Tailwind + CoAP listener), then bin/rails db:seed + bin/forest_simulator to generate live telemetry without any hardware — so a new user can get the system doing something within minutes. CONTRIBUTING.md also links to it.
    https://github.com/Alexey-Lukin/silken_net#readme



    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.

    Documentation currency is a first-class, mechanically-enforced discipline — the project's core "SSOT" methodology (docs/00_06). Beyond "making an effort", the docs.yml CI workflow is the single home for structural doc gates that actively prevent drift: docs:check_refs (dangling cross-refs, deprecated/retired terms, owner-only vocabulary such as the RTC register map and Lorenz constants, ToC sync — 27 drift linters in lib/docs_linter.rb), tracker:check (the action-plan tracker), and a code↔doc registry gate (scripts/model_doc_sync.rb maps app/models and app/services 1:1 to their doc sections). Any documented value that drifts from the code fails CI. The one-home rule (one fact, one canonical doc — 00_06 §2) is the standing principle; known inconsistencies are tracked and fixed in docs/00_07.
    https://github.com/Alexey-Lukin/silken_net/blob/main/docs/00_06_SSOT_Documentation_Standard.md
    https://github.com/Alexey-Lukin/silken_net/blob/main/.github/workflows/docs.yml



    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 repository front page (README) identifies and hyperlinks the project's achievements at the very top: the OpenSSF Best Practices badge (passing — project 13358) and the OpenSSF Scorecard badge, each linking to its source page. The badges are also on the wiki landing page (docs/00_00). They were added and updated as the badge progressed (in_progress → passing), within the 48-hour window.
    https://github.com/Alexey-Lukin/silken_net#readme


  • 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 web frontend (Phlex + Turbo + Tailwind) follows accessibility best practices: visible keyboard focus indicators via Tailwind focus-visible: utilities (used in ~48 components), ARIA semantics (role and aria-live attributes), light/dark theming plus prefers-reduced-motion and prefers-contrast media-query handling in the stylesheet, semantic Phlex components (navigation, pagination, locale switcher, mobile-nav toggle), and a design system that drives all colour through semantic tokens (supporting contrast and theme adaptation). The UI accessibility conventions are documented in docs/04_04 (Phlex UI & Tailwind).
    https://github.com/Alexey-Lukin/silken_net/blob/main/docs/04_04_Phlex_UI_and_Tailwind.md



    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.

    The software is internationalized using Rails i18n: user-facing strings go through I18n.t (148 files) rather than being hardcoded, message catalogues live in config/locales (currently English, Ukrainian, Lithuanian and Latvian), and the UI includes a locale switcher component. Adding a new locale is a matter of dropping in another YAML catalogue — no code changes — exactly what this criterion asks for.
    https://github.com/Alexey-Lukin/silken_net/tree/main/config/locales


  • 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 — the repository, the project home page (the GitHub wiki), and the download/release URLs — are all hosted on GitHub. As this criterion explicitly notes, the use of GitHub meets the requirement: external-user authentication and any password storage for these sites is handled by GitHub, not by the project. (Separately, the software produced by the project stores its own end-user passwords with Argon2id + per-user salt — covered under crypto_password_storage.)
    https://github.com/Alexey-Lukin/silken_net


 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. It uses Semantic Versioning (managed by release-please) and publishes a human-readable CHANGELOG documenting the features and fixes in each release, so users can see exactly what changed when moving between versions. The backend is a continuously-deployed service (users run the latest); the firmware and smart contracts follow the same versioned releases. At this stage (v0.x) upgrades are not breaking-complex, so updating to the newest release is the upgrade path, and any future breaking change will be documented in the CHANGELOG / release notes with the steps needed.
    https://github.com/Alexey-Lukin/silken_net/blob/main/CHANGELOG.md
    https://github.com/Alexey-Lukin/silken_net/releases


 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 tracker for individual issues.
    https://github.com/Alexey-Lukin/silken_net/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]

    N/A — no vulnerability reports have been received or resolved in the last 12 months (zero repository security advisories), so there are no reporters to credit. The credit practice for when a report is resolved is now documented in SECURITY.md ("Credit"): reporters are credited in the advisory and/or release notes unless they request anonymity.
    https://github.com/Alexey-Lukin/silken_net/blob/main/SECURITY.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 process for responding to vulnerability reports is documented in SECURITY.md: reports are received privately via GitHub Security Advisories, acknowledged within 72 hours, with a fix or mitigation for high-severity issues targeted within 14 days; the in-scope components, openly-tracked known limitations, and a safe-harbor statement are also included. The open security backlog is tracked in docs/00_07 (SEC.*).
    https://github.com/Alexey-Lukin/silken_net/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 guide for each primary language, documented in CONTRIBUTING.md ("Coding standards"): Ruby — the Rails Omakase RuboCop style (.rubocop.yml inherits rubocop-rails-omakase); Python — Ruff (ruff.toml, a curated pycodestyle/pyflakes/isort/pyupgrade/bugbear ruleset); firmware C — -Wall -Wextra -Wpedantic + cppcheck (MISRA C:2012 advisory); Solidity — forge fmt; C# — .editorconfig (.NET conventions). Contributions are required to comply (CI must be green).
    https://github.com/Alexey-Lukin/silken_net/blob/main/CONTRIBUTING.md#requirements-for-acceptable-contributions



    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 selected styles are enforced automatically in CI by FLOSS tools, and a contribution that violates them fails the build: RuboCop (Ruby) and Ruff (Python) in the ci.yml lint jobs, cppcheck for firmware C (firmware_lint), and forge fmt / Slither for Solidity (solidity_audit.yml). Tool configs live in the repo (.rubocop.yml, ruff.toml, contracts/foundry.toml, tools/cad/.editorconfig). Exceptions are rare and documented in code at their locations — e.g. inline // cppcheck-suppress with a reason, and fingerprinted, annotated entries in config/brakeman.ignore.
    https://github.com/Alexey-Lukin/silken_net/blob/main/.github/workflows/ci.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 native-binary build (firmware/test/Makefile) honors the compiler/linker variables passed in via the environment or command line: CC ?= gcc (a packager can pass CC=clang) and CFLAGS += <project flags> (env/CLI CFLAGS are honored and the project EXTENDS them with its mandatory -std=c11 -I., never replacing). The recipes are single-invocation gcc compile+link, so linker flags carried in CFLAGS (e.g. -Wl,-z,relro) reach the linker too — making it easy to enable ASAN or distribution-hardening flags. Verified: an env CFLAGS value passes through to the compiler, and CI (firmware_test) is green. (The Rails backend and Solidity contracts produce no native binaries.)
    https://github.com/Alexey-Lukin/silken_net/blob/main/firmware/test/Makefile



    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 preserves debugging information when requested: passing CFLAGS="-g" is honored by the Makefile (CFLAGS += extends the user's flags) so debug info is generated, and the firmware host tests run in place and are never installed with stripping (there is no "install -s" / strip step). The dedicated coverage (--coverage) and ASAN (-g) lanes also build with debug/instrumentation symbols. (The Rails backend and Solidity contracts have no native-binary build/install that strips symbols.)
    https://github.com/Alexey-Lukin/silken_net/blob/main/firmware/test/Makefile



    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 build systems do not use recursive make over cross-dependent subdirectories. The only native build (firmware/test/Makefile) is a single, non-recursive Makefile: each target lists its full header/source dependencies and the shared firmware/common headers compile directly into each test via -I (no per-subdirectory independent builds). Its only $(MAKE) calls recurse into the same directory (the asan/coverage re-instrumented rebuilds), never into subdirectories, so the dependency information is complete and accurate. The other toolchains (Bundler, Foundry/forge, npm, conda) are not recursive-make either.
    https://github.com/Alexey-Lukin/silken_net/blob/main/firmware/test/Makefile



    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.

    Builds and code-generation are reproducible bit-for-bit, and CI enforces it. Generated firmware artifacts are checked against their source on every run: tools/ml/scripts/check_firmware_tables.py regenerates the log-mel tables and fails if they differ from the committed headers, and tools/firmware/check_bytecode.py verifies the committed lorenz_bytecode.h matches bio_contract.rb; QEMU jobs additionally assert host↔Cortex-M4 bit-parity. Solidity bytecode is deterministic — solc is pinned (solc_version = 0.8.35) with fixed optimizer settings (foundry.toml), so forge build reproduces the same bytecode. (The Rails backend is interpreted Ruby — no compiled artifact.)
    https://github.com/Alexey-Lukin/silken_net/blob/main/.github/workflows/ci.yml


  • 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 software is installed via commonly-used conventions. The backend is packaged as a container in a standard format (Dockerfile, multi-stage build on ruby:4.0.5-slim) and deployed with Kamal (config/deploy.yml: image, registry, servers) — kamal setup / kamal deploy installs it, kamal remove uninstalls it. For development it installs at the language level via Bundler (bundle install) per the README Quick Start, and uninstalling is removing the directory/containers. The smart contracts deploy on-chain via Foundry scripts.
    https://github.com/Alexey-Lukin/silken_net/blob/main/Dockerfile
    https://github.com/Alexey-Lukin/silken_net#readme



    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]

    N/A — the project has no installation system that writes built artifacts to a
    user-selectable location, so the DESTDIR/PREFIX convention does not apply. The
    end-user software (the D-MRV Rails platform) is delivered as a self-contained
    container image (Docker, deployed by Kamal — config/deploy.yml) or run in place
    from its working directory after a Bundler install; neither has a DESTDIR/PREFIX
    step. There is no make install / PREFIX / DESTDIR target anywhere in the repo.
    The one first-party Python package (tools/ml, "silken-ml") is internal ML tooling
    run in place (PYTHONPATH=src) or via an editable pip install -e inside a conda
    env — an editable install links the source tree rather than writing built
    artifacts to a chosen location — so it is not an end-user installation system
    either. (CMSIS-DSP and mruby ship their own packaging but are vendored
    third-party submodules, not this project's installation system.)



    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.

    bin/setup (the standard idempotent Rails dev-bootstrap script — runs
    bundle install, bin/rails db:prepare, clears logs, starts the dev server).
    The README "Quick Start" documents the system-package prerequisites, the same
    steps, and how to run the test suite (bundle exec rspec). The repo is polyglot,
    so each domain installs its support + test environment via its standard language
    package manager, all listed in CONTRIBUTING.md: Bundler for Ruby/Rails (tests:
    rspec); npm ci + Foundry for the Solidity contracts (tests: forge test); a
    conda environment file for the Python in-silico/ML tooling
    (tools/*/environment.yml); and make -C firmware/test for the host-based
    firmware tests (no ARM toolchain needed). A Dockerfile is also provided as the
    generated-container path.
    https://github.com/Alexey-Lukin/silken_net/blob/main/bin/setup
    https://github.com/Alexey-Lukin/silken_net/blob/main/CONTRIBUTING.md
    https://github.com/Alexey-Lukin/silken_net#readme


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


    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.

    External dependencies are monitored continuously and on every CI run across
    the polyglot stack:

    • Dependabot (.github/dependabot.yml) — weekly, 5 ecosystems: bundler (gems),
      docker (base-image tag+digest), github-actions, npm (contracts/), terraform.
    • bundler-audit (the OpenSSF-listed Ruby SCA tool) runs in CI on every push
      (.github/workflows/ci.yml) against the ruby-advisory-db; brakeman runs SAST.
    • Slither runs SCA / static analysis on the Solidity contracts
      (.github/workflows/solidity_audit.yml).
    • OpenSSF Scorecard runs weekly + on push (.github/workflows/scorecard.yml) and
      publishes results; its Vulnerabilities check queries osv.dev and its
      Dependency-Update-Tool check confirms Dependabot is active.
      The conda-managed Python research tooling and the pinned git-submodule vendored
      C libraries are not on Dependabot, but they are development/in-silico only and
      sit outside the deployed runtime trust boundary (the production service is the
      Rails app + its gems + the Docker base image, all of which are monitored).
      https://github.com/Alexey-Lukin/silken_net/blob/main/.github/dependabot.yml
      https://github.com/Alexey-Lukin/silken_net/blob/main/.github/workflows/scorecard.yml


    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.

    Met (via both routes — standard package managers and easy-to-update pins; no
    forked convenience copies). Every reused component is identified in a
    computer-processable manifest and updated by a standard mechanism:

    • Gems (Gemfile/lock, bundle update), npm for contracts, conda for the Python
      tooling, .NET PackageReference, and JS via Rails importmap (bin/importmap pin).
    • Vendored C/firmware + CAD libraries are git submodules pinned to the CANONICAL
      UPSTREAM repositories (.gitmodules: ARM-software/CMSIS, mruby/mruby,
      LoupVaillant/Monocypher, STMicroelectronics HAL, leap71) — they are not forks,
      so a security fix is applied by bumping the submodule pin to a new upstream tag.
    • Front-end JS is supplied by the Rails framework gems (turbo/stimulus/activestorage)
      plus one version-explicit CDN pin (leaflet@1.9.4), updateable via bin/importmap.
    • OpenSSL and PostgreSQL are standard system components.
      Dependabot automates update PRs for the package-managed ecosystems weekly, so a
      vulnerable reused component is straightforward to update.
      https://github.com/Alexey-Lukin/silken_net/blob/main/.gitmodules
      https://github.com/Alexey-Lukin/silken_net/blob/main/.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]

    Met. The project runs a current technology stack (Ruby 4.0.5, Rails 8.1,
    PostgreSQL 17, Solidity 0.8.35 / EVM cancun, .NET 9) — no EOL or obsolete
    frameworks — and actively flags deprecated/obsolete APIs in CI so the FLOSS-current
    alternative is used:


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

    Met. A GitHub Actions automated test suite runs on every check-in — triggered on
    push to main and on every pull_request (.github/workflows/ci.yml) — and
    produces a pass/fail report via the Actions checks UI and the ci-ok aggregate
    required check. The suite spans the polyglot stack: RSpec for the Rails backend
    (bundle exec rspec), the firmware host-test suite (make -C firmware/test, plus
    an ASan/UBSan lane), Foundry forge test for the Solidity contracts
    (solidity_audit.yml), and language smoke workflows (ml_smoke, in_silico_smoke,
    cad_smoke, coap_smoke).
    https://github.com/Alexey-Lukin/silken_net/blob/main/.github/workflows/ci.yml
    https://github.com/Alexey-Lukin/silken_net/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]

    Met. The standing practice is to land a bug fix together with a regression test in
    the same commit/PR. An audit of the bug-fix commits over the last six months shows
    a clear majority shipped with a test change in the same commit; the share is higher
    for the shipped product code (Rails backend, firmware, smart contracts) — e.g.
    "Fix OTA packager 8-bit overflow + implement missing CRC16" (firmware host tests),
    "fix: rollback receipt envelope, OTA HMAC trailer, Celo double-pay" (RSpec),
    "fix(queen): FW.51 — telemetry not lost on CoAP-flush failure" (firmware host
    tests), "Fix double-anchoring risk in EthereumAnchorWorker" (RSpec). Regression
    tests live in the automated suites: RSpec (spec/), firmware host tests
    (firmware/test/), and Foundry (contracts/test/). A class of in-silico
    research-script tuning fixes (simulation NaN/SCF convergence) are not
    unit-regression-testable and are outside the shipped-product bug count.
    https://github.com/Alexey-Lukin/silken_net/tree/main/spec
    https://github.com/Alexey-Lukin/silken_net/blob/main/CONTRIBUTING.md#requirements-for-acceptable-contributions



    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 Ruby/Rails backend — the bulk of the codebase — is measured by SimpleCov
    (FLOSS, with branch coverage enabled), and the full CI suite enforces a hard gate of
    minimum_coverage line: 99, branch: 95 (spec/spec_helper.rb): the build fails below
    99% statement coverage, well above the 80% bar. A per-group tripwire additionally
    floors Services/Workers/Models at ~99% line so no single area can erode while the
    global average holds. The other languages are measured with FLOSS coverage tools too:
    the firmware C host suite via gcov/lcov (make -C firmware/test coverage) and the
    Solidity contracts via forge coverage --report lcov (→ Codecov). The coverage-scope
    policy is documented in docs/04_06 §B.
    https://github.com/Alexey-Lukin/silken_net/blob/main/spec/spec_helper.rb
    https://github.com/Alexey-Lukin/silken_net/blob/main/.github/workflows/ci.yml


  • 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 testing policy in CONTRIBUTING.md
    ("Requirements for acceptable contributions"): "Tests are mandatory for new
    functionality (project policy). When you add or change functionality you MUST add
    or update automated tests; as major new functionality is added, tests for it MUST
    be added to the relevant automated suite (RSpec / Foundry forge / firmware host
    tests). A pull request that adds major new functionality without accompanying
    tests will not be merged." The policy is backed in practice by the project's
    regression-test record (see regression_tests_added50) and the SimpleCov 99%
    line-coverage gate enforced in CI.
    https://github.com/Alexey-Lukin/silken_net/blob/main/CONTRIBUTING.md#requirements-for-acceptable-contributions



    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 add-tests policy is documented in CONTRIBUTING.md under "Requirements for acceptable contributions".
    https://github.com/Alexey-Lukin/silken_net/blob/main/CONTRIBUTING.md#requirements-for-acceptable-contributions


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

    Met — strict where practical, enforced in CI across every language:

    • Firmware C: compiled with -Wall -Wextra -Wpedantic (-std=c11); cppcheck is a hard
      CI gate (firmware_lint: --enable=warning,performance,portability,style,
      --error-exitcode=1, MISRA C:2012 addon, --check-level=exhaustive), plus an
      ASan/UBSan runtime lane.
    • Ruby: RuboCop (rails-omakase) gates CI and fails on any offense.
    • Python: Ruff's strict rule-set (E/W/F/I/UP/B/C4/SIM/RUF) gates CI, and the test
      suite escalates DeprecationWarning to an error.
    • Solidity: forge fmt --check and Slither static analysis gate CI.
    • Security SAST: Brakeman gates CI.
    • .NET CAD: default .NET analyzers run on the first-party code; strictness is
      relaxed only in the third-party LEAP71 wrapper, where it is not practical.
      https://github.com/Alexey-Lukin/silken_net/blob/main/firmware/test/Makefile
      https://github.com/Alexey-Lukin/silken_net/blob/main/.github/workflows/ci.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).

    Met. Secure design principles are implemented across the stack:

    • Fail-safe / deny-by-default: minting refuses unless every condition holds —
      BlockchainMintingService raises "Security Breach" unless the telemetry is
      verified_by_iotex?, oracle_status_fulfilled?, and KYC-approved; in production
      WEB3_STRICT_MODE=true turns missing security config (e.g. CHAINLINK_HMAC_SECRET)
      into a hard raise instead of a silent fallback.
    • Secure by default (deployment): production enforces config.force_ssl + HSTS
      (preload, 1-year, subdomains), a Content-Security-Policy with a per-request
      nonce, X-Frame-Options: DENY, X-Content-Type-Options: nosniff, a Permissions-
      Policy, and session cookies set httponly + same_site:lax + secure.
    • Complete mediation: per-resource Pundit policies (app/policies/*) plus role gates
      in the API base controller (authorize_admin!/super_admin!/forester!); thin
      controllers and AASM state machines make state changes non-bypassable.
    • Least privilege / separation of privilege: on-chain roles are split and gated by
      onlyRole(...), admin actions are routed through a Timelock, and mint()/slash()
      run on physically separate keys (MINTER_ROLE vs SLASHER_ROLE).
    • Defense in depth: a manual_review double-spend guard freezes funds when a
      transaction state is unknown; anomaly/tamper telemetry is zeroed for minting in
      BOTH firmware and backend; no weak crypto is used (no MD5/SHA-1/DES/RC4) —
      Argon2id passwords, an HKDF/HMAC key ratchet (NIST SP 800-108), AES + Ed25519.
    • Economy of mechanism: an explicit YAGNI "lazy-senior" ladder + Ruthless Pruning
      keep mechanisms minimal (CLAUDE.md §4), with input validation at trust boundaries.

    https://github.com/Alexey-Lukin/silken_net/blob/main/docs/03_05_Hardware_Symmetric_Crypto_and_Security.md
    https://github.com/Alexey-Lukin/silken_net/blob/main/config/environments/production.rb


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

    Verified across the whole stack — no algorithms with serious known weaknesses are used. Hashes: SHA-256 / HMAC-SHA256 (keccak256 in contracts); no SHA-1 or MD5 anywhere. Password hashing: Argon2id. Signatures: Ed25519. RNG: SecureRandom (backend) + hardware TRNG (firmware). The CoAP backhaul is AES-256-CBC with a fresh random IV per message (semantic security; not the SSH-CBC weakness); the LoRa target is authenticated AES-128-CCM. The only weak mode is the transitional LoRa AES-128-ECB, whose risk and mitigations are documented in docs/03_05 and which is migrating to AES-128-CCM (FW.2).
    https://github.com/Alexey-Lukin/silken_net/blob/main/docs/03_05_Hardware_Symmetric_Crypto_and_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]

    Met (SHOULD). The project uses multiple cryptographic algorithm families and is
    built to switch primitives rather than hard-wiring one:

    • Hashes: both SHA-2 (SHA-256 — backend integrity, HMAC-SHA256, HKDF, audit-log
      hash chain, firmware) and SHA-3 (keccak256 — Solidity roles/parameter keys and
      Eth::Util.keccak256 on the backend) are in active use.
    • Signatures: two schemes — Ed25519 (SE050 device attestation, peaq DID, M2M auth)
      and secp256k1/ECDSA (EVM chains, IoTeX verification).
    • Symmetric: AES in four selectable modes (ECB, CCM, CBC, GCM). The backend names
      the cipher as an OpenSSL string (OpenSSL::Cipher.new("aes-256-cbc")), so switching
      to any OpenSSL-supported cipher is a one-line change, and the live
      ECB->authenticated-CCM migration is runtime-selectable via the
      TELEMETRY_CCM_ENABLED / FW2_CCM_ENABLED flags — a working demonstration of
      switching a primitive when one is found weak. A documented PQC migration roadmap
      (docs/03_05 §10) plans the post-quantum transition.
      The symmetric cipher is AES (not Twofish/Serpent) because the STM32 nodes are bound
      to the hardware AES engine; agility there is at the mode level plus the documented
      migration roadmap.
      https://github.com/Alexey-Lukin/silken_net/blob/main/docs/03_05_Hardware_Symmetric_Crypto_and_Security.md


    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]

    Met. Credentials and private keys are stored in dedicated files/stores — separate
    from code, in-repo config, the database, and logs — and are replaceable at runtime
    without recompiling (Ruby is interpreted; secrets are read at boot):

    • App secrets (DB password, API/RPC keys, the Chainlink HMAC secret, etc.) live in
      Rails' encrypted credentials (config/credentials.yml.enc) decrypted by a separate
      config/master.key, and/or in environment variables (config/database.yml and code
      read them via ENV.fetch / Rails.application.credentials). master.key and .env* are
      git-ignored; at deploy RAILS_MASTER_KEY and other secrets are injected via Kamal
      secrets (.kamal/secrets) from the environment / a secrets manager, never committed.
    • User passwords are stored only as Argon2id hashes (HasArgon2Password concern,
      OWASP-recommended), never in plaintext.
    • Private cryptographic keys are rotatable without code changes: a key ratchet
      (Cryptography::KeyRatchet), an OTA HMAC-key service, and an over-the-air
      key-rotation worker replace device keys at runtime; the SE050 secure element holds
      non-extractable keys.
    • Secrets are kept out of logs by an explicit filter_parameters allowlist
      (passwords, tokens, *_key, private_key, mnemonic, wallet_private_key, signature…).
      https://github.com/Alexey-Lukin/silken_net/blob/main/.kamal/secrets
      https://github.com/Alexey-Lukin/silken_net/blob/main/config/initializers/filter_parameter_logging.rb


    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]

    Met (SHOULD). All IP/web network communications use TLS by default and no insecure
    protocol is enabled:

    • The web app and API enforce HTTPS in production (config.force_ssl = true) with
      HSTS (1 year, includeSubdomains, preload) and assume_ssl behind the TLS-terminating
      Kamal proxy (Let's Encrypt, TLS 1.2/1.3). HTTP is redirected to HTTPS.
    • All outbound calls use HTTPS — chain RPC (Alchemy/Infura), Chainlink Functions,
      IoTeX and peaq endpoints — with default certificate verification (no VERIFY_NONE).
    • A scan of the code finds no FTP, telnet, SSLv3/earlier, SSHv1, or plain-HTTP
      endpoints.
      For the constrained IoT radio link (Soldier->Queen LoRa, Queen->Rails CoAP) TLS/DTLS
      is not feasible on a tens-of-bytes LoRa frame, so confidentiality and integrity are
      provided at the application layer with AES: AES-128-CCM (authenticated; the
      LoRaWAN/Zigbee/Thread/BLE golden standard for constrained IoT) on the LoRa link and
      AES-256-CBC with a per-message random IV on the CoAP backhaul. This design — and why
      heavier schemes such as Kyber do not fit the radio MTU — is documented in docs/03_05.
      The transitional AES-128-ECB LoRa mode is documented and is migrating to AES-128-CCM.
      https://github.com/Alexey-Lukin/silken_net/blob/main/config/environments/production.rb
      https://github.com/Alexey-Lukin/silken_net/blob/main/docs/03_05_Hardware_Symmetric_Crypto_and_Security.md


    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]

    Met (SHOULD). The project uses TLS and supports TLS 1.2+ everywhere; nothing is
    configured to allow TLS 1.1 or earlier:

    • Inbound HTTPS is terminated by the Kamal proxy with automatic Let's Encrypt
      certificates (config/deploy.yml, proxy ssl: true); the proxy (Go crypto/tls)
      negotiates TLS 1.2/1.3 and does not offer TLS 1.0/1.1. The Rails app enforces it
      with config.force_ssl = true and HSTS (1 year, includeSubdomains, preload) in
      production.rb, so HTTP is redirected to HTTPS.
    • Outbound HTTPS (chain RPC, Chainlink, IoTeX, peaq) is made by Ruby 4.0.5 on
      OpenSSL 3.6.2, which negotiates TLS 1.2/1.3 by default and has TLS 1.0/1.1
      disabled; no client sets a lower ssl_version/min_version.
      No SSLv2/SSLv3 or TLS 1.1-or-earlier is configured or supported anywhere in the stack.
      https://github.com/Alexey-Lukin/silken_net/blob/main/config/environments/production.rb
      https://github.com/Alexey-Lukin/silken_net/blob/main/config/deploy.yml


    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]

    Met. TLS certificate verification is left at the secure default everywhere and is
    never disabled. A scan of the entire repository (app, lib, config, scripts, firmware,
    tools, contracts) finds no VERIFY_NONE, verify: false, ssl_verify false,
    verify_peer: false, "insecure", curl -k, or --no-check-certificate — nothing
    overrides certificate verification.

    • Outbound HTTPS uses standard clients at their defaults: the eth gem (Eth::Client,
      over Net::HTTP) for chain RPC and HTTPX for other services, both of which verify the
      server certificate by default (OpenSSL VERIFY_PEER) for https URLs. No custom
      SSLContext or verify_mode is set anywhere.
    • Subresources in the web UI (importmap JS, Leaflet) are loaded over HTTPS and a
      Content-Security-Policy restricts their origins, so the browser performs normal
      certificate verification on them as well.
      https://github.com/Alexey-Lukin/silken_net/blob/main/config/initializers/content_security_policy.rb


    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]

    Met. Private information is only sent over a connection whose certificate has been
    verified:

    • Server side: session cookies are flagged secure in production
      (config/initializers/session_store.rb: secure: Rails.env.production?, plus httponly
      and same_site: :lax), and config.force_ssl = true with HSTS (1 year,
      includeSubdomains, preload) guarantees the browser transmits the cookie only over
      HTTPS after verifying the server certificate, and never over plain HTTP (HSTS
      preload blocks downgrade).
    • Client side: outbound requests carrying private headers (e.g. Authorization: Bearer
      API keys to dClimate/Filecoin, the Chainlink HMAC signature, M2M tokens) are sent
      over HTTPS via Net::HTTP/HTTPX with default certificate verification (OpenSSL
      VERIFY_PEER), which is never disabled anywhere in the codebase — the TLS handshake,
      including certificate validation, completes before the request headers are sent.
      https://github.com/Alexey-Lukin/silken_net/blob/main/config/initializers/session_store.rb
      https://github.com/Alexey-Lukin/silken_net/blob/main/config/environments/production.rb

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

    Met. The project's public generated deliverable — the production container image
    mirrored to GHCR (ghcr.io/alexey-lukin/silken_net) for widespread use (e.g. Akash
    providers) — is cryptographically signed with a Sigstore-keyless SLSA
    build-provenance attestation produced by actions/attest-build-provenance in
    .github/workflows/mirror-ghcr.yml (GitHub Actions OIDC → Fulcio, logged in the
    public Rekor transparency log) and pushed to the registry alongside the image. The
    signing key is ephemeral (Fulcio-issued per build, never stored) — it is not on the
    distribution site. The documented user verification process is in SECURITY.md
    ("Verifying release artifacts"): gh attestation verify
    oci://ghcr.io/alexey-lukin/silken_net:<tag> --owner Alexey-Lukin. Source-tree
    commit/tag signing is tracked separately (OPS.10).
    https://github.com/Alexey-Lukin/silken_net/blob/main/.github/workflows/mirror-ghcr.yml
    https://github.com/Alexey-Lukin/silken_net/blob/main/SECURITY.md



    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]

    Met. The project's public generated deliverable — the production container image
    mirrored to GHCR (ghcr.io/alexey-lukin/silken_net) for widespread use (e.g. Akash
    providers) — is cryptographically signed with a Sigstore-keyless SLSA
    build-provenance attestation produced by actions/attest-build-provenance in
    .github/workflows/mirror-ghcr.yml (GitHub Actions OIDC → Fulcio, logged in the
    public Rekor transparency log) and pushed to the registry alongside the image. The
    signing key is ephemeral (Fulcio-issued per build, never stored) — it is not on the
    distribution site. The documented user verification process is in SECURITY.md
    ("Verifying release artifacts"): gh attestation verify
    oci://ghcr.io/alexey-lukin/silken_net:<tag> --owner Alexey-Lukin. Source-tree
    commit/tag signing is tracked separately (OPS.10).
    https://github.com/Alexey-Lukin/silken_net/blob/main/.github/workflows/mirror-ghcr.yml
    https://github.com/Alexey-Lukin/silken_net/blob/main/SECURITY.md


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

    Met — input is validated with an allowlist approach at every untrusted boundary:

    • HTTP/API: Rails strong parameters (params.require(...).permit(...)) accept only an
      explicit allowlist of attributes; everything else is dropped. Models add
      allowlist-style validations enforced before persistence — numbers are range-checked
      (actuator_command duration numericality: { greater_than: 0, less_than_or_equal_to:
      3600 }, ai_insight scores { in: 0.0..100.0 } / { in: 0.0..1.0 }), values are
      constrained to allowlists (inclusion: { in: %w[evm solana celo] }, inclusion: { in:
      HARDWARE_TYPES }), and strings are checked for syntax/length (format: { with: ... }
      for hex addresses/bytecode, length: { maximum: ... }). Invalid records are rejected.
    • Untrusted IoT telemetry (binary LoRa/CoAP): TelemetryUnpackerService validates the
      decoded packet (valid_sensor_data?) before processing and rejects malformed or
      out-of-range frames; it also enforces a SEC.10 panic-replay counter and CCM
      key-size checks.
    • On-chain (Solidity): every external function guards its inputs with require(...) —
      non-zero addresses, array-length equality, batch-size bounds (<= MAX_BATCH_SIZE),
      positive amounts — reverting on invalid input.
    • Oracle callbacks (Chainlink) are authenticated by HMAC before their payload is
      accepted.

    https://github.com/Alexey-Lukin/silken_net/blob/main/app/models/blockchain_transaction.rb
    https://github.com/Alexey-Lukin/silken_net/blob/main/app/services/telemetry_unpacker_service.rb



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

    Met (SHOULD). Hardening mechanisms are applied on both the web and firmware sides.

    Web (Rails — the network-facing attack surface):

    • A strict Content-Security-Policy (config/initializers/content_security_policy.rb):
      default_src/base_uri/form_action 'self', frame_ancestors 'none', frame_src 'none',
      object_src 'none', and a per-request nonce for inline scripts (no 'unsafe-inline'
      on script-src).
    • A full security-header set (config/initializers/security_headers.rb): X-Frame-Options
      DENY, X-Content-Type-Options nosniff, Referrer-Policy strict-origin-when-cross-origin,
      Cross-Origin-Opener-Policy / Cross-Origin-Resource-Policy same-origin, a restrictive
      Permissions-Policy, and X-XSS-Protection 0 (disables the legacy exploitable filter).
    • HSTS with preload (1 year, includeSubdomains) + config.force_ssl; session cookies are
      httponly + secure + same_site:lax.

    Firmware C (a memory-unsafe language → compiler hardening):

    • The entire host test suite is compiled and executed under AddressSanitizer +
      UndefinedBehaviorSanitizer (-fsanitize=address,undefined -fno-sanitize-recover=all) on
      every CI run, so undefined behavior, buffer overflows and use-after-free abort the build
      before release — the criterion's "compiler flags to eliminate undefined behavior"
      example. The host build also honors -fstack-protector-strong / -D_FORTIFY_SOURCE / RELRO.

    https://github.com/Alexey-Lukin/silken_net/blob/main/config/initializers/content_security_policy.rb
    https://github.com/Alexey-Lukin/silken_net/blob/main/firmware/test/Makefile



    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.

    Met. The project provides a structured security assurance case at
    docs/SECURITY_ASSURANCE_CASE.md. It states the top-level security claims; a threat
    model (assets, threat actors, and attack surfaces across the Soldier->Queen->Rails->chain
    pipeline); an explicit identification of every trust boundary and the guard that
    enforces it; an argument that Saltzer-Schroeder secure-design principles are applied,
    with code anchors; and an OWASP Top 10 (2021) table showing how each common
    implementation weakness is countered - followed by an honest residual-risk and
    assumptions section. Each claim is backed by the test / SAST / SCA evidence listed in
    the document.
    https://github.com/Alexey-Lukin/silken_net/blob/main/docs/SECURITY_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.

    The static analyzers used are specifically designed to find common vulnerabilities: Brakeman targets Rails vulnerability classes (SQL injection, XSS, mass assignment, CSRF), CodeQL runs security queries mapped to CWE, Slither has detectors for common Solidity vulnerabilities (reentrancy, access control, arithmetic), and cppcheck flags memory/defect issues in C. CodeQL runs security queries mapped to CWE (GitHub default setup, across all six
    languages — Ruby, C/C++, C#, JS/TS, Python, Actions).
    https://github.com/Alexey-Lukin/silken_net/blob/main/.github/workflows/solidity_audit.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 ships memory-unsafe C firmware (STM32 Soldier/Queen + the One-Home libraries in firmware/common/), so N/A does not apply. Every host-based unit test (firmware/test/, ~22 binaries covering the untrusted-input parsers — AT-command/CoAP PDU tokenizer, circular-DMA UART RX ring, flash KV/ring/OTA journals with power-cut fault injection — plus the crypto, DSP and TinyML paths) is compiled and executed under AddressSanitizer + UndefinedBehaviorSanitizer on every CI run, via make -C firmware/test asan in the firmware_test job of .github/workflows/ci.yml (gating through the ci-ok aggregate required check). Flags: -fsanitize=address,undefined -fno-sanitize-recover=all -fno-omit-frame-pointer -g -O1. AddressSanitizer detects heap/stack/global buffer overflows (the explicit "buffer overwrite" concern), use-after-free/return and double-free; UndefinedBehaviorSanitizer detects signed-integer overflow, out-of-bounds shifts, misaligned/null pointer dereferences and invalid enum/bool loads; halt_on_error=1 makes the first finding fail the build. LeakSanitizer is intentionally disabled (detect_leaks=0) because the only allocations outliving main() are OpenSSL's one-time global init in two tests, which the short-lived test processes deliberately do not tear down — a "still reachable" false positive, not a memory-safety defect. This dynamic lane complements the existing static analysis (cppcheck firmware_lint, CodeQL c-cpp, and -Wall -Wextra -Wpedantic).
    https://github.com/Alexey-Lukin/silken_net/blob/main/firmware/test/Makefile



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 Alexey Lukin and the OpenSSF Best Practices badge contributors.

Project badge entry owned by: Alexey Lukin.
Entry created on 2026-06-24 13:17:00 UTC, last updated on 2026-06-25 13:55:07 UTC. Last achieved passing badge on 2026-06-24 17:34:54 UTC.