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

Implement -r recursive option #127

Closed
KevinHock opened this issue May 3, 2018 · 6 comments
Closed

Implement -r recursive option #127

KevinHock opened this issue May 3, 2018 · 6 comments
Labels

Comments

@KevinHock
Copy link
Collaborator

So let us steal, once again (a 3rd, or 4th time), from Bandit.

https://github.com/openstack/bandit/blob/master/bandit/cli/main.py#L157-L160

https://github.com/openstack/bandit/blob/8f09d8b208f037b7d49ed6bc88f2ac200e7cc06c/bandit/core/manager.py#L171-L219

This will enable a user to just give -r /path/to/files instead of -f file one at a time.

This is less straightforward, you should also add

    parser.add_argument(
        'targets', metavar='targets', type=str, nargs='*',
        help='source file(s) or directory(s) to be tested'
    )
    parser.add_argument(
        '-x', '--exclude', dest='excluded_paths', action='store',
        default='', help='comma-separated list of paths to exclude from scan '
                         '(note that these are in addition to the excluded '
                         'paths provided in the config file)'
    )

too.

This will help us out a great deal, as I'm working on documentation, and then after docs I'll return to the CFG work (the expr_star_handler stuff). So without you I wouldn't work on this for a while.

@KevinHock KevinHock added the cool label May 3, 2018
@KevinHock
Copy link
Collaborator Author

Look at the files I linked to see how all this is done.

@KevinHock
Copy link
Collaborator Author

KevinHock commented May 3, 2018

Hi @omergunal, I have a hard ticket for you 👍

@omergunal
Copy link
Contributor

All right, i'm waiting for you

@KevinHock
Copy link
Collaborator Author

Yes?

@omergunal
Copy link
Contributor

We can work on this when you finish documentation

@KevinHock
Copy link
Collaborator Author

Yay 🎊 🎉 🎈

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants