Repository navigation
Add baseline lifecycle and new-risk checks - #73
Merged
Merged
Conversation
efegokdemir
marked this pull request as ready for review
October 21, 2026 19:02
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds versioned baselines for explicit TOML comparisons and Git reviews, so CI can report new, existing and resolved findings. Existing
--fail-onand--fail-on-riskpolicies still apply to all findings;--fail-on-newis an independent gate.User-facing capabilities
Use
changeguard baseline createto save a reviewed comparison, thenbaseline check --fail-on-newto fail only for newly introduced findings. The GitHub Action acceptsbaseline_pathandfail_on_newand exposes lifecycle counts.Implementation
Schema v1 stores bounded finding counts, repository-relative paths and SHA-256 fingerprints over stable, redacted finding identity. Baseline reads validate schema and paths; creation is exclusive and will not overwrite an existing file. Renames use the new path as a new identity, with the old finding reported as resolved. Baseline entries use deterministic ordering across locales.
Evidence
No Shopify rule was added. The existing coordinated Action example now pins the latest published release commits; it does not point at these unreleased feature branches.
Compatibility
The CLI minimum is now Node.js 22; the Action remains on Node.js 24. The package version stays at 0.6.0 on this feature branch. Proposed next version: 0.7.0.
Testing
Node.js 22.18.0 and 24.21.0:
npm ci --ignore-scripts,npm test(119/119 each),npm run coverage(92.89% statements/lines, 83.24% branches, 98.48% functions),npm run lint,npm run package:check,npm run package:smoke,npm run action:check,npm audit --audit-level=high(0 vulnerabilities), andgit diff --checkpassed. The four-tool synthetic CLI integration smoke test passed on both versions. Hosted GitHub Actions passed: Node.js 22/24 CI, cross-platform Action fixtures on Ubuntu/macOS/Windows with Node.js 22/24, CodeQL, Dependency Review, ChangeGuard PR Review, and Snyk. Scorecard has no PR-branch result; its workflow is configured for main pushes and weekly runs.Security
The baseline contains no summaries or configuration values. Baseline input is size-bounded and rejects unsupported schemas, symlinks, traversal and out-of-repository paths. The Action remains read-only and adds no permissions, telemetry or Shopify network calls.
Limitations
A baseline represents one selected comparison and can only be checked against the same comparison kind. It does not store commit IDs or transient checkout paths. Unsupported or incomplete Git reviews continue to fail closed under the selected policy.
Release impact
Recommend 0.7.0 after review and hosted CI. The Node.js 22 minimum is a documented compatibility break. No version was bumped on this branch.
Review checklist
Safety and semantics
Validation
Local checks and hosted results are reported above.