AB#536564: update picard dependencies and fix query builder adding (1=1) - #118
Merged
Adam Cofer (acofer) merged 2 commits intoJul 14, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates Go dependencies (notably Masterminds/squirrel) and adjusts Picard’s filter/query construction to avoid generating unintended tautological SQL like (1=1) when no-op filters are applied.
Changes:
- Updated
squirreland other Go module dependencies (viago.mod/go.sum). - Changed filter
Applyimplementations and query assembly to return/propagatenilfor no-op filters and skip adding empty groups. - Updated local dev tooling (
Makefile,.gitignore) to reflect current workflows and outputs.
Reviewed changes
Copilot reviewed 6 out of 8 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tags/tags.go | Returns nil for no-op filters/groups to avoid generating (1=1) conditions with updated squirrel. |
| tags/tags_test.go | Updates tests to assert nil for no-op NullFilter behavior. |
| queryparts/table.go | Skips appending nil where-groups to the table’s WHERE list. |
| query/build.go | Stores whereGroup result explicitly before adding it to the table. |
| Makefile | Adjusts test targets and adds an update target for dependency refresh. |
| go.mod | Updates Go version directive and bumps dependencies (including squirrel). |
| go.sum | Updates dependency checksums corresponding to module upgrades. |
| .gitignore | Ignores the built picard binary. |
Comments suppressed due to low confidence (1)
tags/tags.go:252
- FieldFilter.Apply does not guard against an unknown FieldName. TableMetadata.GetField returns the zero FieldMetadata when the key is missing (columnName == ""), so this currently builds an aliased expression like "t0." and produces invalid SQL instead of behaving as a no-op (consistent with NullFilter.Apply’s handling of missing columns).
fieldMetadata := metadata.GetField(ff.FieldName)
columnName := fieldMetadata.GetColumnName()
expr := fmt.Sprintf(qp.AliasedField, table.Alias, columnName)
switch ff.FilterOperator {
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Nathan Dullea (njdullea)
approved these changes
Jul 14, 2026
Nathan Dullea (njdullea)
left a comment
Contributor
There was a problem hiding this comment.
Update dependency and fixes nil where group
Adam Cofer (acofer)
deleted the
AB#536564-veracode_remediation_dependency_updates
branch
July 14, 2026 20:46
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.
Issue Link
https://dev.azure.com/nintex/Nintex/_workitems/edit/536564
High-Level Description
Updating dependencies and adjusting
squirrelusage because it now evaluatessquirrel.Eq{}as(1=1).Changelog: