SV-235195r638812_rule
V-235195
SRG-APP-000447-DB-000393
MYS8-00-012500
CAT II
10
Configure the MySQL Server to behave in a predictable and documented manner that reflects organizational and system objectives when invalid inputs are received.
To validate data at the database table level modify tables by adding constraints CHECK constraint is a type of integrity constraint in SQL within the create or alter table statement.
[CONSTRAINT [symbol]] CHECK (expr) [[NOT] ENFORCED]
For example
CREATE TABLE checker (i tinyint, CONSTRAINT i_must_be_between_7_and_12 CHECK (i BETWEEN 7 AND 12 ) );
Adding a constraint to an existing table
ALTER TABLE <table_name>
ADD [CONSTRAINT [symbol]] CHECK (condition) [[NOT] ENFORCED]
Review the MySQL Server to ensure it behaves in a predictable and documented manner that reflects organizational and system objectives when invalid inputs are received.
To determine if table check constraints that have been put in place:
SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS;
If input validation is required beyond those enforced by the datatype and no constraints exist for data input, this is a finding.
V-235195
False
MYS8-00-012500
Review the MySQL Server to ensure it behaves in a predictable and documented manner that reflects organizational and system objectives when invalid inputs are received.
To determine if table check constraints that have been put in place:
SELECT * FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS;
If input validation is required beyond those enforced by the datatype and no constraints exist for data input, this is a finding.
M
5277