azure / Azure-Sentinel-Notebooks
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
pkl
txt
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.

main78200 LOC (97%) 127 files
test804 LOC (<1%) 4 files
generated0 LOC (0%) 0 files
build and deployment52 LOC (<1%) 2 files
other1438 LOC (1%) 25 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
pkl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 127 files match defined criteria (78,200 LOC, 100.0% vs. main code):
    • 75 *.ipynb files (71,455 LOC)
    • 17 *.pkl files (5,351 LOC)
    • 29 *.py files (1,103 LOC)
    • 5 *.yaml files (279 LOC)
    • 1 *.ps1 files (12 LOC)
  • " *.ipynb" is biggest, containing 91.37% of LOC.
  • " *.ps1" is smallest, containing 0.02% of LOC.


*.ipynb71455 LOC (91%) 75 files
*.pkl5351 LOC (6%) 17 files
*.py1103 LOC (1%) 29 files
*.yaml279 LOC (<1%) 5 files
*.ps112 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
pkl
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/test_.*".
    • files with paths like ".*/[Tt]est/.*".
    • files with paths like ".*_test[.].*".
  • 4 files match defined criteria (804 LOC, 1.0% vs. main code):
    • 2 *.pkl files (280 LOC)
    • 1 *.ipynb files (273 LOC)
    • 1 *.py files (251 LOC)
  • " *.pkl" is biggest, containing 34.83% of LOC.
  • " *.py" is smallest, containing 31.22% of LOC.


*.pkl280 LOC (34%) 2 files
*.ipynb273 LOC (33%) 1 file
*.py251 LOC (31%) 1 file
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 (52 LOC, 0.1% vs. main code). All matches are in *.sh files.


*.sh52 LOC (100%) 2 files
Other Code
txt
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]json".
    • files with paths like ".*[.]md".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.](rst|rest|resttxt|rsttxt)".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/LICENSE[.][a-z0-9]+".
    • files with paths like ".*/[.]gitignore".
  • 25 files match defined criteria (1,438 LOC, 1.8% vs. main code):
    • 13 *.md files (642 LOC)
    • 5 *.json files (603 LOC)
    • 6 *.txt files (181 LOC)
    • 1 *.rst files (12 LOC)
  • " *.md" is biggest, containing 44.65% of LOC.
  • " *.rst" is smallest, containing 0.83% of LOC.


*.md642 LOC (44%) 13 files
*.json603 LOC (41%) 5 files
*.txt181 LOC (12%) 6 files
*.rst12 LOC (<1%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-06 21:53