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

--all option fails #31

Closed
kmcquade opened this issue Jan 25, 2021 · 4 comments
Closed

--all option fails #31

kmcquade opened this issue Jan 25, 2021 · 4 comments
Assignees
Labels
bug Something isn't working

Comments

@kmcquade
Copy link
Collaborator

For some reason, the --all option fails.

 $ aws-allowlister generate -a
                                                                                                                                                                         
aws_allowlister.command.generate [INFO] Note: to silence these logs, supply the argument '--quiet'
aws_allowlister.command.generate [INFO] Policies for standard(s): 
Traceback (most recent call last):
  File "/Users/kmcquade/Code/github.com/salesforce/aws-allowlister/venv/bin/aws-allowlister", line 8, in <module>
    sys.exit(main())
  File "/Users/kmcquade/Code/github.com/salesforce/aws-allowlister/venv/lib/python3.9/site-packages/aws_allowlister/bin/cli.py", line 21, in main
    aws_allowlister()
  File "/Users/kmcquade/Code/github.com/salesforce/aws-allowlister/venv/lib/python3.9/site-packages/click/core.py", line 829, in __call__
    return self.main(*args, **kwargs)
  File "/Users/kmcquade/Code/github.com/salesforce/aws-allowlister/venv/lib/python3.9/site-packages/click/core.py", line 782, in main
    rv = self.invoke(ctx)
  File "/Users/kmcquade/Code/github.com/salesforce/aws-allowlister/venv/lib/python3.9/site-packages/click/core.py", line 1259, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/Users/kmcquade/Code/github.com/salesforce/aws-allowlister/venv/lib/python3.9/site-packages/click/core.py", line 1066, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/Users/kmcquade/Code/github.com/salesforce/aws-allowlister/venv/lib/python3.9/site-packages/click/core.py", line 610, in invoke
    return callback(*args, **kwargs)
  File "/Users/kmcquade/Code/github.com/salesforce/aws-allowlister/venv/lib/python3.9/site-packages/aws_allowlister/command/generate.py", line 133, in generate
    results = generate_allowlist_scp(standards, include, exclude)
  File "/Users/kmcquade/Code/github.com/salesforce/aws-allowlister/venv/lib/python3.9/site-packages/aws_allowlister/command/generate.py", line 151, in generate_allowlist_scp
    services = list(standard_results[0].intersection(*standard_results))
IndexError: list index out of range

I am about to fix this now. I will also expand the click unit tests so it covers all the options.

@kmcquade kmcquade added the bug Something isn't working label Jan 25, 2021
@kmcquade kmcquade self-assigned this Jan 25, 2021
@jdyke
Copy link
Collaborator

jdyke commented Jan 25, 2021

I didn't realize that was an available flag / argument. We should add to the list in the readme.

@jdyke
Copy link
Collaborator

jdyke commented Jan 25, 2021

kmcquade added a commit that referenced this issue Jan 25, 2021
@kmcquade
Copy link
Collaborator Author

That's the default argument for generate - I just thought I'd give it an explicit option.

@kmcquade
Copy link
Collaborator Author

Fixed by #32

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants