Skip to content

Batch: 3 dependency manifest fixes, one commit each - #40

Merged
thebenignhacker merged 3 commits into
mainfrom
integrate/2026-10-19-r1
Oct 19, 2026
Merged

thebenignhacker merged 3 commits into
mainfrom
integrate/2026-10-19-r1

Conversation

@thebenignhacker

Copy link
Copy Markdown
Member

This pull request lands 3 commits in pkg/analyzer, pkg/scanner, pkg/reporter, internal/cli, docs, README.md and CHANGELOG.md.

Included

Verified on this exact tree

  • go version: go1.26.3 darwin/arm64
  • go build ./...: exit 0
  • go vet ./...: exit 0
  • gofmt -l on the 77 tracked Go files: no output
  • go test -race -p 4 -count=1 -v ./...: exit 0, 8 packages ok, 1 package with no test files, 305 tests passed (1028 including subtests), 0 failed, 0 skipped, counted from the --- PASS:, --- FAIL: and --- SKIP: lines
  • changelog check: TestChangelogEntries and TestChangelogSaysWhereSARIFAndCSVCarryTheCryptoJSText passed in the test run above
  • golangci-lint run: exit 1, 21 issues (errcheck 15, staticcheck 6), PRE-EXISTING: a detached worktree of origin/main prints the same 21, compared by path and message
  • golangci-lint run --max-same-issues 0 --max-issues-per-linter 0: exit 1, 85 issues (errcheck 45, staticcheck 40) on this tree and the same 85 on origin/main, compared by path and message
  • cryptoscan scan crypto-samples --format json with the built binary and with a build of origin/main: 110 findings from each, the same list when compared by id, file, line and severity

Not included

None

Closes

How to merge

Rebase and merge, so that each change stays its own commit on main.

… does not read as not scanned, instead of counting them (#38)

Fixes #38
…it is written that way (#39)

The two keys were decoded into struct fields, which encoding/json matches
without regard to case, while npm 11.20.0 reads them as written. A
DevDependencies key holding a string stopped the file from being decoded,
so a package.json listing crypto-js under dependencies had no finding, was
listed as not analyzed with a reason naming devDependencies, and made gate
exit 1. A list under Dependencies, which npm pkg get dependencies does not
print, gave a finding.

The top level is now decoded into a map, whose keys are exact, and the
value under each of the two keys is decoded on its own. The offset and key
of a value of the wrong type are rebased onto the file, so the line and
reason reported for a wrong-typed value under dependencies or
devDependencies are the ones the existing tests expect. A repeated
dependencies key now keeps its last list, as npm pkg get dependencies
prints it, where the packages under both copies were read.

Fixes #39
@thebenignhacker
thebenignhacker merged commit 8a28d0e into main Oct 19, 2026
4 checks passed
@thebenignhacker
thebenignhacker deleted the integrate/2026-10-19-r1 branch October 19, 2026 03:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant