Repository navigation
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
Open
devin-ai-integration[bot] wants to merge 4 commits into
devin-ai-integration[bot] wants to merge 4 commits into
Conversation
…d of committing and pushing Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
Author
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
…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>
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
git node securityno longer asks permission for local changes, and it never commits or pushes from a local checkout. It writes the files, runsgit addon them, and writes the commit message to.git/MERGE_MSG(the file Git uses for the message during a conflicted merge). A plaingit commit, and editors such as VS Code, then start with that message, so the staged diff can be reviewed before committing.commitAndPushVulnerabilitiesJSON→stageSecurityReleaseChanges: keeps thecheckRemotecheck and the rejection of unrelated staged changes, thengit add -- <paths>and writes the message togit 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 commitdeletes the file once the commit is made. The CLI prints the next steps (git diff --cached,git commit,git push,git resetto discard).runSecurityGitCommandandwriteSecurityFile. Callers, includingpersistPendingCve, now usefs.writeFileSyncdirectly.checkoutOnSecurityReleaseBranchandupdateReleaseFolderno longer ask either.--request-cveasks 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→requestReportCVEthenupdateHackonerReportCve), with no further prompts.vulnerabilities.jsonis written and staged last, so if that step fails or the run is interrupted,git node security --synccan still pull the CVE IDs from HackerOne. The OpenJS CNApendingCvemarker is still written before waiting, so an interrupted reservation can be resumed.--startis unchanged from main: since feat(git-node): simplifysecurity --startnodejs/node-core-utils#1240 it pushes the draft through the GitHub API, and that push is still a confirmed remote step.confirmSecurityStepstays for remote actions: issues, PRs, branches, HackerOne and comments.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