Libellus Potionis

Проекты, которые следуют приведенным ниже лучшим практикам, могут добровольно и самостоятельно оценить себя и продемонстрировать, что они получили значок Open Source Security Foundation (OpenSSF).

Не существует набора практик, гарантирующего, что у программного обеспечения никогда не будет недостатков или уязвимостей; даже формальные методы могут не помочь, если спецификации или допущения ошибочны. Также не существует какой-либо практики, которая могла бы гарантировать, что проект будет поддерживать здоровое и хорошо функционирующее сообщество разработчиков. Однако следующие хорошие правила могут помочь улучшить результаты проектов. Например, некоторые правила описывают ревью несколькими участниками перед выпуском, что может помочь найти технические уязвимости, которые было бы сложно найти другим способом, и помочь построить доверие и желание дальнейшего взаимодействия между разработчиками из разных компаний. Чтобы получить значок, нужно выполнить все критерии с ключевыми словами "НЕОБХОДИМО"/"ОБЯЗАН"/"НЕДОПУСТИМО", все критерии со словом "СЛЕДУЕТ" либо должны удовлетворяться, либо должно быть приведено обоснование их невыполнения, и все критерии со словом "ЖЕЛАТЕЛЬНО" могут быть удовлетворены ИЛИ неудовлетворены (желательно, чтобы они были хотя бы рассмотрены). Если вы хотите ввести общий комментарий вместо объяснения, почему текущая ситуация приемлема, начните текст с '//' и пробела. Приветствуется обратная связь через сайт на GitHub в виде issues или pull requests. Существует также список рассылки для общих вопросов.

Мы с удовольствием предоставляем информацию на нескольких языках, однако, если есть какой-либо конфликт или несоответствие между переводами, английская версия является авторитетной.
Если это ваш проект, пожалуйста, покажите свой значок на странице проекта! Статус значка выглядит следующим образом: Уровень значка для проекта 13480 - passing Вот как вставить его:
Вы можете показать свой статус значка, вставив его в файл с разметкой Markdown:
[![OpenSSF Best Practices](https://www.bestpractices.dev/projects/13480/badge)](https://www.bestpractices.dev/projects/13480)
- или HTML:
<a href="https://www.bestpractices.dev/projects/13480"><img src="https://www.bestpractices.dev/projects/13480/badge"></a>


Это критерии уровня Silver. Вы также можете просмотреть критерии уровня Passing или Gold.

Baseline Series: Базовый уровень 1 Базовый Уровень 2 Базовый Уровень 3

        

 Основы 16/17

  • Общая

    Обратите внимание, что другие проекты могут использовать то же имя.

    Libellus Potionis is a privacy-first, free, open-source, and ad-free alcohol consumption tracker designed to help users monitor, pace, and manage their drinking habits entirely offline. It requires no invasive device permissions—no camera, microphone, or location access—and completely operates without network connectivity. It runs on both Android and iOS, and is available on F-Droid.

    Используйте формат выражения лицензии SPDX; примеры включают «Apache-2.0», «BSD-2-Clause», «BSD-3-Clause», «GPL-2.0+», «LGPL-3.0+», «MIT» и «(BSD-2-Clause OR Ruby)».
    Если используется более одного языка, перечислите их через запятую (пробелы необязательны), и отсортируйте их от наиболее до наименее используемого. Если список длинный, пожалуйста, перечислите по крайней мере три наиболее распространенных. Если языка нет (например, это проект только для документации или только для тестирования), используйте один символ «-» (минус). Для каждого языка используйте общепринятую капитализацию названия, например «JavaScript».
    Common Platform Enumeration (CPE) - это структурированная схема именования для информационных систем, программного обеспечения и пакетов. Она используется в ряде систем и баз данных для отчетов об уязвимостях.

    The two are separate native apps in this one repository — Kotlin/Jetpack Compose for Android, Swift/SwiftUI for iOS — that share the same design, the same feature set, and a common JSON backup format, so a backup exported on one platform imports on the other. Their behaviour is kept in lock-step by a shared set of golden test vectors.

    Key Features

    • Logging: predefine custom beverages or use internationally common presets. Log drinks instantly or retroactively with precise timestamp corrections.
    • Concurrent limits: set three boundaries at once — a daily limit in grams of pure alcohol, a rolling 7-day limit in grams, and a maximum number of drinking days per week. Each has its own progress bar.
    • Blood alcohol concentration (BAC): enter your body weight to get a live estimate from the Widmark formula.
    • Counseling reports: generate a two-page PDF report of your consumption for a counseling appointment.
    • Data portability: export the dataset as a CSV file for external processing (e.g. in LibreOffice Calc), or create JSON backups to move data between devices.
    • Adjustments: set your own "day start" time, so that late-night drinks count toward the preceding evening, and an evaluation start date for a clean restart.

    A User's Guide is available inside the app.

  • Предварительные требования


    Проект ОБЯЗАН получить значок уровня Passing. [achieve_passing]

  • Основная информация на веб-сайте проекта


    В информацию о том, как внести вклад, НЕОБХОДИМО включить требования к приемлемым взносам (например, ссылку на любой требуемый стандарт кодирования). (Требуется URL) [contribution_requirements]

    CONTRIBUTING.md documents the requirements for acceptable contributions. Section 2 ("Submitting changes"), step 3, makes them a merge precondition and points to the relevant sections; Section 4 ("Coding conventions") names the required coding standard — the official Kotlin coding conventions — together with mandatory KDoc and constant/default/enum-persistence rules; Sections 3 (architecture) and 5 (testing) add the remaining acceptance rules. ./gradlew test and tools/release-check.sh must pass.


  • Надзор за проектом


    Проекту СЛЕДУЕТ иметь юридический механизм, через который все авторы содержательных взносов в ПО проекта подтверждают, что они имеют законное право на внесение этих взносов. Самый распространенный и легко реализуемый подход для этого заключается в использовании Developer Certificate of Origin (DCO), при котором пользователи добавляют строку "signed-off-by" в свои коммиты, а проект ссылается на веб-сайт DCO. Но этот механизм МОЖЕТ быть реализован и в качестве Лицензионного соглашения с участниками (Contributor License Agreement, CLA) или другого правового механизма. (Требуется URL) [dco]
    DCO является рекомендуемым механизмом, потому что его легко реализовать и отслеживать в исходном коде, а git напрямую поддерживает функцию "signed-off" при помощи "commit -s". Для большей эффективности лучше всего, если проектная документация объясняет, что означает "signed-off" для этого проекта. CLA - это юридическое соглашение, которое определяет условия, на которых произведения умственного труда были лицензированы для организации или проекта. Соглашение о назначении участника (contributor assignment agreement, CAA) является юридическим соглашением, которое передает права на произведения умственного труда другой стороне; проекты не обязаны иметь CAA, поскольку CAA увеличивает риск того, что потенциальные участники не будут вносить свой вклад, особенно если получатель является коммерческой организацией. Лицензии CLA от Apache Software Foundation (лицензия отдельного участника и корпоративное соглашение CLA) являются примерами CLA для проектов, считающих, что риски от такого рода CLA для проекта меньше, чем их преимущества.

    Contributions are governed by the Developer Certificate of Origin (DCO). CONTRIBUTING.md, Section 2, requires every commit to be signed off with a Signed-off-by line (via git commit -s) and links to developercertificate.org documenting what sign-off means for this project. This is the recommended lightweight legal mechanism by which contributors assert they are authorized to submit their contributions under the project's GPL-3.0-or-later license.



    Проект ОБЯЗАН четко определить и задокументировать модель управления проектом (способ принятия решений, включая ключевые роли). (Требуется URL) [governance]
    Требуется устоявшийся задокументированный способ принятия решений и разрешения споров. В небольших проектах это может быть просто вплоть до «владелец и лидер проекта принимает все окончательные решения». Существуют различные модели управления, включая благосклонное диктаторство и формальную меритократию; более подробно см. Governance models. В проектах успешно используются как централизованные подходы (например, с одним ведущим), так и децентрализованные (например, с групповыми ведущими). Не нужно указывать в сведениях об управлении возможность форка проекта, поскольку это всегда возможно для проектов СПО.

    The project's governance model is documented in docs/GOVERNANCE.md. Libellus Potionis uses a single-maintainer (benevolent-dictator) model: the project owner and lead makes all final decisions on scope, design, contribution acceptance, and releases. Proposals and discussion happen openly in the GitLab issue tracker and merge requests; the maintainer decides and is the sole merger (process in CONTRIBUTING.md §2), resolves disputes, and — as a FLOSS project — anyone may fork under GPL-3.0-or-later.



    Проект ОБЯЗАН определить правила поведения и разместить эти правила в стандартном месте. (Требуется URL) [code_of_conduct]
    Проекты могут повысить цивилизованность их сообщества и установить ожидания относительно приемлемого поведения, приняв правила поведения. Это может помочь избежать проблем до их возникновения и сделать проект более привлекательным местом, поощряющим участие. Правила должны быть сосредоточены только на поведении в сообществе или на рабочем месте проекта. Примерами правил поведения являются правила конфликтов на проекте ядра Linux, Contributor Covenant Code of Conduct, Кодекс поведения Debian, Ubuntu Code of Conduct, Правила поведения проекта Fedora, GNOME Code Of Conduct, KDE Community Code of Conduct">, Python Community Code of Conduct, The Ruby Community Conduct Guideline и The Rust Code of Conduct.

    The project has adopted the Contributor Covenant version 2.1 as its code of conduct, posted at docs/CODE_OF_CONDUCT.md and linked from README.md and CONTRIBUTING.md. It defines expected and unacceptable behavior, enforcement responsibilities and scope, a reporting/enforcement contact (android@godisch.de), and graduated enforcement guidelines.



    Проект ОБЯЗАН четко определять и публично документировать ключевые роли в проекте и их обязанности, включая любые задачи, которые должны выполнять эти роли. Должно быть ясно, кто имеет какую роль(и), хотя это может быть и не задокументировано соответствующим образом. (Требуется URL) [roles_responsibilities]
    Документация для управления , а также роли и обязанности могут быть в одном месте.

    The project's key roles and responsibilities are documented in docs/GOVERNANCE.md ("Key roles"). The project currently has a single role — Maintainer / project lead, held by Martin A. Godisch (android@godisch.de) — with explicitly listed responsibilities: triaging and answering issues, reviewing and merging contributions, handling security reports, maintaining translations and documentation, and preparing and signing releases. It is clear who holds the role, and contributors take on no formal ongoing role beyond their individual contributions.



    Проект ОБЯЗАН быть в состоянии продолжать работу с минимальным прерыванием, если какой-либо человек окажется недееспособен или убит. В частности, проект ОБЯЗАН быть в состоянии создавать и закрывать вопросы в трекере, принимать предложенные изменения и выпускать версии программного обеспечения через неделю после подтверждения того, что данный человек недееспособен или убит. Это МОЖЕТ быть реализовано через обеспечение кого-то ещё необходимыми ключами, паролами и законными правами для продолжения проекта. Лица, которые запускают проект СПО, МОГУТ сделать это, оставив ключи в сейфе и завещание, передающее все необходимые юридические права (например, для имен DNS). (Требуется URL) [access_continuity]

    Libellus Potionis is maintained by a single person, and no continuity arrangement is in place yet that would let the project reliably continue — creating/closing issues, accepting changes, and releasing — within a week if that person became unavailable. Distribution via F-Droid is an advantage here (F-Droid builds from source and signs the APK with its own key, so releases do not depend on the maintainer's private signing key), and the project is fully FLOSS on a public GitLab repository (so it is forkable), but no successor has been designated with the necessary repository access and legal rights. Planned remediation: designate a trusted successor with access to the required credentials/keys (e.g. via a lockbox) and legal rights, and/or add a second maintainer, then document the arrangement in docs/GOVERNANCE.md.



    Проекту СЛЕДУЕТ поддерживать «коэффициент автобуса» 2 или более. (Требуется URL) [bus_factor]
    «Коэффициент автобуса» (или «коэффициент грузовика») - это минимальное количество участников проекта, которые должны внезапно исчезнуть из проекта («попасть под автобус»), чтобы проект заглох из-за отсутствия квалифицированного или компетентного персонала. Инструмент truck-factor может оценить это для проектов на GitHub. Для получения дополнительной информации см. статью Cosentino et al. Assessing the Bus Factor of Git Repositories.

    This is a SHOULD at silver (and a MUST at gold): the badge allows a SHOULD to remain unmet where the rationale is documented, so it does not block the silver badge. Libellus Potionis has a single maintainer, so its bus factor is 1. This is not a considered design choice but a consequence of the project's size: a second significantly involved maintainer has not yet come forward, and one cannot be declared into existence. What the project does do to limit the consequences: the software is Free Software (GPL) in a public GitLab repository and is therefore forkable by anyone; F-Droid builds from source and signs the APK with its own key, so continued distribution there does not depend on a signing key held by the maintainer; and the governance model, the key roles and the contribution process are documented (docs/GOVERNANCE.md, CONTRIBUTING.md), so a newcomer can see how decisions are made and how to join. Contributions and co-maintainers are welcome. Tracked in docs/ROADMAP.md under "Recommended, not blocking (SHOULD)" ("Raise the bus factor"); the gold-level MUST is noted under "Working toward the OpenSSF gold badge". The related silver MUST access_continuity is answered separately.


  • Документация


    Проект ОБЯЗАН иметь задокументированный долгосрочный план (roadmap), описывающий, что проект намеревается, а что не намеревается делать, по крайней мере на ближайший год. (Требуется URL) [documentation_roadmap]
    Проект может не достичь того, что описано в долгосрочном плане, и это нормально. Цель дорожной карты - помочь потенциальным пользователям и участникам понять намеченное направление проекта. Подробности не требуются.

    The project maintains a documented roadmap in docs/ROADMAP.md (linked from the README) covering roughly the next year. It describes the project's intended directions as well as its explicit non-goals — what the project deliberately will not do — and is clearly framed as a statement of intent rather than a commitment. The specific items are listed in the file itself.



    Проект ОБЯЗАН включать документацию по архитектуре (также называемой высокоуровневым дизайном) ПО, создаваемого проектом. Выберите «неприменимо» (N/A), если проект не создает программное обеспечение. (Требуется URL) [documentation_architecture]
    Архитектура ПО объясняет фундаментальную структуру программы, то есть основные компоненты программы, отношения между ними и ключевые свойства этих компонентов и отношений.

    The software's high-level architecture is documented in CONTRIBUTING.md §3 ("Architecture rules"): it lists the major components (the data/, data/security/, domain/, l10n/, ui/, and util/ packages and their roles) and the relationships and layering constraints among them (the domain layer is framework-free and JVM-testable, Room types stay within the data layer, repositories expose only domain models, and ViewModels are context-free except SettingsViewModel). The README's "Technical Aspects" section additionally documents the key technologies and the manual dependency-injection approach (PotillusApp lazy singletons), Room, and Jetpack Compose. The SwiftUI port under ios/ mirrors this layering — a framework-free PotillusKit domain shared by the UI — and its behaviour is pinned to Android's by the shared golden test vectors in test-vectors/.



    Проект ОБЯЗАН документировать то, что пользователь может и чего он не должен ожидать с точки зрения безопасности от ПО, создаваемого проектом (его «требования безопасности»). (Требуется URL) [documentation_security]
    Это требования безопасности, выполнение которых ожидается от ПО.

    SECURITY.md includes a "Security model" section documenting the software's security requirements — what users can and cannot expect. Users can expect that the app never transmits data (it holds no network permission), applies data minimization and least privilege, stores data on-device in sandboxed storage encrypted at rest (with an AES-256-GCM Keystore key for preferences), offers an optional biometric lock, and performs no tracking. It also states the limits: no defence on a compromised/rooted device, the biometric lock is an access gate rather than full-disk/forensic protection, exported files leave the app's control, and BAC estimates are informational.



    Проект ОБЯЗАН предоставить руководство для быстрого начала работы для новых пользователей, чтобы помочь им быстро что-то сделать, используя ПО, создаваемое проект. (Требуется URL) [documentation_quick_start]
    Идея состоит в том, чтобы показать пользователям, как начать работу и и добиться, чтобы ПО что-то вообще сделало. Потенциальным пользователям это критически важно для начала работы.

    The README provides a "Quick start" section that helps a new user do something with the software quickly: install from F-Droid, log a first drink from the Today screen's plus button, and immediately see consumption and limit status, with optional steps to set limits, enter body weight for a BAC estimate, and export a PDF/CSV/JSON. The in-app User's Guide covers everything in full.



    Проект ОБЯЗАН прилагать усилия к тому, чтобы документация соответствовала текущей версии результатов проекта (включая ПО, создаваемое проектом). НЕОБХОДИМО исправлять любые известные дефекты документации, приводящие к ее непоследовательности. Если документация в целом актуальна, но ошибочно включает в себя некоторые более старые данные, которые больше не верны, просто рассматривайте это как дефект, отслеживайте и исправляйте, как обычно. [documentation_current]
    Документация МОЖЕТ включать информацию о различиях или изменениях между версиями программного обеспечения и/или ссылку на более старые версии документации. Смысл этого критерия заключается в том, что прилагаются усилия для обеспечения согласованности документации, а не в том, чтобы документация была идеальной.

    The project actively keeps its documentation consistent with the current version and fixes known documentation defects. A release gate (tools/release-check.sh) enforces version-string consistency across build.gradle.kts, the top CHANGELOG.md entry, the README title, and proguard-rules.pro, flags missing file headers and undocumented public functions, and rejects non-English prose; the CONTRIBUTING.md release checklist (§7) ties documentation updates to every release, and LocaleSyncTest fails the build on inconsistent or incomplete translations. Known defects are fixed as they are found — for example, CONTRIBUTING.md was recently corrected to match the code (architecture package map, a constant value, the testing-strategy table, and the localization workflow).



    НЕОБХОДИМО размещать ссылку на любые свои достижения, включая этот значок передовой практики, на главной странице проекта и/или веб-сайте в течение 48 часов после открытого признания достижения. (Требуется URL) [documentation_achievements]
    Достижением считается любой набор внешних критериев, над выполнением которых проект специально работал, включая некоторые значки. Эта информация не обязательно должна находиться на главной странице веб-сайта проекта. Проект с использованием GitHub может помещать достижения на главную страницу хранилища кода, добавляя их в файл README.

    The repository front page (the rendered README) identifies and hyperlinks to the project's OpenSSF Best Practices badge at the top, using the badge image for project 13480 linked to the project's badge entry. Because the badge image reflects the current status automatically, the achievement is shown and stays up to date.


  • Общедоступность и интернационализация


    Проекту (как на сайтах проекта, так и в результатах работы проекта) СЛЕДУЕТ придерживаться передовой практики общедоступности, чтобы люди с ограниченными возможностями могли участвовать в проекте и использовать результаты проекта, где это имеет смысл. [accessibility_best_practices]
    Для веб-приложений см. Руководство по обеспечению доступности веб-контента (WCAG) 2.0 и его поддерживающий документ Understanding WCAG 2.0; см. также W3C accessibility information. Для приложений с графическим интерфейсом рассмотрите использование соответствующих вашему окружению рекомендаций по обеспечению доступности (таких как GNOME, KDE, XFCE, Android, iOS, Mac и Windows (на русском)). Некоторые приложения с текстовым интерфейсом пользователя (например, программы на ncurses) могут сделать некоторые вещи, чтобы сделать себя более доступными (например, параметр `force-arrow-cursor` в `alpine`). Большинство приложений командной строки довольно общедоступны как они есть. Этот критерий часто неприменим, например, для библиотек программ. Вот несколько примеров действий или проблем, которые следует учитывать:
    • Должны предоставляться текстовые альтернативы для любого нетекстового контента, так чтобы его можно изменить на другие необходимые формы, например крупная печать, шрифт Брайля, озвучка текста, символы или упрощенный язык (Understanding WCAG 2.0 guideline 1.1)
    • Цвет не должен использоваться в качестве единственного визуального средства передачи информации, указания на действие, запрос реакции пользователя или выделения визуальных элементов. (WCAG 2.0 guideline 1.4.1)
    • Визуальное представление текста и изображений текста должно иметь контрастность не менее 4,5:1, за исключением большого текста, случайного текста и логотипов (WCAG 2.0 guideline 1.4.3)
    • Все функциональные возможности должны быть доступны с клавиатуры (WCAG guideline 2.1)
    • GUI или веб-проект ДОЛЖНЫ тестировать, по крайней мере, одно средство чтения экрана на целевой платформе(ах) (например, NVDA, Jaws или WindowEyes в Windows; VoiceOver на Mac и iOS; Orca на Linux/BSD; TalkBack на Android). Программы с текстовым интерфейсом пользователя МОГУТ по возможности сокращать переписывание текста на экране, чтобы предотвратить лишнее чтение средствами чтения экрана.

    The application follows Android accessibility best practices, without claiming conformance to any WCAG level or using a W3C conformance logo. Every INTERACTIVE control carries a screen-reader (TalkBack) name via contentDescription — including the calendar navigation arrows, the drink-category icon and each year heat-map day cell that holds data (added in the v0.79.0 QA rounds) — while purely decorative icons are explicitly null. The app is built on Material 3 / Jetpack Compose (TalkBack semantics, sp-based dynamic text scaling), declares RTL support, and uses a blue-vs-red (not red/green) under/over-limit palette that is colour-blind distinguishable. tools/release-check.sh section 13 guards this labelling invariant against regressions. Every drawn chart carries a spoken summary, apart from the iOS category ring, which stays silent because the legend beneath it states each slice in full. Known gaps toward WCAG 2.2 Level AA are tracked honestly in docs/ROADMAP.md: standard Material controls meet the target-size minimum while the dense 10 dp year heat-map cells rest on the criterion's own spacing exception (2.5.8); the dark theme's text red measures 3.49 : 1 against the 4.5 : 1 small text needs (1.4.3); the empty cells of the year heat-map sit below 3 : 1 by a measured decision recorded beside the code, with the data cells above it (1.4.11); and no contrast value has been measured on iOS. As this is a SHOULD criterion about FOLLOWING accessibility best practices rather than certifying full WCAG conformance, the project meets it through broad platform adherence while tracking the remaining gaps. The iOS app follows the platform's accessibility practices in the same spirit: controls carry VoiceOver labels, text scales with Dynamic Type, the layout mirrors for right-to-left languages, and the same colour-blind-distinguishable blue-vs-red limit palette is used.



    Проекту СЛЕДУЕТ интернационализировать создаваемое ПО, чтобы обеспечить легкую локализацию под культуру, регион или язык целевой аудитории. Выберите «неприменимо» (N/A), если интернационализация (i18n) не применяется (например, ПО не генерирует текст, предназначенный для конечных пользователей, и не сортирует текст, читаемый человеком), [internationalization]
    Локализация "относится к адаптации продукта, приложения или содержимого документа для соответствия языковым, культурным и другим требованиям конкретного целевого рынка (языковому стандарту)". Интернационализация - это «проектирование и разработка продукта, приложения или содержимого документа, которые позволяют легкую локализацию под целевые аудитории, различающиеся по культуре, региону или языку». (См. «Локализация по сравнению с интернационализацией» на веб-сайте W3C.) Чтобы ПО соответствовало этому критерию, достаточно лишь интернационализации. Не требуется локализация для другого конкретного языка, так как после того, как программное обеспечение было интернационализировано, другие могут работать над локализацией.

    The application is fully internationalized. All user-facing text is externalized into Android string resources (res/values*/strings.xml); no user-facing strings are hard-coded, and the release gate enforces English-only source prose. Localization is driven by a single source of truth, l10n/SupportedLocales.kt, and the app currently ships 21 languages (20 values-*/ translations plus the English base; English and German hand-authored, the rest machine-generated). Completeness and consistency are enforced automatically by LocaleSyncTest, which fails the build on missing or inconsistent translations. The app also handles locale-dependent formatting, a configurable week start, and declares RTL support for right-to-left languages, and CONTRIBUTING.md documents how new locales and corrections are contributed. The iOS app is internationalized the same way: all user-facing text is externalized into a String Catalog (Localizable.xcstrings) generated from the same source, with no hard-coded strings (a project linter, check-l10n, enforces this), shipping the same locale set as Android.


  • Другое


    Если на сайтах проекта (веб-сайт, хранилище и URL-адреса загрузки) хранятся пароли для аутентификации внешних пользователей, НЕОБХОДИМО хранить пароли как итерированные хеши с отдельной "солью" для каждого пользователя с использованием алгоритма (итерированного) растяжения ключа (например, Argon2id, Bcrypt, Scrypt или PBKDF2). Выберите «неприменимо» (N/A), если сайты проекта не хранят пароли для этой цели. [sites_password_security]
    Примечание: использование GitHub автоматически выполняет этот критерий. Этот критерий применяется только к паролям, используемым для аутентификации внешних пользователей на сайтах проекта (т.н. входящей аутентификации). Если сайты проекта должны подключаться к другим сайтам (т.н. исходящая аутентификация), им может потребоваться хранить аутентифицирующие данные (пароли, ключи) для этой цели как-то иначе (поскольку хранение контрольной суммы для этой цели бесполезно). В данном случае критерий crypto_password_storage применяется к сайтам проекта, по аналогии с критерием sites_https.

    The project does not operate any site of its own that stores passwords for authenticating external users. All project sites are third-party hosted: the source repository and issue tracker are on GitLab, downloads are distributed via F-Droid, and the badge entry is on bestpractices.dev. Authentication for these is handled by those platforms; the project itself stores no user passwords, so this criterion does not apply.


 Управление изменениями 1/1

  • Предыдущие версии


    Проект ОБЯЗАН поддерживать наиболее часто используемые старые версии продукта или предоставлять возможность простого перехода на более новые версии (upgrade path). Если переход затруднен, проект ОБЯЗАН задокументировать порядок обновления (например, изменившиеся интерфейсы и подробные предлагаемые шаги для обновления). [maintenance_or_update]

    The project provides a clear, low-friction upgrade path to newer versions. The app is distributed via F-Droid (with Google Play planned), where users receive and install updates through the store's normal update mechanism, with no manual steps. User data is carried forward automatically across versions by versioned Room database migrations, which are covered by an instrumented MigrationTest, so upgrading never loses data. Because the upgrade path is straightforward, no separate upgrade documentation is required; as a mobile app, only the newest version is distributed, so maintaining older versions in parallel is unnecessary. On iOS the planned Apple App Store delivers updates through the same automatic store mechanism, and the shared JSON backup format carries user data forward across versions.


 Отчеты о проблемах 3/3

  • Процесс сообщения об ошибках


    Проект ОБЯЗАН использовать трекер вопросов (issue tracker) для отслеживания отдельных вопросов. [report_tracker]

    The project uses the GitLab issue tracker to track individual issues. The tracker is enabled and public, and users are directed to it: the README ("Feedback & Contributing") and CONTRIBUTING.md §2 point bug reports and enhancement suggestions there, while SECURITY.md routes security-sensitive reports to a private channel instead. Issue tracker: gitlab.com/godisch/potillus/-/issues


  • Процесс отчета об уязвимостях


    Проект ОБЯЗАН отмечать автора(-ов) всех отчетов об уязвимостях, разрешенных за последние 12 месяцев, за исключением авторов, которые просят об анонимности. Выберите «неприменимо» (N/A), если в течение последних 12 месяцев не было обнаружено никаких уязвимостей. (Требуется URL) [vulnerability_report_credit]

    No externally reported security vulnerabilities have been resolved in the last 12 months, so there are no reporters to credit. Should this change, the project's practice is to credit reporters of resolved vulnerabilities unless they request anonymity; the reporting channel is documented in SECURITY.md.



    Проект ОБЯЗАН иметь документированный процесс реагирования на отчеты об уязвимостях. (Требуется URL) [vulnerability_response_process]
    Этот критерий тесно связан с критерием vulnerability_report_process, который требует документированного способа для сообщения об уязвимостях. Он также связан с vulnerability_report_response, который требует ответа на отчеты об уязвимостях в течение определенного периода времени.

    The project has a documented vulnerability-response process in SECURITY.md. It specifies a private, PGP-encrypted reporting channel to android@godisch.de (with the maintainer's published PGP fingerprint obtained from the official Debian keyserver) kept separate from the public issue tracker, states what a report should include, commits to acknowledging reports within 14 days followed by assessment and response, and defines the scope of what qualifies as a security issue.


 Качество 19/19

  • Стандарты кодирования


    Проект ОБЯЗАН задать определенные правила стиля кодирования для основных языков, которые он использует, и требовать его соблюдения от предлагаемого кода. (Требуется URL) [coding_standards]
    В большинстве случаев это делается путем ссылки на некоторые существующие руководства по стилю, возможно, с перечислением различий. Эти руководства по стилю могут включать в себя способы повышения удобочитаемости и способы снижения вероятности дефектов (включая уязвимости). Многие языки программирования имеют один или несколько широко используемых руководств по стилю. Примеры руководств по стилю включают Руководство по стилю Google и Стандарты кодирования SEI CERT.

    The project identifies a specific coding style guide for its primary language and requires general compliance. CONTRIBUTING.md §4 ("Coding conventions") directs contributors to follow the official Kotlin coding conventions (kotlinlang.org/docs/coding-conventions.html) and adds project-specific rules (mandatory KDoc on public API, constant placement, default-value consistency, enum persistence by name). Compliance is required through the review process (§2 makes the documented conventions a merge condition) and is partly enforced automatically via Kotlin's allWarningsAsErrors and Android Lint's warningsAsErrors gates. For Swift the project follows the community SwiftLint rule set (pinned to 0.65.0) enforced in --strict mode, the direct counterpart to the Kotlin conventions, plus the same review requirement.



    Проект ОБЯЗАН автоматически применять свой выбранный стиль(и) кодирования, если есть хотя бы один инструмент на СПО, который может сделать это на выбранном языке (языках). [coding_standards_enforced]
    Это МОЖЕТ быть реализовано при помощи инструмента(ов) статического анализа и/или путем пропускания кода через средства переформатирования. Во многих случаях конфигурация инструмента включена в репозиторий проекта (так как разные проекты могут выбирать разные конфигурации). Проекты МОГУТ (и, как правило, будут) допускать исключения стиля; там, где происходят исключения, они ОБЯЗАНЫ быть редки и документированы в соответствующих местах кода, чтобы эти исключения можно было пересматривать и инструменты могли автоматически обрабатывать их в будущем. Примеры таких инструментов включают ESLint (JavaScript) и Rubocop (Ruby).

    The project automatically enforces its selected Kotlin coding style using ktlint (a FLOSS tool), integrated via the org.jlleitschuh.gradle.ktlint Gradle plugin. Style settings are defined in the repository-root .editorconfig (official Kotlin conventions). The ktlintCheck task runs as part of the standard check lifecycle and fails on violations, and ktlintFormat auto-formats sources; CONTRIBUTING.md §4 documents this for contributors. Enforcement is build-time only and not on the release-assembly path, so reproducible builds are preserved. On iOS enforcement is automated by SwiftLint --strict (pinned 0.65.0) as part of make ios, so a style violation fails the build rather than relying on review alone.


  • Рабочая система сборки


    Системы сборки для нативных двоичных файлов ОБЯЗАНЫ учитывать соответствующие переменные (среды) для компилятора и компоновщика, переданные им (например, CC, CFLAGS, CXX, CXXFLAGS и LDFLAGS) и передавать их на вызовы компилятора и компоновщика. Система сборки МОЖЕТ расширять их дополнительными флагами; НЕДОПУСТИМО просто заменять предоставленные значения своими. Выберите «неприменимо» (N/A), если нативные двоичные файлы не создаются. [build_standard_variables]
    Должно быть легко включить специальные функции сборки, такие как Address Sanitizer (ASAN), или выполнить рекомендации по упрочнению от дистрибутивов (например, путем простого включения флагов компилятора для этого).

    The project compiles no C/C++ sources on either platform: there is no externalNativeBuild, CMake or NDK configuration on Android, and the iOS app is pure Swift. The only .so references are in a jniLibs packaging block that excludes them from the APK. CFLAGS/CXXFLAGS-style variables therefore have nothing to apply to.



    В системах сборки и установки СЛЕДУЕТ сохранять отладочную информацию, если передаваемые флаги требуют этого (например, не используется «install -s»). Выберите «неприменимо» (N/A), если системы сборки или установки нет (например, для типичных библиотек JavaScript), . [build_preserve_debug]
    Например, установка CFLAGS (C) или CXXFLAGS (C++) должна создавать соответствующую информацию для отладки, если эти языки используются, и ее не следует удалять во время установки. Отладочная информация необходима для поддержки и анализа, а также полезна для того, чтобы определить наличие упрочняющих функций в скомпилированных двоичных файлах.

    Neither platform compiles C/C++ sources: there is no NDK, CMake or externalNativeBuild configuration on Android, and the iOS app is pure Swift. Kotlin/JVM debugging metadata and the dSYM the Xcode build emits beside the iOS binary are both handled by the standard toolchains rather than by native compiler flags, so there is no flag-controlled native debugging information for this control to preserve or strip.



    НЕДОПУСТИМО, чтобы система сборки ПО, создаваемого проектом, рекурсивно собирала подкаталоги, если в подкаталогах есть кросс-зависимости. Выберите «неприменимо» (N/A), если системы сборки или установки нет (например, типичные библиотеки JavaScript). [build_non_recursive]
    Информация о внутренних зависимостях системы сборки проекта должна быть точной, в противном случае изменения в проекте могут быть включены в сборку неправильно. Неправильные сборки могут привести к дефектам (включая уязвимости). Общей ошибкой в ​​больших системах сборки является использование «рекурсивной сборки» или «рекурсивного make», то есть иерархии подкаталогов, содержащих исходные файлы, где каждый подкаталог собирается независимо. Если только каждый из подкаталогов не является полностью независимым, это ошибка, потому что информация о зависимостях неверна.

    The project builds with Gradle, not make. Gradle constructs a single directed acyclic task graph for the whole project during configuration and resolves dependencies across the entire build, which is the non-recursive build model this criterion calls for; the pitfalls of recursive make do not apply. The build comprises a single application module (:app) declared in settings.gradle.kts, so there is no recursive subdirectory building. (Because the project does not use make, N/A would also be a defensible selection.) The iOS port likewise builds non-recursively: SwiftPM and xcodebuild resolve one package graph (ios/PotillusKit) rather than recursing through subdirectory makefiles.



    Проект ОБЯЗАН быть в состоянии повторить процесс генерации информации из исходных файлов и получить такой же результат с точностью до бита. Выберите «неприменимо» (N/A), если в проекте не используется сборка (например, языки сценариев, в которых исходный код используется непосредственно вместо компиляции), . [build_repeatable]
    Пользователи GCC и clang могут найти полезной опцию -frandom-seed; в некоторых случаях это может быть разрешено путем задания определенного порядка сортировки. Дополнительные предложения можно найти на сайте Reproducible builds.

    The project has a reproducible build and this is verified externally: the app is built from source and distributed via F-Droid, whose reproducible-builds process rebuilds the app and compares it bit-for-bit against the published artifact. The build is deterministic by design — the Gradle version catalog (libs.versions.toml) pins all dependency and plugin versions, and AGP/Kotlin/KSP are pinned. Determinism is actively protected: the foojay JDK auto-provisioning resolver plugin was deliberately removed from settings.gradle.kts (and must not be re-added) because it would make the compile toolchain network-dependent and non-reproducible, and build-time-only steps (SBOM generation, jniLibs packaging exclusions, and the newly added ktlint check) are kept off the release-assembly path so they do not affect the APK output. The separate Gradle daemon-JVM provisioning in gradle-daemon-jvm.properties may still fetch the JVM that runs Gradle itself, but that is independent of the compile toolchain and does not affect the externally verified artifact reproducibility. This external reproducibility is the F-Droid (Android) path. The iOS release is reproducible too, self-verified: make release-ios builds the archive twice from a clean checkout on the pinned Xcode and refuses to stage unless the two unsigned Potillus.app payloads are byte-for-byte identical (the code signature is excluded — it is inherently signing-time- and nonce-dependent, and Apple re-signs on delivery). Unlike F-Droid there is no independent third-party rebuilder for iOS, so this guarantee is self-attested on a fixed toolchain rather than externally verified.


  • Система установки


    Проект ОБЯЗАН предоставлять возможность легко установить и удалить ПО, создаваемое проектом, с использованием общепринятых способов. [installation_common]
    Примеры включают использование менеджера пакетов (на уровне системы или языка), «make install/uninstall» (с поддержкой DESTDIR), контейнер в стандартном формате или образ виртуальной машины в стандартном формате. Процесс установки и удаления (например, его упаковка) МОЖЕТ быть реализован третьей стороной, при условии что он построен на СПО.

    The software is installed and uninstalled using the platform's standard convention for Android apps. Installation is via F-Droid (with Google Play planned), the platform's package-manager/app-store mechanism, or by side-loading the signed APK; uninstallation uses Android's built-in uninstall flow (long-press the app or Settings → Apps). The app installs no system or root components and stores all data in its sandbox, so a normal uninstall removes it completely. The README "Quick start" documents the installation path. On iOS the planned distribution is the Apple App Store, the platform's standard install, update, and uninstall mechanism, which sandboxes the app the same way.



    В системе установки для конечных пользователей НЕОБХОДИМО учитывать стандартные соглашения при выборе места, в которое собранные артефакты записываются при установке. Например, если она устанавливает файлы в системе POSIX, НЕОБХОДИМО учитывать переменную окружения DESTDIR. Если установочной системы или стандартного соглашения нет, выберите «неприменимо» (N/A). [installation_standard_variables]

    DESTDIR/PREFIX-style variables apply to make install-type installations into filesystem prefixes (typical of C/Autotools projects). An Android application has no such installation system: where the app is placed is decided by the operating system's package installer (F-Droid/Play/the Android package manager), not by a project-provided install step, so there is no location-selection stage that could honor DESTDIR or PREFIX.



    Проект ОБЯЗАН предоставить возможность потенциальным разработчикам быстро установить все результаты проекта и поддерживать среду, необходимую для внесения изменений, включая тесты и тестовое окружение. Проект ОБЯЗАН использовать для этого общепринятые соглашения. [installation_development_quick]
    Это МОЖЕТ быть реализовано при помощи сгенерированного контейнера или установочных сценариев. Внешние зависимости обычно устанавливаются путем вызова системных и/или языковых пакетов, как описано в критерии external_dependencies.

    It is easy to get started developing the software. The project builds two native apps from one repository. The Android app is a standard Gradle project: cloning the repository and running the bundled Gradle wrapper (./gradlew) builds it with no manual Gradle installation, and all dependency and plugin versions are pinned in the version catalog with repositories preconfigured in settings.gradle.kts, so a fresh checkout builds without additional setup. Developers can import it into Android Studio or run ./gradlew assembleDebug and installDebug to see changes on an emulator or device. CONTRIBUTING.md (architecture, build/test commands, release checklist) and the README's "Technical Aspects" document the path from clone to a running build. The iOS port is just as easy to start: make ios regenerates the Xcode project with XcodeGen from ios/project.yml (the .xcodeproj is generated, not committed) and builds via the Swift toolchain, and swift test in ios/PotillusKit runs the package suite — a fresh checkout builds with no manual project setup.


  • Компоненты, поддерживаемые извне


    Проект ОБЯЗАН перечислять внешние зависимости в машинночитаемом виде. (Требуется URL) [external_dependencies]
    Обычно это делается при помощи инструкций для диспетчера пакетов и/или системы сборки. Обратите внимание, что это помогает реализовать критерий installation_development_quick.

    External dependencies are declared in a computer-processable, versioned form and are obtained automatically by a standard build. The Gradle version catalog (android/gradle/libs.versions.toml) pins every library and plugin version in its [versions], [libraries], and [plugins] tables, referenced via alias(libs.…) in the build scripts; settings.gradle.kts configures the repositories (google, mavenCentral, gradlePluginPortal), so ./gradlew resolves and downloads all declared dependencies with no manual steps. The build additionally generates a CycloneDX 1.6 JSON SBOM of the release dependencies as a standardized machine-readable inventory. On iOS the single external dependency (GRDB.swift) is declared and pinned in the SwiftPM manifest, resolved reproducibly from the pinned version.



    Проекты ОБЯЗАНЫ следить за своими внешними зависимостями или периодически проверять их (включая копии, сделанные для удобства) на предмет известных уязвимостей, а также исправлять уязвимости, которые могут быть использованы, или проверять невозможность их использования. [dependency_monitoring]
    Это можно сделать с помощью средств анализа происхождения/зависимостей, например Dependency-Check от OWASP, Nexus Auditor от Sonatype, Protex от Black Duck , Protecode от Synopsys и Bundler-аудит (для Ruby). Некоторые менеджеры пакетов включают в себя соответствующие механизмы. Допустимо оставлять уязвимость, если ее невозможно использовать, но такой анализ труден, и временами проще просто обновить или исправить эту часть кода.

    The project checks its external dependencies for known vulnerabilities before every release, enforced at staging. As documented in SECURITY.md ("Dependency monitoring") and enforced by the CONTRIBUTING.md §7 release checklist, dependencies are scanned before each release with osv-scanner (a FLOSS scanner querying the OSV database) against the CycloneDX SBOM the build generates. Reported issues are triaged: exploitable vulnerabilities are fixed by upgrading or mitigating the affected dependency; non-exploitable ones are recorded as such.



    Проект ОБЯЗАН:
    1. позволять легко идентифицировать и обновлять повторно используемые компоненты, поддерживаемые извне; или
    2. использовать стандартные компоненты, предоставляемые системой или языком программирования.
    В этом случае, если уязвимость обнаружена в повторно используемом компоненте, будет легко обновить этот компонент. [updateable_reused_components]
    Типичным способом выполнить этот критерий является использование предоставляемых операционной системой и языком программирования систем управления пакетами. Многие свободные программы распространяются с «подсобными библиотеками», которые являются локальными копиями стандартных библиотек (возможно, форков библиотек). Само по себе это нормально. Однако, если программа *должна* использовать эти локальные копии/форки, то обновление «стандартных» библиотек через системное обновление безопасности оставит эти дополнительные копии по-прежнему уязвимыми. Это особенно актуально для облачных систем; если провайдер облака обновляет свои «стандартные» библиотеки, но программа их не собирается использовать, обновления фактически не помогут. См., например, "Chromium: Why it isn't in Fedora yet as a proper package" от Тома Каллавея.

    The project uses externally-maintained components throughout, declared and version-pinned in the Gradle version catalog, with no vendored/convenience copies of third-party source that could silently go stale. The stack is kept current (modern AndroidX/Jetpack/Compose libraries, AGP 9 with built-in Kotlin, KSP), keeping it up to date is an explicit roadmap goal ("stay current and maintained"), and the documented pre-release osv-scanner check (see SECURITY.md, "Dependency monitoring") prevents the project from locking itself into outdated versions with known vulnerabilities, since findings are resolved by upgrading. The iOS app has exactly one third-party dependency, GRDB.swift (MIT), declared and version-pinned in the Swift package manifest with no vendored copy, kept current under the same "stay maintained" roadmap goal.



    Проекту СЛЕДУЕТ избегать использования нерекомендуемых (deprecated) или устаревших (obsolete) функций и API в тех случаях, когда альтернативы на СПО доступны в используемом наборе технологий («стек технологий» проекта) и для подавляющего большинства пользователей, поддерживаемых проектом (т.е. так чтобы пользователи могли быстро воспользоваться этой альтернативой). [interfaces_current]

    The project avoids deprecated or obsolete APIs and enforces this automatically: Kotlin's allWarningsAsErrors and Android Lint's warningsAsErrors promote deprecation warnings to build-breaking errors, so using a deprecated API fails the build. The technology stack is modern and actively maintained (current Jetpack Compose/AndroidX APIs, KSP instead of the older kapt, minSdk 30 avoiding legacy-compatibility workarounds), and the roadmap goal of staying current keeps the interfaces in use aligned with upstream releases; the warnings-as-errors gate is configured in android/app/build.gradle.kts. The iOS app targets a current, actively-maintained stack (iOS 17 SwiftUI, the Observation framework, String Catalogs) and no deprecated replacements; SwiftLint --strict is the automated lint gate. (Unlike Android, iOS does not promote compiler deprecation warnings to build errors; currency is maintained by the modern minimum target and review rather than a warnings-as-errors flag.)


  • Набор автотестов


    НЕОБХОДИМО применять автоматический набор тестов к каждому коммиту в общий репозиторий по крайней мере для одной ветки. Этот набор тестов ОБЯЗАН создавать отчет об успешном или неудачном тестировании. [automated_integration_testing]
    Это требование можно рассматривать как подмножество test_continuous_integration, но сосредоточенное только на тестировании, без требования непрерывной интеграции.

    The automated test suites now run on every change rather than only before a release. On the read-only GitHub mirror, every push to every branch runs the JVM unit tests and the Kover coverage floor (android.yml) and the PotillusKit suite with its coverage floor on a macOS runner (ios.yml); the on-device Compose UI and Espresso suite runs on an API 36 emulator (device-tests.yml) whenever anything under android/ changes, and weekly regardless. These need an SDK, KVM and macOS, which is precisely why they live on the mirror: the canonical GitLab pipeline (.gitlab-ci.yml) stays device-free and carries the checks that gate a merge. The iOS tests that require a booted simulator (app-target XCTests and XCUITests) are the remaining part still run locally before a release; see docs/MIRROR-CHECKS.md for the full scope and its limits.



    Проект ОБЯЗАН добавить регрессионные тесты к автоматизированному набору тестов по крайней мере на 50% ошибок, исправленных в течение последних шести месяцев. [regression_tests_added50]

    For well over 50% of the bugs fixed in the recent release history, the project added a regression test or an automated check that prevents recurrence. Examples of regression tests: LocaleFormattingInstrumentedTest (added with the fix for incorrect system-language number/date formatting in exports on API 30–32), NumberFormatTest (pinning the decimal separator after a locale-dependent formatting bug), and a white-box assertion in BackupRepositoryInstrumentedTest added with a backup fix. In addition, defect fixes were routinely paired with new invariants in the automated release-check gate (tools/release-check.sh) — e.g. version-string and locale-consistency checks and current-version locale-coverage checks — and with re-enabled lint checks (such as PluralsCandidate) that catch the class of bug going forward. Together these mean the majority of recent fixes are covered by automated regression protection. The iOS port is guarded the same way: its behaviour is pinned to Android's by the shared golden test vectors (SchemaParityTests), so a fixed cross-platform discrepancy stays fixed.



    Проект ОБЯЗАН иметь автоматические тестовые пакеты на СПО, которые обеспечивают покрытие не менее 80% инструкций кода, если есть хотя бы один инструмент на СПО, который может измерять этот критерий на выбранном языке. [test_statement_coverage80]
    Для измерения тестового покрытия существует множество средств на СПО, включая gcov/lcov, Blanket.js, Istanbul и JCov. Обратите внимание, что соответствие этому критерию не является гарантией того, что тестовый пакет является исчерпывающим; вместо этого, несоответствие этому критерию является сильным индикатором плохого набора тестов.

    The JVM unit-test suite clears the 90% line floor with headroom, measured with Kover over the unit-testable code (make -C android cover-figures prints the current figure). Android-runtime-bound code (Compose UI, Room database/DAOs, DataStore preferences, Keystore, PDF/WebView rendering, and MediaStore import/export) is excluded from this figure and verified instead by the instrumented suite (src/androidTest). A build-breaking floor of 90% line and 80% branch coverage is enforced by the koverVerify Gradle task in the release gate (make cover-check). Methodology: CONTRIBUTING.md §5; scope/enforcement: app/build.gradle.kts. The iOS port's PotillusKit suite (ios/PotillusKit/Tests) clears the same 90% line floor, enforced by the same release gate (make cover-check, via swift test --enable-code-coverage and tools/check-ios-coverage.py), so both implementations meet this criterion.


  • Тестирование новых функций


    Проект ОБЯЗАН иметь формальную задокументированную политику о том, что при добавлении существенной новой функциональности НЕОБХОДИМО добавлять тесты для новой функциональности в набор автоматических тестов. [test_policy_mandated]

    The project has a formal written policy mandating tests for new functionality. CONTRIBUTING.md §5 ("Test policy (mandatory)") states that as major new functionality is added, automated tests covering it MUST be added to the project's automated test suite as part of the same change, and that a change introducing significant new behavior without accompanying tests will not be merged. This is reinforced by the domain-layer coverage-floor rules in the same section.



    Проект ОБЯЗАН включать в свои документированные инструкции для предложений об изменениях политику, по которой для существенной новой функциональности должны добавляться тесты. [tests_documented_added]
    Однако даже неформальное правило приемлемо, если тесты добавляются на практике.

    The project's documented instructions for change proposals include the test-addition policy. CONTRIBUTING.md §2 ("Submitting changes"), step 3, states that per the mandatory test policy in §5, major new functionality MUST include automated tests covering it in the same change, and that ./gradlew test must pass and the release gate must stay green. The full policy is defined in §5. The same policy covers the iOS Swift suite; make check-swift-tests guards that added Swift tests actually assert.


  • Флаги предупреждений


    Проекты ОБЯЗАНЫ быть максимально строгими с предупреждениями в ПО, создаваемом проектом, где это целесообразно. [warnings_strict]
    Некоторые предупреждения не могут быть эффективно задействованы в некоторых проектах. Что необходимо в этом критерии - это доказательства того, что проект стремится включать флаги предупреждений там, где это возможно, чтобы ошибки обнаруживались на ранней стадии.

    The project is maximally strict with warnings. The Kotlin compiler runs with allWarningsAsErrors = true, so every compiler warning fails the build, and Android Lint runs with warningsAsErrors = true and abortOnError = true, promoting every lint warning to a build-breaking error. Rather than suppressing warnings, the project removes their causes and re-enables checks once underlying tooling bugs are fixed (e.g. the PluralsCandidate and WrongStartDestinationType lint checks were restored after workarounds were no longer needed). ktlint was additionally added as a style checker. These gates are configured in android/app/build.gradle.kts. On the iOS side the strictness gate is SwiftLint (a FLOSS linter pinned to version 0.65.0), run as part of make ios; Swift compiler warnings-as-errors are not currently enforced.


 Безопасность 13/13

  • Знание безопасной разработки


    Проект ОБЯЗАН реализовывать принципы безопасного дизайна (из критерия «know_secure_design»), где это применимо. Выберите «неприменимо» (N/A), если проект не создает программное обеспечение. [implement_secure_design]
    Например, результаты проекта должны иметь отказоустойчивые значения по умолчанию (доступ по умолчанию должен быть запрещен, а установка проектов по умолчанию должна быть в защищенной конфигурации). Также должно использоваться полное отграничение (любой доступ, который может быть ограничен, должен проверяться на достаточность прав доступа и не иметь обходных путей). Обратите внимание, что в некоторых случаях принципы будут противоречить друг другу, и в этом случае необходимо делать выбор (например, многочисленность механизмов может усложнять дизайн, противореча принципу экономичности/простоты механизма).

    The project implements secure design principles. Least privilege / minimal attack surface: the app holds no network permission and requests no camera, microphone, location, contacts, or runtime-storage permissions. Secure defaults: it is offline-only with no tracking, analytics, or ads by design; data stays in the app sandbox; and the preferences store is sealed with an AES-256-GCM key in the hardware-backed Android Keystore. Economy of mechanism: a small, focused architecture with a framework-free domain layer and no unnecessary services. Fail-safe input handling: importers validate input and the CSV exporter neutralizes formula injection (OWASP "CSV Injection"), with migration tests protecting data integrity. Defense in depth: an optional biometric lock supplements the platform sandbox. These are documented in SECURITY.md ("Security model") and PRIVACY.md. The SwiftUI port embodies the same principles on Apple's platform: the App Sandbox and no network entitlement, the key in the iOS Keychain (SecretKeyProviding), and the same defensive backup parsing; iOS-specific hardening refinements (e.g. an explicit ATS declaration) are tracked in docs/ROADMAP.md.


  • Основы правильного использования криптографии

    Обратите внимание, что некоторое ПО не нуждается в использовании криптографических механизмов.

    В ПО, создаваемом проектом, НЕДОПУСТИМО делать механизмы безопасности по умолчанию зависимыми от криптографических алгоритмов или режимов с известными серьезными слабостями (например, криптографический алгоритм хеширования SHA-1 или режим CBC в SSH). [crypto_weaknesses]
    Проблемы, связанные с режимом CBC в SSH, обсуждаются в описании уязвимости CERT: SSH CBC.

    The software's default security mechanisms use only strong, modern cryptography and none of the known-weak algorithms or modes. The encrypted preferences store uses AES-256 in GCM (authenticated encryption) — not ECB, CBC, DES/3DES, or RC4 — with the key held in the hardware-backed Android Keystore, a 96-bit random IV per encryption drawn from a cryptographically secure RNG, and a 128-bit authentication tag. No weak hash functions (e.g. MD5 or SHA-1) are used in the security mechanisms (implemented in KeystoreSecretStore.kt). The iOS path uses the same modern AEAD construction (AES-256-GCM via CryptoKit), avoiding the broken or weak algorithms the criterion warns against.



    Проекту СЛЕДУЕТ поддерживать несколько криптографических алгоритмов, чтобы пользователи могли быстро переключиться, если один из них поврежден. Общие симметричные ключевые алгоритмы включают AES, Twofish и Serpent. Общие алгоритмы контрольных сумм (хешей) включают SHA-2 (SHA-224, SHA-256, SHA-384 и SHA-512) и SHA-3. [crypto_algorithm_agility]

    Deliberately not planned. This is a SHOULD criterion: the badge allows a SHOULD to remain unmet where the rationale is documented, so it does not block the silver badge. SCOPE: the software seals exactly one artifact at rest -- the preferences blob -- using AES-256-GCM (KeystoreSecretStore on Android, PreferencesStore via CryptoKit AES.GCM on iOS). SQLCipher was removed in v0.73.0, so no other ciphertext exists and the entry database itself is not encrypted; the question is therefore the narrow one of whether this single blob should be sealable under more than one algorithm. WHY A SECOND ALGORITHM IS NOT APPROPRIATE HERE: (1) it would risk weakening the design rather than strengthening it, because on Android the symmetric key is generated inside the Android Keystore and never leaves it -- a second AEAD would first have to be one the platform key store can hold, and if it cannot, that key would have to live outside the Keystore's protection, trading a hardware-backed key for algorithm choice, which is a poor bargain for this threat model; (2) the criterion's stated purpose, letting users switch quickly if an algorithm is broken, does not map onto this software, since users of a drinks diary do not select ciphers and the switch path is an app update, which the project already ships regularly; (3) the sealed framing (IV || ciphertext+tag) is deliberately byte-identical on both platforms, so changing it touches Android, iOS, the backup path and the shared test vectors -- a data-loss risk on a personal diary for no practical user gain; (4) AES-256-GCM is the primitive both platforms provide and neither is deprecating, and a break would be an industry-wide event answered by platform and app updates rather than by a per-record algorithm selector. MITIGATION THAT DOES EXIST: the algorithm is encapsulated in a single module per platform, so replacing AES-256-GCM would be a localized change rather than a rewrite.



    Проект ОБЯЗАН поддерживать хранение данных для аутентификации (например, паролей и динамических токенов) и закрытых криптографических ключей в файлах, отдельных от остальной информации (например, файлов конфигурации, баз данных и журналов) и позволять пользователям их обновление и замену без перекомпиляции кода. Выберите «неприменимо» (N/A), если проект никогда не работает с данными аутентификации и закрытыми криптографическими ключами. [crypto_credential_agility]

    The application processes no authentication credentials (no passwords, tokens, logins, or network authentication) and stores no key files. Its only cryptographic key is an AES-256-GCM key generated inside the hardware-backed Android Keystore; the raw key material never leaves the secure hardware and is never written to a file, so there are no user-managed credential or key files to store separately or replace without recompilation. (For context, the Keystore key is already isolated from configuration, database, and logs and could be rotated by deleting its alias, but this is not user-facing credential management.)



    В ПО, создаваемом проектом, СЛЕДУЕТ поддерживать безопасные протоколы для всех сетевых коммуникаций, такие как SSHv2 или новее, TLS1.2 или новее (HTTPS), IPsec, SFTP и SNMPv3. По умолчанию СЛЕДУЕТ отключать небезопасные протоколы, такие как FTP, HTTP, telnet, SSLv3 или более ранние версии, и SSHv1, и разрешать их только в том случае, если пользователь явным образом это задаёт. Если программное обеспечение, созданное проектом, не поддерживает сетевые коммуникации, выберите «неприменимо» (N/A). [crypto_used_network]

    The application performs no network communication: it does not declare the INTERNET permission, works entirely offline, and transmits no data. There are therefore no network protocols whose security could be assessed.



    Если ПО, создаваемое проектом, поддерживает или использует TLS, ему СЛЕДУЕТ поддерживать как минимум версию TLS 1.2. Примечание: предшественник TLS называется SSL. Если программное обеспечение не использует TLS, выберите «неприменимо» (N/A). [crypto_tls12]

    The application does not use TLS because it performs no network communication at all (no INTERNET permission, offline-only). There is no TLS configuration or version to assess.



    В ПО, создаваемом проектом, НЕОБХОДИМО выполнять проверку сертификата TLS по умолчанию при использовании TLS, в том числе в подресурсах. Если программное обеспечение не использует TLS, выберите «неприменимо» (N/A). [crypto_certificate_verification]
    Обратите внимание, что неправильная проверка сертификата TLS является распространенной ошибкой. Для дальнейших сведений см. "The Most Dangerous Code in the World: Validating SSL Certificates in Non-Browser Software" Мартина Георгиева и др. и "Do you trust this application?" Майкла Катанзаро.

    The application does not use TLS and performs no network communication (no INTERNET permission, offline-only), so there are no TLS connections and no certificate verification to assess.



    В ПО, создаваемом проектом, НЕОБХОДИМО, если поддерживается TLS, выполнять проверку сертификата TLS по умолчанию при использовании TLS, в том числе в подресурсах. Если программное обеспечение не использует TLS, выберите «неприменимо» (N/A). [crypto_verification_private]

    The application does not use TLS and performs no network communication (no INTERNET permission, offline-only); it never sends HTTP headers or any private information over a network, so there is nothing to verify before transmission.


  • Безопасный выпуск


    Проект ОБЯЗАН криптографически подписывать выпуски результатов проекта, предназначенные для широкого использования, и ОБЯЗАН иметь задокументированный процесс, объясняющий пользователям, как они могут получить общедоступные ключи подписи и проверить подпись(и) выпусков. НЕДОПУСТИМО размещать закрытый ключ для этих подписей на сайте(сайтах), используемом для прямого распространения ПО для общественности. Выберите «неприменимо» (N/A), если выпуски не предназначены для широкого использования. [signed_releases]
    Результаты проекта включают как исходный код, так и любые сгенерированные результаты, если это применимо (например, исполняемые файлы, пакеты и контейнеры). Сгенерированные результаты МОГУТ быть подписаны отдельно от исходного кода. Подписывание МОЖЕТ быть реализовано как подписанные теги git (с использованием криптографических цифровых подписей). Проекты МОГУТ предоставлять генерируемые результаты отдельно от таких инструментов, как git, но в этих случаях отдельные результаты ОБЯЗАНЫ быть отдельно подписаны.

    Releases are cryptographically signed with the maintainer's own Android app-signing key via reproducible builds; the private key is held only by the maintainer and is never stored on GitLab, F-Droid, or any other distribution site. SECURITY.md ("Verifying releases") documents how users obtain the public key and verify a release: the F-Droid client verifies the signature automatically and the project's F-Droid metadata pins the allowed signing key; users can also compare the APK signing certificate SHA-256 fingerprint (7506f17184b31a2d67621305d190a73e497806b39f7d64463ff5dbc0afd8317b) via apksigner verify --print-certs, or reproduce the build and compare. This author-signing model is the one used by the productive channels (GitLab and F-Droid). The planned app-store channels follow each store's own signing model instead: with Google Play App Signing the developer signs the upload with an upload key and Google re-signs the distributed APK with a Google-held key; with the Apple App Store the developer signs with a distribution certificate and App Store Connect re-signs the app with an Apple identity. On those channels the store, not the maintainer, holds the distribution signing key — a property of the platforms, not a project choice.



    ЖЕЛАТЕЛЬНО, чтобы в системе контроля версий каждый важный тег версии (тег, который является частью основного выпуска, минорной версии или исправляет общедоступные уязвимости) подписывался криптографической подписью и поддавался проверке, как описано в критерииsigned_releases. [version_tags_signed]

    Release tags are cryptographically signed and verifiable. Per the CONTRIBUTING.md §7 release checklist, each release tag is created as a GPG-signed annotated tag (git tag -s) using the maintainer's key (fingerprint 1842 323B 4FCF 9B90 995F A17F A350 B991 F05A 4857, available from keyring.debian.org — the same key used for security reports); the checklist also documents enabling git config tag.gpgSign true so annotated tags are signed automatically. SECURITY.md ("Verifying releases") documents how to import the key and verify a tag with git tag -v.


  • Другие вопросы безопасности


    В результатах проекта НЕОБХОДИМО проверять любой ввод из потенциально ненадежных источников, чтобы убедиться, что они действительны (*белый список*), и отклонять недействительный ввод, если вообще есть какие-либо ограничения на данные. [input_validation]
    Обратите внимание, что сравнения ввода со списком «плохих форматов» (также известным как *черный список*) обычно недостаточно, потому что злоумышленники часто могут обойти черный список. В частности, числа преобразуются во внутренние форматы, а затем проверяются, находятся ли они между их минимальным и максимальным (включительно), а текстовые строки проверяются, чтобы убедиться, что они являются допустимыми текстовыми шаблонами (например, действительный UTF-8, длина, синтаксис и т. д.). От некоторых данных может требоваться, чтобы они были «хоть чем-нибудь» (например, загрузчик файлов), но такое обычно случается редко.

    The application validates inputs from its potentially untrusted sources using an allowlist approach. JSON backup/import is validated on restore (structure and values) and invalid or foreign data is rejected, covered by BackupRepositoryInstrumentedTest. Numeric user inputs (drink amounts, body weight, limits) are checked for valid ranges/format, with the amount dialog entering a controlled error state rather than accepting bad values, and locale-dependent number parsing is handled deliberately (regression-tested by NumberFormatTest). Room migrations validate the database schema on upgrade (MigrationTest). As output-side hardening, the CSV exporter neutralizes formula injection (OWASP "CSV Injection"). Since the app uses no network, its untrusted inputs are essentially user entries and imported files, both of which are validated. The iOS port validates the same untrusted inputs: it reads and writes the identical JSON backup format, with its parser pinned to Android's behaviour by the shared golden test vectors (SchemaParityTests).



    В ПО, создаваемом проектом, СЛЕДУЕТ использовать механизмы упрочнения безопасности (hardening), чтобы дефекты программного обеспечения с меньшей вероятностью приводили к уязвимостям в безопасности. [hardening]
    Механизмы упрочнения могут включать HTTP-заголовки, такие как Content Security Policy (CSP), флаги компилятора для противостояния атакам (например, -fstack-protector) или флаги компилятора, устраняющие неопределенное поведение. Для наших целей политика наименьших привилегий не считается механизмом упрочнения (использовать наименьшие достаточные привилегии важно, но этому посвящён отдельный критерий).

    Release builds apply R8 code shrinking and obfuscation (isMinifyEnabled = true) with resource shrinking and the optimizing ProGuard configuration. The manifest sets android:allowBackup="false" to prevent backup-based data exfiltration, and the app applies WindowManager FLAG_SECURE by default from cold start to block screenshots, screen recording, and Recents-thumbnail exposure. The permission set is minimal (no network or telephony; only USE_BIOMETRIC) and only the launcher activity is exported. These complement the hardware-backed Keystore at-rest encryption and the warnings-as-errors/lint gate. The R8, resource-shrinking and lint configuration lives in android/app/build.gradle.kts. The iOS port applies the platform-equivalent hardening — the App Sandbox, no network entitlement, and the encryption key held in the iOS Keychain (SecretKeyProviding) — while iOS-specific items such as an explicit App Transport Security declaration are tracked in docs/ROADMAP.md.



    Проект ОБЯЗАН предоставить обоснование того, что требования безопасности соблюдаются проектом. В обоснование НЕОБХОДИМО включить: описание модели угроз, четкое указание границ доверия, доказательство того, что использовались принципы безопасного дизайна, и доказательство того, что слабости в безопасности реализации нейтрализованы. (Требуется URL) [assurance_case]
    Обоснованием является «документальное подтверждение, которое дает убедительное и корректное доказательство того, что указанный набор критических заявлений относительно свойств системы адекватно оправдан для данного приложения в данной среде» (перевод выдержки из "Software Assurance Using Structured Assurance Case Models", Thomas Rhodes et al, NIST Interagency Report 7608). Границы доверия - это границы, на которых меняется уровень доверия к данным или выполнению кода, например границы сервера в типичном веб-приложении. В обосновании обычно перечисляются принципы безопасного проектирования (такие как Saltzer and Schroeer) и общие слабости безопасности в реализации (такие как OWASP Top 10 или CWE/SANS Top 25), и показывается, как противодействовать каждой из них. Полезным примером может служить обоснование для BadgeApp. Этот критерий связан с documentation_security, documentation_architecture и implement_secure_design.

    The project provides a security assurance case in docs/ASSURANCE_CASE.md (linked from SECURITY.md). It takes the security requirements from SECURITY.md, describes the threat model (assets, in-scope adversaries/attacks, and explicit out-of-scope residual risks), identifies the trust boundaries (app sandbox, hardware-backed Keystore, FLAG_SECURE screen boundary, device/biometric authentication, the export boundary, and the absence of a network boundary), argues that secure design principles were applied (least privilege, secure defaults, economy of mechanism, defense in depth, fail-safe), and maps common implementation weakness classes to their countermeasures (injection, insecure storage, cryptography, input validation, network exposure, memory safety, tampering, and upgrade data integrity).


 Анализ 2/2

  • Статический анализ кода


    Проект ОБЯЗАН использовать хотя бы один инструмент статического анализа с правилами или подходами для поиска распространенных уязвимостей в анализируемом языке или окружении, если есть хотя бы один инструмент на СПО, который может реализовать этот критерий на выбранном языке. [static_analysis_common_vulnerabilities]
    Инструменты статического анализа, специально предназначенные для поиска распространенных уязвимостей, с большей вероятностью найдут их. Тем не менее, использование любых статических инструментов обычно помогает найти какие-то проблемы, поэтому мы предлагаем, но не требуем этого для получения базового значка.

    The static analysis tool used for static_analysis — Android Lint — includes a dedicated set of security detectors that look for common Android-environment vulnerabilities (e.g. exported components and permission issues, cleartext traffic, hardcoded credentials, weak cryptography, unsafe WebView/TrustManager patterns, and SQL-injection/path-traversal hints). The build runs Lint with abortOnError = true and warningsAsErrors = true, so such findings are enforced as build-breaking errors rather than merely reported. This is complemented by osv-scanner dependency scanning (SECURITY.md, "Dependency monitoring"). The Lint gate is configured in android/app/build.gradle.kts. On the iOS side SwiftLint — a FLOSS linter pinned to version 0.65.0 — runs as a make ios gate over the Swift sources, so lint findings are caught before a build ships.


  • Динамический анализ кода


    Если ПО, создаваемое проектом, включает ПО, написанное с использованием небезопасного языка (например, C или C++), тогда проект ОБЯЗАН регулярно использовать хотя бы один динамический инструмент (например, фаззер или сканер веб-приложения) в сочетании с механизмом для обнаружения проблем безопасности памяти, таких как перезапись буфера. Выберите «неприменимо» (N/A), если проект не создает ПО, написанное на небезопасном языке. [dynamic_analysis_unsafe]
    Примерами механизмов обнаружения проблем безопасности памяти являются Address Sanitizer (ASAN) (доступен в GCC и LLVM), Memory Sanitizer и valgrind. Другие потенциально используемые инструменты включают Thread Sanitizer и Undefined Behavior Sanitizer. Достаточно широкое использование утверждений (assertions) тоже может быть приемлемо.

    The software is written entirely in memory-safe languages: Kotlin on the JVM/ART runtime for the Android app and Swift for the iOS app, both with automatic memory management and no manual allocation, pointer arithmetic, or buffer handling. Neither build produces memory-unsafe (C/C++/NDK) code, so there is no unsafe memory use for a dynamic analysis tool to detect.



Вы можете использовать инструменты и системы ИИ для предложения изменений через простой URL, например https://www.bestpractices.dev/ru/projects/13480/choose/edit?osps_ac_01_01_status=Met&osps_ac_01_01_justification=GitHub+enforced. Смотрите нашу систему автоматизированных предложений о том, как это сделать. Эти данные доступны по лицензии Community Data License Agreement – Permissive, Version 2.0 (CDLA-Permissive-2.0). Это означает, что получатель данных может распространять данные с изменениями или без них, при условии, что получатель данных предоставляет текст данного соглашения вместе с распространяемыми данными. Пожалуйста, укажите в качестве источника Martin A. Godisch и участников OpenSSF Best Practices badge.

Владелец анкеты на значок проекта: Martin A. Godisch.
2026-07-04 04:21:04 UTC, последнее изменение сделано 2026-08-29 11:29:00 UTC. Значок последний раз потерян 2026-07-19 18:17:51 UTC. Последний раз условия для получения значка были выполнены 2026-07-19 18:18:14 UTC.