walkdiff 0.10.0 → 0.11.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 +13 -0
- package/README.md +17 -8
- package/app-ui/assets/index-DpnOoKA-.js +63 -0
- package/app-ui/index.html +1 -1
- package/package.json +3 -1
- package/report-ui/assets/index-CNwloc-G.css +1 -0
- package/report-ui/assets/index-DVs2-pp1.js +81 -0
- package/report-ui/index.html +2 -2
- package/scanner-pins/semgrep-overrides.txt +17 -0
- package/scanner-pins/semgrep-requirements.txt +325 -295
- package/walkdiff.mjs +840 -175
- package/app-ui/assets/index-D08hi5Lz.js +0 -63
- package/report-ui/assets/index-BhaHkEaL.js +0 -81
- package/report-ui/assets/index-D9j4qnI6.css +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.11.0
|
|
4
|
+
|
|
5
|
+
- **Review your own branch before opening a pull request:** `walkdiff review --local` reviews the committed work on the current branch of the repository you're in, against the remote's default branch or `--base <ref>`. It reads the repository in place without fetching or changing anything, and says how many files have uncommitted changes it left out. The report is the same, without what needs a host: the PR link, links to files, posting a review, and coverage from CI.
|
|
6
|
+
- **Kotlin and C#:** files in these languages now get changed units with change facts, callers traced across the repository, function metrics, risky-API rules and syntax highlighting.
|
|
7
|
+
- **Kotlin:** extension functions are named by the type they extend, as `String.shout`.
|
|
8
|
+
- **C#:** file-scoped namespaces name the declarations after them, as `Acme.Server.Runner.Run`.
|
|
9
|
+
- **JSON logs:** `--log-format json`, or `WALKDIFF_LOG_FORMAT=json` in CI, prints each message to stderr as one JSON object per line, with `time`, `level` and `msg`, plus fields such as the analysis step or the report's folder. Messages now have levels, `info`, `warn` or `error`, and the text format is unchanged.
|
|
10
|
+
- **Test files are recognised the same way everywhere:**
|
|
11
|
+
- `ServerTest.java`, `ParserTests.kt`, `Tests/` folders and `_test` files in any language count as tests in every check.
|
|
12
|
+
- Go's `TestXxx` functions and Rust's `tests.rs` stay off the review path.
|
|
13
|
+
- Test files no longer get function-metric findings or a "no tests changed" note.
|
|
14
|
+
- **Semgrep's environment is patched:** Walkdiff now installs the fixed versions of `mcp` (1.30.0) and OpenTelemetry (1.45.2) with Semgrep, which still pins vulnerable ones itself. Existing installs pick this up on the next run.
|
|
15
|
+
|
|
3
16
|
## 0.10.0
|
|
4
17
|
|
|
5
18
|
- **Dependency checks for Go and Java:** PRs that add or bump dependencies in `go.mod`, `pom.xml`, `build.gradle`, `build.gradle.kts`, Gradle version catalogs (`*.versions.toml`) or `gradle.lockfile` now get what npm, Cargo and Python ones get. Each new direct dependency is noted, checked for trust (known malicious, not on its registry, very new, or a lookalike name) and against your licence allowlist, and versions new to the build are looked up in OSV. Go and Maven packages are looked up through [deps.dev](https://deps.dev), which covers the Go module proxy, Maven Central and Google's Maven repository. `go.sum` isn't read, since it lists versions the build dropped, and a Maven module of the project's own group is recognised as part of the project.
|
package/README.md
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
A review companion for GitHub pull requests and GitLab merge requests. `walkdiff review <url>` fetches the
|
|
6
6
|
change, analyzes it, and serves a local report.
|
|
7
7
|
|
|
8
|
-
Status: early release, [v0.
|
|
8
|
+
Status: early release, [v0.11.0](CHANGELOG.md). To run it on your team's PRs, see the [pilot guide](docs/pilot.md).
|
|
9
9
|
|
|
10
10
|
**Documentation:** [website](https://navasvarela.github.io/walkdiff/), [getting started](docs/getting-started.md), [configuration](docs/configuration.md), [troubleshooting](docs/troubleshooting.md), [security policy](SECURITY.md).
|
|
11
11
|
|
|
@@ -15,7 +15,7 @@ The report opens on a brief: what to check, how many changes need attention, and
|
|
|
15
15
|
|
|
16
16
|
All changes has five tabs, including **Conversation** in the app: **Changes** (files, the map of each file and the changed units), **Impact** (where other code uses what changed), **Risks** (each check's result and every finding) and **AI review**. Each tab shows a count, and its name in the URL lets you link to it, as in `#risks`.
|
|
17
17
|
|
|
18
|
-
- **Changed units, not hunks.** For Rust, TypeScript/JavaScript, Python, Go, Java, C and C++, each changed function,
|
|
18
|
+
- **Changed units, not hunks.** For Rust, TypeScript/JavaScript, Python, Go, Java, Kotlin, C#, C and C++, each changed function,
|
|
19
19
|
method, type, class or macro appears once, whole, before and after, with edited words marked. A class shows only the
|
|
20
20
|
code it owns; its methods are separate cards. In JavaScript and TypeScript tests, each `describe`,
|
|
21
21
|
`it`/`test` and hook such as `beforeEach` is a unit too, named by its title, such as `parser › reads includes`.
|
|
@@ -29,8 +29,8 @@ All changes has five tabs, including **Conversation** in the app: **Changes** (f
|
|
|
29
29
|
lists where the rest of the code still uses it, linked to the host at the head commit, and flags the
|
|
30
30
|
callers this PR did not touch. Removed and renamed units show any references left behind.
|
|
31
31
|
- **Risks and security findings.** Built-in rules flag likely secrets (redacted in the report), risky APIs
|
|
32
|
-
such as `eval`, `shell=True`, raw HTML, `unsafe`, Go's `InsecureSkipVerify`, Java deserialization
|
|
33
|
-
`strcpy` (only in code, not comments or strings), sensitive
|
|
32
|
+
such as `eval`, `shell=True`, raw HTML, `unsafe`, Go's `InsecureSkipVerify`, Java deserialization, C#'s
|
|
33
|
+
`BinaryFormatter` or C's `strcpy` (only in code, not comments or strings), sensitive
|
|
34
34
|
areas such as auth, payments, migrations and CI, new dependencies, and known vulnerabilities in
|
|
35
35
|
dependency versions new to `package-lock.json`, `Cargo.lock`, `poetry.lock`, `uv.lock`, pinned
|
|
36
36
|
requirements, `go.mod`, `pom.xml`, Gradle build files and version catalogs, or `gradle.lockfile`
|
|
@@ -56,7 +56,7 @@ Known limits: tests are recognised by the usual names (`describe`, `it`, `test`
|
|
|
56
56
|
test helper with another name shows under "imports & top level"; a unit renamed as well as moved and
|
|
57
57
|
edited, or mostly rewritten, shows as removed plus added (see
|
|
58
58
|
[troubleshooting](docs/troubleshooting.md#a-function-shows-as-removed-and-added)); code is highlighted
|
|
59
|
-
only in Rust, TypeScript/JavaScript, Python, Go, Java, C and C++; and `.h` headers are read as C++, which
|
|
59
|
+
only in Rust, TypeScript/JavaScript, Python, Go, Java, Kotlin, C#, C and C++; and `.h` headers are read as C++, which
|
|
60
60
|
reads C too unless the code uses a C++ keyword such as `new` as a name.
|
|
61
61
|
|
|
62
62
|
## Usage
|
|
@@ -68,6 +68,15 @@ npx walkdiff review https://github.com/owner/repo/pull/123
|
|
|
68
68
|
npx walkdiff review https://gitlab.com/group/project/-/merge_requests/45 --no-serve --out ./report
|
|
69
69
|
```
|
|
70
70
|
|
|
71
|
+
To review your own branch before opening a pull request, run it inside the repository:
|
|
72
|
+
|
|
73
|
+
```sh
|
|
74
|
+
npx walkdiff review --local # against the remote's default branch
|
|
75
|
+
npx walkdiff review --local --base develop
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
It reads your committed work in place, without fetching or changing anything, and leaves uncommitted changes out. The report is the same, without the parts that need a host: links to the PR and its files, posting a review, and coverage from CI.
|
|
79
|
+
|
|
71
80
|
Or install it once with `npm install --global walkdiff`, then run `walkdiff`. To work on Walkdiff itself,
|
|
72
81
|
clone this repository, run `pnpm install`, and use `pnpm walkdiff` in place of `walkdiff`.
|
|
73
82
|
|
|
@@ -106,7 +115,7 @@ Tokens and code stay on your machine, apart from the host itself, package names
|
|
|
106
115
|
|
|
107
116
|
## In CI
|
|
108
117
|
|
|
109
|
-
The GitHub Action (`navasvarela/walkdiff@v0.
|
|
118
|
+
The GitHub Action (`navasvarela/walkdiff@v0.11.0`) and the GitLab template (`ci/gitlab-ci.yml`) generate the report for each PR, keep it as a job artifact, and post one summary comment that is updated on each push. The [pilot guide](docs/pilot.md) has the setup. Locally, `walkdiff review` also works without a URL inside a CI job, and `walkdiff comment --report <dir> --report-url <url>` posts the summary.
|
|
110
119
|
|
|
111
120
|
## AI review
|
|
112
121
|
|
|
@@ -180,7 +189,7 @@ A change also needs someone it can affect:
|
|
|
180
189
|
| Go | A capitalised name, and for a method, a capitalised type | A `go.mod` is above it, the package isn't `main`, and no folder on its path is `internal` |
|
|
181
190
|
|
|
182
191
|
Java isn't covered yet, since nothing in a Java project's files reliably tells a published library from an
|
|
183
|
-
application
|
|
192
|
+
application, and the same goes for Kotlin and C#. Neither are C and C++, whose API is whatever the installed headers declare.
|
|
184
193
|
|
|
185
194
|
Otherwise it's flagged only if calls this PR didn't touch remain in the repository. Python and TypeScript
|
|
186
195
|
functions under a framework's decorator are skipped, as the decorator can change how they're called. So is a
|
|
@@ -210,7 +219,7 @@ without the definition changing, and inputs of a GitHub Action's `action.yml`.
|
|
|
210
219
|
Walkdiff flags poor implementations and bad practice in the code a PR adds, under the "Code quality"
|
|
211
220
|
category in the Risks tab. These findings never count as security findings.
|
|
212
221
|
|
|
213
|
-
**Function metrics** are built in and cover Rust, TypeScript, Python, Go, Java, C and C++. A function is flagged when
|
|
222
|
+
**Function metrics** are built in and cover Rust, TypeScript, Python, Go, Java, Kotlin, C#, C and C++. A function is flagged when
|
|
214
223
|
the PR adds it over a limit, pushes it over one, or makes one already over the limit at least 20%
|
|
215
224
|
worse. The Changes tab also shows each modified function's complexity change. Test code is left out.
|
|
216
225
|
|