-
Notifications
You must be signed in to change notification settings - Fork 437
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
Adds verify taint config only option #740
Adds verify taint config only option #740
Conversation
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.
Thanks for proposing this! I just noted a few minor things
source/command/analyzeCommand.ml
Outdated
Log.log_exception "Taint analysis failed." exn (Worker.exception_backtrace exn); | ||
raise exn |
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.
@arthaud Do you have a second opinion if we can do better for the logging?
cf8f7ae
to
56f3baa
Compare
@tianhan0 thanks for the review. Made the changes, hopefully, as suggested. Back to you if it pleases you :) |
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.
Looks good! Just left a nitpick that hope you can address.
Also, do you know why this test failed: https://github.com/facebook/pyre-check/actions/runs/5141096156/jobs/9253212045?pr=740? Is this expected?
That test has been failing for a long time and is unrelated to this PR. I think, from some tests that I did that the setup ocaml action actually uses caches which need to be invalidated now. I tried to run the action by manually setting up opam with a package manager instead of the actions and the build doesn't error out as it does in the main repo. But then without the action, setting up the switch takes a large chunk of time. I think there is a way to specify a cache key that is invalidated for a specific amount of time. I can look into this further if you want.
Ofcourse, I can address it. Thanks for the valuable suggestions and reviews. Made the change! |
56f3baa
to
3702746
Compare
Adds verify_taint_config_only option to the analyze command that just verifies taint.config files and skips the analysis. This can be useful in the future when we want to verify taint config files via the vs code extension without performing analysis or even any other sort of preprocessing. Modifies the ocaml server and the python client to pass options for the same. Signed-off-by: Abishek V Ashok <[email protected]>
3702746
to
985868b
Compare
LGTM! |
@arthaud has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Adds verify_taint_config_only option to the analyze command that just verifies taint.config files and skips the analysis. This can be useful in the future when we want to verify taint config files via the vs code extension without performing analysis or even any other sort of preprocessing.
Modifies the ocaml server and the python client to pass options for the same.
Pre-submission checklist
pip install -r requirements-dev.txt && pre-commit install
pre-commit run
Summary
Test Plan
taint.config
ondocumentation/pysa_tutorial/exercise1/
:python3 -m pyre-check.client.pyre -n analyze --verify-taint-config-only
taint.config
to induce a TaintConfigurationError:Command:
python3 -m pyre-check.client.pyre -n analyze --verify-taint-config-only
Fixes part of MLH-Fellowship#82
Signed-off-by: Abishek V Ashok [email protected]