Skip to content

Git-Repo-Scanner: Optionally include commit information in output#775

Merged
rfelber merged 4 commits intomainfrom
feature/git-repo-scanner-annotate-commit-id
Oct 26, 2021
Merged

Git-Repo-Scanner: Optionally include commit information in output#775
rfelber merged 4 commits intomainfrom
feature/git-repo-scanner-annotate-commit-id

Conversation

@malexmave
Copy link
Copy Markdown
Member

@malexmave malexmave commented Oct 25, 2021

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 True to the call.

Side note: Usually, I would use a store_true action for the parameterization, which would make it unnecessary to explicitly add a True to the call. I am using the explicit parameterization to be consistent with the --obey-rate-limit switch, which also requires an explicit True / False parameter. However, if desired, I can change it.

Checklist

  • Test your changes as thoroughly as possible before you commit them. Preferably, automate your test by unit/integration tests.
  • Make sure npm test runs for the whole project.
  • Make codeclimate checks happy

malexmave and others added 2 commits October 25, 2021 17:42
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>
@malexmave malexmave added the scanner Implement or update a security scanner label Oct 25, 2021
@malexmave malexmave self-assigned this Oct 25, 2021
malexmave and others added 2 commits October 25, 2021 17:54
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: GitHub Actions <securecodebox@iteratec.com>
@rfelber rfelber added this to the v3.3.0 milestone Oct 26, 2021
@rfelber rfelber merged commit 97aa41b into main Oct 26, 2021
@rfelber rfelber deleted the feature/git-repo-scanner-annotate-commit-id branch October 26, 2021 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scanner Implement or update a security scanner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants