@theonly1me/vigilante 0.1.1 → 0.2.1

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.
Files changed (2) hide show
  1. package/README.md +16 -15
  2. package/package.json +5 -5
package/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  <div align="center">
2
- <img src="https://raw.githubusercontent.com/theonly1me/vigilante/v0.1.1/assets/vigilante-wordmark-white-bg.webp" alt="Vigilante" width="360">
2
+ <img src="https://raw.githubusercontent.com/theonly1me/vigilante/v0.2.1/assets/vigilante-wordmark-white-bg.webp" alt="Vigilante" width="360">
3
3
  <p><b>See what a pull request lets your code, your CI, and your AI agents do, before you merge it.</b></p>
4
4
  <p>
5
5
  <a href="https://github.com/theonly1me/vigilante/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/theonly1me/vigilante/ci.yml?branch=main&amp;label=CI&amp;logo=github" alt="CI"></a>
@@ -16,7 +16,7 @@ Vigilante reads a pull request and lists the new powers that the pull request ad
16
16
 
17
17
  Your security team approves powers in a `vigilante.lock` file. If a pull request adds a power that is not in the lock, the check fails.
18
18
 
19
- By default, Vigilante does not run code from the repository that it checks. It reads the files and resolves calls by type. It uses [Capslock](https://github.com/google/capslock) for Go, the TypeScript type checker for JavaScript and TypeScript, and Pyright for Python. These tools read code, and they do not run it. Vigilante also downloads the locked packages from their public registries and reads them. If you set `[engines] rust = "typed"`, Vigilante builds the Rust code in a Docker container that has no network access ([docs/dependencies.md](https://github.com/theonly1me/vigilante/blob/v0.1.1/docs/dependencies.md#calls-resolved-by-type)).
19
+ By default, Vigilante does not run code from the repository that it checks. It reads the files and resolves calls by type. It uses [Capslock](https://github.com/google/capslock) for Go, the TypeScript type checker for JavaScript and TypeScript, and Pyright for Python. These tools read code, and they do not run it. Vigilante also downloads the locked packages from their public registries and reads them. If you set `[engines] rust = "typed"`, Vigilante builds the Rust code in a Docker container that has no network access ([docs/dependencies.md](https://github.com/theonly1me/vigilante/blob/v0.2.1/docs/dependencies.md#calls-resolved-by-type)).
20
20
 
21
21
  ## Why
22
22
 
@@ -28,6 +28,8 @@ An agent opens a pull request that exports invoices. Vigilante gives this report
28
28
 
29
29
  > ## Vigilante: this pull request adds 6 new powers
30
30
  >
31
+ > **Result: fail.** 6 powers are not in vigilante.lock. Run `vigilante lock` and commit the file.
32
+ >
31
33
  > | Severity | Scope | Power | What it means | Evidence | Status |
32
34
  > | --- | --- | --- | --- | --- | --- |
33
35
  > | HIGH | `services/billing` (code) | `exec` | Can run other programs | `services/billing/billing/export.py:5 via export.export → subprocess.run` | **not in lock** |
@@ -36,8 +38,6 @@ An agent opens a pull request that exports invoices. Vigilante gives this report
36
38
  > | MEDIUM | `.github/workflows/release.yml` (ci) | `token_write:contents` | The CI token can write to the repository | `.github/workflows/release.yml:6` | **not in lock** |
37
39
  > | MEDIUM | `.github/workflows/release.yml` (ci) | `secret:PYPI_TOKEN` | The workflow reads a secret | `.github/workflows/release.yml:14` | **not in lock** |
38
40
  > | MEDIUM | `.claude/settings.json` (agent) | `tool_allow:Bash(curl:*)` | The agent can use a tool without asking | `.claude/settings.json:3` | **not in lock** |
39
- >
40
- > **Result: fail.** 6 powers are not in vigilante.lock. Run `vigilante lock` and commit the file.
41
41
 
42
42
  The same pull request also added a second network call to `services/billing`, the allow rules `Bash(pytest:*)` and `Read`, and a call to `actions/checkout`. Vigilante does not report them, for these reasons:
43
43
 
@@ -52,11 +52,11 @@ The same pull request also added a second network call to `services/billing`, th
52
52
  | --- | --- | --- |
53
53
  | Code | Rust, JavaScript, TypeScript, Python, Ruby, C#, Java, and Go | `exec`, `network`, `files`, `native`, `dynamic_code`, `read_system_state`, `modify_system_state`, `system_calls` |
54
54
  | Code, through dependencies | Go with [Capslock](https://github.com/google/capslock). JavaScript, TypeScript, Python, Java, Rust, C#, and Ruby with the call graph of Vigilante over the locked packages. Calls resolve by type in JavaScript, TypeScript, and Python, and through the class hierarchy in Java and C#. | Each code power, with the call path. For Go, all 13 Capslock capabilities, for example `operating_system`, `runtime`, `arbitrary_execution`, and `unanalyzed`. |
55
- | CI | `.github/workflows/*.yml` | `token_write`, `oidc`, `untrusted_trigger`, `third_party_action`, `secret` |
56
- | AI agents | `.claude/settings.json`, `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json`, `.codex/config.toml`, `.gemini/settings.json` | `tool_allow`, `hook`, `mcp_server`, `skip_permissions` |
55
+ | CI | `.github/workflows/*.yml`, composite actions (`action.yml`) | `token_write`, `oidc`, `untrusted_trigger`, `third_party_action`, `secret`, `remote_script` |
56
+ | AI agents | `.claude/settings.json`, Claude Code skills and commands, `.mcp.json`, `.cursor/mcp.json`, `.vscode/mcp.json`, `.codex/config.toml`, `.gemini/settings.json` | `tool_allow`, `hook`, `mcp_server`, `skip_permissions` |
57
57
  | Build | `package.json` install scripts, `build.rs`, `setup.py`, `.husky/`, `.pre-commit-config.yaml` | `install_hook`, `git_hook` |
58
58
 
59
- Vigilante reports a power only the first time that it appears in a scope. For code, a scope is the nearest package root. For Go, a scope is the Go package. Vigilante skips tests, fixtures, and vendored code. [docs/powers.md](https://github.com/theonly1me/vigilante/blob/v0.1.1/docs/powers.md) tells you about each power and the rules that keep the report short.
59
+ Vigilante reports a power the first time that it appears in a scope. After that, it reports each changed risk. Some risks block until `vigilante.lock` approves them. Examples are a call with untrusted input, and a workflow script that reads the title of a pull request. See [docs/risks.md](https://github.com/theonly1me/vigilante/blob/v0.2.1/docs/risks.md). For code, a scope is the nearest package root. For Go, a scope is the Go package. Vigilante skips vendored code. It reports tests and fixtures as test code, apart from the findings. See [docs/powers.md](https://github.com/theonly1me/vigilante/blob/v0.2.1/docs/powers.md) for each power and for the rules that keep the report short.
60
60
 
61
61
  A finding is `exec`, `network`, or `native` that your package reaches through its own code. This rule is the same in each language. All other results are notes:
62
62
 
@@ -64,7 +64,7 @@ A finding is `exec`, `network`, or `native` that your package reaches through it
64
64
  - a power that your package reaches only through a dependency, or through another package of the same repository;
65
65
  - a new package on a call path to a power.
66
66
 
67
- Notes do not make the check fail. For example, a new dependency that reaches the network is a note. [docs/dependencies.md](https://github.com/theonly1me/vigilante/blob/v0.1.1/docs/dependencies.md) tells you how Vigilante reads packages.
67
+ Notes do not make the check fail, unless a `deny` rule matches their power. For example, a new dependency that reaches the network is a note. [docs/dependencies.md](https://github.com/theonly1me/vigilante/blob/v0.2.1/docs/dependencies.md) tells you how Vigilante reads packages.
68
68
 
69
69
  ## Install
70
70
 
@@ -92,10 +92,11 @@ Run these commands in the root of your repository.
92
92
 
93
93
  | Command | What it does |
94
94
  | --- | --- |
95
- | `vigilante scan` | Shows each power in the repository. |
95
+ | `vigilante scan` | Shows each power in the repository, and the code that Vigilante could not read. |
96
96
  | `vigilante lock` | Writes `vigilante.lock`. Commit this file. |
97
97
  | `vigilante diff --base origin/main` | Shows the powers that your branch adds, compared with its merge base. |
98
98
  | `vigilante check` | Fails if `vigilante.lock` does not agree with the repository. |
99
+ | `vigilante doctor` | Checks that `CODEOWNERS` and the branch rules on GitHub protect `vigilante.lock`. It uses `gh`. |
99
100
 
100
101
  `diff` and `check` write Markdown. For other tools, add `--format json` or `--format sarif`.
101
102
 
@@ -126,11 +127,11 @@ jobs:
126
127
  with:
127
128
  fetch-depth: 0
128
129
  persist-credentials: false
129
- - uses: theonly1me/vigilante@v0.1.1
130
+ - uses: theonly1me/vigilante@v0.2.1
130
131
  ```
131
132
  <!-- x-release-please-end -->
132
133
 
133
- On a pull request, the action runs `vigilante diff` against the base branch. On a push, it runs `vigilante check`. The action writes the report to the job summary. The job needs no secrets, so it also works on pull requests from forks.
134
+ On a pull request, the action runs `vigilante diff` against the base branch. On a push, it runs `vigilante check`. The action writes the report to the job summary. The job needs no secrets, so it also works on pull requests from forks. To also write the report as a comment on the pull request, set `comment: true` and give the job the permission `pull-requests: write`.
134
135
 
135
136
  Then make your security team the owner of the lock in `CODEOWNERS`. Also turn on "Require review from Code Owners".
136
137
 
@@ -140,7 +141,7 @@ vigilante.toml @your-org/security
140
141
  .github/ @your-org/security
141
142
  ```
142
143
 
143
- After this change, each pull request that adds a power must change `vigilante.lock`. The security team must approve that change. [docs/github-action.md](https://github.com/theonly1me/vigilante/blob/v0.1.1/docs/github-action.md) gives the full setup. It also tells you how to protect the check and how to use Vigilante in other CI systems.
144
+ After this change, each pull request that adds a power must change `vigilante.lock`. The security team must approve that change. Run `vigilante doctor` to make sure that GitHub enforces these rules. [docs/github-action.md](https://github.com/theonly1me/vigilante/blob/v0.2.1/docs/github-action.md) gives the full setup. It also tells you how to protect the check and how to use Vigilante in other CI systems.
144
145
 
145
146
  ## Use it with AI agents
146
147
 
@@ -161,7 +162,7 @@ deny = [{ scope = "services/**", capability = "exec" }]
161
162
  trusted_owners = ["your-org"]
162
163
  ```
163
164
 
164
- In a pull request, Vigilante reads `vigilante.toml` from the merge base. So a pull request cannot change the rules that check it. [docs/configuration.md](https://github.com/theonly1me/vigilante/blob/v0.1.1/docs/configuration.md) lists each key and the lock format. It also tells you how to add rules for your own wrappers.
165
+ In a pull request, Vigilante reads `vigilante.toml` from the merge base. So a pull request cannot change the rules that check it. [docs/configuration.md](https://github.com/theonly1me/vigilante/blob/v0.2.1/docs/configuration.md) lists each key and the lock format. It also tells you how to add rules for your own wrappers.
165
166
 
166
167
  ## What Vigilante is not
167
168
 
@@ -172,8 +173,8 @@ In a pull request, Vigilante reads `vigilante.toml` from the merge base. So a pu
172
173
 
173
174
  ## Contribute
174
175
 
175
- Read [CONTRIBUTING.md](https://github.com/theonly1me/vigilante/blob/v0.1.1/CONTRIBUTING.md). To report a security problem, read [SECURITY.md](https://github.com/theonly1me/vigilante/blob/v0.1.1/SECURITY.md). [docs/README.md](https://github.com/theonly1me/vigilante/blob/v0.1.1/docs/README.md) lists all the documentation.
176
+ Read [CONTRIBUTING.md](https://github.com/theonly1me/vigilante/blob/v0.2.1/CONTRIBUTING.md). To report a security problem, read [SECURITY.md](https://github.com/theonly1me/vigilante/blob/v0.2.1/SECURITY.md). [docs/README.md](https://github.com/theonly1me/vigilante/blob/v0.2.1/docs/README.md) lists all the documentation.
176
177
 
177
178
  ## License
178
179
 
179
- You can use Vigilante under the [Apache License 2.0](https://github.com/theonly1me/vigilante/blob/v0.1.1/LICENSE-APACHE) or the [MIT license](https://github.com/theonly1me/vigilante/blob/v0.1.1/LICENSE-MIT).
180
+ You can use Vigilante under the [Apache License 2.0](https://github.com/theonly1me/vigilante/blob/v0.2.1/LICENSE-APACHE) or the [MIT license](https://github.com/theonly1me/vigilante/blob/v0.2.1/LICENSE-MIT).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theonly1me/vigilante",
3
- "version": "0.1.1",
3
+ "version": "0.2.1",
4
4
  "description": "Shows the new powers that a pull request gives to code, CI, build, and AI agents",
5
5
  "keywords": [
6
6
  "security",
@@ -27,9 +27,9 @@
27
27
  "node": ">=18"
28
28
  },
29
29
  "optionalDependencies": {
30
- "@theonly1me/vigilante-darwin-arm64": "0.1.1",
31
- "@theonly1me/vigilante-darwin-x64": "0.1.1",
32
- "@theonly1me/vigilante-linux-arm64": "0.1.1",
33
- "@theonly1me/vigilante-linux-x64": "0.1.1"
30
+ "@theonly1me/vigilante-darwin-arm64": "0.2.1",
31
+ "@theonly1me/vigilante-darwin-x64": "0.2.1",
32
+ "@theonly1me/vigilante-linux-arm64": "0.2.1",
33
+ "@theonly1me/vigilante-linux-x64": "0.2.1"
34
34
  }
35
35
  }