Skip to content
Merged
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
4 changes: 4 additions & 0 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,10 @@

<!-- Describe the tests you ran and how a reviewer can reproduce them. -->

## AI use

<!-- Was AI used for this change? If yes, which tool and for what. See AI_POLICY.md. -->

## Checklist

- [ ] `make verify` passes locally.
Expand Down
52 changes: 52 additions & 0 deletions AI_POLICY.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# AI Policy

## How this project is made

USBGuardGUI is written entirely by AI. The code, tests, packaging, CI and documentation
are produced by an AI coding assistant (Anthropic's Claude, through Claude Code); commits
it writes carry a `Co-Authored-By` trailer. The human maintainer does not write the code.
They decide what is built, set the scope and priorities, and approve every merge and
release.

Contributions from other people keep their authorship. The Brazilian Portuguese catalogue,
for example, was written by its contributor.

## What we rely on instead

AI-written code can be wrong in ways that read as plausible, so the project does not ask
to be trusted on that basis. It aims to be reliable through verification, and every change
goes through the same gates whoever, or whatever, wrote it:

- **Every pull request:** formatting and Clippy with warnings as errors; tests on stable,
beta and the minimum supported Rust version; a whole-application line-coverage gate
(>=95%, GTK included); fuzzing of the rule parser; a dynamic-analysis gate; CodeQL;
dependency advisories, licenses and sources; a strict documentation build; DCO sign-off.
- **Every package format:** two independent offline builds must produce byte-identical
binaries and RPM, DEB, Arch and Flatpak packages. See
[reproducing the build](docs/verification.md#5-reproducing-the-build).
- **Every release:** the Flatpak bundle is installed and started in its pinned runtime;
every artifact gets a checksum, an SBOM entry and a Sigstore signature bound to the
release workflow; a release candidate is published and checked before the stable tag.
- **Behavior on real systems:** for changes that affect it, clean installations in disposable
virtual machines (Fedora, Debian, Ubuntu, Arch) exercise the real daemon, Polkit and PAM
with synthetic USB devices. Graphical tests run on private displays or in those machines,
never on a personal desktop.

What each release was checked against, and what was not repeated, is recorded in
[docs/verification.md](docs/verification.md).

## What this does not claim

Passing these checks is evidence, not proof. Tests only cover what someone thought to test,
and coverage measures lines executed, not correctness. The pipeline has caught AI mistakes
before they shipped (in 0.2.1, a metadata tag that differed between distributions and a
stale Flatpak runtime pin), which is the reason it exists, not a guarantee that nothing
slips through. Report problems as described in [SECURITY.md](SECURITY.md) or
[SUPPORT.md](SUPPORT.md).

## Contributions that use AI

They are welcome on the same terms as any other: the same gates apply, and the
contributor signs off under the DCO and answers for the change. Please say in the pull
request whether, and how, AI was used. Translations prepared with AI are marked as such
in [docs/translating.md](docs/translating.md) until a fluent speaker has reviewed them.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- `AI_POLICY.md`: the project is written by AI and relies on its verification
pipeline, not on trust; contributors are asked to disclose AI use.
- Roadmap: 0.3.0 (marking devices that act as input devices) and 0.4.0
(devices plugged in while the session is locked) are planned.

## [0.2.1] - 2026-11-27

### Added
Expand Down
1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ By making a contribution to this project, I certify that:
2. Ensure `make verify` passes locally.
3. Update the documentation required by [`docs/documentation-policy.md`](docs/documentation-policy.md).
4. Fill in the pull request template checklist honestly.
If you used AI, say so and how; the same checks apply either way. See [`AI_POLICY.md`](AI_POLICY.md).
5. Submit the pull request and wait for review. Expect a first response within **7 days**.

Thank you for your help!
Expand Down
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,9 @@ case.
## Project status

[**0.2.1 is released**](https://github.com/onyks-os/USBGuardGUI/releases/tag/v0.2.1).
The approved feature roadmap is complete. Development now focuses on bug fixes,
security and dependency updates, and desktop/distribution compatibility. Further
features will be considered based on concrete needs; no new feature milestone is committed.
The 0.2 feature roadmap is complete. Planned next: marking devices that act as
keyboards or mice (0.3.0) and handling devices plugged in while the screen is locked
(0.4.0). Bug fixes, security and dependency updates continue alongside.
See the [roadmap](ROADMAP.md) and [release verification](docs/verification.md).

## Features
Expand Down Expand Up @@ -294,6 +294,14 @@ make fuzz-parser # cargo-fuzz the parser (nightly toolchain + cargo-fuzz)
└── docs/ # Architecture, interfaces, threat model, Phase 0 results
```

## How this project is made

USBGuardGUI is written entirely by AI, under the direction of a human maintainer who
decides scope and approves every merge and release. Instead of asking to be trusted,
it relies on a verification pipeline: tests and coverage gates, fuzzing, static and
dependency analysis, byte-for-byte reproducible packages, signed releases and
clean-install tests. That is evidence, not a guarantee. See [AI_POLICY.md](AI_POLICY.md).

## Contributing

Contributions are welcome. The areas where help matters most:
Expand Down
27 changes: 25 additions & 2 deletions ROADMAP.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ records the candidate and stable workflows. The historical acting-on-policy scop
the D-Bus migration and validation work. See the
[stable release](https://github.com/onyks-os/USBGuardGUI/releases/tag/v0.2.0) and
[release verification](docs/verification.md#stable-020-release-verification-2026-10-26).
The agreed feature scope is complete; the project now enters maintenance.
The feature scope agreed for 0.2 is complete; 0.3.0 and 0.4.0 are
[planned](#planned-milestones-2026-11-27).
**0.2.1** (2026-11-27) is the first maintenance release: Brazilian Portuguese,
completed Italian and French catalogues, the USBGuard #636 warning and dependency updates;
see its [release verification](docs/verification.md#stable-021-release-verification-2026-11-27).
Expand Down Expand Up @@ -248,7 +249,8 @@ GTK, desktop and distribution versions. Preserve the >=95% whole-application lin
coverage gate and validate release packages when shipping changes. Coverage and
passing tests are evidence, not a guarantee that no defects remain.

New features require a concrete use case and a separately agreed scope. Additional
New features require a concrete use case and a separately agreed scope; the agreed
ones are listed under *Planned milestones*. Additional
languages, AUR and the upstream API proposal below remain optional ideas, not
unfinished requirements for this release.

Expand All @@ -270,6 +272,27 @@ pass the existing tests, coverage and packaging gates before release. The first
preview is an attribute-match snapshot, not a promise that saving a rule immediately
changes those devices or that it wins over earlier policy rules.

### Planned milestones (2026-11-27)

Agreed with the maintainer after comparing with
[gunchev/usbguard_gui](https://github.com/gunchev/usbguard_gui), another USBGuard front end.
Two of its ideas address real risks that this program does not handle yet; they are planned
as separate releases so each gets its own acceptance run.

| Release | Milestone | Scope and acceptance criteria | Status |
| :--- | :--- | :--- | :--- |
| **0.3.0** | **Recognize devices that act as input devices** | A device declaring a HID interface (class `03`) can type or click on its own; one that also declares storage or another function is the usual shape of a "BadUSB" attack. Mark such devices in the list, the details view and the notification, and say which interfaces they declare. Do not offer the notification's quick *Allow* for them: allowing one needs the window and a confirmation that names the risk. The marking is a description of what the device declares, not a verdict on whether it is malicious. Also add a how-to for recovering when the policy blocks the keyboard. Test single-function, composite and malformed interface lists, hostile names, notification servers with and without actions, and keyboard-only operation; translate every new string in it/fr/pt_BR; keep >=95% application line coverage. | Planned |
| **0.4.0** | **Devices plugged in while the session is locked** | Read the session's lock state from logind (`LockedHint`) rather than a desktop-specific screensaver API; confirming that GNOME and Plasma keep it current is part of acceptance. A device inserted while locked gets no quick action; after unlock, one notification lists what arrived, marked as *plugged in while locked*, and the event history records it. If the lock state cannot be read, behave as today and say so in the diagnostics. Test lock/unlock races, devices removed before unlock, missing logind and repeated lock cycles; validate on GNOME and Plasma in the disposable guests; keep >=95% coverage. | Planned |

Not adopted from that project, deliberately:

- **A Polkit rule that grants policy changes without a password.** Installing a Polkit rule
stays the administrator's decision (see *Explicitly Out of Scope*).
- **"Once" actions that delete an existing permanent rule.** Here permanent rules are managed
in the rule editor, where the user sees which rule is removed.
- **A blocking pop-up dialog on every insertion.** Desktop notifications already offer the
action and do not steal focus; 0.3.0 and 0.4.0 restrict that action where it is risky.

| Item | Description |
| :--- | :---------- |
| **D-Bus dependency migration** | Implemented: zbus 6.1 with Rust 1.89 in the application, CI and pinned builder. The fixed SNI/menu interfaces run directly on zbus, replacing ksni and the deprecated stack; wire, watcher-restart and GTK regression tests pass. See DEPENDENCIES.md. |
Expand Down
12 changes: 7 additions & 5 deletions SESSION_HANDOFF.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
# Development checkpoint — 2026-11-27

**0.2.1 is published** (GitHub Release *Latest* and crates.io). The approved
feature roadmap is complete; continue in maintenance mode, not release preparation.
**0.2.1 is published** (GitHub Release *Latest* and crates.io). The 0.2 feature
roadmap is complete. Next approved features: 0.3.0 (HID/input-device marking) and
0.4.0 (devices plugged in while locked); see ROADMAP *Planned milestones*.
`AI_POLICY.md` states that the project is written by AI.
The user authorized signed-off commits, PR management and release/tag publication;
DCO consent already exists. No new features are proposed. This session did not touch
the user's installed package (0.2.0 at the previous checkpoint).
DCO consent already exists. This session did not touch the user's installed package
(0.2.0 at the previous checkpoint).

**Privacy:** never inspect the real host's desktop, applications, services or
physical devices. The explicitly requested USBGuardGUI package upgrade and narrow
Expand Down Expand Up @@ -51,6 +53,6 @@ private proc/dev/tmp/run/sys/buses/network, only explicit code/toolchain binds,
software Mesa. Do not use the older whole-root bind or the real desktop.

Maintenance covers bugs, security/dependency review and desktop/distribution
compatibility. There is no pending approved feature milestone. Do not restart
compatibility. The next approved milestones are 0.3.0 and 0.4.0 in ROADMAP. Do not restart
release preparation or repeat the full test suite for documentation-only edits.
Release evidence and its scope are summarized in `docs/verification.md`.
10 changes: 7 additions & 3 deletions docs/web/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,9 +97,13 @@ bundle, are on the [releases page](https://github.com/onyks-os/USBGuardGUI/relea
[changelog](release-notes/changelog.md) and the
[roadmap](https://github.com/onyks-os/USBGuardGUI/blob/main/ROADMAP.md).

The approved feature roadmap is complete. The project is now in maintenance:
bug fixes, security/dependency updates, and desktop/distribution compatibility.
No additional feature milestone is currently committed.
The 0.2 feature roadmap is complete. Planned next: marking devices that act as
keyboards or mice (0.3.0) and handling devices plugged in while the screen is
locked (0.4.0). Bug fixes, security/dependency updates and compatibility continue.

USBGuardGUI is written entirely by AI under a human maintainer's direction, and relies
on a verification pipeline rather than on trust; see the
[AI policy](https://github.com/onyks-os/USBGuardGUI/blob/main/AI_POLICY.md).

Security policy and vulnerability reporting:
[SECURITY.md](https://github.com/onyks-os/USBGuardGUI/blob/main/SECURITY.md).
7 changes: 7 additions & 0 deletions docs/web/release-notes/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

### Added

- `AI_POLICY.md`: the project is written by AI and relies on its verification
pipeline, not on trust; contributors are asked to disclose AI use.
- Roadmap: 0.3.0 (marking devices that act as input devices) and 0.4.0
(devices plugged in while the session is locked) are planned.

## [0.2.1] - 2026-11-27

### Added
Expand Down