Skip to content

Commit

Permalink
feat: added list cloud source repo functionalities in the scanner (#19)
Browse files Browse the repository at this point in the history
Signed-off-by: Sudipto Baral <sudiptobaral.me@gmail.com>
  • Loading branch information
sudiptob2 authored and mshudrak committed Feb 24, 2023
1 parent 3ca9933 commit df8e1ee
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/gcp_scanner/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,13 @@ def crawl_loop(initial_sa_tuples: List[Tuple[str, Credentials, List[str]]],
project_result['services'] = crawl.list_services(project_id,
credentials)

# Get list of cloud source repositories enabled in the project
if is_set(scan_config, 'repos'):
project_result['repos'] = crawl.list_sourcerepo(
project_id,
credentials
)

# trying to impersonate SAs within project
if scan_config is not None:
impers = scan_config.get('service_accounts', None)
Expand Down

0 comments on commit df8e1ee

Please sign in to comment.