aquasecurity / chain-bench

An open-source tool for auditing your software supply chain stack for security compliance based on a new CIS Software Supply Chain benchmark.
Apache License 2.0
712 stars 63 forks source link

Fix issue with get repo info #131

Closed codekuu closed 8 months ago

codekuu commented 8 months ago

Description

Issue when the sub group has the same name as the repository. The getRepoInfo function does not parse it out correctly.

This fixes this issue.

Example url: https://my-gitlab-instance.com/top-group/sub-group/repo-name/repo-name getRepoInfo returned before:

host: my-gitlab-instance.com
namespace: top-group/sub-group
repo: repo-name
err: %!s(<nil>)

it now returns:

host: my-gitlab-instance.com
namespace: top-group/sub-group/repo-name
repo: repo-name
err: %!s(<nil>)

Related issues

Checklist

CLAassistant commented 8 months ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Kevin Kuusela seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.