Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature: Scan Remote repository - Azure #954

Closed
dwertent opened this issue Dec 6, 2022 · 3 comments · Fixed by #1037
Closed

feature: Scan Remote repository - Azure #954

dwertent opened this issue Dec 6, 2022 · 3 comments · Fixed by #1037
Assignees
Labels
feature New feature or request fixed fixed issue and waiting for approval

Comments

@dwertent
Copy link
Contributor

dwertent commented Dec 6, 2022

Introduction

Currently, you can scan a remote repository hosted on GitHub as follows:

kubescape scan https://github.com/<org>/<repo>

In the background, kubescape will clone the repository and scan it like scanning a local directory.

Current behavior

This is true only for repositories hosted on github.

Desired behavior

Kubescape should support scanning public/private repositories hosted on Azure

e.g.

kubescape scan https://<>@dev.azure.com/<>/<>/_git/<>

Additional information

Private repositories should be supported as well, the token should be passed using an environment variable

@dwertent dwertent added feature New feature or request good first issue Good for newcomers open for contribution Feature/bug fix that we are happy to hand out to anyone who would like to contribute labels Dec 6, 2022
@anubhav06
Copy link
Contributor

anubhav06 commented Dec 19, 2022

If it's still open and if no one else is working on it, then I can take this. ( Since, this is similar to adding support for GitLab API )

@anubhav06
Copy link
Contributor

anubhav06 commented Jan 1, 2023

I've pretty much completed adding this feature.
Only thing that is creating a problem is that, even for scanning public Azure Repos, I need to pass my Personal Access Token.
When I pass my PAT, it successfully scans the repo. Without PAT, it shows an error that authentication required.

This seems to be a problem with go-git. Should I go ahead and create a PR with what's ready ?
"Azure DevOps requires capabilities multi_ack / multi_ack_detailed, which are not fully implemented". The new support which they have added has an example for Private repo cloning, but no example for public repo cloning.

Thus, I believe that it's a problem with go-git, and we need to clone Public repos by passing the PAT, until they fully support Azure DevOps cloning.

@matthyx matthyx removed good first issue Good for newcomers open for contribution Feature/bug fix that we are happy to hand out to anyone who would like to contribute labels Jan 5, 2023
@matthyx
Copy link
Contributor

matthyx commented Jan 11, 2023

thanks a lot @anubhav06 !

@matthyx matthyx added the fixed fixed issue and waiting for approval label Jan 12, 2023
@dwertent dwertent mentioned this issue Jan 13, 2023
@kubescape kubescape deleted a comment from github-actions bot Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request fixed fixed issue and waiting for approval
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants