-
Notifications
You must be signed in to change notification settings - Fork 37
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
sprintf-args check false positive when format is a string variable #1104
Comments
Thanks! Hmm, yeah, that should be easy to account for, I think. I'll take a look. |
anderseknert
added a commit
that referenced
this issue
Sep 12, 2024
While I started looking into #1104 I encountered some cases where `ast.ref_to_string`, and it's `static` counterpart would return wrong representations. We already had a bit of a homegrown format, which was convenient for some things, but would also leak out in places where it shouldn't be. Now use the same format as OPA for representing refs as strings. Also added the query in error messages where we fail to prepare or eval in a couple of places, as the lack of those made debugging this issue much harder than it had to be. Signed-off-by: Anders Eknert <anders@styra.com>
anderseknert
added a commit
that referenced
this issue
Sep 12, 2024
While I started looking into #1104 I encountered some cases where `ast.ref_to_string`, and it's `static` counterpart would return wrong representations. We already had a bit of a homegrown format, which was convenient for some things, but would also leak out in places where it shouldn't be. Now use the same format as OPA for representing refs as strings. Also added the query in error messages where we fail to prepare or eval in a couple of places, as the lack of those made debugging this issue much harder than it had to be. Signed-off-by: Anders Eknert <anders@styra.com>
anderseknert
added a commit
that referenced
this issue
Sep 12, 2024
While I started looking into #1104 I encountered some cases where `ast.ref_to_string`, and it's `static` counterpart would return wrong representations. We already had a bit of a homegrown format, which was convenient for some things, but would also leak out in places where it shouldn't be. Now use the same format as OPA for representing refs as strings. Also added the query in error messages where we fail to prepare or eval in a couple of places, as the lack of those made debugging this issue much harder than it had to be. Signed-off-by: Anders Eknert <anders@styra.com>
anderseknert
added a commit
that referenced
this issue
Sep 12, 2024
While this rule likely never will catch all violations, as some are just too expensive to find for something very unlikely — it should never report false positives. Fixes #1104 Signed-off-by: Anders Eknert <anders@styra.com>
srenatus
pushed a commit
to srenatus/regal
that referenced
this issue
Oct 1, 2024
While I started looking into StyraInc#1104 I encountered some cases where `ast.ref_to_string`, and it's `static` counterpart would return wrong representations. We already had a bit of a homegrown format, which was convenient for some things, but would also leak out in places where it shouldn't be. Now use the same format as OPA for representing refs as strings. Also added the query in error messages where we fail to prepare or eval in a couple of places, as the lack of those made debugging this issue much harder than it had to be. Signed-off-by: Anders Eknert <anders@styra.com>
srenatus
pushed a commit
to srenatus/regal
that referenced
this issue
Oct 1, 2024
…at (StyraInc#1107) While this rule likely never will catch all violations, as some are just too expensive to find for something very unlikely — it should never report false positives. Fixes StyraInc#1104 Signed-off-by: Anders Eknert <anders@styra.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This shouldn't be flagged, but it is. Playground
The text was updated successfully, but these errors were encountered: