fedfred

遵循以下最佳实践的项目将能够自愿的自我认证,并显示他们已经实现了核心基础设施计划(OpenSSF)徽章。

如果这是您的项目,请在您的项目页面上显示您的徽章状态!徽章状态如下所示: 项目10158的徽章级别为gold 这里是如何嵌入它:

这些是白银级别条款。您还可以查看通过黄金级别条款。

        

 基本 17/17

  • 识别

    A feature-rich python package for interacting with the Federal Reserve Bank of St. Louis Economic Database: FRED

  • 先决条件


    项目必须拥有通过徽章。 [achieve_passing]

  • 基本项目网站内容


    关于如何贡献的信息必须包括对可接受的贡献的要求(例如,引用任何所需的编码标准)。 (需要网址) [contribution_requirements]

    How to contribute is outlined in the GitHub repositories CONTRIBUTING.md file. https://github.com/nikhilxsunder/fedfred/blob/main/CONTRIBUTING.md


  • 项目监督


    该项目应该有一个合法机制,所有对项目软件做出显著贡献的开发人员都声明他们有合法授权作出这些贡献。最常用且易于实施的方法是使用开发者原产地证书(DCO),用户可以在其提交中添加“signed-off-by”,另外,项目链接到DCO网站。本条款也可以使用贡献者许可协议(CLA)或其他法律机制实现。 (需要网址) [dco]

    The project uses a Developer Certificate of Origin (DCO) to ensure that all contributors assert they are legally authorized to make contributions. Contributors are required to sign off on their commits using the git commit -s command, which appends a Signed-off-by line to the commit message. This indicates their agreement to the terms of the DCO.

    The DCO is documented in the repository and linked in the DCO.md file: https://github.com/nikhilxsunder/fedfred/blob/main/DCO.md. The CONTRIBUTING.md file also explains how to sign commits and includes a reference to the DCO: https://github.com/nikhilxsunder/fedfred/blob/main/CONTRIBUTING.md. Pull requests with unsigned commits are automatically flagged and cannot be merged until all commits are signed.

    For more information, see the Developer Certificate of Origin: https://developercertificate.org/.



    该项目必须明确定义和记录其项目治理模式(决策方式,包括关键角色)。 (需要网址) [governance]

    The project follows a centralized governance model where the project owner and lead, Nikhil Sunder, makes all final decisions regarding the project's direction, contributions, and dispute resolution. This governance model is documented in the CONTRIBUTING.md file: https://github.com/nikhilxsunder/fedfred/blob/main/CONTRIBUTING.md.

    For more details on the contribution process and decision-making, contributors are encouraged to review the guidelines outlined in the CONTRIBUTING.md file.



    该项目必须采取行为守则,并将其发布在标准的位置。 (需要网址) [code_of_conduct]

    The project has adopted the Contributor Covenant Code of Conduct, which sets expectations for behavior within the community and ensures a welcoming and inclusive environment. The Code of Conduct is posted in the repository at the following URL: https://github.com/nikhilxsunder/fedfred/blob/main/CODE_OF_CONDUCT.md.

    This document outlines acceptable and unacceptable behavior, enforcement responsibilities, and reporting mechanisms for addressing violations.



    该项目必须明确定义和公开记录项目中的关键角色及其职责,包括这些角色必须执行的任务。必须清楚指出谁是什么角色,尽管这可能没有以相同的方式记录下来。 (需要网址) [roles_responsibilities]

    The project defines and documents key roles and responsibilities in the CONTRIBUTING.md file: https://github.com/nikhilxsunder/fedfred/blob/main/CONTRIBUTING.md.

    The project owner and lead, Nikhil Sunder, is responsible for making final decisions regarding the project's direction, contributions, and dispute resolution. Contributors are encouraged to participate in discussions, submit pull requests, and follow the contribution guidelines outlined in the documentation. The governance model and roles are centralized, with the project owner retaining ultimate authority.



    如果任何一个开发者丧失工作能力或丧生,该项目必须能够继续保持最小的中断。特别是,在确认个人无行为能力或死亡的一周内,项目必须能够创建和关闭问题,接受提议的更改和发布软件版本。这可以通过确保其他人有任何必要的密钥,密码和合法权利来继续该项目。运行FLOSS项目的个人可以通过在锁箱中提供密钥,并提供任何所需的合法权利(例如DNS名称)来实现。 (需要网址) [access_continuity]

    The project ensures continuity by maintaining shared access to critical resources, including repository administration, release management, and issue tracking. Multiple maintainers have access to the GitHub repository, ensuring that issues can be created and closed, proposed changes can be reviewed and merged, and new versions can be released without interruption.

    The governance model and contribution process are documented in the CONTRIBUTING.md file: https://github.com/nikhilxsunder/fedfred/blob/main/CONTRIBUTING.md.

    Additionally, access credentials for critical resources, such as API keys and deployment tools, are securely stored and shared among trusted maintainers to ensure the project can continue in the event of the loss of support from any individual.



    项目必须具有2个或更多的“公交车因子”。 (需要网址) [bus_factor]

    The project has a "bus factor" of 2 or more, ensuring that it can continue without interruption if one key contributor becomes unavailable. Multiple maintainers have access to critical resources, including the GitHub repository, release management, and issue tracking. This ensures that the project can continue to create and close issues, accept proposed changes, and release new versions.

    The governance model and contribution process are documented in the CONTRIBUTING.md file: https://github.com/nikhilxsunder/fedfred/blob/main/CONTRIBUTING.md.

    Additionally, access credentials for critical resources are securely shared among trusted maintainers to ensure continuity.


  • 文档


    该项目必须有一个文档化的路线图,描述项目打算做什么,至少在下一年做什么。 (需要网址) [documentation_roadmap]

    The project has a documented roadmap outlining its goals and priorities for the next year. The roadmap is available at: https://github.com/nikhilxsunder/fedfred/blob/main/ROADMAP.md. It helps users and contributors understand the intended direction of the project and is updated as priorities evolve.



    该项目必须包括项目生成的软件的架构(也称为高级别设计)的文档。如果项目不产生软件,请选择“不适用”(N/A)。 (需要网址) [documentation_architecture]

    The project includes documentation of its architecture in the README.md and the source directory. The README.md provides an overview of the project's features, including its modular design with components like FredAPI, FredMapsAPI, and data classes for structured outputs. The source directory contains detailed API references and usage examples, which describe the relationships between components and their functionality.

    For more details, see the documentation at: https://github.com/nikhilxsunder/fedfred/blob/main/README.md and https://nikhilxsunder.github.io/fedfred/.



    该项目必须书面记录用户从项目生成的软件的安全性上可以获得和不能指望的内容(其“安全需求”)。 (需要网址) [documentation_security]

    The project documents its security requirements in the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.

    This document outlines what users can and cannot expect in terms of security, including:

    1. Security Measures:

      • Enforced certificate verification for all HTTP clients.
      • Strict validation of API parameters and responses.
      • Regular dependency scanning and updates to address vulnerabilities.
    2. User Responsibilities:

      • Secure storage of API keys (e.g., using environment variables).
      • Avoiding hardcoding sensitive information in scripts.
    3. Limitations:

      • The software does not provide encryption for user data beyond HTTPS communication.
      • Users are responsible for securing their runtime environments.

    For more details, refer to the SECURITY.md file.



    该项目必须为新用户提供“快速启动”指南,以帮助他们快速使用该软件。 (需要网址) [documentation_quick_start]

    The project provides a "Quick Start" guide in the quickstart.rst file, which is also available in the online documentation. The guide helps new users quickly set up the library, initialize the API client, and fetch data from the FRED API. It includes examples for both synchronous and asynchronous usage.

    The Quick Start guide can be accessed at: https://nikhilxsunder.github.io/fedfred/quickstart/.



    项目必须努力使文档与当前版本的项目结果(包括项目生成的软件)保持一致。任何已知的文档缺陷使其不一致必须修正。如果文档基本是最新的,但是错误地包括一些不再是真实的旧信息,那么将其视为缺陷,然后像往常一样进行跟踪和修复。 [documentation_current]

    The project makes an effort to keep its documentation consistent with the current version of the software. The documentation is regularly updated to reflect changes in functionality, as evidenced by the CHANGELOG.md file: https://github.com/nikhilxsunder/fedfred/blob/main/CHANGELOG.md.

    Additionally, the project maintains a dedicated ROADMAP.md file: https://github.com/nikhilxsunder/fedfred/blob/main/ROADMAP.md, which outlines future goals and priorities. Any known documentation defects are tracked and addressed as part of the development process. The documentation also includes version-specific details and links to older versions where applicable.



    项目存储代码库首页和/或网站必须在获得成就的48小时内标识并超链接任何成就,包括此最佳实践徽章。 (需要网址) [documentation_achievements]

    The project identifies and hyperlinks to its achievements, including the OpenSSF Best Practices badge, on the repository's front page in the README.md file. The badge is displayed prominently at the top of the file, along with other status badges.

    The README.md file can be accessed at: https://github.com/nikhilxsunder/fedfred/blob/main/README.md.


  • 无障碍和国际化


    该项目(项目网站和项目成果)都应遵循无障碍最佳做法,使残疾人仍然可以参与项目,并在合理的情况下使用项目成果。 [accessibility_best_practices]

    This project is a Python library and does not produce a GUI or web-based application. As such, accessibility best practices for GUIs or web applications, such as WCAG 2.0 guidelines, are not directly applicable. However, the project documentation and results are designed to be accessible:

    1. Documentation: The documentation is written in clear, concise language and is accessible via standard web browsers. It includes text alternatives for images (e.g., alt text for the project logo) and follows a consistent heading hierarchy for screen readers.

    2. Library Design: The library is designed for use in command-line and programmatic environments, which are inherently accessible to users with assistive technologies like screen readers.

    For these reasons, this criterion is marked as Not Applicable (N/A).



    该项目产生的软件应该被国际化,以便为目标受众的文化,地区或语言进行简单的本地化。如果国际化(i18n)不适用(例如,该软件不会生成针对最终用户的文本,并且不排序可读文本),请选择“不适用”(N/A)。 [internationalization]

    The software produced by the project is a Python library intended for developers and does not generate text intended for end-users or require sorting of human-readable text. As such, internationalization (i18n) does not apply. This criterion is marked as Not Applicable (N/A).


  • 其他


    如果项目站点(网站,存储库和下载URL)存储用于外部用户认证的密码,则必须使用密钥拉伸(迭代)算法将密码存储为具有每用户盐值的迭代散列(例如,PBKDF2,Bcrypt或Scrypt)。如果项目站点不存储密码,请选择“不适用”(N/A)。 [sites_password_security]

    The project does not store passwords for the authentication of external users on its sites (e.g., website, repository, or download URLs). Authentication is handled through GitHub, which meets this criterion. Therefore, this criterion is marked as Not Applicable (N/A).


  • 之前的版本


    该项目必须维护最常用的旧版本的产品提供较新版本的升级路径。如果升级路径很困难,项目必须记录如何执行升级(例如,给出更改的接口描述和详细的建议步骤以帮助升级)。 [maintenance_or_update]

    The project maintains older versions of the product and provides an upgrade path to newer versions. The CHANGELOG.md file (https://github.com/nikhilxsunder/fedfred/blob/main/CHANGELOG.md) documents all changes, including new features, bug fixes, and deprecated functionality, to help users understand what has changed between versions.

    For major updates that introduce breaking changes, the project follows Semantic Versioning and includes detailed instructions in the CHANGELOG.md to guide users through the upgrade process. This ensures users can either continue using older versions or transition smoothly to newer ones.


  • 错误报告流程


    项目必须使用问题跟踪器来跟踪每个问题。 [report_tracker]
  • 漏洞报告流程


    除了要求匿名的报告者外,该项目必须对过去12个月内解决的所有漏洞报告的报告者表示感谢。如果过去12个月没有修复漏洞,请选择“不适用”(N/A)。 (需要网址) [vulnerability_report_credit]

    The project has not resolved any reported vulnerabilities in the last 12 months. Therefore, this criterion is marked as Not Applicable (N/A).

    For future reference, the project documents vulnerability reports and credits reporters in the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.



    该项目必须有一个书面的流程来响应漏洞报告。 (需要网址) [vulnerability_response_process]

    The project has a documented process for responding to vulnerability reports in the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.

    The process includes the following steps:

    1. Reporting: Vulnerabilities must be reported via email to nsunder724@gmail.com, not through public GitHub issues.
    2. Acknowledgment: The project team will acknowledge receipt of the report within 48 hours.
    3. Verification: The team will verify the vulnerability and assess its impact.
    4. Remediation: A fix will be developed and tested.
    5. Disclosure: The team will coordinate with the reporter on the disclosure timeline and credit the reporter unless anonymity is requested.

    This ensures a clear and structured approach to handling vulnerabilities.


  • 编码标准


    该项目必须确定其使用的主要语言的具体编码风格指南,并要求贡献一般情况下符合此要求。 (需要网址) [coding_standards]

    The project identifies and enforces coding standards in the CONTRIBUTING.md file: https://github.com/nikhilxsunder/fedfred/blob/main/CONTRIBUTING.md.

    The project adheres to the following coding style guides:

    1. PEP 8: The official Python style guide for code readability and consistency.
    2. PEP 257: For docstring conventions, including parameter descriptions, return values, and examples.
    3. Type Hints (PEP 484): All functions must include type annotations for parameters and return values.

    The CONTRIBUTING.md file also specifies the use of tools like pylint, mypy, and bandit to enforce these standards and ensure compliance. Contributors are required to run these tools before submitting pull requests.



    如果至少有一个FLOSS工具可以应用于所选择的语言,项目必须自动执行其选定的编码风格。 [coding_standards_enforced]

    The project automatically enforces its selected coding styles using the following tools, as documented in the CONTRIBUTING.md file: https://github.com/nikhilxsunder/fedfred/blob/main/CONTRIBUTING.md.

    1. Pylint: Enforces PEP 8 compliance and general code quality. A minimum score of 9.0+ is required for all code.
    2. Mypy: Enforces type checking to ensure compliance with PEP 484.
    3. Bandit: Performs security-focused static analysis to identify common security issues.

    These tools are integrated into the development workflow via pre-commit hooks and GitHub Actions workflows. All pull requests are automatically checked for compliance, and any exceptions must be explicitly documented in the code with comments explaining the rationale.


  • 可工作的构建系统


    本地二进制文件的构建系统必须遵守传递给它们的相关编译器和链接器(环境)变量(例如CC,CFLAGS,CXX,CXXFLAGS和LDFLAGS),并将它们传递给编译器和链接器。构建系统可以使用附加标志来扩展它们,但不能简单地用自己的替换提供的值。如果没有生成本地二进制文件,请选择“不适用”(N/A)。 [build_standard_variables]

    The project does not generate native binaries, as it is a Python library. Therefore, this criterion is marked as Not Applicable (N/A).



    构建和安装系统在在相关标志中要求时,应该保留调试信息(例如,“install -s”未被使用)。如果没有构建或安装系统(例如典型的JavaScript库),请选择“不适用”(N/A)。 [build_preserve_debug]

    The project is a Python library and does not involve a build or installation system that generates native binaries. Therefore, this criterion is marked as Not Applicable (N/A).



    如果子目录中存在交叉依赖关系,则由项目生成的软件的构建系统必须不能递归地构建子目录。如果没有构建或安装系统(例如典型的JavaScript库),请选择“不适用”(N/A)。 [build_non_recursive]

    The project is a Python library and does not use a build system that involves recursive builds or subdirectory dependencies. Therefore, this criterion is marked as Not Applicable (N/A).



    该项目必须能够重复从源代码文件生成的过程,并获得完全相同的比特位结果。如果没有发生构建(例如,直接使用源代码而不是编译使用的脚本语言),请选择“不适用”(N/A)。 [build_repeatable]

    The project is a Python library and does not involve a build process that generates compiled binaries or artifacts. The source code is used directly, making this criterion Not Applicable (N/A).


  • 安装系统


    该项目必须提供一种使用常用惯例轻松安装和卸载由项目生成的软件的方法。 [installation_common]

    The project provides an easy way to install and uninstall the software using commonly-used conventions:

    Using pip: The software can be installed and uninstalled via the Python package manager pip, which is widely used in the Python ecosystem.

    Installation: pip install fedfred Uninstallation: pip uninstall fedfred Using conda: The software is available on Conda-Forge, allowing installation and uninstallation via the conda package manager.

    Installation: conda install -c conda-forge fedfred Uninstallation: conda remove fedfred Detailed installation instructions are documented in the README.md file: https://github.com/nikhilxsunder/fedfred/blob/main/README.md and the installation.rst file in the documentation: https://nikhilxsunder.github.io/fedfred/installation/.



    最终用户的安装系统必须遵守用于在安装时选择构建工件写入位置的标准约定。例如,如果在POSIX系统上安装文件,它必须遵守DESTDIR环境变量。如果没有安装系统或没有标准惯例,请选择“不适用”(N/A)。 [installation_standard_variables]

    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]



    该项目必须为潜在开发人员提供一种快速安装所有项目成果和支持环境所必需的环境,包括测试套件和测试环境。必须通过常规惯例执行。 [installation_development_quick]

    The project provides a quick and straightforward way for developers to install all necessary dependencies and set up the development environment using commonly-used conventions. This is documented in the CONTRIBUTING.md file: https://github.com/nikhilxsunder/fedfred/blob/main/CONTRIBUTING.md.

    Development Setup:

    1. Using Poetry:

      • Clone the repository: git clone https://github.com/nikhilxsunder/fedfred.git
      • Navigate to the project directory: cd fedfred
      • Install dependencies: poetry install
      • Run tests: poetry run pytest
    2. Using Conda:

      • Clone the repository: git clone https://github.com/nikhilxsunder/fedfred.git
      • Navigate to the project directory: cd fedfred
      • Create a Conda environment: conda create -n fedfred-dev python=3.9
      • Activate the environment: conda activate fedfred-dev
      • Install dependencies: pip install -e ".[dev,types]"
      • Run tests: pytest

    These steps ensure that developers can quickly set up the environment and run tests to start contributing to the project.


  • 外部维护的组件


    项目必须以计算机可处理的方式列出外部依赖关系。 (需要网址) [external_dependencies]

    The project lists its external dependencies in a computer-processable way using pyproject.toml and poetry.lock files. These files are compatible with the Poetry package manager and specify all required dependencies, including their versions and groups (e.g., main, dev).

    The pyproject.toml file can be found at: https://github.com/nikhilxsunder/fedfred/blob/main/pyproject.toml.
    The poetry.lock file can be found at: https://github.com/nikhilxsunder/fedfred/blob/main/poetry.lock.



    项目必须监视或定期检查其外部依赖(包括便利副本)以检测已知的漏洞,并修复可利用的漏洞或将其验证为不可利用的漏洞。 [dependency_monitoring]

    The project monitors its external dependencies for known vulnerabilities using automated tools and processes:

    GitHub Dependabot: Automatically scans dependencies for vulnerabilities and creates pull requests to update them when issues are detected. CodeQL: Performs security analysis on the codebase, including dependency vulnerabilities. Poetry: Dependency management ensures that only compatible and secure versions of packages are installed. These tools are integrated into the project's workflows and run regularly to ensure that vulnerabilities are detected and addressed promptly. For more details, see the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.



    该项目必须满足下述情况之一:
    1. 可以轻松识别和更新重用的外部维护组件;
    2. 使用系统或编程语言提供的标准组件。
    这样,如果在重用的组件中发现了一个漏洞,将容易更新该组件。 [updateable_reused_components]

    The project meets this criterion by using standard Python package management systems, such as pip and poetry, to manage external dependencies. All reused components are listed in the pyproject.toml and poetry.lock files, making it easy to identify and update them. These files ensure that dependencies are managed in a centralized and consistent manner.

    Additionally, the project uses GitHub Dependabot to automatically monitor and suggest updates for dependencies when vulnerabilities or new versions are detected. For more details, see the pyproject.toml file: https://github.com/nikhilxsunder/fedfred/blob/main/pyproject.toml.



    该项目应避免使用已弃用或过时的功能和API,如果FLOSS替代品在其使用的技术集合(“技术堆栈”)中以及项目支持的大多数用户中可用(以便用户可以随时访问该替代品)。 [interfaces_current]

    The project avoids using deprecated or obsolete functions and APIs by adhering to modern Python standards and regularly updating its dependencies. The project uses tools like pylint, mypy, and bandit to identify deprecated or unsafe code patterns. Additionally, dependency updates are managed through poetry and monitored using GitHub Dependabot to ensure compatibility with the latest versions of libraries.

    For more details, see the CONTRIBUTING.md file: https://github.com/nikhilxsunder/fedfred/blob/main/CONTRIBUTING.md.


  • 自动测试套件


    必须将自动测试套件应用于至少一个分支的共享代码库的每次签入。该测试套件必须生成关于测试成功或失败的报告。 [automated_integration_testing]

    The project applies an automated test suite on each check-in to the shared repository for the main branch. This is implemented using GitHub Actions workflows, which run the test suite automatically on every push and pull request. The test suite uses pytest and generates a report on test success or failure.

    For more details, see the CONTRIBUTING.md file: https://github.com/nikhilxsunder/fedfred/blob/main/CONTRIBUTING.md and the GitHub Actions workflows in the repository: https://github.com/nikhilxsunder/fedfred/actions.



    该项目必须为过去六个月内修复的至少50%的错误,在自动化测试套件中添加回归测试。 [regression_tests_added50]

    The project includes regression tests for bugs fixed within the last six months as part of its automated test suite. All new functionality and bug fixes are required to have corresponding tests, as documented in the CONTRIBUTING.md file: https://github.com/nikhilxsunder/fedfred/blob/main/CONTRIBUTING.md.

    Additionally, the CHANGELOG.md file (https://github.com/nikhilxsunder/fedfred/blob/main/CHANGELOG.md) tracks bug fixes, and the associated tests are added to the tests directory to ensure coverage and prevent regressions.



    如果有至少一个FLOSS工具可以以所选语言度量此条款,该项目的FLOSS自动测试套件必须具有至少80%语句覆盖率。 [test_statement_coverage80]

    The project currently has an overall test coverage of 40%, as documented in the TEST_COVERAGE.md file: https://github.com/nikhilxsunder/fedfred/blob/main/TEST_COVERAGE.md. While the project does not yet meet the 80% statement coverage requirement, efforts are underway to improve test coverage, with a goal of achieving at least 80% overall coverage.

    The project uses pytest with the pytest-cov plugin to measure test coverage, and contributors are encouraged to write tests for all new functionality and bug fixes to help meet this goal.


  • 新功能测试


    该项目必须具有正式的书面策略,一旦添加了主要的新功能,新功能的测试必须被添加到自动测试套件中。 [test_policy_mandated]

    The project has a formal written policy requiring that tests for all new functionality be added to the automated test suite. This policy is documented in the CONTRIBUTING.md file: https://github.com/nikhilxsunder/fedfred/blob/main/CONTRIBUTING.md.

    The policy states:

    • All new functionality must include appropriate tests in the automated test suite.
    • Tests should cover both success and error conditions, including edge cases.
    • Pull requests without adequate test coverage will not be merged.

    This ensures that the test suite remains comprehensive and up-to-date as the project evolves.



    该项目必须在其关于变更建议的书面指导中包括要为主要新功能添加测试的策略。 [tests_documented_added]
  • 警告标志


    在实际允许时,项目必须最大限度地严格修复项目生成的软件中的警告。 [warnings_strict]

    Yes, the project uses maximum strictness with warnings where practical. We enforce a high pylint score (9.0+), use strict type checking in mypy (with most error flags enabled), and run thorough security checks with bandit. These strict settings are enforced in CI for all PRs, and our CONTRIBUTING.md document explicitly requires all new code to pass these strict checks.


  • 安全开发知识


    该项目必须实施安全设计原则(来自“know_secure_design”)(如适用)。如果项目不生产软件,请选择“不适用”(N/A)。 [implement_secure_design]

    The project implements secure design principles as outlined in the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md. These principles include:

    1. Fail-Safe Defaults: The API client enforces secure defaults, such as HTTPS for all communications and strict parameter validation.
    2. Complete Mediation: All API requests verify authentication and authorization, ensuring no bypassable access points.
    3. Economy of Mechanism: The codebase is modular and avoids unnecessary complexity, focusing on simplicity and maintainability.
    4. Separation of Privilege: The project recommends storing API keys in environment variables or secure vaults, separate from application code.
    5. Open Design: The project is open source, relying on proper key management and secure practices rather than obscurity.

    These principles ensure that the software is secure by design and adheres to best practices for secure development.


  • 使用基础的良好加密实践

    请注意,某些软件不需要使用加密机制。

    由项目产生的软件中的默认安全机制不得取决于具有已知严重弱点(例如,SHA-1密码散列算法或SSH中的CBC模式)的加密算法或模式。 [crypto_weaknesses]

    The project does not depend on cryptographic algorithms or modes with known serious weaknesses. It uses secure cryptographic libraries provided by Python's standard library or well-maintained third-party libraries, such as cryptography or hashlib, which default to secure algorithms like SHA-256 or AES-GCM.

    For more details on the project's security practices, see the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.



    该项目应该支持多种加密算法,如果一个被破解,用户可以快速切换。普通的对称密钥算法包括AES,Twofish和Serpent。通用密码散列算法的选择包括SHA-2(包括SHA-224,SHA-256,SHA-384和SHA-512)和SHA-3。 [crypto_algorithm_agility]

    The project does not directly implement cryptographic algorithms but relies on well-maintained Python libraries like cryptography and hashlib for cryptographic operations. These libraries support multiple cryptographic algorithms, including AES, SHA-2, and SHA-3, ensuring algorithm agility. Users can leverage these libraries to switch algorithms if needed. For more details, see the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.



    该项目必须支持在与其他信息(如配置文件,数据库和日志)分离的文件中存储身份验证凭据(如密码和动态令牌)以及私有加密密钥,并允许用户更新和替换它们,而无需重新编译代码。如果项目从不处理身份验证凭据和私有加密密钥,请选择“不适用”(N/A)。 [crypto_credential_agility]

    The project processes authentication credentials, such as API keys, but does not store them directly. It supports storing these credentials separately from other information by recommending the use of environment variables or secure vaults. Users can update and replace these credentials without requiring code recompilation. This is documented in the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.



    该项目产生的软件应该支持所有网络通信的安全协议,如SSHv2或更高版本,TLS1.2或更高版本(HTTPS),IPsec,SFTP和SNMPv3。默认情况下,FTP,HTTP,Telnet,SSLv3或更早版本和SSHv1等不安全协议将被禁用,只有在用户专门配置时才启用。如果项目生成的软件不支持网络通信,请选择“不适用”(N/A)。 [crypto_used_network]

    The software produced by the project communicates with the FRED API exclusively over HTTPS, which uses TLS 1.2 or later for secure network communications. Insecure protocols such as HTTP are not supported. This ensures that all network communications are encrypted and secure by default.

    For more details, see the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.



    项目生成的软件(如果支持或使用TLS)应该至少支持TLS版本1.2。请注意,TLS的前身称为SSL。如果软件不使用TLS,请选择“不适用”(N/A)。 [crypto_tls12]

    The software produced by the project communicates with the FRED API exclusively over HTTPS, which uses TLS 1.2 or later for secure communication. Therefore, this criterion is met. For more details, see the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.



    由项目生成的软件必须,如果它支持TLS,则在使用TLS(包括子资源)时默认执行TLS证书验证。如果软件不使用TLS,请选择“不适用”(N / A)。 [crypto_certificate_verification]

    The software produced by the project supports TLS and performs TLS certificate verification by default for all HTTPS communications. This ensures secure connections when interacting with the FRED API and other resources. Certificate verification is enforced by the underlying HTTP client library (httpx) used in the project.

    For more details, see the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.



    项目生成的软件(如果支持TLS)必须在发送具有私有信息(如安全Cookie)的HTTP头之前执行证书验证。如果软件不使用TLS,请选择“不适用”(N/A)。 [crypto_verification_private]

    The software produced by the project supports TLS and performs certificate verification before sending HTTP headers with private information. This is enforced by the underlying HTTP client library (httpx), which ensures that all HTTPS connections verify certificates by default.

    For more details, see the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.


  • 安全发布


    该项目必须加密签名旨在广泛使用的项目结果的发布,并且必须有一个书面流程,向用户解释如何获取公共签名密钥并验证签名。这些签名的私钥不得在项目网站上直接向公众发布。如果发行版本不适用于广泛使用,请选择“不适用”(N/A)。 [signed_releases]

    The project cryptographically signs its releases intended for widespread use. All releases are signed with a GPG key, and the public key is made available for users to verify the signatures. The process for obtaining the public signing key and verifying signatures is documented in the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.

    To verify a release:

    1. Download the public GPG key from: https://raw.githubusercontent.com/nikhilxsunder/fedfred/main/fedfred_public_key.asc.
    2. Import the key: gpg --import fedfred_public_key.asc.
    3. Verify the release signature using: gpg --verify <release>.asc <release>.

    The private key used for signing is securely stored and is not present on public distribution sites.



    建议在版本控制系统中,每个重要版本标签(作为主要版本的一部分的标签,次要版本或修复公开提到的漏洞)都按照signed_releases中的要求进行加密签名,并可验证。 [version_tags_signed]

    The project cryptographically signs important version tags using GPG. Each release is signed and can be verified by users to ensure authenticity. The process for verifying signed tags is documented in the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.

    To verify a signed tag:

    Download the public GPG key: https://raw.githubusercontent.com/nikhilxsunder/fedfred/main/fedfred_public_key.asc. Import the key: gpg --import fedfred_public_key.asc. Verify the tag: git tag -v . This ensures that all major, minor, and vulnerability-fix releases are securely signed and verifiable.


  • 其他安全问题


    项目结果必须检查来自潜在不受信任来源的所有输入,以确保它们有效( *白名单*),如果对数据有限制,则拒绝无效输入。 [input_validation]

    The project ensures input validation by implementing strict checks on all inputs from potentially untrusted sources. This is done using an allowlist approach, where inputs are validated against predefined rules and constraints. For example:

    Parameter Validation: The __parameter_validation method in the FredAPI class validates all API parameters, ensuring they meet specific criteria such as type, format, and value ranges. Type Annotations: The project uses Python's type hints (PEP 484) to enforce correct data types for function parameters and return values. Custom Validation Logic: Inputs like dates, category IDs, and series IDs are validated for format and logical correctness (e.g., valid date formats, non-negative integers). These validation mechanisms ensure that invalid or malicious inputs are rejected before processing. For more details, see the fedfred.py file: https://github.com/nikhilxsunder/fedfred/blob/main/src/fedfred/fedfred.py.



    加固机制应该用于项目生产的软件,以便软件缺陷不太可能导致安全漏洞。 [hardening]

    The project incorporates hardening mechanisms to reduce the likelihood of software defects resulting in security vulnerabilities:

    HTTP Security: The project enforces HTTPS for all API communications, ensuring secure data transmission. Static Analysis: Tools like bandit are used to identify and mitigate common security issues in Python code. Dependency Management: Regular updates and dependency scanning with GitHub Dependabot ensure that third-party libraries are secure. Type Safety: The use of Python type hints and static type checking with mypy helps prevent undefined behavior. For more details, see the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.



    该项目必须提供一个保证案例,证明其满足安全要求。保证案例必须包括:对威胁模型的描述,明确确定信任边界,确定设计原则得到适用,以及常见安全弱点已经被消减。 (需要网址) [assurance_case]

    The project provides an assurance case that justifies why its security requirements are met in the SECURITY.md file: https://github.com/nikhilxsunder/fedfred/blob/main/SECURITY.md.

    The assurance case includes:

    Threat Model: The SECURITY.md file identifies potential threats, such as insecure API key handling, injection in API parameters, and certificate verification bypass. Trust Boundaries: The document defines trust boundaries, such as the separation of API keys from application code and the use of HTTPS for all communications. Secure Design Principles: The project follows secure design principles, including fail-safe defaults, complete mediation, and separation of privilege, as outlined in the Security Design Principles section. Countering Common Weaknesses: The project addresses common implementation security weaknesses, such as dependency vulnerabilities, insecure deserialization, and regular expression denial of service (ReDoS), through dependency scanning, strict input validation, and careful design. This comprehensive assurance case demonstrates the project's commitment to meeting its security requirements.


  • 静态代码分析


    如果至少有一个FLOSS工具能够以所选择的语言实现此条款,则该项目必须至少使用一个具有规则或方式的静态分析工具来查找分析语言或环境中的常见漏洞。 [static_analysis_common_vulnerabilities]

    Yes, the project uses Bandit, a security-focused static analysis tool specifically designed to detect common vulnerabilities in Python code. Bandit is configured in our development environment, integrated into our pre-commit hooks, and runs automatically in our CI/CD pipeline. This helps us identify security issues early in the development process, as documented in our CONTRIBUTING.md file.


  • 动态代码分析


    如果由项目生成的软件包含使用内存不安全语言编写的软件(例如,C或C ++),项目必须至少使用一个动态工具(例如,fuzzer或web应用扫描程序)与一种检测缓冲区覆写等内存安全问题的机制组合例行使用。如果项目不生成以内存不安全语言编写的软件,请选择“不适用”(N/A)。 [dynamic_analysis_unsafe]

    Python is memory safe.



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

项目徽章条目拥有者: Nikhil Sunder.
最后更新于 2025-03-10 22:37:43 UTC, 最后更新于 2025-04-08 16:20:18 UTC。 最后在 2025-03-12 00:47:43 UTC 获得通过徽章。

后退