feat(ci): add plugin checksum drift verification#608
Conversation
|
@utksh1 This PR adds plugin checksum verification to CI. When plugin files change without updating checksums, the workflow will fail and guide contributors to run |
|
@utksh1 The formatting check failure is due to line endings (CRLF vs LF) on Windows — this PR only adds CI workflow files and a Python script. The functionality is unaffected. Please review. |
utksh1
left a comment
There was a problem hiding this comment.
Thanks for adding a checksum workflow. This is not mergeable yet.
The new scripts/refresh_plugin_checksums.py --dry-run path only computes and prints checksums. It never reads a committed checksum manifest and never exits non-zero when a plugin file has drifted, so the GitHub Action would pass even when plugin metadata/parser files changed without an updated checksum. That misses the core purpose of the PR.
Please make dry-run/verify mode compare against a committed manifest and fail on missing, changed, or extra entries. Also fix the current formatting-hygiene failure from git diff --check before re-requesting review.
|
@utksh1 Both requested changes are now addressed: --dry-run now reads the committed manifest (plugins/checksums.json), compares live checksums against it, and exits 1 on missing, changed, or extra entries — verified by the passing verify-checksums check. The two remaining failures (backend-lint and frontend-checks) are pre-existing on main and unrelated to this PR: backend-lint: F821 Undefined name 'db' in backend/secuscan/workflows.py:82 — git diff main -- backend/secuscan/workflows.py shows no changes to that file from this branch. |
utksh1
left a comment
There was a problem hiding this comment.
Re-reviewed the update. This is still not merge-ready: required checks are red, and the checksum workflow still needs to prove drift detection by comparing against the committed manifest and failing on mismatch, not only generating/printing checksums. Please rebase on latest main, fix CI, and add a failing-drift test path.
|
@utksh1 Addressed all feedback:
All checks are green. |
utksh1
left a comment
There was a problem hiding this comment.
Re-reviewed the latest update. The workflow now compares against a committed manifest, but the manifest still stores paths with Windows-style backslashes, e.g. plugins\amass\metadata.json. The CI runs on Ubuntu and the script walks POSIX paths, so this needs normalized POSIX-relative paths or explicit cross-platform normalization before it is safe to merge. Please also rebase on latest main and rerun the checksum workflow.
- Add refresh_plugin_checksums.py script to generate plugin checksums - Add GitHub Actions workflow to verify checksums on PR/push - CI will fail when plugin files change without checksum update Fixes utksh1#581
0fb1043 to
7d11a89
Compare
|
@utksh1 Rebased onto upstream |
utksh1
left a comment
There was a problem hiding this comment.
This still needs changes before merge. The PR commits a full generated plugin checksum manifest, and that manifest is already drifting as unrelated plugin metadata changes continue landing. Please narrow the workflow so it does not require broad generated churn on every plugin change, use stable POSIX paths consistently, and rebase/regenerate against current main only after the workflow design is scoped.
…committed manifest
…um in metadata.json
|
@utksh1 Redesigned based on feedback:
Let me know if the scope or design needs further adjustment. |
utksh1
left a comment
There was a problem hiding this comment.
Re-reviewed the latest push. This duplicates the existing plugin checksum tooling and introduces a separate refresh_plugin_checksums.py/workflow path instead of integrating with scripts/refresh_plugin_checksum.py and current metadata checksum validation. Please rework to extend the existing script/CI path and keep the diff much smaller.
… for CI drift detection
|
@utksh1 Reworked completely based on this feedback. This PR now extends the existing
Let me know if this is the shape you had in mind. |
|
Closing due to unresolved review feedback. |
Fixes #581