Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ the generated HTML also remains available as an offline snapshot. See
- **Bugs and ideas:** open an issue with the template. Say what you expected and what happened.
- **Large changes:** open an issue first, so we can agree the approach before you build it.

Read [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the design and
Read [GOVERNANCE.md](GOVERNANCE.md) for who decides what, [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for the design,
[docs/ASSURANCE.md](docs/ASSURANCE.md) for why it is secure, and
[docs/HANDOFF.md](docs/HANDOFF.md) for what is done and what is next.
The handoff also contains historical notes; its current snapshot and the code take
precedence over old next-step lists. User setup is in
Expand Down Expand Up @@ -62,8 +63,9 @@ Normal CI does not run the ignored hardware or real-network tests.
## What a good pull request has

- **One change.** A fix or a feature, not both.
- **Tests with the code.** New logic gets tests in the same pull request, above all pure
functions and anything security relevant.
- **Tests with the code.** This is required: new functionality and bug fixes must add tests
to the automated suite in the same pull request, above all for pure functions and anything
security relevant. A pull request without them needs a reason in its description.
- **Clippy clean.** CI builds with `-D warnings`.
- **Docs kept true.** If your change alters what Veil protects, what it depends on, or what other
parties can see, update [docs/TRANSPARENCY.md](docs/TRANSPARENCY.md) in the same pull request.
Expand All @@ -72,6 +74,13 @@ Normal CI does not run the ignored hardware or real-network tests.
lines of code. A new dependency must pass `tools/licences.py`.
- **Small files.** Aim for under 500 lines per file. Split by responsibility.

## Coding standards

Rust code follows the [Rust API Guidelines](https://rust-lang.github.io/api-guidelines/) and
the [Rust style guide](https://doc.rust-lang.org/style-guide/), formatted with `rustfmt` (not
yet enforced in CI, see #140). Clippy enforces the rest: CI runs it on all targets with
`-D warnings`. Python tools follow [PEP 8](https://peps.python.org/pep-0008/) (not checked).

## Writing style

Docs and interface text use plain English: short sentences, one idea each, UK spelling. Say
Expand Down
48 changes: 48 additions & 0 deletions GOVERNANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# Governance

Veil is a small project run by its maintainers. UCS Labs (the UCSLabs GitHub organisation)
owns the repository, the release environment and the signing accounts.

## How decisions are made

- **Product direction and the roadmap:** the lead maintainer decides, after discussion in
issues or pull requests. Decisions that change the mission or trust model are recorded in
[docs/ROADMAP.md](docs/ROADMAP.md) or as an ADR in [docs/adr/](docs/adr/).
- **Code changes:** go through a pull request. CI must pass, including the required checks
on `main`. [CODEOWNERS](.github/CODEOWNERS) asks the right maintainer to review.
- **Releases:** any maintainer may cut, tag and publish a release by following
[docs/RELEASING.md](docs/RELEASING.md). The organisation owner sets release, signing and
supply-chain policy ([docs/CODE_SIGNING.md](docs/CODE_SIGNING.md)) and can stop a release.
- **Disagreement:** discuss it on the issue or pull request. If the maintainers still
disagree, the lead maintainer decides product questions and the organisation owner decides
release and security-process questions.

## Roles

| Role | Who | Responsibilities |
|---|---|---|
| Lead maintainer | @Jeremy8776 | Product direction, roadmap, architecture, default code review, triage of issues |
| Organisation owner and release maintainer | @benandez | Repository and organisation settings, releases, Windows signing, CI, dependency and supply-chain policy, review of security-sensitive paths (see CODEOWNERS), security reports |
| Maintainer | @James-Chapman | Code and review, with write access |
| Contributor | Anyone | Issues and pull requests, as in [CONTRIBUTING.md](CONTRIBUTING.md) |

Maintainers have write access to the repository. Only organisation owners change settings,
secrets and branch protection.

## Continuity

Veil aims to keep going if any one person stops. In particular:

- The code, issues, releases and CI live in the UCSLabs organisation, not a personal account.
- Release builds and signing run in GitHub Actions. Windows signing uses Azure Artifact
Signing through a federated identity, so no person holds a signing certificate.
- The release-manifest signing key is kept as a secret of the `release` environment; its
public half is in `crates/veil-app/release-key.pub`.
- Every maintainer can review, merge and tag a release. The release steps are written down
in [docs/RELEASING.md](docs/RELEASING.md).
- If a maintainer leaves, an organisation owner removes their access and reassigns their
CODEOWNERS entries.

**Known gap:** UCSLabs has one organisation owner today. If that person stopped, nobody
could change settings, secrets or branch protection. Adding a second owner is tracked in
[#141](https://github.com/UCSLabs/veil/issues/141).
17 changes: 15 additions & 2 deletions SECURITY.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,21 @@ Please report it privately, not in a public issue:
2. Choose **Report a vulnerability**.
3. Say what you found, how to reproduce it, and what an attacker gains.

Only the maintainer sees the report. You get a reply when it has been read. This is a
one-person project, so there is no fixed response time, and no bug bounty.
Only repository admins and security managers see the report. There is no bug bounty.

## What happens next

1. **Acknowledge:** a maintainer replies when the report has been read, aiming for 14 days.
2. **Assess:** we reproduce it, judge the severity, and agree the details with you.
3. **Fix:** we fix it in the advisory's temporary private fork, with tests, and release a new version.
We aim to fix a confirmed vulnerability of medium or higher severity within 60 days.
4. **Disclose:** we publish a GitHub security advisory, request a CVE where it applies, and
note the fix in [CHANGELOG.md](CHANGELOG.md).

## Credit

We credit reporters by name in the advisory and the changelog, unless you ask to stay
anonymous.

## What counts

Expand Down
59 changes: 59 additions & 0 deletions docs/ASSURANCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Security assurance case

This page argues why Veil meets its security requirements, and points to the evidence. It
does not repeat the detail: follow the links.

## Requirements

What Veil promises, and what it does not, is in [TRANSPARENCY.md](TRANSPARENCY.md). In short:
only admitted members can read or change call media, names and chat; removed members lose
access to new media; helper nodes (relays, forwarders, rendezvous) never get conversation
keys; and Veil sends no telemetry and uses no default servers.

## Threat model and trust boundaries

The threat model is in [ARCHITECTURE.md §5.2](ARCHITECTURE.md#52-threat-model). The trust
boundaries are:

| Boundary | Untrusted side | Trusted side |
|---|---|---|
| Network | Every packet from the network, including from members | The local Veil process after decryption and checks |
| Helper nodes | Relays, forwarders, rendezvous nodes | Members holding the MLS group keys |
| Admission | Invite links and join requests | The host's approval and the MLS commit |
| Update | Downloaded packages | The signed release manifest checked against the built-in public key |
| Embedding host app | Calls from another application | The engine's provider contract |

The roadmap's [data ownership and trust boundaries](ROADMAP.md#data-ownership-and-trust-boundaries)
section explains who owns which data.

## Secure design principles applied

- **Least privilege:** helper nodes see metadata only; relay-only members stay relay-only.
- **Fail closed:** frames that fail authentication or replay checks are dropped; admission
needs host approval; an update with a bad signature is refused.
- **Economy of mechanism:** published protocols only (MLS, RFC 9420) and audited libraries;
no home-grown cryptography.
- **Complete mediation:** every received frame is decrypted and checked before use; group
membership changes go through MLS commits.
- **Open design:** the protocol and code are public; the known leaks are listed in
TRANSPARENCY.md.
- **No unsafe code** outside the documented exceptions (the media FFI modules and the
Android launcher): the workspace sets `unsafe_code = "forbid"` (TRANSPARENCY.md §5 lists
them).

## Countering common weaknesses

| Weakness | Counter-measure | Evidence |
|---|---|---|
| Memory errors | Rust, `unsafe` forbidden by default | `Cargo.toml` workspace lints |
| Malformed input from the network | Parsers reject invalid input; fuzzing of the frame, app-message and UPnP parsers | `fuzz/`, `.github/workflows/fuzz.yml` |
| Weak or misused cryptography | MLS via openmls with `MLS_128_DHKEMX25519_CHACHA20POLY1305_SHA256_Ed25519` (128-bit security level), RustCrypto and dalek crates | [ARCHITECTURE.md §5.1](ARCHITECTURE.md#51-layers) |
| Vulnerable dependencies | cargo-deny advisories in CI and daily, Dependabot | `deny.toml`, `.github/workflows/audit.yml` |
| Code-level flaws | clippy with `-D warnings`, CodeQL required on `main`, SonarQube Cloud | `.github/workflows/ci.yml`, `codeql.yml` |
| Tampered updates or workflows | Signed release manifest, Authenticode, pinned actions, zizmor, tag-only release environment | [RELEASING.md](RELEASING.md), [CODE_SIGNING.md](CODE_SIGNING.md) |

## Known gaps

Veil has had no independent security audit. The known leaks and untested areas are in
TRANSPARENCY.md sections 2, 6 and 7. Report problems as described in
[SECURITY.md](../SECURITY.md).
4 changes: 2 additions & 2 deletions docs/RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ packages. Never describe them as OS-signed just because the checksum signature i

## Publish and check

Publishing needs the maintainer's authorization; a request to cut and publish a release
provides it. Replace generated notes with clear changes, upgrade requirements and known
Any maintainer may publish ([GOVERNANCE.md](../GOVERNANCE.md#how-decisions-are-made)); a
maintainer's request to cut and publish a release is that authorization. Replace generated notes with clear changes, upgrade requirements and known
limits. Publish the verified draft as a normal release and mark it latest.

Read back `draft=false`, `prerelease=false`, the tag and all ten assets. Confirm the
Expand Down
Loading