You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Objective: To create a detailed and reliable record of critical system actions for security analysis and compliance.
Status: No audit impact: The changes are limited to CMake linking and library types with no application runtime logic added, so audit trail compliance cannot be assessed from this diff.
Referred Code
# Link ApplicationLibCode, cafCommandFeatures, Commands, and GrpcInterface with WHOLE_ARCHIVE
# to ensure static initialization is not optimized away by the linker
target_link_libraries(ResInsight PRIVATE
$<LINK_LIBRARY:WHOLE_ARCHIVE,ApplicationLibCode>
$<LINK_LIBRARY:WHOLE_ARCHIVE,cafCommandFeatures>
$<LINK_LIBRARY:WHOLE_ARCHIVE,Commands>
$<$<BOOL:${RESINSIGHT_ENABLE_GRPC}>:$<LINK_LIBRARY:WHOLE_ARCHIVE,GrpcInterface>>
)
Generic: Robust Error Handling and Edge Case Management
Objective: Ensure comprehensive error handling that provides meaningful context and graceful degradation
Status: No error paths: Only build system changes are introduced (STATIC libraries and WHOLE_ARCHIVE); no runtime error handling or edge-case logic is present to validate this criterion.
Referred Code
# Link ApplicationLibCode, cafCommandFeatures, Commands, and GrpcInterface with WHOLE_ARCHIVE
# to ensure static initialization is not optimized away by the linker
target_link_libraries(ResInsight-tests PUBLIC
$<LINK_LIBRARY:WHOLE_ARCHIVE,ApplicationLibCode>
$<LINK_LIBRARY:WHOLE_ARCHIVE,cafCommandFeatures>
$<LINK_LIBRARY:WHOLE_ARCHIVE,Commands>
$<$<BOOL:${RESINSIGHT_ENABLE_GRPC}>:$<LINK_LIBRARY:WHOLE_ARCHIVE,GrpcInterface>>
)
Objective: To prevent the leakage of sensitive system information through error messages while providing sufficient detail for internal debugging.
Status: Not applicable here: The diff only modifies CMake linking flags and targets, so no user-facing error messaging is introduced to verify secure handling.
Objective: To ensure logs are useful for debugging and auditing without exposing sensitive information like PII, PHI, or cardholder data.
Status: No logging changes: There are no additions to application logging in this PR diff; secure logging practices cannot be evaluated based on these build changes.
Referred Code
# Link ApplicationLibCode, cafCommandFeatures, Commands, and GrpcInterface with WHOLE_ARCHIVE
# to ensure static initialization is not optimized away by the linker
target_link_libraries(ResInsight PRIVATE
$<LINK_LIBRARY:WHOLE_ARCHIVE,ApplicationLibCode>
$<LINK_LIBRARY:WHOLE_ARCHIVE,cafCommandFeatures>
$<LINK_LIBRARY:WHOLE_ARCHIVE,Commands>
$<$<BOOL:${RESINSIGHT_ENABLE_GRPC}>:$<LINK_LIBRARY:WHOLE_ARCHIVE,GrpcInterface>>
)
Generic: Security-First Input Validation and Data Handling
Objective: Ensure all data inputs are validated, sanitized, and handled securely to prevent vulnerabilities
Status: Build-only changes: Switching to STATIC libraries and WHOLE_ARCHIVE affects linking but does not expose input validation or data handling logic to assess security posture.
This file contains hidden or 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
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.
PR Type
Enhancement
Description
Convert OBJECT libraries to STATIC libraries across multiple CMake files
Add WHOLE_ARCHIVE linker flags to preserve static initialization
Improve debug information in Visual Studio builds
Update documentation comments to reflect new linking strategy
Diagram Walkthrough
File Walkthrough
CMakeLists.txt
Convert ApplicationLibCode to STATIC with WHOLE_ARCHIVEApplicationLibCode/CMakeLists.txt
ApplicationLibCodelibrary from OBJECT to STATICcafCommandFeatures, Commands, and GrpcInterface
CMakeLists.txt
Convert Commands library to STATICApplicationLibCode/Commands/CMakeLists.txt
Commandslibrary from OBJECT to STATICCMakeLists.txt
Convert cafCommandFeatures to STATIC libraryFwk/AppFwk/cafCommandFeatures/CMakeLists.txt
cafCommandFeatureslibrary from OBJECT to STATICCMakeLists.txt
Replace TARGET_OBJECTS with WHOLE_ARCHIVE linkingFwk/AppFwk/cafTests/cafTestApplication/CMakeLists.txt
CMakeLists.txt
Convert GrpcInterface to STATIC libraryGrpcInterface/CMakeLists.txt
GrpcInterfacelibrary from OBJECT to STATICCMakeLists.txt
Add WHOLE_ARCHIVE flags to unit testsApplicationLibCode/UnitTests/CMakeLists.txt
GrpcInterface with WHOLE_ARCHIVE