Repository navigation
Implement Phase231-240 plugin trust enforcement - #22
Conversation
|
@codex review |
There was a problem hiding this comment.
Pull request overview
This PR introduces a manifest-and-lockfile based "plugin trust v1" enforcement layer on top of the existing plugin signature support: in enforce mode, every plugin must be pinned by a signed TOML manifest and a JSON patchgate-plugin.lock, with verified artifact digests, key fingerprints, deny-by-default network/env/write permissions, and a generated trust report. Trust material is also folded into the scan cache key (bumped to v2) so any change in manifest, lockfile, signature, artifact, sandbox, or permissions invalidates cached results. Companion docs and example/policy files describe and propagate the new fields.
Changes:
- New
PluginManifest/PluginLockfileschemas plusverify_plugin_trust_materialpipeline (signature, digest, lockfile-binding, permission checks) and aPluginTrustReport/PluginSandboxCapabilityArtifactsurfaced onPluginInvocation. - Cache key bumped to
v2and extended with aplugin_trustdimension hashing manifest, lockfile, signature, command/arg files, and sandbox profile. - New
plugins.lockfile_pathconfig +entries[].manifest_path, validation updates (allowmanifest_pathinstead ofsignature_path, dedupe entry ids), and documentation/examples for the trust model.
Reviewed changes
Copilot reviewed 17 out of 18 changed files in this pull request and generated 10 comments.
Show a summary per file
| File | Description |
|---|---|
| crates/patchgate-core/src/runner.rs | Core trust verification, manifest/lockfile parsing, permission resolution, isolated-network plumbing, new tests |
| crates/patchgate-core/src/model.rs | Adds PluginTrustReport and PluginSandboxCapabilityArtifact, embeds trust on PluginInvocation |
| crates/patchgate-core/src/lib.rs | Re-exports new model types |
| crates/patchgate-core/Cargo.toml | Adds toml dep for manifest parsing |
| crates/patchgate-config/src/types.rs | Adds lockfile_path and manifest_path config fields with defaults |
| crates/patchgate-config/src/lib.rs | Validation: dedupe ids, require lockfile_path, accept manifest_path as signature material |
| crates/patchgate-cli/src/main.rs | Plugin trust hash in cache key, schema version bump to v2, tests |
| config/policy.toml.example | Adds lockfile_path to default policy template |
| docs/26_plugin_trust.md | New plugin trust model doc |
| docs/02_config_reference.md, docs/04_recipes.md, docs/ARCHITECTURE.md, docs/SECURITY.md, docs/trust-boundary.md, sdk/README.md, examples/plugins/python-sample/README.md, mkdocs.yml | Doc/nav updates referencing the new fields |
| Cargo.lock | Lockfile entry for toml dep on patchgate-core |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9cceb84c1e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2fb94f84b0
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 68a88ac3f6
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: caa023c113
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review |
Summary
Validation
cargo fmt --all -- --checkcargo clippy --workspace --all-targets -- -D warningscargo test --workspacegit diff --checkNotes
patchgate_sellable_design_docs.zipremains untracked and is not part of this PR.