Hard-coded sensitive data
Description
This defect occurs when data that is potentially sensitive is directly exposed in the code, for instance, as string literals. The checker identifies certain data as sensitive from their use in certain functions such as password encryption functions.
Following data can be potentially sensitive.
Type of Data | Functions That Indicate Sensitive Nature of Information |
---|---|
Host name |
|
Password |
|
Database |
|
User name |
|
Salt | crypt , crypt_r (2nd argument) |
Cryptography keys and initialization vectors | OpenSSL:
|
Seed |
|
Risk
Information that is hardcoded can be queried from binaries generated from the code.
Fix
Avoid hard coding sensitive information.
Examples
Result Information
Group: Security |
Language: C | C++ |
Default: Off |
Command-Line Syntax:
HARD_CODED_SENSITIVE_DATA |
Impact: Medium |
Version History
Introduced in R2020a
See Also
Topics
- Interpret Bug Finder Results in Polyspace Desktop User Interface
- Interpret Bug Finder Results in Polyspace Access Web Interface (Polyspace Access)
- Address Results in Polyspace User Interface Through Bug Fixes or Justifications
- Address Results in Polyspace Access Through Bug Fixes or Justifications (Polyspace Access)