Intrafile tainting with variadic functions#538
Merged
maciejpirog merged 2 commits intomainfrom Jan 13, 2026
Merged
Conversation
43e9ae2 to
12b3064
Compare
dimitris-m
reviewed
Jan 13, 2026
| let sig_details = all_sigs |> List.map (fun s -> | ||
| Printf.sprintf "(arity=%d, params=%s)" s.arity | ||
| (s.sig_.params |> List.map (function Signature.P s -> "P(" ^ s ^ ")" | Signature.Other -> "Other") |> String.concat ",") | ||
| (s.sig_.params |> List.map Signature.show_param |> String.concat ",") |
Collaborator
There was a problem hiding this comment.
I think we still need the "P(" ... ) part to remain compatible in terms of output?
dimitris-m
reviewed
Jan 13, 2026
| (* Debug logging for ALL signatures being added *) | ||
| let fn_name_str = show_fn_id func_name in | ||
| let params_str = signature.sig_.params |> List.map (function Signature.P s -> "P(" ^ s ^ ")" | Signature.Other -> "Other") |> String.concat "," in | ||
| let params_str = signature.sig_.params |> List.map Signature.show_param |> String.concat "," in |
Collaborator
There was a problem hiding this comment.
Ok, maybe better, not sure. Maybe print P(...) and PRest(...) ?
This could be done by adapting show_, not necessarily here.
Contributor
Author
There was a problem hiding this comment.
It is for logging only, I believe
Collaborator
There was a problem hiding this comment.
Up to you, lgtm for me.
dimitris-m
approved these changes
Jan 13, 2026
This was referenced Jan 13, 2026
Merged
tmeijn
pushed a commit
to tmeijn/dotfiles
that referenced
this pull request
Jan 17, 2026
This MR contains the following updates: | Package | Update | Change | |---|---|---| | [opengrep/opengrep](https://github.com/opengrep/opengrep) | minor | `v1.14.1` → `v1.15.1` | MR created with the help of [el-capitano/tools/renovate-bot](https://gitlab.com/el-capitano/tools/renovate-bot). **Proposed changes to behavior should be submitted there as MRs.** --- ### Release Notes <details> <summary>opengrep/opengrep (opengrep/opengrep)</summary> ### [`v1.15.1`](https://github.com/opengrep/opengrep/releases/tag/v1.15.1): Opengrep 1.15.1 [Compare Source](opengrep/opengrep@v1.15.0...v1.15.1) #### Bug fixes - Clojure translation improvements by [@​dimitris-m](https://github.com/dimitris-m) in [#​534](opengrep/opengrep#534) **Full Changelog**: <opengrep/opengrep@v1.15.0...v1.15.1> ### [`v1.15.0`](https://github.com/opengrep/opengrep/releases/tag/v1.15.0): Opengrep 1.15.0 [Compare Source](opengrep/opengrep@v1.14.1...v1.15.0) #### What's Changed - Clojure translation part III by [@​dimitris-m](https://github.com/dimitris-m) in [#​527](opengrep/opengrep#527) - Php modernisation by [@​corneliuhoffman](https://github.com/corneliuhoffman) in [#​529](opengrep/opengrep#529) - Intrafile tainting with variadic functions by [@​maciejpirog](https://github.com/maciejpirog) in [#​538](opengrep/opengrep#538) - C#: The `field` implicit parameter can be skipped in a pattern by [@​maciejpirog](https://github.com/maciejpirog) in [#​525](opengrep/opengrep#525) - C#: Add conditional array access (`?[...]`) to l-values by [@​maciejpirog](https://github.com/maciejpirog) in [#​535](opengrep/opengrep#535) - C#: Collection expressions vs attributes with targets (parser fix) by [@​maciejpirog](https://github.com/maciejpirog) in [#​539](opengrep/opengrep#539) - Add `noopengrep` to the default nosem patterns by [@​dimitris-m](https://github.com/dimitris-m) in [#​533](opengrep/opengrep#533) **Full Changelog**: <opengrep/opengrep@v1.14.1...v1.15.0> </details> --- ### Configuration 📅 **Schedule**: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined). 🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied. ♻ **Rebasing**: Whenever MR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this MR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this MR, check this box --- This MR has been generated by [Renovate Bot](https://github.com/renovatebot/renovate). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0Mi44MS4yIiwidXBkYXRlZEluVmVyIjoiNDIuODIuMyIsInRhcmdldEJyYW5jaCI6Im1haW4iLCJsYWJlbHMiOlsiUmVub3ZhdGUgQm90IiwiYXV0b21hdGlvbjpib3QtYXV0aG9yZWQiLCJkZXBlbmRlbmN5LXR5cGU6Om1pbm9yIl19-->
This file contains hidden or 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
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.
We add tainting via "rest" params, as in:
This is done by adding a new kind of param (
ParamRestin IL andPRestin function tainting signature) that corresponds toParamRestin AST.NOTE: In tainting signature db, the arity of a variadic function is still counted as if the "rest" param was a single param, so there might be problems when a variadic function is only one of possible overloads. But fixing that will be part of subsequent effort to upgrade naming and overloading resolution.