Git-Repo-Scanner: Optionally include commit information in output#775
Merged
Git-Repo-Scanner: Optionally include commit information in output#775
Conversation
In some cases, the latest commit ID (SHA) of the found repositories can be an interesting piece of metadata (for example, to annotate the version field for DefectDojo output in cascading rules). This commit adds this functionality to git-repo-scanner. It is disabled by default, as it causes an extra API hit per detected repository. Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: GitHub Actions <securecodebox@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: GitHub Actions <securecodebox@iteratec.com>
rfelber
approved these changes
Oct 26, 2021
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.
In some cases, the latest commit ID (SHA) of the found repositories can be an interesting piece of metadata (for example, to annotate the version field for DefectDojo output in cascading rules). This PR adds this functionality to git-repo-scanner. It is disabled by default, as it causes an extra API hit per detected repository. To enable it, add
--annotate-latest-commit-id Trueto the call.Side note: Usually, I would use a
store_trueaction for the parameterization, which would make it unnecessary to explicitly add aTrueto the call. I am using the explicit parameterization to be consistent with the--obey-rate-limitswitch, which also requires an explicit True / False parameter. However, if desired, I can change it.Checklist
npm testruns for the whole project.