discovery-media-player

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

没有一套可以保证软件永远不会有缺陷或漏洞的做法;如果规范或假设是错误的,即使合适的方法也可能失败。也没有哪些做法可以保证一个项目能够维持健康和运作良好的开发者社区。但是,遵循最佳做法可以帮助改善项目的成果。例如,一些做法可以在发布之前进行多人评估,这可以帮助您找到其他难以找到的技术漏洞,并帮助建立信任,并希望不同公司的开发人员之间进行重复的交互。要获得徽章,必须满足所有“必须”和“禁止”的条款,满足所有“应该”条款或有合适的理由,所有“建议”条款必须满足或未满足(至少希望考虑)。欢迎通过 GitHub网站创建问题或提出请求进行反馈。另外还有一个一般讨论邮件列表

如果这是您的项目,请在项目页面上显示您的基准徽章状态!基准徽章状态如下所示: 项目14197的基准徽章等级为baseline-2 以下是如何嵌入基准徽章:
您可以通过将其嵌入到Markdown文件中来显示您的基准徽章状态:
[![OpenSSF Baseline](https://www.bestpractices.dev/projects/14197/baseline)](https://www.bestpractices.dev/projects/14197)
或者将其嵌入到HTML中:
<a href="https://www.bestpractices.dev/projects/14197"><img src="https://www.bestpractices.dev/projects/14197/baseline"></a>


这些是基准等级2的标准。 这些是标准版本 v2026.02.19。

Baseline Series: 基准等级1 基准等级2 基准等级3

        

 基本

  • 常规

    请注意,其他项目可能使用相同的名称。

    Self-hosted document viewer: per-recipient tracked links, reading analytics, live presentation. The core knows nothing about the app hosting it.

    请使用 SPDX许可证表达格式;例子包括“Apache-2.0”,“BSD-2-Clause”,“BSD-3-Clause”,“GPL-2.0+”,“LGPL-3.0 +”,“MIT”和“(BSD-2-Clause OR Ruby)”。
    如果有多种语言,请将它们列为逗号分隔值(可选空格),并将它们从最多到最少使用。如果有长列表,请至少列出前三个最常见的列表。如果没有语言(例如,这是仅文档或仅测试项目),请使用单个字符“ - ”。请使用每种语言的常规大小写,例如“JavaScript”。
    通用平台枚举(CPE)是用于信息技术系统,软件和软件包的结构化命名方案。在报告漏洞时,它可用于多个系统和数据库。

 控制 19/19

  • 控制


    当执行CI/CD任务且未指定权限时,CI/CD系统必须将任务的权限默认为管道中授予的最低权限。 [OSPS-AC-04.01]
    配置项目的设置,默认情况下为新管道分配最低可用权限,仅在特定任务需要时才授予额外权限。

    All eight workflows declare permissions: at the top level, so no job ever runs on an unspecified default. release.yml starts from permissions: {} — no scope at all — and grants each job only what it needs: the build job contents: read, the publish job adding id-token: write for OIDC and nothing more. ci.yml is contents: read throughout and scorecard.yml is read-all. A job needing a write scope names it at job level rather than inheriting one.



    当创建正式发布时,该发布必须分配一个唯一的版本标识符。 [OSPS-BR-02.01]
    为项目生成的每个发布分配一个唯一的版本标识符,遵循一致的命名约定或编号方案。示例包括SemVer、CalVer或git提交id。

    Each release carries a unique identifier: package.json declares it, npm publishes under that exact version and refuses to republish it, git carries a matching vX.Y.Z tag, and a running instance reports the same string through GET /api/doc?contract=1 so an operator can tell what is serving. The current release is v0.1.128. A release preflight guard refuses a tag whose version does not match what the repository declares, and another refuses a tag pointing at a commit that does not belong to main.



    当创建正式发布时,该发布必须包含功能和安全修改的描述性日志。 [OSPS-BR-04.01]
    确保所有发布都包含描述性的变更日志。建议确保变更日志是人类可读的,并且包含超出提交消息的详细信息,例如安全影响的描述或与不同用例的相关性。为确保机器可读性,请将内容放在markdown标题下,例如"## Changelog"。

    Every release ships notes covering functional and security-relevant changes. CHANGELOG.md carries a dated section per version in Keep a Changelog form — including, by name and date, the findings of the three external assessments of August 2026 and the version that fixed each — and the same content is published as the GitHub Release for that tag. tools/changelog.mjs fails CI when the version being released has no matching section, so a release cannot ship without a log.



    当构建和发布管道摄取依赖项时,它必须使用标准化工具(如果可用)。 [OSPS-BR-05.01]
    为您的生态系统使用通用工具,例如包管理器或依赖项管理工具,以在构建时摄取依赖项。这可能包括使用依赖项文件、锁文件或清单来指定所需的依赖项,然后由构建系统拉入。

    npm is the dependency manager, driven exclusively through npm ci; no workflow runs npm install. package-lock.json is committed and carries a Subresource-Integrity hash for every package in the transitive graph, so CI installs the graph the lockfile describes rather than whatever the registry served that morning. Build inputs outside npm are pinned by digest rather than tag — container base images by sha256, GitHub Actions by 40-character commit SHA — each enforced by a CI guard that refuses a floating reference. The policy is written down in docs/DEPENDENCIES.md.



    当创建正式发布时,该发布必须进行签名或在包含每个资产加密哈希值的签名清单中进行说明。 [OSPS-BR-06.01]
    在构建时使用加密签名或证明(例如GPG或PGP签名、Sigstore签名、SLSA来源或SLSA VSA)对所有发布的软件资产进行签名。在签名清单或元数据文件中包含每个资产的加密哈希值。

    Released assets are signed at build time. The npm package is published with npm publish --provenance under OIDC trusted publishing, producing a Sigstore-signed SLSA provenance attestation that names the tarball's cryptographic digest and binds it to the workflow, repository and commit that built it; a consumer verifies it with npm audit signatures. The container image is built with provenance: mode=max and an SBOM, and pushed to GHCR with build attestations under id-token: write. No long-lived signing credential exists to hold or to leak — the signature is obtained from the platform's identity at the moment of publication.



    当项目发布版本后,项目文档必须包含项目如何选择、获取和跟踪其依赖项的描述。 [OSPS-DO-06.01]
    建议在可公开查看的资源(如源代码存储库、项目网站或其他渠道)上与项目的技术和设计文档一起发布此信息。

    docs/DEPENDENCIES.md describes selection, acquisition and tracking. Selection: the bar a new dependency must clear, and why it is high for a component that runs beside an operator's commercial documents — the runtime tree is one package, pdfjs-dist, pinned exactly because it is the rendering engine and its upgrade is a decision rather than a bump. Acquisition: npm ci only, against a committed lockfile with integrity hashes, with digest pinning for images and commit-SHA pinning for actions. Tracking: the Dependabot policy — monthly, tooling grouped, an action's major arriving alone so it cannot hide in a batch — including the two upgrades deliberately held back, the reason for each, and why majors are not frozen elsewhere.



    项目文档必须包含如何构建软件的说明,包括所需的库、框架、SDK 和依赖项。 [OSPS-DO-07.01]
    建议将此信息与项目的贡献者文档一起发布,例如在 CONTRIBUTING.md 或其他开发者任务文档中。也可以使用 Makefile 目标或其他自动化脚本来记录此信息。

    CONTRIBUTING.md opens with the build: npm install, npm test, npm run lint, npm run typecheck, npm run build. It states the only prerequisite — Node 22 or later — and adds that there is nothing else to install, because the tests spin the player up in-process against a temporary folder and run offline. The browser bench and its single extra requirement are documented beside it: a Chrome already present on the machine, driven by playwright-core with no browser download, and PLAYER_E2E_CHROME to point at it if it lives somewhere unusual. README.md gives the same path for a fresh clone.



    在活动期间,项目文档必须包含有权访问敏感资源的项目成员列表。 [OSPS-GV-01.01]
    通过项目源代码存储库中的members.md、governance.md、maintainers.md或类似文件等工件记录项目参与者及其角色。这可以简单到在维护者列表中包含姓名或账户句柄,或者根据项目的治理更复杂。

    MAINTAINERS.md lists the project members and, in a dedicated table, exactly which sensitive resources each holds: repository admin, merge rights on main, GitHub Actions configuration, npm publishing, the GHCR image, and the security mailbox. There is currently one maintainer and no other account holds write access to the repository, which the file states explicitly rather than leaving to be inferred. It also records that no release credential is stored anywhere — publication authenticates through OIDC at the moment it runs, so there is no secret to hold, rotate, or lose.



    在活动期间,项目文档必须包含项目成员的角色和责任的描述。 [OSPS-GV-01.02]
    通过项目源代码存储库中的members.md、governance.md、maintainers.md或类似文件等工件记录项目参与者及其角色。

    MAINTAINERS.md describes the roles and what each answers for. The maintainer: review and merge, what the host contract may promise and when it may break, cutting releases and being answerable for what a published version contains, and triaging vulnerability reports within the timeline SECURITY.md commits to. Contributors: no invitation to wait for, the CLA that a workflow checks on every pull request, and the project's rule on tests. Operators: no access here, but asked to report a boundary the documentation did not predict. A Bus factor section states plainly what one maintainer costs and what it does not.



    在活动期间,项目文档必须包含代码贡献者指南,其中包括可接受贡献的要求。 [OSPS-GV-03.02]
    扩展项目文档中的CONTRIBUTING.md或CONTRIBUTING/的内容,以概述可接受的贡献要求,包括编码标准、测试要求和代码贡献者的提交指南。建议将该指南作为贡献者和批准者的真实来源。

    CONTRIBUTING.md states the requirements for an acceptable contribution. The project's one rule is that a behaviour worth keeping is worth a test that fails without it, and the requirement extends to the test's name: it must say which failure it prevents, not that it tests the happy path, and one that does not will be asked about in review. The same document covers what review looks for, how generated files are handled, commit and branch conventions, the language rule and the CLA; AGENTS.md records which conventions a CI guard enforces and which only review catches.



    处于活跃状态时,版本控制系统必须要求所有代码贡献者在每次提交时断言他们有合法授权提交相关的贡献。 [OSPS-LE-01.01]
    在项目的代码库中包含一个DCO,要求代码贡献者在每次提交时断言他们有合法授权提交相关贡献。使用状态检查以确保完成此断言。CLA也满足此要求。某些版本控制系统(例如GitHub)可能会在平台服务条款中包含此项。

    Every code contributor asserts their legal right to contribute through the CLA in CLA.md, and the assertion is enforced rather than assumed: .github/workflows/cla.yml checks it on every pull request, posts and updates a comment when a signature is missing, and records signatures on a dedicated branch. An unsigned pull request does not merge, and because branch protection makes pull requests the only route into main, no contribution reaches released code without the assertion having been made and recorded. The OSPS recommendation for this control names a CLA as satisfying it.



    当向主分支提交时,必须通过或手动绕过提交的任何自动化状态检查。 [OSPS-QA-03.01]
    配置项目的版本控制系统,要求所有自动化状态检查通过或在提交合并到主分支之前需要手动确认。建议不要将任何可选状态检查配置为批准者可能会绕过的通过或失败要求。

    main is protected and its status checks must pass before a pull request can merge. The required set covers lint, typecheck and the full 1515-test suite on Node 22 and 24, CodeQL, and the repository's own guards: every GitHub Action pinned to a commit SHA, the version comment beside each SHA telling the truth, container base images pinned to a digest, the committed browser bundles still matching their TypeScript sources, the published tarball shipping compiled JavaScript rather than raw TypeScript, and no plaintext credential in any tracked file. Direct pushes, which would bypass all of it, are refused.



    在接受提交之前,项目的CI/CD管道必须运行至少一个自动化测试套件,以确保更改符合预期。 [OSPS-QA-06.01]
    应在每次合并到主分支之前运行自动化测试。测试套件应在CI/CD管道中运行,结果应对所有贡献者可见。测试套件应在一致的环境中运行,并应以允许贡献者在本地运行测试的方式运行。测试套件的示例包括单元测试、集成测试和端到端测试。

    ci.yml runs on every pull request and every push to main, executing the full vitest suite — 1515 tests across 144 files — on Node 22 and 24, alongside lint and typecheck. Three further benches run in the same workflow rather than on a schedule: a browser bench driving a real Chromium including an axe-core accessibility pass, a bench against a real PostgREST and Postgres instead of a stub, and a cost bench that asserts on the number of database round trips per gesture, so a performance regression fails the build instead of surfacing on an invoice.



    当项目发布版本时,项目文档必须包括设计文档,展示系统中的所有操作和参与者。 [OSPS-SA-01.01]
    在项目文档中包括说明操作和参与者的设计。参与者包括可以影响系统中另一段的任何子系统或实体。确保为新功能或重大更改更新此文档。

    docs/ARCHITECTURE.md includes an Actors and actions section: a table of every actor — link recipient, internal reader, presenter, live attendee, host application, operator, maintainer — giving the actions each may perform and, in the column that matters most, where the decision is actually made. A second table covers the three non-human systems the design turns on: the file source and the SSRF guard that confines it to allow-listed origins, the database reached only from the server with no anonymous read policy on any table, and the host route behind PLAYER_HOST_FETCH_SECRET. The rest of the document explains the seam that makes those the only decision points.



    当项目发布版本时,项目文档必须包括对已发布软件资产的所有外部软件接口的描述。 [OSPS-SA-02.01]
    记录已发布软件资产的所有软件接口(API),解释用户如何与软件交互以及期望或产生什么数据。确保为新功能或重大更改更新此文档。

    docs/API.md is the English reference for what a host can call and what it must implement. docs/HOST-CONTRACT.md is the binding version of the same surface, carrying a dated journal of every boundary change, and it ships inside the published package — resolvable by a consumer as discovery-media-player/contrat. TypeScript declarations in types/ describe the interface to a compiler, and src/bridge.ts is the MIT-licensed postMessage contract a host application imports to talk to the player. A CI guard compares the declared public surface against what the package actually exports, so the documentation cannot drift from the code.



    当项目发布版本时,项目必须执行安全评估,以了解软件中可能发生的最可能和最具影响力的潜在安全问题。 [OSPS-SA-03.01]
    执行安全评估可以告知项目成员和下游消费者,项目了解软件中可能出现的问题。了解可能实现的威胁有助于项目管理和应对风险。此信息对下游消费者很有用,可以证明项目的安全敏锐度和实践。确保为新功能或重大更改更新此文档。

    SECURITY.md is the assessment. It names the file proxy as the highest-value target in the codebase, precisely because it takes a URL from a caller and fetches it server-side, and enumerates the outcomes treated as vulnerabilities: reaching a file outside an allow-listed storage origin, reading a document without the right link through slug guessing or a revoked link that still opens, taking a live presentation without its control token, escalating across the host boundary or leaking PLAYER_HOST_FETCH_SECRET into a URL or a log, and XSS against a nonce-based CSP. It also states what is out of scope and why. Three external assessments were carried out in August 2026 and are published unedited in docs/, with a follow-up ledger recording what was fixed, what was decided against, and the reason.



    处于活跃状态时,项目文档必须包括协调漏洞披露(CVD)的政策,并有明确的响应时间框架。 [OSPS-VM-01.01]
    在目录根目录创建一个SECURITY.md文件,概述项目的协调漏洞披露政策。包括报告漏洞的方法。设定项目将如何响应和处理报告问题的期望。

    SECURITY.md publishes the coordinated disclosure policy with explicit timeframes: acknowledgement within 72 hours, an assessment within 7 days, then a disclosure date agreed with the reporter, and credit in the changelog unless the reporter would rather not be named. It states which versions are supported, what is and is not treated as a vulnerability, and the design notes a tester needs before starting. .github/ISSUE_TEMPLATE/config.yml links the policy from the issue chooser, so a reporter meets it before opening a public issue.



    处于活跃状态时,项目文档必须提供一种方法,用于直接向项目内的安全联系人私下报告漏洞。 [OSPS-VM-03.01]
    为安全研究人员提供一种方式,以私下向项目报告漏洞。这可能是专用电子邮件地址、Web表单、VCS专用工具、安全联系人的电子邮件地址或其他方法。

    Private reporting is the required channel rather than an option, and there are two: GitHub private vulnerability reporting and security@3d-discovery.fr. SECURITY.md directs reporters to them instead of opening an issue, and the issue-template configuration puts the private form first, with the reason written: instances of this player serve commercial documents, and a public report would expose every operator before a fix exists. https://github.com/Juli1artha/discovery-media-player/blob/main/SECURITY.md



    处于活跃状态时,项目文档必须公开发布有关已发现漏洞的数据。 [OSPS-VM-04.01]
    在可预测的公共渠道(例如CVE条目、博客文章或其他媒体)中提供有关已知漏洞的信息。在可能的情况下,此信息应包括受影响的版本、消费者如何确定他们是否容易受到攻击以及缓解或修复的说明。

    Discovered issues are published in a predictable public channel. CHANGELOG.md carries a dated section per version naming security-relevant fixes and the version carrying each, so a consumer can tell from a version number whether they are affected and what to upgrade to; the same content is published as the GitHub Release for that tag. The findings of the three external assessments of August 2026 are published in full in docs/, kept in the state they were received because an assessment rewritten afterwards is no longer a trace, alongside a ledger of what was fixed and what was deliberately not. SECURITY.md commits to crediting reporters there. No CVE has been assigned to date; that changelog section is where one would appear.



该数据可在社区数据许可协议 – 许可性,版本 2.0 (CDLA-Permissive-2.0)下获取。这意味着数据接收方可以共享数据,无论是否经过修改,只要数据接收方在共享数据时提供本协议文本。请注明Julien Arthapignet和OpenSSF最佳实践徽章贡献者。

项目徽章条目拥有者: Julien Arthapignet.
最后更新于 2026-08-22 00:19:58 UTC, 最后更新于 2026-08-25 12:37:10 UTC。 最后在 2026-08-22 07:59:01 UTC 获得通过徽章。