aws-ia / taskcat
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
dockerignore
cfg
in
  • 16 extensions are included in analyses: py, yml, yaml, sh, txt, md, json, jinja, dockerignore, html, css, cfg, svg, in, gitignore, toml
  • 6 criteria are used to exclude files from analysis:
    • exclude files with path like ".*/[.][a-zA-Z0-9_]+.*" (Hidden files and folders) (30 files).
    • exclude files with path like ".*/docs/.*" (Documentation) (13 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) (11 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.

main6519 LOC (32%) 64 files
test6050 LOC (29%) 85 files
generated0 LOC (0%) 0 files
build and deployment63 LOC (<1%) 2 files
other7605 LOC (37%) 12 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
cfg
in
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 64 files match defined criteria (6,519 lines of code, 100.0% vs. main code):
    • 51 *.py files (5,756 lines of code)
    • 8 *.jinja files (342 lines of code)
    • 1 *.css files (188 lines of code)
    • 1 *.yml files (161 lines of code)
    • 1 *.cfg files (38 lines of code)
    • 1 *.toml files (30 lines of code)
    • 1 *.in files (4 lines of code)
  • " *.py" is biggest, containing 88.3% of code.
  • " *.in" is smallest, containing 0.06% of code.


*.py5756 LOC (88%) 51 files
*.jinja342 LOC (5%) 8 files
*.css188 LOC (2%) 1 files
*.yml161 LOC (2%) 1 files
*.cfg38 LOC (<1%) 1 files
*.toml30 LOC (<1%) 1 files
*.in4 LOC (<1%) 1 files
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
    • files with paths like ".*_test[.].*".
    • files with paths like ".*/e2e/.*".
    • files with paths like ".*_tests[.].*".
    • files with any line of content like ".*/simpletest/.*".
  • 85 files match defined criteria (6,050 lines of code, 92.8% vs. main code):
    • 36 *.py files (4,589 lines of code)
    • 22 *.yaml files (688 lines of code)
    • 16 *.yml files (490 lines of code)
    • 11 *.sh files (283 lines of code)
  • " *.py" is biggest, containing 75.85% of code.
  • " *.sh" is smallest, containing 4.68% of code.


*.py4589 LOC (75%) 36 files
*.yaml688 LOC (11%) 22 files
*.yml490 LOC (8%) 16 files
*.sh283 LOC (4%) 11 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
  • 2 files match defined criteria (63 lines of code, 1.0% vs. main code). All matches are in *.sh files.


*.sh63 LOC (100%) 2 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*/[Ee]xamples/.*".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*/[.]dockerignore".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
  • 12 files match defined criteria (7,605 lines of code, 116.7% vs. main code):
    • 10 *.json files (7,579 lines of code)
    • 1 *.md files (25 lines of code)
    • 1 *.sh files (1 lines of code)
  • " *.json" is biggest, containing 99.66% of code.
  • " *.sh" is smallest, containing 0.01% of code.


*.json7579 LOC (99%) 10 files
*.md25 LOC (<1%) 1 files
*.sh1 LOC (<1%) 1 files
Analyzers
Info about analyzers used for source code examinations.
  • *.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
  • *.jinja files are analyzed with HtmlAnalyzer:
    • 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
  • *.css files are analyzed with CssAnalyzer:
    • 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
  • *.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
  • *.cfg files are analyzed with CfgAnalyzer:
    • 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
  • *.toml 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
  • *.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


2022-01-31 23:12