Skip to content

sshole: fixes from the independent review of the Sensei port - #7

Merged
devGregA merged 7 commits into
mainfrom
devgrega/sshole-review-fixes
Nov 7, 2026
Merged

devGregA merged 7 commits into
mainfrom
devgrega/sshole-review-fixes

Conversation

@devGregA

@devGregA devGregA commented Nov 7, 2026

Copy link
Copy Markdown
Contributor

Fixes from the independent adversarial review of the Sensei port (DefectDojo-Inc/defectdojo-scan-and-fix#338), which copies this detector's internal/ packages.

  • Base-image lookups: only for a stage that installs an OpenSSH server, at most 32 per scan, reading only the image's first layer (image.OpenBaseLayer) under a 90 s and 512 MiB limit; a glibc os-release stops the read early. Before, every unidentified FROM was read to the end (node:22 was 389 MB).
  • Temporary failures: a lookup that may succeed later is returned in Result.Transient (the repo target is marked incomplete) instead of turning an error into a not-checked note, and the error text no longer goes into the message, so titles and fingerprints stay stable.
  • Added files: every path is checked before anything is written; .git is refused; identical content already in place is success; writes go through a temporary file linked into place. Parallel fixes of several defconfigs in one Buildroot external tree no longer fail or leave partial changes.
  • repo.Find follows a finding whose line moved instead of reporting it fixed.
  • A pull request that changes one Yocto file is judged with the tree's other Yocto files.

Tests: new cases for each; go test -race ./..., fuzzing, and parity/sshole.py (10/10) pass.

🤖 Generated with Claude Code

devGregA and others added 7 commits November 6, 2026 21:07
- Base images are read only when a stage installs an OpenSSH server, at
  most 32 per scan, and only their first layer (OpenBaseLayer), under a
  time and size limit; a glibc os-release stops the read early.
- A base lookup that may succeed later is reported (Result.Transient, an
  incomplete target) instead of becoming a not-checked note, and the error
  text stays out of the finding's message so titles do not churn.
- New files: every path is checked before anything is written, .git is
  refused, identical content already in place is success, and writes go
  through a temporary file linked into place, so parallel fixes of sibling
  defconfigs in one external tree no longer race.
- Find follows a finding whose line moved instead of calling it fixed.
- A pull request's Yocto change is judged with the tree's other Yocto
  files (TCLIBC, bbappends).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… themselves

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…line, is not checked, never not Alpine

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@devGregA
devGregA merged commit bdc20b6 into main Nov 7, 2026
2 checks passed
@devGregA
devGregA deleted the devgrega/sshole-review-fixes branch November 7, 2026 04:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant