Upgrade gitleaks from v7.6.1 to v8.3.0#830
Merged
Merged
Conversation
Member
|
Oh my. This is going to be a larger operation if we include it. Let's discuss what to do about this once we have our team together again. |
This was referenced Nov 29, 2021
Member
|
What will have to be done here:
|
Signed-off-by: secureCodeBoxBot <securecodebox@iteratec.com>
08a65bf to
a8db880
Compare
Signed-off-by: GitHub Actions <securecodebox@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
3 tasks
5 tasks
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
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: 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: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Before Gitleaks 8.0, the parser used to construct a direct URL to each detected commit based on the parameter used to clone the repo. Since it can no longer clone repos, this is no longer feasible. However, this commit adds the capability to pull the repo information from a scan annotation and use that. It does not actually enforce that the provided repository URL matches the one that was cloned in the init container - it blindly trusts whatever data it is given. Signed-off-by: Max Maass <max.maass@iteratec.com>
This improves consistency with the scope limiter annotations, which use descriptors of a similar form. Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
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: Max Maass <max.maass@iteratec.com>
Member
|
This is now ready to review. Please also review with an eye towards secureCodeBox/documentation#160 so that we may be able to close that as well. |
The git clone should use the --mirror option to ensure the full repository is cloned. Otherwise the data may be incomplete. See https://wwws.nightwatchcybersecurity.com/2022/02/11/gitbleed/ Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
Signed-off-by: Max Maass <max.maass@iteratec.com>
SebieF
requested changes
Mar 7, 2022
SebieF
left a comment
Contributor
There was a problem hiding this comment.
A lot of nice work! Only a few comments/questions from my side. :)
Signed-off-by: Max Maass <max.maass@iteratec.com>
SebieF
approved these changes
Mar 11, 2022
rfelber
approved these changes
Mar 16, 2022
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.
This PR upgrades gitleaks from v7.6.1 to v8.3.0. This includes a number of breaking changes, see the release notes by Gitleaks, particularly that for v8.0.0.
SCB-specific changes
Gitleaks no longer supports cloning natively. To clone a repository, use an init container as described in the updated documentation.
Findings no longer contain direct link to commit. Since Gitleaks no longer clones, it also does not include repository information in its output. We thus removed the
attributes.repokey from the finding, and theattributes.commitno longer contains a link to the repo by default, only the SHA of the commit. To add the link to the repo, you need to add a scan annotation calledmetadata.scan.securecodebox.io/git-repo-urland point it at the URL of the repository (e.g.https://github.com/secureCodeBox/secureCodeBox). Further details can be found in the documentation.Scanning only commits from a specific timeframe now works natively. There is no longer a need to use our fork of gitleaks. See the description in the documentation. Closes #790.
We removed the default cascading rules. There is no longer the possibility to write a generic cascading rule that covers all possible ways of authenticating. You can find an example cascading rule that downloads a repository from GitHub here, use it as a basis and change the used scanner to Gitleaks with your chosen parameters.
We removed the default rulesets. The ScanType no longer ships with a set of default rules, as they were outdated and it is better to rely on the rulesets maintained by the Gitleaks team. Use the ruleset built into the scanner or provide your own using a ConfigMap.
Severity of the findings now more explicitly based on result tags. All findings are now classified as medium severity by default. When defining your own Gitleaks rulesets, you can set the tags "LOW" or "HIGH" to override the severity for findings matching a particular rule.
We now use the official Docker image. Before, we used a custom version of the image to work around some limitations of Gitleaks (i.e., being unable to control the return code, and the system not creating a report file if no findings were found). Both of these limitations have been addressed, so we now use the official Docker image of Gitleaks directly. This will be changed automatically when you update the Helm install (you do not need to make any manual changes) but it will lead to a new image being installed on your cluster.