Repository navigation
feat: seckit fix command + audit check for Dependabot security updates - #15
Merged
Merged
Conversation
policy-github.yml lists dependabot_security_updates as required and
enforce already turns it on, but audit never read it back. Query
repos/{owner}/{repo}/automated-security-fixes and record
security.dependabot_security_updates as enabled, disabled, paused or
unknown. Same check in audit.ps1.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
New fix_deps.sh / fix_deps.ps1, dispatched as `seckit fix [DIR]` and menu item f. Finds package-lock.json files, applies same-major fixes with osv-scanner fix (in-place, minor, no-introduce) then npm audit fix --package-lock-only --ignore-scripts (fallback when osv fails). Prints before/after severity counts, version changes, and what still needs a major upgrade. --dry-run works on a temp copy, --install also updates node_modules (still --ignore-scripts). Never commits or pushes. Exit 1 while high/critical remain. Other ecosystems are reported as not supported yet. fix_deps.sh added to shellcheck in check.sh and CI. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
npm audit prints {"error":...} with exit 0 when the registry is unreachable;
fix_deps.sh read that as 0 critical / 0 high and exited 0. Treat a missing
metadata.vulnerabilities as unknown and count it as a failure, matching
fix_deps.ps1. A workspace lockfile skipped by --dry-run now keeps its
before-count instead of reporting clean (both scripts).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QgSpYbut4TczrUrE1hUKeg
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.
What
seckit auditnow checks Dependabot security updates. The policy (templates/policy-github.yml) marks them required andenforcealready turns them on, butauditnever checked. It now recordssecurity.dependabot_security_updatesand fails when the setting is disabled, paused or unreadable. Bash and PowerShell.seckit fix [DIR]command (fix_deps.sh/fix_deps.ps1): applies safe, same-major fixes to vulnerable npm dependencies.package-lock.jsononly,--ignore-scripts, never touchesnode_modules, never commits or pushes.osv-scanner fix --strategy=in-place, falls back tonpm audit fixwhen osv fails (it errors on lockfiles withfile:deps).--dry-runwrites nothing;--installalso updatesnode_modules(scripts still off).Why
Found on a real repo: Dependabot alerts were on but security-update PRs were off, so 134 alerts sat unfixed, including a critical Next.js RCE. Neither
auditnorscanflagged the setting, and SecKit had no way to apply fixes.Testing
audit.sh/audit.ps1against a repo with the setting off: row fails as expected; API refusal (no admin) recordsunknownwithout crashing.fix_deps.shon throwaway npm fixtures (minimist, lodash, node-fetch): safe bumps applied, major-only item listed, dry-run leaves the lockfile byte-identical, registry outage and skipped workspaces fail closed. Same results fromfix_deps.ps1./bin/bash3.2.bash check.sh: RESULT: green.No automated test for
fix(needs the npm registry, does not fitcheck.sh).🤖 Generated with Claude Code
https://claude.ai/code/session_01QgSpYbut4TczrUrE1hUKeg