aws / aws-encryption-sdk-c
Source Code Overview

Analysis scope, overview of main, test, generated, deployment, build, and other code.

Source Code Analysis Scope
Files includes and excluded from analyses
txt
cmake
pt
in
clang-format
gitmodules
  • 21 extensions are included in analyses: c, txt, h, md, cpp, sh, yml, cmake, ps1, pt, in, gitignore, Dockerfile, rst, bat, json, py, inc, yaml, clang-format, gitmodules
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/bin/.*" (Binaries for distribution) (12 files).
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (10 files).
    • exclude files with path like ".*/git[-]history[.]txt" (Git history) (1 file).
    • exclude files with path like ".*/git[-][a-zA-Z0-9_]+[.]txt" (Git data exports for sokrates analyses) (0 files).
    • exclude files with path like ".*[.]txt" (Text files) (116 files).
    • exclude files with path like ".*/sokrates_conventions[.]json" (Sokrates scoping conventions) (1 file).
Overview of Analyzed Files
Basic stats on analyzed files
Intro
For analysis purposes we separate files in scope into several categories: main, test, generated, deployment and build, and other.

  • The main category contains all manually created source code files that are being used in the production.
  • Files in the main category are used as input for other analyses: logical decomposition, concerns, duplication, file size, unit size, and conditional complexity.
  • Test source code files are used only for testing of the product. These files are normally not deployed to production.
  • Build and deployment source code files are used to configure or support build and deployment process.
  • Generated source code files are automatically generated files that have not been manually changed after generation.
  • While a source code folder may contain a number of files, we are primarily interested in the source code files that are being written and maintained by developers.
  • Files containing binaries, documentation, or third-party libraries, for instance, are excluded from analysis. The exception are third-party libraries that have been changed by developers.

main16619 LOC (49%) 257 files
test14604 LOC (43%) 62 files
generated0 LOC (0%) 0 files
build and deployment94 LOC (<1%) 3 files
other1957 LOC (5%) 36 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
in
cmake
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 257 files match defined criteria (16,619 lines of code, 100.0% vs. main code):
    • 163 *.c files (10,917 lines of code)
    • 63 *.h files (2,155 lines of code)
    • 3 *.in files (1,779 lines of code)
    • 4 *.cpp files (1,160 lines of code)
    • 8 *.cmake files (349 lines of code)
    • 3 *.dockerfile files (142 lines of code)
    • 7 *.yml files (54 lines of code)
    • 1 *.py files (31 lines of code)
    • 4 *.ps1 files (25 lines of code)
    • 1 *.yaml files (7 lines of code)
  • " *.c" is biggest, containing 65.69% of code.
  • " *.yaml" is smallest, containing 0.04% of code.


*.c10917 LOC (65%) 163 files
*.h2155 LOC (12%) 63 files
*.in1779 LOC (10%) 3 files
*.cpp1160 LOC (6%) 4 files
*.cmake349 LOC (2%) 8 files
*.dockerfile142 LOC (<1%) 3 files
*.yml54 LOC (<1%) 7 files
*.py31 LOC (<1%) 1 files
*.ps125 LOC (<1%) 4 files
*.yaml7 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
pt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with any line of content like ".*/simpletest/.*".
  • 62 files match defined criteria (14,604 lines of code, 87.9% vs. main code):
    • 32 *.c files (8,898 lines of code)
    • 10 *.cpp files (3,877 lines of code)
    • 1 *.inc files (1,207 lines of code)
    • 15 *.h files (614 lines of code)
    • 1 *.yml files (5 lines of code)
    • 3 *.pt files (3 lines of code)
  • " *.c" is biggest, containing 60.93% of code.
  • " *.pt" is smallest, containing 0.02% of code.


*.c8898 LOC (60%) 32 files
*.cpp3877 LOC (26%) 10 files
*.inc1207 LOC (8%) 1 files
*.h614 LOC (4%) 15 files
*.yml5 LOC (<1%) 1 files
*.pt3 LOC (<1%) 3 files
Build and Deployment Code
Source code used to configure or support build and deployment process.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]sh".
    • files with paths like ".*[.]bat".
    • files with paths like ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitmodules".
    • files with paths like ".*/[.]gitignore".
  • 3 files match defined criteria (94 lines of code, 0.6% vs. main code):
    • 2 *.sh files (61 lines of code)
    • 1 *.bat files (33 lines of code)
  • " *.sh" is biggest, containing 64.89% of code.
  • " *.bat" is smallest, containing 35.11% of code.


*.sh61 LOC (64%) 2 files
*.bat33 LOC (35%) 1 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]json".
  • 36 files match defined criteria (1,957 lines of code, 11.8% vs. main code):
    • 8 *.cpp files (1,166 lines of code)
    • 21 *.md files (483 lines of code)
    • 2 *.c files (191 lines of code)
    • 2 *.rst files (55 lines of code)
    • 2 *.sh files (48 lines of code)
    • 1 *.bat files (14 lines of code)
  • " *.cpp" is biggest, containing 59.58% of code.
  • " *.bat" is smallest, containing 0.72% of code.


*.cpp1166 LOC (59%) 8 files
*.md483 LOC (24%) 21 files
*.c191 LOC (9%) 2 files
*.rst55 LOC (2%) 2 files
*.sh48 LOC (2%) 2 files
*.bat14 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.c files are analyzed with CStyleAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.h files are analyzed with CppAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.in files are analyzed with RustAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • No dependency analysis
  • *.cpp files are analyzed with CppAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Advanced heuristic dependency analysis
  • *.cmake files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.dockerfile files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.yml files are analyzed with YamlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.py files are analyzed with PythonAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • Unit size analysis
    • Conditional complexity analysis
    • Basic heuristic dependency analysis
  • *.ps1 files are analyzed with DefaultLanguageAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Basic code cleaning (empty lines removed for LOC calculations and duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis
  • *.yaml files are analyzed with YamlAnalyzer:
    • All basic standard analyses supported (source code overview, duplication, file size, concerns, findings, metrics, controls)
    • Advanced code cleaning (empty lines and comments removed for LOC calculations, additional cleaning for duplication calculations)
    • No unit size analysis
    • No conditional complexity analysis
    • No dependency analysis


2022-01-31 14:52