guardian / securedrop-client
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
mo
po
desktop
txt
asc
in
ini
pyi
mako
cfg
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.

main13394 LOC (34%) 167 files
test16324 LOC (41%) 106 files
generated0 LOC (0%) 0 files
build and deployment300 LOC (<1%) 12 files
other9085 LOC (23%) 75 files
Main Code
All manually created or maintained source code that defines logic of the product that is run in a production environment.
mo
in
desktop
mako
pyi
cfg
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*".
  • 167 files match defined criteria (13,394 LOC, 100.0% vs. main code):
    • 96 *.py files (10,636 LOC)
    • 21 *.css files (956 LOC)
    • 21 *.mo files (784 LOC)
    • 12 *.toml files (716 LOC)
    • 4 *.rs files (185 LOC)
    • 4 *.in files (43 LOC)
    • 4 *.desktop files (25 LOC)
    • 1 *.mako files (17 LOC)
    • 1 *.jinja files (16 LOC)
    • 1 *.xml files (7 LOC)
    • 1 *.pyi files (6 LOC)
    • 1 *.cfg files (3 LOC)
  • " *.py" is biggest, containing 79.41% of LOC.
  • " *.cfg" is smallest, containing 0.02% of LOC.


*.py10636 LOC (79%) 96 files
*.css956 LOC (7%) 21 files
*.mo784 LOC (5%) 21 files
*.toml716 LOC (5%) 12 files
*.rs185 LOC (1%) 4 files
*.in43 LOC (<1%) 4 files
*.desktop25 LOC (<1%) 4 files
*.mako17 LOC (<1%) 1 file
*.jinja16 LOC (<1%) 1 file
*.xml7 LOC (<1%) 1 file
*.pyi6 LOC (<1%) 1 file
*.cfg3 LOC (<1%) 1 file
Test Code
Used only for testing of the product. Normally not deployed in a production environment.
desktop
asc
Explore:   circles  |  sunburst
  • The following criteria are used to filter files:
    • files with paths like ".*/[Tt]ests/.*".
    • files with paths like ".*/test_.*".
  • 106 files match defined criteria (16,324 LOC, 121.9% vs. main code):
    • 96 *.py files (15,575 LOC)
    • 5 *.desktop files (477 LOC)
    • 5 *.asc files (272 LOC)
  • " *.py" is biggest, containing 95.41% of LOC.
  • " *.asc" is smallest, containing 1.67% of LOC.


*.py15575 LOC (95%) 96 files
*.desktop477 LOC (2%) 5 files
*.asc272 LOC (1%) 5 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".
  • 12 files match defined criteria (300 LOC, 2.2% vs. main code). All matches are in *.sh files.


*.sh300 LOC (100%) 12 files
Other Code
po
txt
ini
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 ".*/README[.][a-z0-9]+".
    • files with paths like ".*[.]txt".
    • files with paths like ".*[.]po".
    • files with paths like ".*[.]svg".
    • files with paths like ".*[.]ini".
    • files with paths like ".*[.]json".
  • 75 files match defined criteria (9,085 LOC, 67.8% vs. main code):
    • 21 *.po files (6,629 LOC)
    • 14 *.md files (1,470 LOC)
    • 30 *.svg files (693 LOC)
    • 5 *.txt files (162 LOC)
    • 3 *.ini files (116 LOC)
    • 2 *.json files (15 LOC)
  • " *.po" is biggest, containing 72.97% of LOC.
  • " *.json" is smallest, containing 0.17% of LOC.


*.po6629 LOC (72%) 21 files
*.md1470 LOC (16%) 14 files
*.svg693 LOC (7%) 30 files
*.txt162 LOC (1%) 5 files
*.ini116 LOC (1%) 3 files
*.json15 LOC (<1%) 2 files
Analyzers
Info about analyzers used for source code examinations.


2025-05-09 20:55