-
Notifications
You must be signed in to change notification settings - Fork 35
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
Main B-21380 Secure SQL Query #13965
Open
brianmanley-caci
wants to merge
8
commits into
main
Choose a base branch
from
MAIN-B-21380-Secure-Sql-Query
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
+54
−3
Conversation
This file contains 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
ryan-mchugh
approved these changes
Oct 21, 2024
samaysofo
approved these changes
Oct 21, 2024
brianmanley-caci
requested review from
deandreJones,
brooklyn-welsh,
loganwc,
elizabeth-perkins,
samaysofo,
msaki-caci,
ryan-mchugh and
stevengleason-caci
October 21, 2024 18:02
brianmanley-caci
unassigned deandreJones, brooklyn-welsh, loganwc, brianmanley-caci and elizabeth-perkins
Oct 21, 2024
brianmanley-caci
assigned brianmanley-caci and unassigned samaysofo, msaki-caci, ryan-mchugh and stevengleason-caci
Oct 21, 2024
ryan-mchugh
approved these changes
Oct 21, 2024
samaysofo
approved these changes
Oct 21, 2024
msaki-caci
approved these changes
Oct 22, 2024
@deandreJones I believe this one can be merged. |
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.
[Agility ticket]
(https://www13.v1host.com/USTRANSCOM38/story.mvc/Summary?oidToken=Story%3A1014751)
##[INTEGRATION PR]
(#13864)
Summary
The purpose of this story is to ensure that this query is not vulnerable to SQL Injection. Ideally I would be able to use a parameterized query here, but that does not seem to be possible with this type of Set statement. The next best option was to validate that the input does not contain anything malicious by running it through a regex matcher. I added a regex matcher that will validate that the input contains only a valid uuid. If it does not an error is returned, otherwise it uses the audit user ID as before.
Is there anything you would like reviewers to give additional scrutiny?
[this article]
(https://www.uuidtools.com/what-is-uuid) I stole the regex from here, but also added the started and end characters
Verification Steps for the Author
These are to be checked by the author.
Verification Steps for Reviewers
These are to be checked by a reviewer.
Setup to Run the Code
How to test
Since this code gets hit by a ton of different handlers, you only need to do some action that causes some handler to execute.
Frontend
officeApp
class or custommin-width
styling is used to hide any states the would not be visible to the user.Backend
Database
Any new migrations/schema changes:
Screenshots