guardian / securedrop-workstation
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
asc
ui
policy
spec
desktop
in
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.

main4574 LOC (65%) 75 files
test1973 LOC (28%) 22 files
generated0 LOC (0%) 0 files
build and deployment143 LOC (2%) 7 files
other262 LOC (3%) 5 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
ui
spec
asc
policy
in
desktop
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 75 files match defined criteria (4,574 LOC, 100.0% vs. main code):
    • 33 *.py files (2,353 LOC)
    • 31 *.sls files (1,228 LOC)
    • 2 *.ui files (386 LOC)
    • 1 *.spec files (236 LOC)
    • 3 *.asc files (156 LOC)
    • 1 *.toml files (105 LOC)
    • 2 *.policy files (94 LOC)
    • 1 *.in files (9 LOC)
    • 1 *.desktop files (7 LOC)
  • " *.py" is biggest, containing 51.44% of LOC.
  • " *.desktop" is smallest, containing 0.15% of LOC.


*.py2353 LOC (51%) 33 files
*.sls1228 LOC (26%) 31 files
*.ui386 LOC (8%) 2 files
*.spec236 LOC (5%) 1 file
*.asc156 LOC (3%) 3 files
*.toml105 LOC (2%) 1 file
*.policy94 LOC (2%) 2 files
*.in9 LOC (<1%) 1 file
*.desktop7 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
asc
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[-].*".
  • 22 files match defined criteria (1,973 LOC, 43.1% vs. main code):
    • 21 *.py files (1,922 LOC)
    • 1 *.asc files (51 LOC)
  • " *.py" is biggest, containing 97.42% of LOC.
  • " *.asc" is smallest, containing 2.58% of LOC.


*.py1922 LOC (97%) 21 files
*.asc51 LOC (2%) 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 ".*[.]git[a-z]+".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]sh".
  • 7 files match defined criteria (143 LOC, 3.1% vs. main code). All matches are in *.sh files.


*.sh143 LOC (100%) 7 files
Other Code
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*[.]md".
    • files with paths like ".*/[.]gitignore".
    • files with paths like ".*[.]txt".
    • files with paths like ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]json".
  • 5 files match defined criteria (262 LOC, 5.7% vs. main code):
    • 4 *.md files (251 LOC)
    • 1 *.json files (11 LOC)
  • " *.md" is biggest, containing 95.8% of LOC.
  • " *.json" is smallest, containing 4.2% of LOC.


*.md251 LOC (95%) 4 files
*.json11 LOC (4%) 1 file
Analyzers
Info about analyzers used for source code examinations.


2025-05-09 20:55