-
Notifications
You must be signed in to change notification settings - Fork 36
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
feat: added support for scanning any account #168
Conversation
b12c08f
to
1b2adc4
Compare
1b2adc4
to
c72c59d
Compare
Changed Now we iterate over each account: for account in Config.account_name:
generator = get_account_generator(account)
for repo in generator:
download_workflows_and_actions(repo) and determine its type: account_info = get_account_info(account_name=account_name)
account_type = account_info.get("type")
if account_type == "User":
log.info(f"[+] Scanning user: {account_name}")
return get_user_repository_generator(account_name)
elif account_type == "Organization":
log.info(f"[+] Scanning organization: {account_name}")
return get_organization_repository_generator(account_name)
else:
log.error(f"[-] Failed to get account type for {account_name}")
return None From there, we continue the same. Usage: raven download account --account-name ravendemo --account-name $PERSONAL_ACCOUNT --token $GITHUB_TOKEN |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I love that you can add multiple accounts to the same scan, but I am unsure about the obfuscation of the account type. It feels odd to me that the user doesn't have to explicitly specify whether the account is a user or an organization.
What led to the decision not to ask for the account type explicitly?
This solution allows users to scan different types of accounts without specifying if it is an organization or a user account. I think this is the best solution as we don't care if we scan an organization or a user account as we want RAVEN to scan its repositories. Command like this: This makes it as easy as possible to run RAVEN as you don't even have to check if a specific account is @oreenlivnicode WDYT? |
ed6230c
to
9490158
Compare
I got it @elad-pticha. I saw that github themselves use the terminology account. So I am ok with it. |
016ddd3
to
bfdae36
Compare
bfdae36
to
05a9316
Compare
No description provided.