discovery-media-player

Projects that follow the best practices below can voluntarily self-certify and show that they've achieved an Open Source Security Foundation (OpenSSF) best practices badge.

There is no set of practices that can guarantee that software will never have defects or vulnerabilities; even formal methods can fail if the specifications or assumptions are wrong. Nor is there any set of practices that can guarantee that a project will sustain a healthy and well-functioning development community. However, following best practices can help improve the results of projects. For example, some practices enable multi-person review before release, which can both help find otherwise hard-to-find technical vulnerabilities and help build trust and a desire for repeated interaction among developers from different companies. To earn a badge, all MUST and MUST NOT criteria must be met, all SHOULD criteria must be met OR be unmet with justification, and all SUGGESTED criteria must be met OR unmet (we want them considered at least). If you want to enter justification text as a generic comment, instead of being a rationale that the situation is acceptable, start the text block with '//' followed by a space. Feedback is welcome via the GitHub site as issues or pull requests There is also a mailing list for general discussion.

We gladly provide the information in several locales, however, if there is any conflict or inconsistency between the translations, the English version is the authoritative version.
If this is your project, please show your baseline badge status on your project page! The baseline badge status looks like this: Baseline badge level for project 14197 is baseline-2 Here is how to embed the baseline badge:
You can show your baseline badge status by embedding this in your markdown file:
[![OpenSSF Baseline](https://www.bestpractices.dev/projects/14197/baseline)](https://www.bestpractices.dev/projects/14197)
or by embedding this in your HTML:
<a href="https://www.bestpractices.dev/projects/14197"><img src="https://www.bestpractices.dev/projects/14197/baseline"></a>


These are the Baseline Level 2 criteria. These are criteria version v2026.02.19.

Baseline Series: Baseline Level 1 Baseline Level 2 Baseline Level 3

        

 Basics

  • General

    Note that other projects may use the same name.

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

    Please use SPDX license expression format; examples include "Apache-2.0", "BSD-2-Clause", "BSD-3-Clause", "GPL-2.0+", "LGPL-3.0+", "MIT", and "(BSD-2-Clause OR Ruby)". Do not include single quotes or double quotes.
    If there is more than one language, list them as comma-separated values (spaces optional) and sort them from most to least used. If there is a long list, please list at least the first three most common ones. If there is no language (e.g., this is a documentation-only or test-only project), use the single character "-". Please use a conventional capitalization for each language, e.g., "JavaScript".
    The Common Platform Enumeration (CPE) is a structured naming scheme for information technology systems, software, and packages. It is used in a number of systems and databases when reporting vulnerabilities.

 Controls 19/19

  • Controls


    When a CI/CD task is executed with no permissions specified, the CI/CD system MUST default the task's permissions to the lowest permissions granted in the pipeline. [OSPS-AC-04.01]
    Configure the project's settings to assign the lowest available permissions to new pipelines by default, granting additional permissions only when necessary for specific tasks.

    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.



    When an official release is created, that release MUST be assigned a unique version identifier. [OSPS-BR-02.01]
    Assign a unique version identifier to each release produced by the project, following a consistent naming convention or numbering scheme. Examples include SemVer, CalVer, or git commit 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.



    When an official release is created, that release MUST contain a descriptive log of functional and security modifications. [OSPS-BR-04.01]
    Ensure that all releases include a descriptive change log. It is recommended to ensure that the change log is human-readable and includes details beyond commit messages, such as descriptions of the security impact or relevance to different use cases. To ensure machine readability, place the content under a markdown header such as "## 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.



    When a build and release pipeline ingests dependencies, it MUST use standardized tooling where available. [OSPS-BR-05.01]
    Use a common tooling for your ecosystem, such as package managers or dependency management tools to ingest dependencies at build time. This may include using a dependency file, lock file, or manifest to specify the required dependencies, which are then pulled in by the build system.

    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.



    When an official release is created, that release MUST be signed or accounted for in a signed manifest including each asset's cryptographic hashes. [OSPS-BR-06.01]
    Sign all released software assets at build time with a cryptographic signature or attestations, such as GPG or PGP signature, Sigstore signatures, SLSA provenance, or SLSA VSAs. Include the cryptographic hashes of each asset in a signed manifest or metadata file.

    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.



    When the project has made a release, the project documentation MUST include a description of how the project selects, obtains, and tracks its dependencies. [OSPS-DO-06.01]
    It is recommended to publish this information alongside the project's technical & design documentation on a publicly viewable resource such as the source code repository, project website, or other channel.

    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.



    The project documentation MUST include instructions on how to build the software, including required libraries, frameworks, SDKs, and dependencies. [OSPS-DO-07.01]
    It is recommended to publish this information alongside the project's contributor documentation, such as in CONTRIBUTING.md or other developer task documentation. This may also be documented using Makefile targets or other automation scripts.

    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.



    While active, the project documentation MUST include a list of project members with access to sensitive resources. [OSPS-GV-01.01]
    Document project participants and their roles through such artifacts as members.md, governance.md, maintainers.md, or similar file within the source code repository of the project. This may be as simple as including names or account handles in a list of maintainers, or more complex depending on the project's governance.

    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.



    While active, the project documentation MUST include descriptions of the roles and responsibilities for members of the project. [OSPS-GV-01.02]
    Document project participants and their roles through such artifacts as members.md, governance.md, maintainers.md, or similar file within the source code repository of the project.

    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.



    While active, the project documentation MUST include a guide for code contributors that includes requirements for acceptable contributions. [OSPS-GV-03.02]
    Extend the CONTRIBUTING.md or CONTRIBUTING/ contents in the project documentation to outline the requirements for acceptable contributions, including coding standards, testing requirements, and submission guidelines for code contributors. It is recommended that this guide is the source of truth for both contributors and approvers.

    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.



    While active, the version control system MUST require all code contributors to assert that they are legally authorized to make the associated contributions on every commit. [OSPS-LE-01.01]
    Include a DCO in the project's repository, requiring code contributors to assert that they are legally authorized to commit the associated contributions on every commit. Use a status check to ensure the assertion is made. A CLA also satisfies this requirement. Some version control systems, such as GitHub, may include this in the platform terms of service.

    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.



    When a commit is made to the primary branch, any automated status checks for commits MUST pass or be manually bypassed. [OSPS-QA-03.01]
    Configure the project's version control system to require that all automated status checks pass or require manual acknowledgement before a commit can be merged into the primary branch. It is recommended that any optional status checks are NOT configured as a pass or fail requirement that approvers may be tempted to bypass.

    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.



    Prior to a commit being accepted, the project's CI/CD pipelines MUST run at least one automated test suite to ensure the changes meet expectations. [OSPS-QA-06.01]
    Automated tests should be run prior to every merge into the primary branch. The test suite should be run in a CI/CD pipeline and the results should be visible to all contributors. The test suite should be run in a consistent environment and should be run in a way that allows contributors to run the tests locally. Examples of test suites include unit tests, integration tests, and end-to-end tests.

    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.



    When the project has made a release, the project documentation MUST include design documentation demonstrating all actions and actors within the system. [OSPS-SA-01.01]
    Include designs in the project documentation that explains the actions and actors. Actors include any subsystem or entity that can influence another segment in the system. Ensure this is updated for new features or breaking changes.

    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.



    When the project has made a release, the project documentation MUST include descriptions of all external software interfaces of the released software assets. [OSPS-SA-02.01]
    Document all software interfaces (APIs) of the released software assets, explaining how users can interact with the software and what data is expected or produced. Ensure this is updated for new features or breaking changes.

    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.



    When the project has made a release, the project MUST perform a security assessment to understand the most likely and impactful potential security problems that could occur within the software. [OSPS-SA-03.01]
    Performing a security assessment informs both project members as well as downstream consumers that the project understands what problems could arise within the software. Understanding what threats could be realized helps the project manage and address risk. This information is useful to downstream consumers to demonstrate the security acumen and practices of the project. Ensure this is updated for new features or breaking changes.

    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.



    While active, the project documentation MUST include a policy for coordinated vulnerability disclosure (CVD), with a clear timeframe for response. [OSPS-VM-01.01]
    Create a SECURITY.md file at the root of the directory, outlining the project's policy for coordinated vulnerability disclosure. Include a method for reporting vulnerabilities. Set expectations for how the project will respond and address reported issues.

    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.



    While active, the project documentation MUST provide a means for private vulnerability reporting directly to the security contacts within the project. [OSPS-VM-03.01]
    Provide a means for security researchers to report vulnerabilities privately to the project. This may be a dedicated email address, a web form, VCS specialized tools, email addresses for security contacts, or other methods.

    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



    While active, the project documentation MUST publicly publish data about discovered vulnerabilities. [OSPS-VM-04.01]
    Provide information about known vulnerabilities in a predictable public channel, such as a CVE entry, blog post, or other medium. To the degree possible, this information should include affected version(s), how a consumer can determine if they are vulnerable, and instructions for mitigation or remediation.

    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.



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

Project badge entry owned by: Julien Arthapignet.
Entry created on 2026-08-22 00:19:58 UTC, last updated on 2026-08-25 12:37:10 UTC. Last achieved passing badge on 2026-08-22 07:59:01 UTC.