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

Add stdin support for reading policy #188

Merged
merged 4 commits into from
Mar 25, 2021

Conversation

briandbecker
Copy link
Contributor

  • Add ability to read from stdin for a policy to be analyzed such as cat file.json | parliament
  • Adds new FileType argument to read from stdin and don't allow both --file and stdin
  • Implements Be able to pipe a file into parliament #163

* Add ability to read from  stdin for a policy to be analyzed such as
  `cat file.json | parliament`
* Adds new FileType argument to read from stdin and don't allow both
  --file and stdin
* Implements duo-labs#163
* Since we can test if we are using stdin vs --file attribute we can
  just use the same attribute instead of 2
@0xdabbad00
Copy link
Collaborator

LGTM. Awesome @briandbecker. This can be merged @steiza

@briandbecker
Copy link
Contributor Author

@0xdabbad00 and @steiza found a bug, the call to analyze_policy_string needs the file name. Fixing in the next push

@briandbecker
Copy link
Contributor Author

ok that should do it, let me know if I should squash

@0xdabbad00
Copy link
Collaborator

LGTM still. Thank you.

@steiza steiza merged commit 1e5cb87 into duo-labs:main Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants