-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Swift: Add predicate injection query #11670
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
Swift: Add predicate injection query #11670
Conversation
QHelp previews: swift/ql/src/queries/Security/CWE-943/PredicateInjection.qhelpPredicate built from user-controlled sourcesPredicates represent logical conditions that can be used to check whether an object matches them. If a predicate is built from user-provided data without sufficient sanitization, an attacker may be able to change the overall meaning of the predicate. RecommendationWhen building a predicate from untrusted data, you should either pass it to the appropriate ExampleIn the following insecure example,
A better way to do this is to use the
References
|
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.
This looks great!
A few very nitpicky comments follow. We will also need a docs review as usual.
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.
LGTM. Happy for this to be merged after docs review.
Co-authored-by: Geoffrey White <40627776+geoffw0@users.noreply.github.com>
da05b20
to
6837af9
Compare
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.
👋 from Docs—just a few minor suggestions!
Co-authored-by: Ben Ahmady <32935794+subatoi@users.noreply.github.com>
Thanks for the review @subatoi! 🙇 All suggestions applied. |
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 @atorralba ! In the unlikely event you need anyone else from Docs to review this again after tomorrow and before the 3rd January, please post in #code-security-docs and someone should be able to help. Have a good break!
No description provided.