-
Notifications
You must be signed in to change notification settings - Fork 10
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 Insufficient_permissions
case as a reason to skip a target
#304
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Backwards compatibility summary:
|
ed0ef24
to
6017756
Compare
aryx
approved these changes
Oct 29, 2024
semgrep-ci bot
pushed a commit
to semgrep/semgrep
that referenced
this pull request
Oct 30, 2024
…ep-proprietary#2506) Important: semgrep-interfaces changed and our internal clients need to upgrade first so they can read understand the new reason for skipping a target file (`Insufficient_permissions`). See semgrep/semgrep-interfaces#304 This involved checking and reporting access problems in three main locations and taking care of 2 project kinds: * pysemgrep, semgrep-core, osemgrep * git and non-git projects We have tests that cover the essentials for pysemgrep and for osemgrep. Not all skipped files or folders are reported depending on the implementation: * in git projects, we don't list skipped folders because git does it for us * in non-git pysemgrep projects, we don't list skipped folders (because it seems unessential and doesn't cause problems downstream whereas it was important to filter out regular files before passing them to semgrep-core) Test plan: * CI tests are sufficient for non-git projects and are most strict for osemgrep * We don't have tests for git projects yet. Manual testing: ``` $ cd semgrep # or any git repo $ mkdir foo $ touch foo/bar.py $ chmod 000 foo/bar.py $ semgrep foo ... $ semgrep foo --experimental ... ``` Expected results: * no crash * show that 0 files were scanned synced from Pro 418b03583f084fb2cc9c8c4367c3c456229a1db2
semgrep-ci bot
pushed a commit
to semgrep/semgrep
that referenced
this pull request
Oct 30, 2024
…ep-proprietary#2506) Important: semgrep-interfaces changed and our internal clients need to upgrade first so they can read understand the new reason for skipping a target file (`Insufficient_permissions`). See semgrep/semgrep-interfaces#304 This involved checking and reporting access problems in three main locations and taking care of 2 project kinds: * pysemgrep, semgrep-core, osemgrep * git and non-git projects We have tests that cover the essentials for pysemgrep and for osemgrep. Not all skipped files or folders are reported depending on the implementation: * in git projects, we don't list skipped folders because git does it for us * in non-git pysemgrep projects, we don't list skipped folders (because it seems unessential and doesn't cause problems downstream whereas it was important to filter out regular files before passing them to semgrep-core) Test plan: * CI tests are sufficient for non-git projects and are most strict for osemgrep * We don't have tests for git projects yet. Manual testing: ``` $ cd semgrep # or any git repo $ mkdir foo $ touch foo/bar.py $ chmod 000 foo/bar.py $ semgrep foo ... $ semgrep foo --experimental ... ``` Expected results: * no crash * show that 0 files were scanned synced from Pro 418b03583f084fb2cc9c8c4367c3c456229a1db2
semgrep-ci bot
pushed a commit
to semgrep/semgrep
that referenced
this pull request
Oct 30, 2024
…ep-proprietary#2506) Important: semgrep-interfaces changed and our internal clients need to upgrade first so they can read understand the new reason for skipping a target file (`Insufficient_permissions`). See semgrep/semgrep-interfaces#304 This involved checking and reporting access problems in three main locations and taking care of 2 project kinds: * pysemgrep, semgrep-core, osemgrep * git and non-git projects We have tests that cover the essentials for pysemgrep and for osemgrep. Not all skipped files or folders are reported depending on the implementation: * in git projects, we don't list skipped folders because git does it for us * in non-git pysemgrep projects, we don't list skipped folders (because it seems unessential and doesn't cause problems downstream whereas it was important to filter out regular files before passing them to semgrep-core) Test plan: * CI tests are sufficient for non-git projects and are most strict for osemgrep * We don't have tests for git projects yet. Manual testing: ``` $ cd semgrep # or any git repo $ mkdir foo $ touch foo/bar.py $ chmod 000 foo/bar.py $ semgrep foo ... $ semgrep foo --experimental ... ``` Expected results: * no crash * show that 0 files were scanned synced from Pro 418b03583f084fb2cc9c8c4367c3c456229a1db2
ajbt200128
pushed a commit
to semgrep/semgrep
that referenced
this pull request
Oct 30, 2024
…ep-proprietary#2506) Important: semgrep-interfaces changed and our internal clients need to upgrade first so they can read understand the new reason for skipping a target file (`Insufficient_permissions`). See semgrep/semgrep-interfaces#304 This involved checking and reporting access problems in three main locations and taking care of 2 project kinds: * pysemgrep, semgrep-core, osemgrep * git and non-git projects We have tests that cover the essentials for pysemgrep and for osemgrep. Not all skipped files or folders are reported depending on the implementation: * in git projects, we don't list skipped folders because git does it for us * in non-git pysemgrep projects, we don't list skipped folders (because it seems unessential and doesn't cause problems downstream whereas it was important to filter out regular files before passing them to semgrep-core) Test plan: * CI tests are sufficient for non-git projects and are most strict for osemgrep * We don't have tests for git projects yet. Manual testing: ``` $ cd semgrep # or any git repo $ mkdir foo $ touch foo/bar.py $ chmod 000 foo/bar.py $ semgrep foo ... $ semgrep foo --experimental ... ``` Expected results: * no crash * show that 0 files were scanned synced from Pro 418b03583f084fb2cc9c8c4367c3c456229a1db2
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Clients consuming
semgrep
output should be upgraded to support this.Used by https://github.com/semgrep/semgrep-proprietary/pull/2506
make setup && make
to update the generated code after editing a.atd
file (TODO: have a CI check)For example, the Semgrep backend need to still be able to consume data generated
by Semgrep 1.17.0.
See https://atd.readthedocs.io/en/latest/atdgen-tutorial.html#smooth-protocol-upgrades