Files
cpanel-importer/scripts
shadowdaoandClaude Sonnet 5.5 7da863cfd1 Scan only the WHP scan scope: whp-scan-scope + clamscan --file-list, scan attestation in report.json
- Dockerfile: multi-stage Go build of whp-scan-scope (CGO off, stdlib only) from a PINNED
  commit of the WHP repo (ARG WHP_COMMIT, currently the merge of WHP #331; bump it to the merge
  of the 2000 MiB limit PR before publishing an image meant to enforce it). Private repo: the
  BuildKit secret whp_token in CI; --build-context whp-src=<checkout> for local builds.
- scan-files.php: whp-scan-scope -> /tmp/scan.list + stats, then clamscan --file-list with
  --max-filesize=2000M --max-scansize=4000M --max-scantime=0 --alert-exceeds-max=yes --tempdir on
  the disk scratch. A missing/failing tool, clamscan exit >= 2 or 0 loaded signatures is FATAL
  (no fall back to an unscoped scan). Writes the attestation (the tool's stats + engine_version,
  signature_db_version, signatures_loaded, clamscan_exit).
- entrypoint.sh: passes --attestation/--scratch, removes the scratch, embeds the attestation as
  report.json "scan" (objects kept as objects).
- Tests: tests/run-tests.sh (stub clamscan, real tool, fail-closed cases), tests/build-scope-tree.sh
  (polyglot, web-root symlink, docroot under tmp, handler dir, uploads, EICAR, sparse 2001 MiB mp4),
  tests/image-scope-test.sh (end to end on the built image; CI runs it).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0185ukXi4YX5FxJGqhi6qab6
2026-11-22 07:05:11 -08:00
..