@noppu-labs/opencode-permission-reviewer 2.4.2 → 3.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +174 -1
- package/LICENSE +21 -201
- package/LICENSE-APACHE +201 -0
- package/MIGRATION.md +2 -1
- package/NOTICE +14 -6
- package/README.md +109 -787
- package/SECURITY.md +41 -22
- package/dist/explain.d.ts +3 -4
- package/dist/explain.js +9708 -4298
- package/dist/index.d.ts +1096 -987
- package/dist/index.js +18646 -10575
- package/dist/rpc.d.ts +38 -38
- package/dist/rpc.js +30 -18
- package/dist/tui/config/jsonc.ts +71 -63
- package/dist/tui/config/layer-read.ts +120 -0
- package/dist/tui/config/loader.ts +73 -512
- package/dist/tui/config/risk-policy-clamp.ts +80 -0
- package/dist/tui/config/trust-boundary-keys.ts +102 -0
- package/dist/tui/config/trust-boundary.ts +148 -0
- package/dist/tui/config/trusted-degradation.ts +97 -0
- package/dist/tui/config-fields.ts +75 -0
- package/dist/tui/config-knobs.ts +119 -0
- package/dist/tui/config-policy-rules.ts +86 -0
- package/dist/tui/config-risk-policy.ts +59 -0
- package/dist/tui/config-rule-condition.ts +150 -0
- package/dist/tui/config.ts +72 -431
- package/dist/tui/descriptor-io.ts +42 -0
- package/dist/tui/failure-kind.ts +28 -0
- package/dist/tui/is-record.ts +13 -0
- package/dist/tui/opencode/event-normalizer.ts +41 -31
- package/dist/tui/reviewer-model.ts +87 -0
- package/dist/tui/system-one-routing.ts +110 -0
- package/dist/tui/tui.tsx +97 -99
- package/dist/tui/types.ts +206 -596
- package/dist/tui/ui/action-fit.ts +161 -0
- package/dist/tui/ui/action-spans.tsx +60 -0
- package/dist/tui/ui/attribution.ts +113 -0
- package/dist/tui/ui/components.tsx +69 -137
- package/dist/tui/ui/config-notices.ts +137 -0
- package/dist/tui/ui/fit-parts.ts +76 -0
- package/dist/tui/ui/manual-toast.ts +87 -0
- package/dist/tui/ui/review-connection.ts +32 -0
- package/dist/tui/ui/review-feed.ts +156 -0
- package/dist/tui/ui/review-overlay.tsx +111 -0
- package/dist/tui/ui/review-result.tsx +74 -0
- package/dist/tui/ui/review-store.ts +88 -0
- package/dist/tui/ui/review-theme.ts +70 -0
- package/dist/tui/ui/rpc.ts +5 -2
- package/dist/tui/ui/v1-host.ts +66 -0
- package/dist/tui/ui/v2.tsx +82 -220
- package/dist/tui/ui-protocol.ts +112 -124
- package/dist/tui/ui-state.ts +86 -64
- package/dist/tui/ui-status-extras.ts +165 -0
- package/dist/tui/ui-status-parse.ts +132 -0
- package/dist/tui/ui-text-elide.ts +89 -0
- package/package.json +24 -23
- package/rpc.js +2 -1
- package/server.js +2 -2
- package/tui.tsx +2 -1
package/SECURITY.md
CHANGED
|
@@ -1,31 +1,50 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Security policy
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
we take security bugs seriously.
|
|
3
|
+
## Reporting a vulnerability
|
|
5
4
|
|
|
6
|
-
|
|
7
|
-
|
|
5
|
+
Report suspected vulnerabilities privately through
|
|
6
|
+
[GitHub private vulnerability reporting](https://github.com/noppu-labs/opencode-permission-reviewer/security/advisories/new);
|
|
7
|
+
please don't open a public issue. Include as much of this as you can:
|
|
8
8
|
|
|
9
|
-
-
|
|
10
|
-
|
|
9
|
+
- a minimal reproduction: the command and the permission policy that trigger it
|
|
10
|
+
- the plugin version (`version` in `package.json`) and the OpenCode version you run
|
|
11
|
+
- the safety outcome you expected and the one you got
|
|
11
12
|
|
|
12
|
-
|
|
13
|
+
We acknowledge reports within a few days and coordinate the fix and disclosure with you.
|
|
13
14
|
|
|
14
|
-
|
|
15
|
+
## Scope
|
|
15
16
|
|
|
16
|
-
-
|
|
17
|
-
|
|
18
|
-
- the OpenCode version you run,
|
|
19
|
-
- the expected vs. actual safety outcome.
|
|
17
|
+
The plugin approves or denies AI-agent actions on your behalf, so most security bugs are cases
|
|
18
|
+
where it approves something it should not. In scope:
|
|
20
19
|
|
|
21
|
-
|
|
20
|
+
- An automatic approval that breaks one of the deterministic invariants in
|
|
21
|
+
[docs/SAFETY.md](docs/SAFETY.md), such as approving an action the reviewer classified as
|
|
22
|
+
critical, or approving after a reviewer failure.
|
|
23
|
+
- Project or inline configuration that weakens trusted global settings (see the trust rules in
|
|
24
|
+
[docs/CONFIGURATION.md](docs/CONFIGURATION.md)).
|
|
25
|
+
- The reviewer session gaining tools, MCP servers, or repository instructions.
|
|
26
|
+
- Credentials leaking into reviewer evidence, the audit log, or the TUI.
|
|
27
|
+
- The release pipeline: npm publishing, provenance, checksums, and the SBOM.
|
|
22
28
|
|
|
23
|
-
|
|
29
|
+
A reviewer model that misjudges an action's risk is a known limit of the design, not a
|
|
30
|
+
vulnerability on its own. The plugin checks a decision's consistency, not its semantic
|
|
31
|
+
correctness. Other plugins loaded into the same OpenCode host can also override its decisions.
|
|
32
|
+
[docs/SAFETY.md](docs/SAFETY.md) covers the threat model.
|
|
24
33
|
|
|
25
|
-
This
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
34
|
+
This project is a fork of
|
|
35
|
+
[warc0s/opencode-permission-reviewer](https://github.com/warc0s/opencode-permission-reviewer).
|
|
36
|
+
If an issue also affects the upstream project, report it there as well.
|
|
37
|
+
|
|
38
|
+
## Verifying releases
|
|
39
|
+
|
|
40
|
+
Each release is published to npm with [provenance](https://docs.npmjs.com/generating-provenance-statements),
|
|
41
|
+
and its GitHub Release carries the package tarball, SHA-256 checksums, and a CycloneDX SBOM. To
|
|
42
|
+
check the registry signatures and provenance attestations of a copy installed with `npm install`
|
|
43
|
+
or `npm ci` (npm 8.15.0 or later), run this in the installing project:
|
|
44
|
+
|
|
45
|
+
```sh
|
|
46
|
+
npm audit signatures
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
[docs/SUPPLY-CHAIN.md](docs/SUPPLY-CHAIN.md) describes what the package ships and the known
|
|
50
|
+
residual exposure in its dependency tree.
|
package/dist/explain.d.ts
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
|
|
2
|
-
declare function runCli(argv: string[]): Promise<number>;
|
|
3
|
-
|
|
4
|
-
export { runCli };
|
|
1
|
+
//#region src/cli/explain.d.ts
|
|
2
|
+
export declare function runCli(argv: string[]): Promise<number>;
|
|
3
|
+
//#endregion
|