Feature 89/filtering by fields #95
No reviewers
Labels
No labels
bug
ci
documentation
duplicate
enhancement
feature
good first issue
help wanted
invalid
performance
priority
P0
priority
P1
priority
P2
question
refactor
size
L
size
M
size
S
size
XL
size
XS
tests
trivial
wontfix
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
noe.trevino/paso!95
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feature-89/filtering-by-fields"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Checklist
CONTRIBUTING.mdgo test ./... -race) locallygofmt -w .andgolangci-lint run ./...respectivelyREADME.mdif applicableSummary
Filterable options
Closes #89
Closes #49
Closes #90
Closes #91
Closes #92
Closes #93
Closes #94
Security: Potential SQL injection via label IDs
The
buildLabelIdsCsvfunction constructs a CSV string from user-provided label IDs usingfmt.Sprintf("%d", id)without validation. While the current implementation expects integers, the SQL queries use this string in aposition()orinstr()call with string concatenation.If a caller passes non-integer values or manipulates the
LabelIDsslice, this could potentially be exploited. Although the current code path appears safe (IDs come from the database), this pattern is fragile.Recommendation:
Add validation to ensure all label IDs are positive integers before constructing the CSV, or use a safer approach like parameterized array queries if the database supports them.
Review Summary
Found 1 security concern related to the label ID CSV construction in the filter query.
Issues Found:
buildLabelIdsCsv(service.go:789-801) - The function constructs a CSV string from label IDs without validation, creating a potential SQL injection risk if non-integer values are passed.Code Quality Assessment:
FilteredTaskSummarytoWithFiltersTaskSummary)Score: 8/10
The implementation is solid overall with good architectural decisions. The unified filter query design is clean and the UI integration is well-structured. The one security concern should be addressed to ensure robust input validation.
False positive. label ids are an array of integers. program would panic before this would happen.