Skip to content

feat(security): stage changes with a pre-filled commit message instead of committing and pushing - #5

Open
devin-ai-integration[bot] wants to merge 4 commits into
mainfrom
devin/1794486350-stage-security-changes
Open

devin-ai-integration[bot] wants to merge 4 commits into
mainfrom
devin/1794486350-stage-security-changes

Conversation

@devin-ai-integration

@devin-ai-integration devin-ai-integration Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Summary

git node security no longer asks permission for local changes, and it never commits or pushes from a local checkout. It writes the files, runs git add on them, and writes the commit message to .git/MERGE_MSG (the file Git uses for the message during a conflicted merge). A plain git commit, and editors such as VS Code, then start with that message, so the staged diff can be reviewed before committing.

  • commitAndPushVulnerabilitiesJSON → stageSecurityReleaseChanges: keeps the checkRemote check and the rejection of unrelated staged changes, then git add -- <paths> and writes the message to git rev-parse --git-path MERGE_MSG. If that file already holds a message (from an earlier uncommitted run), the new message is added as another line. git commit deletes the file once the commit is made. The CLI prints the next steps (git diff --cached, git commit, git push, git reset to discard).
  • Removed runSecurityGitCommand and writeSecurityFile. Callers, including persistPendingCve, now use fs.writeFileSync directly. checkoutOnSecurityReleaseBranch and updateReleaseFolder no longer ask either.
  • --request-cve asks for confirmation once, after listing the reports without a CVE. It then requests each CVE and writes its ID to the HackerOne report right away (collectSuccessfulCVERequests → requestReportCVE then updateHackonerReportCve), with no further prompts. vulnerabilities.json is written and staged last, so if that step fails or the run is interrupted, git node security --sync can still pull the CVE IDs from HackerOne. The OpenJS CNA pendingCve marker is still written before waiting, so an interrupted reservation can be resumed.
  • --start is unchanged from main: since feat(git-node): simplify security --start nodejs/node-core-utils#1240 it pushes the draft through the GitHub API, and that push is still a confirmed remote step.
  • confirmSecurityStep stays for remote actions: issues, PRs, branches, HackerOne and comments.
  • Docs and tests updated.

Link to Devin session: https://app.devin.ai/sessions/f9e2f27485d3429a86f7a19a841c6daa
Open in Devin Desktop: https://app.devin.ai/desktop/session/f9e2f27485d3429a86f7a19a841c6daa?variant=devin
Requested by: @aduh95

…d of committing and pushing

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
@devin-ai-integration

Copy link
Copy Markdown
Author

I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".

  • Disable automatic comment, CI, and merge conflict monitoring

aduh95 and others added 3 commits November 12, 2026 12:42
…e-security-changes

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>

# Conflicts:
#	docs/git-node.md
#	lib/prepare_security.js
#	test/unit/security_git.test.js
…he CLI

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
… vulnerabilities.json

Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
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