Skip to content

Continue enhancing SQL protections#7707

Merged
labkey-jeckels merged 9 commits into
developfrom
fb_sqlProtections
Jun 3, 2026
Merged

Continue enhancing SQL protections#7707
labkey-jeckels merged 9 commits into
developfrom
fb_sqlProtections

Conversation

@labkey-jeckels
Copy link
Copy Markdown
Contributor

@labkey-jeckels labkey-jeckels commented May 30, 2026

Rationale

Robust SQL generation is important. Code cleanup and consolidation is nice too.

Changes

  • Make previous checks mandatory instead of being gated behind experimental flag (defaulting to being enforced)
  • Introduce new set of checks behind a deprecated flag
    • Potentially malformed strings or numbers
    • Pivot values
  • Handle special characters in stored procedure names
  • Use SQLFragment instead of String for stored procedure calls
  • Misc lint cleanup

Tasks 📍

  • Claude Code Review
  • Manual Testing
  • Test Automation


@Override
public String buildProcedureCall(String procSchema, String procName, int paramCount, boolean hasReturn, boolean assignResult, DbScope procScope)
protected String doBuildProcedureCall(String qualifiedProcName, int paramCount, boolean hasReturn, boolean assignResult, DbScope procScope)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should be (String schema, String proc) OR (SQLFragment qualifiedProcName)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Switched to SQLFragment

@labkey-jeckels labkey-jeckels merged commit 602d99e into develop Jun 3, 2026
8 checks passed
@labkey-jeckels labkey-jeckels deleted the fb_sqlProtections branch June 3, 2026 22:41
labkey-jeckels added a commit to LabKey/testAutomation that referenced this pull request Jun 3, 2026
#### Rationale
Robust SQL generation is important. Code cleanup and consolidation is
nice too.

#### Related Pull Requests
- LabKey/platform#7707

#### Changes
- Stored procedure and parent schema name including special characters
- Test ETL to invoke the new stored procedure
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants