diff --git a/SECURITY.md b/SECURITY.md new file mode 100644 index 00000000..89bf53f8 --- /dev/null +++ b/SECURITY.md @@ -0,0 +1,152 @@ +# Security Policy + +## Reporting a Vulnerability + +**Please do not report security vulnerabilities through public GitHub issues, pull requests, Discord, or the forum.** + +You can report a vulnerability privately in either of these ways: + +1. **GitHub private vulnerability reporting** (preferred): go to the [Security tab](https://github.com/processing/libprocessing/security) of this repository and click **Report a vulnerability**. This opens a private GitHub Security Advisory that only Processing maintainers can see. +2. **Email**: responsible.disclosure@processingfoundation.org + +### Reporting Channels + +1. Security Advisories in this repository are received by Processing admins/maintainers +2. Responsible Disclosure email reports are received by Processing Foundation staff + +### What to Include + +A useful report includes: + +- The affected component (for example: `processing_render`, `processing_core`, the C FFI in `processing_ffi`, the Python package `processing_py` / `processing_pyo3`, `processing_wasm`, `processing_audio`, `processing_midi`, `processing_input`, `processing_webcam`, `processing_cuda`) +- The libprocessing version (or `processing_py` wheel version), the operating system, and the graphics backend (Metal, Vulkan, DX12, WebGPU) you tested on +- A brief summary of the impact +- Clear steps to reproduce, and a proof of concept if you have one + +## Supported Versions + +libprocessing is pre-1.0. Security fixes are made against the `main` branch and shipped in the next tagged release. We do not backport fixes to older releases. + +| Version | Supported | +| ------------------------ | ------------------ | +| `main` | :white_check_mark: | +| Latest tagged release | :white_check_mark: | +| Older releases | :x: | + +If you are on an older version, please update to the latest release from [GitHub Releases](https://github.com/processing/libprocessing/releases) or [PyPI](https://pypi.org/project/processing-py/) before reporting. + +## What to Expect + +- We will acknowledge your report within 72 hours +- We will provide regular updates about our progress +- Once the issue is confirmed and fixed, we may ask you to verify the solution + +## Disclosure Policy + +- Please do not disclose the vulnerability publicly until we have had a chance to address it +- We do not offer bounties as we are a non-profit organization +- We appreciate your efforts to responsibly disclose your findings + +## Scope + +This policy covers the code in this repository, including: + +- The Rust crates in `crates/` and the tools in `tools/` +- The Python package (`processing_py`), as published to PyPI as wheels and an sdist +- The C FFI shared libraries (`processing_ffi`), as published to GitHub Releases +- The WebAssembly bindings (`processing_wasm`) +- The documentation site built from `docs/` +- The CI, release, and publishing pipeline in `.github/workflows` + +### Out of Scope + +libprocessing is a library for writing and running code. **A sketch (a Rust, Python, C, or JavaScript program using this library) running arbitrary code on your computer is expected behavior, not a vulnerability.** The following are generally out of scope: + +- Malicious behavior in a sketch you chose to run +- Memory errors caused by the caller misusing `unsafe` Rust or the raw C FFI (for example, passing invalid pointers or using a handle after it has been destroyed). Undefined behavior reachable from safe Rust, Python, or JavaScript APIs **is** in scope. +- Crashes or panics with no further impact (please file these as regular issues) +- Vulnerabilities in third-party dependencies (such as wgpu, PyO3, cpal, or lygia) that are already publicly known and fixed upstream, unless libprocessing's use of them makes the issue exploitable in a new way. A pull request or issue to update the dependency is welcome. Issues in our Bevy fork (`processing/bevy`) may be reported here. + +The following **are** in scope, for example: + +- Memory corruption or undefined behavior reachable through the safe Rust, Python, or WebAssembly APIs +- Loading an asset (image, shader, model, font, audio file) leading to memory corruption or code execution +- Code running **without** the user's clear intent, for example through hot reload picking up files the user did not choose to run +- Tampering with the wheels on PyPI or the binaries on GitHub Releases +- Leaked credentials or weaknesses in our build, publishing, or release process, including CI workflows that run on untrusted pull requests + +Vulnerabilities in other Processing Foundation projects should be reported to that project. For the processing.org website or download servers, use the email address above. + +## Accidental Disclosure: Never Share Vulnerabilities Publicly! + +Please do not report security vulnerabilities in a public channel. If you notice a vulnerability being disclosed in a public channel (whether on Discord, the forum, GitHub, or other platforms), please flag it to a moderator immediately. + +If any moderator in our online community spaces notices something that is plausibly a security vulnerability disclosure (you don't need to verify deeply at this stage, false positive is OK), they should: + +1. screenshot and send to responsible.disclosure@processingfoundation.org +2. delete the public content if possible +3. reach out to the poster with a link to this SECURITY.md and a brief explanation that the content was taken down for security reasons + +## Incident Response Process + +Who handles incoming reports of security vulnerabilities? Who responds to security incidents? A mix of Processing Foundation staff, current Processing maintainers, and Processing contributors, taking on the following roles and responsibilities: + +| Role | Responsibility | +| ----------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| Finder / Reporter | Credited when all reporter expectations (below) are met. | +| Incident Lead | First responder; owns the report end-to-end. By default, this is the Project Lead. Handoffs only with a written status summary. Owns advisory publication, and reporter notification. | +| Implementer(s) | Develops the fix; may be a maintainer or contributor nominated by Incident Lead or maintainer(s). | +| Reviewer(s) | At least one other maintainer reviews in the private fork before release. | +| Release Manager | Builds and publishes the patched release (PyPI wheels and sdist, and FFI binaries on GitHub Releases, as applicable). | + +Whoever is available to claim the Incident Lead role starts as soon as they can with Phase 0. + +### Phase 0 — Intake + +Incident Lead: + +- Notifies relevant people, to see which potential implementers are available +- Moves the conversation into a GitHub Security Advisory, if it is not already on there. + +### Phase 1 — Triage & Classification + +Acknowledge receipt to the reporter within **72H**, along with triage & classification (below). + +Reproduce the issue, potentially iterating with the reporter for more information. + +Notify along private maintainer chat channels. + +Is something a security vulnerability or incident? Use CIA (Confidentiality, Integrity, Availability): + +- (0) Not a problem: cannot reproduce, or behavior is expected (see [Out of Scope](#out-of-scope)). Close with explanation. +- (1) Public bug: problem is real but no CIA impact. Respond to the reporter with explanation, but fix openly in a normal PR. +- (2) Vulnerability: impacts CIA (confirmed or plausibly demonstrated), but no evidence of exploitation. Move on to Phase 3 (Fix) +- (3) Incident, including a High-Severity Vulnerability without logs to rule out past exploit, or any compromise of release credentials (PyPI publishing, tag push rights): Move on to Phase 2 (Expedited Report) and then 3 (Fix) + +### Phase 2 — (Incidents Only) Expedited Report + +In case of an incident, we have some specific reporting responsibilities, which are also fulfilled within **72H** from the initial report. If release credentials may be compromised, revoke them immediately: review PyPI project owners and the trusted publisher configuration, the `pypi` GitHub environment's protection rules, and who can push `v*` tags (which trigger the release workflow). + +### Phase 3 — Private Fix + +The GitHub Security Advisory (GHSA) thread is the main place for technical discussion, and enables working on a fix in a private repository with a specific set of collaborators. In the GHSA workflow, there is a severity scoring tool that uses CVSS. + +Timing of the fix depends on the CVSS score: + +1. Critical: act immediately, as soon as possible +2. High/medium: target patch completion or release within about a week +3. Low: batch into routine releases + +### Phase 4 — Release & Disclosure + +- Merge the fix and publish a patched release; verify that the published PyPI wheels and GitHub Release binaries contain the fix +- Publish the advisory and describe the patch in the release notes +- Notify the reporter(s) and everyone who worked on the fix + +## Reporter Expectations + +Reporters are offered credit in GHSA if their GitHub username is known and if their report: + +- Contains a brief and useful summary, plus clear steps to reproduce +- Focuses on one report per defect, and avoids spurious LLM-generated reports +- Is supportive of the community