-
Notifications
You must be signed in to change notification settings - Fork 773
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
Fix some code quality and bug-risk issues #1379
Conversation
as you mention, the change only makes sense if we subscribe to DeepSource adding DeepSource requires to grant the following permissions. it's unclear to me what this list actually means, and why that is needed. if so, I would like to trigger DeepSource from GitHub. I don't need the other directly. I will not grant anything that comes with write access to anything in this repo. also not sure how I would connect it to |
The screenshot is the GitHub oAuth2 login. By authorizing DeepSource on this screen, you would be able to sign in to DeepSource using your existing GitHub account. DeepSource only need access to your verified email address, so they can identify you. |
ok, got it. thanks for explanation! for completeness: a later screen during the signup process describes exactly the set of permissions (which is perfect): I've merged the PR, and only then clicked "analyze repo" on deepsource.io, and the analysis has run successfully it seems https://deepsource.io/gh/crossbario/autobahn-python/ awesome=) btw: also thanks for the actual fixes. I've had a quick glances at some of the other reported issues .. some of these are definitely worth fixing. others, I guess we need to play with settings a bit (eg line length or such) follow up issues: |
one more Q: I would give "Autofix" a try .. but it wants more permissions than only creating new PRs (which is fine), it also asks for "direct write". just PRs isn't enough? Direct write access (if that means direct push to master or sth): nope. The only permission I would give is: create new PRs, and change exactly those newly created PRs. essentially, exactly what anyone has. so deepsource code fork the repo and create a PR from there. zero permissions needed on the forked repo? |
and one more Q: how/where do I mark issues as invalid? eg https://deepsource.io/gh/crossbario/autobahn-python/issue/PYL-E0602/occurrences is invalid ( Line 38 in 2770817
|
"write" permission on github is indeed push access to every repo that user owns, AFAIK. |
Is it possible to "dismiss" warnings/errors generated by the tool? e.g. this is neat https://deepsource.io/gh/crossbario/autobahn-python/issue/PTC-W1006/occurrences (looking for "secret" in the source, I guess?) but in a method that starts with So being able to say "I, a human, have looked at this warning and find it to be wrong/spurious/etc" would be good. I see it also finds SHA1 hash usage -- but also that's part of an RFC so same thing applies ("I have looked, and want to continue using sha1"). |
Autofix app's write permissionsFor the
Neither Invalid issuesFor the invalid issues, you could either report to us as a false positive (or) ignore them across the repository, only the specific occurrence, only on specific file patterns. Ignore issueTo ignore an issue, you can do one of the following:
Report false positiveWhen you ignore an issue, there is an option to report false positive. All false positive reports are looked at by the DeepSource's analyzer team and will be resolved in a few days. Secret exposed issues in test filesRef: https://deepsource.io/gh/crossbario/autobahn-python/issue/PTC-W1006/occurrences These issues are not raised on test files. The issue is raised in this case due to a mistake in |
Refer #1385 |
@pnijhara thanks again for explanations and help!
|
Find the other issues found here - https://deepsource.io/gh/pnijhara/autobahn-python/issues/?category=recommended
This PR also adds
.deepsource.toml
configuration file to run DeepSource analysis on the repo with. Upon enabling DeepSource, the analysis will run on every PR and commit to detect 560+ types of issues in the changes — including bug risks, anti-patterns, security vulnerabilities, etc.To enable DeepSource analysis after merging this PR, please follow these steps:
You can also look at the docs for more details. Do let me know if I can be of any help!